/* ==========================================================================
   Easy Invoice Manager — Product Page
   Design language: "the ledger" — invoices, typed and stamped.
   Dark ink sections carry the story; cream paper sections carry the product.
   ========================================================================== */

:root {
  /* ---- Palette (named) ---- */
  --ink: #0e1c16;
  --ink-2: #16281f;
  --ink-3: #1e3428;
  --paper: #f5efdf;
  --paper-2: #efe7d0;
  --paper-line: #ddd2ac;
  --ledger-green: #2f6b4f;
  --ledger-green-bright: #3f8c68;
  --brass: #b08a46;
  --brass-bright: #cba15e;
  --stamp-red: #a83a2e;
  --cream-text: #efe8d6;
  --cream-text-dim: #b9c2b6;
  --ink-text: #17251d;
  --ink-text-dim: #55604f;

  /* ---- Type ---- */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* ---- Rhythm ---- */
  --section-pad: clamp(4.5rem, 9vw, 8rem);
  --edge-pad: clamp(1.5rem, 5vw, 4rem);
  --max: 1180px;
  --radius: 3px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

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

/* ---- Type scale ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.08;
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.28rem;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.65;
}

.mono {
  font-family: var(--font-mono);
}

/* ---- Layout shells ---- */
.section {
  padding: var(--section-pad) var(--edge-pad);
  position: relative;
  overflow: hidden;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}

.section--ink {
  background: radial-gradient(120% 140% at 15% -10%, var(--ink-3) 0%, var(--ink) 55%);
  color: var(--cream-text);
}

.section--paper {
  background: var(--paper);
  color: var(--ink-text);
  background-image: repeating-linear-gradient(
    var(--paper) 0px,
    var(--paper) 31px,
    var(--paper-line) 32px
  );
}

.section--paper.no-lines {
  background-image: none;
}

/* Perforated tear divider between ink/paper sections */
.tear {
  height: 26px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.tear--to-paper {
  background: var(--paper);
  mask-image: radial-gradient(circle 7px at 16px 0, transparent 7px, black 7.5px);
  -webkit-mask-image: radial-gradient(circle 7px at 16px 0, transparent 7px, black 7.5px);
  mask-repeat: repeat-x;
  -webkit-mask-repeat: repeat-x;
  mask-size: 32px 26px;
  -webkit-mask-size: 32px 26px;
}

.tear--to-ink {
  background: var(--ink);
  mask-image: radial-gradient(circle 7px at 16px 26px, transparent 7px, black 7.5px);
  -webkit-mask-image: radial-gradient(circle 7px at 16px 26px, transparent 7px, black 7.5px);
  mask-repeat: repeat-x;
  -webkit-mask-repeat: repeat-x;
  mask-size: 32px 26px;
  -webkit-mask-size: 32px 26px;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--edge-pad);
  background: rgba(14, 28, 22, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(239, 232, 214, 0.1);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--cream-text-dim);
  border: 1px solid rgba(239, 232, 214, 0.22);
  padding: 0.5em 0.85em;
  border-radius: 999px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
  white-space: nowrap;
}

.back-btn:hover {
  color: var(--paper);
  border-color: var(--brass-bright);
  background: rgba(203, 161, 94, 0.1);
}

.back-btn svg {
  width: 14px;
  height: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55em;
  text-decoration: none;
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.nav-links {
  display: flex;
  gap: 1.9rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--cream-text-dim);
  font-size: 0.88rem;
  transition: color 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--paper);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--brass-bright);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.6em 1.05em;
  border-radius: 3px;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-cta:hover {
  background: #dcb877;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(239, 232, 214, 0.3);
  color: var(--paper);
  border-radius: 4px;
  padding: 0.4em 0.6em;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9em 1.6em;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn--primary {
  background: var(--brass-bright);
  color: var(--ink);
}

.btn--primary:hover {
  background: #e0bd7f;
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: rgba(239, 232, 214, 0.3);
  color: var(--cream-text);
}

.btn--ghost:hover {
  border-color: var(--brass-bright);
  color: var(--paper);
  transform: translateY(-2px);
}

.btn--dark {
  background: var(--ink);
  color: var(--paper);
}

.btn--dark:hover {
  background: var(--ink-3);
  transform: translateY(-2px);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.hero-eyebrow {
  color: var(--brass-bright);
  margin-bottom: 1.4rem;
}

.hero h1 {
  color: var(--paper);
}

.hero h1 em {
  font-style: normal;
  color: var(--brass-bright);
}

.hero .lede {
  margin-top: 1.4rem;
  max-width: 46ch;
  color: var(--cream-text-dim);
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 2.6rem;
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-size: 0.82rem;
  color: var(--cream-text-dim);
}

.hero-meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--ledger-green-bright);
  flex: none;
}

/* ---- Ledger card (signature element) ---- */

.hero-visual {
  position: relative;
  perspective: 1400px;
}

.ledger-card {
  background: var(--paper);
  color: var(--ink-text);
  border-radius: 6px;
  padding: 1.9rem 1.8rem 1.6rem;
  width: min(420px, 100%);
  margin-inline: auto;
  transform: rotate(2.2deg);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55), 0 8px 20px -8px rgba(0, 0, 0, 0.4);
  position: relative;
  opacity: 0;
  transform: rotate(2.2deg) translateY(18px);
  animation: card-in 0.9s var(--ease) 0.15s forwards;
}

@keyframes card-in {
  to {
    opacity: 1;
    transform: rotate(2.2deg) translateY(0);
  }
}

.ledger-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed var(--paper-line);
  border-radius: 3px;
  pointer-events: none;
}

.ledger-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--paper-line);
  padding-bottom: 0.9rem;
}

.ledger-head-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.ledger-head-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-text-dim);
  margin-top: 0.3rem;
}

.ledger-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: right;
  color: var(--ink-text-dim);
}

.ledger-num strong {
  display: block;
  color: var(--ink-text);
  font-size: 0.85rem;
}

.ledger-rows {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  font-size: 0.82rem;
  opacity: 0;
  transform: translateX(-8px);
}

.ledger-row.is-in {
  animation: row-in 0.5s var(--ease) forwards;
}

@keyframes row-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ledger-row .amt {
  font-family: var(--font-mono);
  color: var(--ink-text-dim);
}

.ledger-total {
  margin-top: 0.95rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--ink-text);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.ledger-total .label {
  font-size: 0.78rem;
  color: var(--ink-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ledger-total .value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.5rem;
}

.ledger-foot {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ledger-qr {
  width: 46px;
  height: 46px;
  position: relative;
  border: 1px solid var(--paper-line);
  border-radius: 3px;
  overflow: hidden;
  flex: none;
}

.ledger-qr .scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ledger-green-bright);
  top: 0;
  box-shadow: 0 0 6px 1px var(--ledger-green-bright);
  animation: scan-move 2.6s ease-in-out infinite;
  animation-delay: 2.4s;
}

@keyframes scan-move {
  0%, 15% { top: 4px; }
  50% { top: 40px; }
  85%, 100% { top: 4px; }
}

.stamp {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--ledger-green);
  border: 2px solid var(--ledger-green);
  border-radius: 4px;
  padding: 0.3em 0.6em;
  transform: rotate(-8deg) scale(0);
  opacity: 0;
}

.stamp.is-stamped {
  animation: stamp-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes stamp-in {
  0% {
    transform: rotate(-8deg) scale(2.4);
    opacity: 0;
  }
  60% {
    transform: rotate(-8deg) scale(0.92);
    opacity: 1;
  }
  100% {
    transform: rotate(-8deg) scale(1);
    opacity: 1;
  }
}

.ledger-card-tab {
  position: absolute;
  top: -14px;
  left: 32px;
  background: var(--stamp-red);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 0.35em 0.7em;
  border-radius: 2px;
  transform: rotate(-3deg);
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Stat strip
   ========================================================================== */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--paper-line);
  border-top: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
}

.stat {
  background: var(--paper);
  padding: 1.6rem 1.4rem;
  text-align: center;
}

.stat .num {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  color: var(--ledger-green);
}

.stat .cap {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--ink-text-dim);
}

/* ==========================================================================
   Problem / solution
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.split-head h2 {
  margin-top: 0.9rem;
}

.split-head .lede {
  margin-top: 1.1rem;
  color: var(--ink-text-dim);
  max-width: 40ch;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--paper-line);
  border: 1px solid var(--paper-line);
}

.compare-col {
  background: var(--paper);
  padding: 1.6rem;
}

.compare-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.compare-col.is-before h4 {
  color: var(--stamp-red);
}

.compare-col.is-after h4 {
  color: var(--ledger-green);
}

.compare-item {
  display: flex;
  gap: 0.65em;
  padding: 0.6rem 0;
  border-top: 1px solid var(--paper-line);
  font-size: 0.92rem;
}

.compare-item:first-of-type {
  border-top: none;
}

.compare-item svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 0.15em;
}

.compare-col.is-before svg {
  color: var(--stamp-red);
}

.compare-col.is-after svg {
  color: var(--ledger-green);
}

/* ==========================================================================
   Features
   ========================================================================== */

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-head h2 {
  margin-top: 0.9rem;
}

.section--ink .section-head .eyebrow {
  color: var(--brass-bright);
}

.section--ink .section-head h2 {
  color: var(--paper);
}

.section--ink .section-head .lede {
  color: var(--cream-text-dim);
  margin-top: 1rem;
}

.section--paper .section-head .eyebrow {
  color: var(--ledger-green);
}

.section--paper .section-head .lede {
  color: var(--ink-text-dim);
  margin-top: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(239, 232, 214, 0.12);
  border: 1px solid rgba(239, 232, 214, 0.12);
}

.feature-card {
  background: var(--ink);
  padding: 1.9rem 1.7rem;
  transition: background 0.25s var(--ease);
}

.feature-card:hover {
  background: var(--ink-2);
}

.feature-icon {
  width: 34px;
  height: 34px;
  color: var(--brass-bright);
  margin-bottom: 1.1rem;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
  transition: transform 0.35s var(--ease), color 0.35s var(--ease);
}

.feature-card:hover .feature-icon svg {
  transform: scale(1.1);
  color: var(--brass-bright);
}

.feature-card h3 {
  color: var(--paper);
  font-size: 1.05rem;
}

.feature-card p {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--cream-text-dim);
  line-height: 1.55;
}

/* ==========================================================================
   How it works
   ========================================================================== */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.steps-path {
  position: absolute;
  top: 26px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  z-index: 0;
  background-image: repeating-linear-gradient(
    to right,
    var(--paper-line) 0,
    var(--paper-line) 4px,
    transparent 4px,
    transparent 10px
  );
}

.steps-path-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  overflow: hidden;
  background-image: repeating-linear-gradient(
    to right,
    var(--ledger-green) 0,
    var(--ledger-green) 4px,
    transparent 4px,
    transparent 10px
  );
  transition: width 1.2s var(--ease);
}

.steps-path.is-in .steps-path-fill {
  width: 100%;
}

.step {
  position: relative;
  z-index: 1;
}

.step-num {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ledger-green);
  color: var(--ledger-green);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.step h3 {
  font-size: 1.02rem;
  color: var(--ink-text);
}

.step p {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  color: var(--ink-text-dim);
  line-height: 1.55;
}

/* ==========================================================================
   Templates
   ========================================================================== */

.template-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
}

.template-card {
  background: var(--paper);
  border-radius: 5px;
  padding: 1rem 1rem 1.2rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  cursor: default;
}

.template-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.6);
}

.template-mini {
  aspect-ratio: 3 / 4;
  border-radius: 3px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}

.template-mini span {
  display: block;
  height: 5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.55);
}

.template-mini span:nth-child(1) { width: 55%; height: 7px; margin-bottom: 0.25rem; }
.template-mini span:nth-child(4),
.template-mini span:nth-child(5),
.template-mini span:nth-child(6) { width: 100%; opacity: 0.7; }
.template-mini span:last-child { width: 40%; margin-top: auto; height: 8px; }

.template-card h3 {
  font-size: 0.92rem;
  color: var(--ink-text);
}

.t-classic .template-mini { background: linear-gradient(155deg, #2b3a4a, #1c2733); }
.t-modern .template-mini { background: linear-gradient(155deg, #2f6b4f, #1f4735); }
.t-minimal .template-mini { background: linear-gradient(155deg, #6b6355, #47423a); }
.t-bold .template-mini { background: linear-gradient(155deg, #a83a2e, #7a2a20); }
.t-signature .template-mini { background: linear-gradient(155deg, #4a3b6b, #322850); }
.t-corporate .template-mini { background: linear-gradient(155deg, #b08a46, #8a6a34); }

/* ==========================================================================
   Security / autosave spotlight
   ========================================================================== */

.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.spotlight-list {
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.spotlight-item {
  display: flex;
  gap: 0.9rem;
}

.spotlight-item svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--ledger-green);
  margin-top: 0.15em;
}

.spotlight-item h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink-text);
  font-weight: 600;
}

.spotlight-item p {
  margin-top: 0.3rem;
  font-size: 0.88rem;
  color: var(--ink-text-dim);
  line-height: 1.55;
}

.toast-demo {
  background: var(--ink-2);
  border: 1px solid rgba(239, 232, 214, 0.14);
  border-radius: 8px;
  padding: 2.4rem 2rem;
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast {
  position: absolute;
  top: 1.6rem;
  right: 1.6rem;
  background: var(--paper);
  color: var(--ink-text);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-10px) translateX(10px);
}

.toast.is-in {
  animation: toast-in 4.2s var(--ease) infinite;
}

@keyframes toast-in {
  0% { opacity: 0; transform: translateY(-10px) translateX(10px); }
  10% { opacity: 1; transform: translateY(0) translateX(0); }
  70% { opacity: 1; transform: translateY(0) translateX(0); }
  85% { opacity: 0; transform: translateY(-6px) translateX(6px); }
  100% { opacity: 0; }
}

.toast-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ledger-green);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.toast-check svg {
  width: 12px;
  height: 12px;
}

.draft-doc {
  width: 200px;
  background: var(--paper);
  border-radius: 6px;
  padding: 1.1rem;
  color: var(--ink-text);
  transform: rotate(-2deg);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.5);
}

.draft-doc .bar {
  height: 6px;
  border-radius: 2px;
  background: var(--paper-line);
  margin-bottom: 0.5rem;
}

.draft-doc .bar:nth-child(1) { width: 60%; height: 9px; margin-bottom: 0.9rem; }
.draft-doc .badge {
  margin-top: 0.9rem;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 0.3em 0.6em;
  border-radius: 999px;
  background: #e4dcbf;
  color: var(--ink-text-dim);
}

/* ==========================================================================
   Import / Export (data portability)
   ========================================================================== */

.migration-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0 2.8rem;
}

.migration-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  width: 160px;
  flex: none;
}

.migration-node-icon {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--ink-2);
  border: 2px solid var(--brass-bright);
  color: var(--brass-bright);
  display: flex;
  align-items: center;
  justify-content: center;
}

.migration-node-icon svg {
  width: 26px;
  height: 26px;
}

.migration-node.is-file .migration-node-icon {
  border-color: var(--ledger-green-bright);
  color: var(--ledger-green-bright);
}

.migration-flow.is-visible .migration-node.is-file .migration-node-icon {
  animation: node-pulse 1.6s ease-out 1.2s;
}

@keyframes node-pulse {
  0% { box-shadow: 0 0 0 0 rgba(63, 140, 104, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(63, 140, 104, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 140, 104, 0); }
}

.migration-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  opacity: 0;
  transform: scale(0.4);
}

.migration-flow.is-visible .migration-node.is-target .migration-badge {
  animation: migration-badge-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 2.3s forwards;
}

@keyframes migration-badge-in {
  to { opacity: 1; transform: scale(1); }
}

.migration-node-label strong {
  display: block;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.migration-node-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cream-text-dim);
  line-height: 1.4;
}

.flow-connector {
  flex: 1 1 60px;
  min-width: 24px;
  max-width: 120px;
  height: 2px;
  background: rgba(239, 232, 214, 0.16);
  position: relative;
  overflow: hidden;
  align-self: center;
  margin-bottom: 2.2rem;
}

.flow-connector-fill {
  position: absolute;
  inset: 0;
  background: var(--brass-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease);
}

.migration-flow.is-visible .flow-connector-fill {
  transform: scaleX(1);
}

.migration-flow.is-visible .migration-node:nth-child(3) ~ .flow-connector .flow-connector-fill {
  transition-delay: 1.2s;
}

.export-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-top: 1rem;
}

.export-point {
  display: flex;
  gap: 0.8rem;
}

.export-point svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--brass-bright);
  margin-top: 0.15em;
}

.export-point h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--paper);
  font-weight: 600;
}

.export-point p {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--cream-text-dim);
  line-height: 1.55;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list {
  border-top: 1px solid var(--paper-line);
  max-width: 800px;
}

.faq-item {
  border-bottom: 1px solid var(--paper-line);
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.4rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink-text);
}

.faq-q .plus {
  flex: none;
  width: 22px;
  height: 22px;
  position: relative;
}

.faq-q .plus::before,
.faq-q .plus::after {
  content: "";
  position: absolute;
  background: var(--ledger-green);
  transition: transform 0.3s var(--ease);
}

.faq-q .plus::before {
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}

.faq-q .plus::after {
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

.faq-item.is-open .plus::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}

.faq-a p {
  padding-bottom: 1.5rem;
  color: var(--ink-text-dim);
  font-size: 0.95rem;
  max-width: 65ch;
  line-height: 1.6;
}

/* ==========================================================================
   Final CTA
   ========================================================================== */

.final-cta {
  text-align: center;
}

.final-cta h2 {
  color: var(--paper);
  max-width: 18ch;
  margin: 0 auto;
}

.final-cta .lede {
  max-width: 46ch;
  margin: 1.2rem auto 0;
  color: var(--cream-text-dim);
}

.final-cta .hero-ctas {
  justify-content: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid rgba(239, 232, 214, 0.12);
  padding: 2.6rem var(--edge-pad);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  color: var(--cream-text-dim);
  font-size: 0.85rem;
}

.footer-brand strong {
  color: var(--paper);
  font-family: var(--font-display);
}

.footer-credit {
  font-size: 0.82rem;
  color: var(--cream-text-dim);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.footer-credit a {
  color: var(--brass-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(203, 161, 94, 0.4);
  transition: border-color 0.2s var(--ease);
}

.footer-credit a:hover {
  border-color: var(--brass-bright);
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.is-visible > * {
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1000px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .split {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 2.5rem;
  }

  .steps-path {
    display: none;
  }

  .template-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .spotlight {
    grid-template-columns: 1fr;
  }

  .spotlight-visual {
    order: -1;
  }
}

@media (max-width: 1150px) {
  .nav-links {
    display: none;
  }

  .nav-links.is-open-mobile {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ink-2);
    border-bottom: 1px solid rgba(239, 232, 214, 0.14);
    padding: 0.5rem var(--edge-pad) 1rem;
  }

  .nav-links.is-open-mobile a {
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(239, 232, 214, 0.08);
  }

  .nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .nav-cta {
    display: none;
  }

  .back-btn span {
    display: none;
  }

  .compare {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .migration-flow {
    flex-direction: column;
  }

  .migration-node {
    width: auto;
  }

  .flow-connector {
    width: 2px;
    height: 36px;
    max-width: none;
    flex: none;
    margin-bottom: 0;
  }

  .flow-connector-fill {
    transform: scaleY(0);
    transform-origin: top;
  }

  .migration-flow.is-visible .flow-connector-fill {
    transform: scaleY(1);
  }

  .export-points {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .template-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }
}
