/* Phase 12-2 — Official Landing (SaaS: Apple / Stripe / Notion style) */

:root {
  --sb-blue: #2563eb;
  --sb-blue-deep: #1d4ed8;
  --sb-sky: #0ea5e9;
  --sb-green: #10b981;
  --sb-orange: #f97316;
  --sb-ink: #0f172a;
  --sb-muted: #64748b;
  --sb-line: #e2e8f0;
  --sb-soft: #f0f7ff;
  --sb-surface: #ffffff;
  --sb-radius: 16px;
  --sb-header-h: 72px;
  --sb-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --sb-shadow-hover: 0 14px 32px rgba(15, 23, 42, 0.1);
  --sb-font: "Segoe UI", "Noto Sans TC", "Noto Sans", system-ui, sans-serif;
  --sb-container: 1280px;
  --sb-section-y: 120px;
  --sb-gap: 32px;
  /* Dark mode tokens (reserved) */
  --sb-dm-bg: #0b1220;
  --sb-dm-ink: #e2e8f0;
  --sb-dm-soft: #111827;
}

body.sb-site {
  font-size: 18px;
  line-height: 1.6;
  color: var(--sb-ink);
  background: var(--sb-surface);
  overflow-x: hidden;
}

.sb-wrap {
  width: min(var(--sb-container), calc(100% - 2rem));
  margin: 0 auto;
}

.sb-header__inner {
  width: min(var(--sb-container), calc(100% - 2rem));
}

.sb-h1 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(2.25rem, 4.5vw, 3.5rem); /* ~36–56px */
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #0f172a;
}

.sb-h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem); /* ~28–40px */
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.sb-h3 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.sb-lead {
  margin: 0;
  max-width: 40rem;
  font-size: 1.125rem; /* 18px */
  line-height: 1.6;
  color: var(--sb-muted);
}

.sb-kicker {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sb-blue);
}

.sb-section {
  padding: var(--sb-section-y) 0;
}

.sb-section--soft {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.sb-section--ink {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #f8fafc;
}
.sb-section--ink .sb-h2,
.sb-section--ink .sb-lead {
  color: #f8fafc;
}
.sb-section--ink .sb-lead {
  opacity: 0.85;
}

.sb-section__head {
  margin-bottom: 3rem;
  max-width: 40rem;
}

/* —— Buttons —— */
.sb-btn {
  min-height: 44px;
  border-radius: 14px;
  font-weight: 700;
}
.sb-btn--lg {
  min-height: 48px;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}
.sb-btn--xl {
  min-height: 54px;
  padding: 0.85rem 2rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  border-radius: 16px;
}
.sb-btn__label {
  font-size: 1.05rem;
  line-height: 1.2;
}
.sb-btn__sub {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.9;
}
.sb-btn--primary {
  background: linear-gradient(135deg, var(--sb-blue), var(--sb-sky));
  color: #fff !important;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}
.sb-btn--primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
.sb-btn--on-ink {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff !important;
}
.sb-btn--on-ink:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
}

.sb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}
.sb-actions--center {
  justify-content: center;
}
.sb-actions--hero {
  margin-top: 1.75rem;
}

/* —— Hero —— */
.sb-hero--v2 {
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(1000px 480px at 85% 0%, rgba(37, 99, 235, 0.1), transparent 60%),
    radial-gradient(700px 400px at 10% 20%, rgba(14, 165, 233, 0.08), transparent 55%),
    #fff;
}
.sb-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.sb-hero__note {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--sb-muted);
}

.sb-product-carousel {
  position: relative;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--sb-line);
  box-shadow: var(--sb-shadow);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.sb-product-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
  padding: 0.75rem 0.75rem 2.5rem;
  display: flex;
  flex-direction: column;
}
.sb-product-carousel__slide.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 1;
}
.sb-product-carousel__caption {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--sb-muted);
}
.sb-product-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.65rem;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  z-index: 2;
}
.sb-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: #cbd5e1;
  cursor: pointer;
  min-height: 8px;
}
.sb-dot.is-active {
  width: 22px;
  background: var(--sb-blue);
}

.sb-shot {
  margin: 0;
  width: 100%;
}
.sb-shot svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* —— Timeline —— */
.sb-timeline {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--sb-gap);
  position: relative;
}
.sb-timeline::before {
  content: "";
  position: absolute;
  top: 2.1rem;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sb-line), transparent);
  z-index: 0;
}
.sb-timeline__item {
  position: relative;
  z-index: 1;
}
.sb-timeline__card {
  background: #fff;
  border: 1px solid var(--sb-line);
  border-radius: 16px;
  padding: 1.35rem 1.15rem 1.15rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  height: 100%;
}
.sb-timeline__card:hover {
  box-shadow: var(--sb-shadow-hover);
  transform: translateY(-2px);
}
.sb-timeline__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sb-blue), var(--sb-sky));
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}
.sb-timeline__title {
  margin: 0 0 0.4rem;
  font-size: 1.125rem;
  font-weight: 750;
}
.sb-timeline__body {
  margin: 0;
  font-size: 1rem;
  color: var(--sb-muted);
  line-height: 1.55;
}
.sb-timeline__rule {
  margin: 1rem 0 0;
  border: 0;
  border-top: 1px solid var(--sb-line);
}

/* —— Demo flow —— */
.sb-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0.5rem;
  align-items: center;
  justify-content: flex-start;
}
.sb-flow__step {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  background: #fff;
  border: 1px solid var(--sb-line);
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.98rem;
}
.sb-flow__step:not(:last-child)::after {
  content: "↓";
  margin-left: 0.55rem;
  color: var(--sb-blue);
  font-weight: 700;
}
.sb-flow__num {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--sb-soft);
  color: var(--sb-blue);
  font-size: 0.85rem;
  font-weight: 800;
}

@media (min-width: 900px) {
  .sb-flow {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .sb-flow__step:not(:last-child)::after {
    content: "→";
  }
}

/* —— Feature rows (Stripe/Notion style) —— */
.sb-feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  margin-bottom: clamp(4rem, 8vw, 6rem);
}
.sb-feature-row.is-flip .sb-feature-row__media {
  order: 2;
}
.sb-feature-row.is-flip .sb-feature-row__copy {
  order: 1;
}
.sb-feature-row__lead {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 650;
  color: var(--sb-ink);
}
.sb-feature-row__body {
  margin: 0;
  color: var(--sb-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}
.sb-feature-row__media {
  border-radius: 20px;
  border: 1px solid var(--sb-line);
  background: #fff;
  padding: 0.75rem;
  box-shadow: var(--sb-shadow);
}

/* —— Gallery —— */
.sb-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sb-gap);
}
.sb-gallery__item {
  margin: 0;
  background: #fff;
  border: 1px solid var(--sb-line);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.sb-gallery__item:hover {
  box-shadow: var(--sb-shadow-hover);
  transform: translateY(-2px);
}
.sb-gallery__item figcaption {
  padding: 0.75rem 1rem 1rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--sb-muted);
}
.sb-shot--gallery svg {
  border-radius: 0;
}

.sb-cta-band {
  text-align: center;
}
.sb-cta-band .sb-lead {
  margin-left: auto;
  margin-right: auto;
}

/* —— Reveal: never hide content (JS may add .is-in for polish only) —— */
.sb-reveal {
  opacity: 1;
  transform: none;
}
html.sb-js .sb-reveal.is-in {
  animation: sbFadeUp 0.55s ease both;
}
@keyframes sbFadeUp {
  from {
    opacity: 0.2;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.sb-js .sb-reveal.is-in {
    animation: none;
  }
  .sb-product-carousel__slide {
    transition: none;
  }
}

/* —— Footer enrich —— */
.sb-footer {
  padding: 4rem 0 2rem;
  background: #0b1220;
  color: #cbd5e1;
}
.sb-footer a {
  color: #e2e8f0;
}
.sb-footer a:hover {
  color: #fff;
}
.sb-footer__grid {
  width: min(var(--sb-container), calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
}
.sb-footer h2 {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 750;
}
.sb-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.sb-footer__bottom {
  width: min(var(--sb-container), calc(100% - 2rem));
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #94a3b8;
}

/* —— RWD —— */
@media (max-width: 980px) {
  :root {
    --sb-section-y: 80px;
  }
  .sb-hero__grid {
    grid-template-columns: 1fr;
  }
  .sb-hero--v2 {
    padding-top: 2.5rem;
  }
  .sb-timeline {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .sb-timeline::before {
    display: none;
  }
  .sb-feature-row,
  .sb-feature-row.is-flip {
    grid-template-columns: 1fr;
  }
  .sb-feature-row.is-flip .sb-feature-row__media,
  .sb-feature-row.is-flip .sb-feature-row__copy {
    order: initial;
  }
}

@media (max-width: 640px) {
  :root {
    --sb-section-y: 64px;
  }
  .sb-actions--hero {
    flex-direction: column;
    align-items: stretch;
  }
  .sb-btn--xl {
    align-items: center;
    text-align: center;
  }
  .sb-flow__step {
    width: 100%;
    justify-content: flex-start;
  }
  .sb-flow__step:not(:last-child)::after {
    margin-left: auto;
    content: "↓";
  }
}

/* 200% zoom / narrow readable layout */
@media (max-width: 420px) {
  .sb-h1 {
    font-size: 1.85rem;
  }
  .sb-wrap {
    width: calc(100% - 1.25rem);
  }
}

/* Public social proof (gated; hidden when counts below threshold) */
.sb-section--proof {
  padding-block: 1.25rem 0.5rem;
}
.sb-proof {
  text-align: center;
  max-width: 36rem;
  margin-inline: auto;
}
.sb-proof__line {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 600;
  color: #0f2b46;
  letter-spacing: 0.01em;
}
.sb-proof__sub {
  margin: 0.4rem 0 0;
  color: #4b647c;
  font-size: 0.95rem;
}
