/*
 * InkedForm marketing — design plan (see also DESIGN.md)
 * Palette: ink #1a2830 · mute #5c6b75 · paper #f5f6f7 · surface #fff · teal #004d66 · rule #c9d2d8
 * Type: Source Serif 4 + Noto Serif TC (display) · IBM Plex Sans + Noto Sans TC (body)
 * Layout: dossier / product-truth; bold = 8px teal stamp bar on hero headline
 * Avoid: Inter, ALL-CAPS eyebrows, pill CTAs, soft-shadow card grids, cyan gradients
 */
:root {
  --ink: #1a2830;
  --ink-mute: #5c6b75;
  --paper: #f5f6f7;
  --surface: #ffffff;
  --teal: #004d66;
  --teal-deep: #003847;
  --rule: #c9d2d8;
  --focus: #004d66;
  --warn-bg: #f4efe6;
  --warn-ink: #6a5420;
  --warn-rule: #d9cba8;
  --max: 1080px;
  --nav-h: 64px;
  --font-serif: "Source Serif 4", "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
  --font-sans: "IBM Plex Sans", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.025rem;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
video { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* —— Nav —— */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.nav {
  height: var(--nav-h);
  display: flex; align-items: center; gap: 1.25rem;
}
.nav-logo img { height: 32px; width: auto; }
.nav-links {
  display: flex; gap: 1.35rem; margin-left: auto;
  list-style: none; padding: 0; margin-top: 0; margin-bottom: 0;
}
.nav-links a {
  color: var(--ink-mute); text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
}
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; gap: 0.5rem; align-items: center; }
.nav-toggle {
  display: none; border: 0; background: transparent; padding: 0.45rem; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 20px; height: 1.5px; background: var(--ink); margin: 5px 0;
}

/* —— Buttons (square-ish, not pills) —— */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 3px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.925rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}
.btn-primary {
  background: var(--teal); color: #fff; border-color: var(--teal);
}
.btn-primary:hover { background: var(--teal-deep); color: #fff; border-color: var(--teal-deep); }
.btn-secondary {
  background: transparent; color: var(--ink); border-color: var(--rule);
}
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); background: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink-mute); border-color: transparent; }
.btn-ghost:hover { color: var(--ink); }
.btn-lg { padding: 0.85rem 1.4rem; font-size: 0.975rem; }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; }

/* —— Hero (editorial, stamp bar) —— */
.hero {
  padding: 3.75rem 0 4.25rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3rem;
  align-items: start;
}
.hero-copy {
  border-left: 8px solid var(--teal);
  padding-left: 1.35rem;
}
.hero h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.8vw, 2.85rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.hero .headline-zh {
  margin: 0 0 1.35rem;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--teal);
  line-height: 1.4;
}
.hero .lede {
  margin: 0 0 1.6rem;
  font-size: 1.05rem;
  color: var(--ink-mute);
  max-width: 34rem;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 1.1rem; }
.hero-note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-mute);
  max-width: 28rem;
}

.hero-media {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--teal-deep);
  aspect-ratio: 16 / 10;
}
.hero-media video,
.hero-media img.poster {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-media .fallback-mock {
  position: absolute; inset: 0;
  background: var(--teal-deep) url("../assets/hero-poster.jpg") center / cover no-repeat;
}
.media-caption {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: var(--ink-mute);
}

/* —— Sections —— */
section { padding: 4.25rem 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: 0; }
.section-soft { background: var(--paper); }
.section-head { max-width: 38rem; margin-bottom: 2.25rem; }
.section-head.wide { max-width: 44rem; }
.section-label {
  margin: 0 0 0.55rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--teal);
}
.section-head h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
}
.section-head p { margin: 0; color: var(--ink-mute); font-size: 1.02rem; }

/* —— Pain: annotated rows, not icon cards —— */
.pain-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.pain-item {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) 1fr;
  gap: 1.25rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
}
.pain-item h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
}
.pain-item p { margin: 0; color: var(--ink-mute); font-size: 0.975rem; }

/* —— Solution —— */
.solution-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}
.solution-layout ul {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}
.solution-layout li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-mute);
  padding-left: 0;
}
.solution-layout li:last-child { border-bottom: 0; }
.solution-panel-dark {
  background: var(--teal-deep);
  color: #e8eef1;
  padding: 1.6rem 1.5rem;
}
.solution-panel-dark p {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.4;
  color: #fff;
}
.flow-line {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.flow-line div {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(255,255,255,0.18);
  font-size: 0.925rem;
}
.flow-line div:first-child { border-top: 0; }
.flow-line .n {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #a8c5d0;
}

/* —— Steps (real sequence) —— */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.step {
  padding: 1.5rem 1.25rem 1.5rem 0;
  border-right: 1px solid var(--rule);
}
.step:last-child { border-right: 0; padding-right: 0; }
.step:first-child { padding-left: 0; }
.step .step-num {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 0.65rem;
}
.step h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
}
.step p { margin: 0; color: var(--ink-mute); font-size: 0.95rem; }

/* —— Videos —— */
.video-block { margin-bottom: 2.75rem; }
.video-block:last-child { margin-bottom: 0; }
.video-block h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
}
.video-block .caption-intro {
  margin: 0 0 1rem;
  color: var(--ink-mute);
  font-size: 0.925rem;
}
.video-frame {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--teal-deep);
  aspect-ratio: 16 / 9;
}
.video-frame video {
  width: 100%; height: 100%; object-fit: cover; background: var(--teal-deep);
}
.demo-reel { position: absolute; inset: 0; }
.demo-reel img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.demo-reel img.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .demo-reel img { transition: none; }
}
.demo-chrome {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(transparent 68%, rgba(0, 24, 32, 0.78));
}
.demo-label {
  position: absolute; left: 0.85rem; top: 0.85rem; z-index: 2;
  background: rgba(0, 24, 32, 0.72); color: #fff;
  font-size: 0.72rem; font-weight: 500;
  padding: 0.3rem 0.55rem;
}
.demo-caption {
  position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.85rem;
  z-index: 2; color: #fff;
}
.demo-caption strong {
  display: block; font-size: 1rem; font-weight: 500; margin-bottom: 0.15rem;
  font-family: var(--font-serif);
}
.demo-caption span { font-size: 0.85rem; opacity: 0.88; }
.demo-dots {
  position: absolute; right: 0.85rem; bottom: 0.85rem; z-index: 3;
  display: flex; gap: 0.35rem;
}
.demo-dots button {
  width: 7px; height: 7px; border-radius: 1px; border: 0; padding: 0;
  background: rgba(255,255,255,0.35); cursor: pointer;
}
.demo-dots button.is-active { background: #fff; }
.script-list {
  margin: 1rem 0 0; padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}
.script-list li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.85rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}
.script-list time {
  color: var(--teal);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.placeholder-note {
  margin-top: 0.75rem;
  font-size: 0.825rem;
  color: var(--warn-ink);
  padding: 0.6rem 0.8rem;
  background: var(--warn-bg);
  border: 1px solid var(--warn-rule);
}

/* —— Diff —— */
.diff-wrap { overflow-x: auto; border: 1px solid var(--rule); }
.diff-table {
  width: 100%; border-collapse: collapse; background: var(--surface); min-width: 520px;
}
.diff-table th, .diff-table td {
  padding: 0.95rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  font-size: 0.95rem;
}
.diff-table th {
  background: var(--paper);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-mute);
}
.diff-table tr:last-child td { border-bottom: 0; }
.diff-table td:last-child {
  color: var(--teal);
  font-weight: 500;
  background: rgba(0, 77, 102, 0.03);
}

/* —— Trust —— */
.trust-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2rem;
}
.trust-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.trust-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-mute);
  font-size: 0.975rem;
}
.trust-aside {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--teal);
  padding: 1.35rem 1.25rem;
}
.trust-aside h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
}
.trust-aside p { margin: 0 0 0.75rem; color: var(--ink-mute); font-size: 0.925rem; }
.trust-aside p:last-child { margin-bottom: 0; }

/* —— Use cases —— */
.use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.use-item {
  padding: 1.5rem 1.25rem 1.5rem 0;
  border-right: 1px solid var(--rule);
}
.use-item:last-child { border-right: 0; padding-right: 0; }
.use-item .tag {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--teal);
  margin-bottom: 0.55rem;
}
.use-item h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
}
.use-item p { margin: 0; color: var(--ink-mute); font-size: 0.95rem; }

/* —— Pricing —— */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
}
.price-card {
  background: var(--surface);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--rule);
}
.price-card:last-child { border-right: 0; }
.price-card.featured {
  background: var(--paper);
}
.price-card .plan {
  margin: 0 0 0.2rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
}
.price-card .for {
  margin: 0 0 1.1rem;
  color: var(--ink-mute);
  font-size: 0.875rem;
}
.price-card ul {
  list-style: none; margin: 0 0 1.35rem; padding: 0; flex: 1;
}
.price-card li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--rule);
}
.price-card li:last-child { border-bottom: 0; }
.price-note {
  margin-top: 1.25rem;
  text-align: left;
  color: var(--ink-mute);
  font-size: 0.875rem;
}

/* —— CTA —— */
.cta-band {
  background: var(--teal-deep);
  color: #e8eef1;
  padding: 2.75rem 2rem;
  border: 1px solid var(--teal-deep);
}
.cta-band h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  color: #fff;
  max-width: 28rem;
}
.cta-band p {
  margin: 0 0 1.35rem;
  max-width: 32rem;
  opacity: 0.88;
  font-size: 1rem;
}
.cta-band .btn-primary {
  background: #fff; color: var(--teal); border-color: #fff;
}
.cta-band .btn-primary:hover { background: var(--paper); color: var(--teal-deep); }
.cta-band .btn-secondary {
  color: #fff; border-color: rgba(255,255,255,0.4);
}
.cta-band .btn-secondary:hover {
  background: rgba(255,255,255,0.08); color: #fff; border-color: #fff;
}
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

/* —— Footer —— */
.site-footer {
  padding: 2.75rem 0 1.75rem;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.75rem;
}
.footer-brand img { height: 28px; margin-bottom: 0.7rem; }
.footer-brand p {
  margin: 0; color: var(--ink-mute); font-size: 0.875rem; max-width: 22rem;
}
.footer-col h4 {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  font-family: var(--font-serif);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a {
  display: inline-block; padding: 0.2rem 0;
  color: var(--ink-mute); text-decoration: none; font-size: 0.9rem;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  padding-top: 1.1rem; border-top: 1px solid var(--rule);
  font-size: 0.825rem; color: var(--ink-mute);
}

/* —— Stub pages —— */
.stub { padding: 4rem 0 5rem; min-height: 55vh; }
.stub-card {
  max-width: 38rem;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--teal);
  padding: 2.25rem 1.75rem;
}
.stub-card h1 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 600;
}
.stub-card p { color: var(--ink-mute); }
.stub-badge {
  display: inline-block;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-rule);
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.9rem;
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .hero-grid,
  .solution-layout,
  .trust-grid,
  .footer-grid { grid-template-columns: 1fr; }
  .steps,
  .use-grid,
  .pricing-grid { grid-template-columns: 1fr; }
  .step,
  .use-item,
  .price-card {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 1.25rem 0;
  }
  .step:last-child,
  .use-item:last-child,
  .price-card:last-child { border-bottom: 0; }
  .pricing-grid { border-left: 0; border-right: 0; }
  .price-card { border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }
  .pain-item { grid-template-columns: 1fr; gap: 0.35rem; }
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--surface);
    padding: 1rem 1.1rem 0.5rem;
    border-bottom: 1px solid var(--rule);
    gap: 0.65rem; z-index: 40;
  }
  .nav.is-open .nav-actions {
    display: flex;
    position: absolute;
    top: calc(var(--nav-h) + 11.5rem);
    left: 0; right: 0;
    background: var(--surface);
    padding: 0 1.1rem 1.1rem;
    border-bottom: 1px solid var(--rule);
    z-index: 40; flex-wrap: wrap;
  }
  .nav.is-open .nav-actions .btn-ghost { display: inline-flex; }
  .hero { padding-top: 2.5rem; }
  .hero-copy { border-left-width: 6px; padding-left: 1rem; }
  .cta-band { padding: 2rem 1.35rem; }
}
