/* =========================================================================
   wa2text — landing page
   Straightforward utility aesthetic. Navy + ivory. No ornament.
   Self-contained. Does not share class names with style.css.
   Fonts loaded via <link> in the HTML head.
   ========================================================================= */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

:root {
  --ink:        #0c1422;
  --ink-2:      #222b3d;
  --ink-soft:   #5b6578;
  --ink-faint:  #8e95a4;
  --paper:      #f4efe0;
  --paper-2:    #ebe5d2;
  --paper-3:    #dfd7bf;
  --navy:       #16243f;
  --navy-deep:  #0a1220;
  --rule:       rgba(12, 20, 34, .15);
  --rule-soft:  rgba(12, 20, 34, .07);

  --serif: "Newsreader", "Times New Roman", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Very subtle paper texture, no fashion sheen */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  opacity: .2;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .1 0 0 0 0 .09 0 0 0 0 .08 0 0 0 .08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
body > * { position: relative; z-index: 2; }

a { color: inherit; text-decoration: none; }

/* =========================================================================
   Shell
   ========================================================================= */
.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* =========================================================================
   Nav
   ========================================================================= */
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
  /* Lift the whole header's stacking context above the page sections so
     dropdowns inside it (e.g. the Support panel) aren't covered by the
     hero/section that follow. Without this, body > * { z-index: 2 } makes
     every section a peer at z-index 2 and later siblings win. */
  z-index: 100;
}
.site-nav .brand {
  font-family: var(--serif);
  font-variation-settings: "opsz" 72;
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -.02em;
  color: var(--ink);
}
.site-nav .brand .b-sep { color: var(--ink-soft); font-weight: 400; }
.site-nav .nav-links {
  display: inline-flex; align-items: center; gap: 1.75rem;
  font-size: .92rem; font-weight: 500;
}
.site-nav .nav-links a { color: var(--ink-soft); transition: color .12s; }
.site-nav .nav-links a:hover { color: var(--ink); }
.site-nav .nav-links .link-cta {
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
}

@media (max-width: 640px) {
  .site-nav { padding: 1rem 1.25rem; }
  .site-nav .nav-links { gap: 1.1rem; font-size: .88rem; }
  .site-nav .nav-links a:not(.link-cta) { display: none; }
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 340px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .2em;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 72;
  font-weight: 500;
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.025em;
  color: var(--ink);
  margin: 0 0 1.6rem;
  max-width: 18ch;
}

.hero .lede {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14;
  font-weight: 400;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 50ch;
  margin: 0 0 2rem;
}

.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.cta-sub {
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* Primary button — navy fill, letterpress press */
.btn-primary {
  display: inline-flex; align-items: center; gap: .75rem;
  padding: .95rem 1.65rem;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  border-radius: 2px;
  box-shadow:
    0 2px 0 0 var(--navy-deep),
    0 4px 10px -3px rgba(10, 18, 32, .3);
  transition: transform .1s, box-shadow .1s, background .12s;
}
.btn-primary:hover { background: #1d2e50; }
.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 0 var(--navy-deep), 0 2px 4px -2px rgba(10, 18, 32, .25);
}
.btn-primary .arrow {
  display: inline-block; width: 14px; height: 1px; background: var(--paper);
  position: relative;
}
.btn-primary .arrow::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 6px; height: 6px;
  border-top: 1px solid var(--paper);
  border-right: 1px solid var(--paper);
  transform: translateY(-50%) rotate(45deg);
}

/* Hero aside — "At a glance" info card */
.hero-aside { padding-top: .25rem; }
.spec-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.4rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--ink-2);
  line-height: 1.55;
}
.spec-card h5 {
  font-family: var(--mono);
  margin: 0 0 .8rem;
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--ink);
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--rule);
}
.spec-card dl { margin: 0; display: grid; grid-template-columns: 9ch 1fr; gap: .5rem 1rem; }
.spec-card dt { color: var(--ink-soft); font-weight: 400; }
.spec-card dd { margin: 0; color: var(--ink); font-weight: 500; }
.spec-card dd .dd-sub {
  display: block;
  font-size: .82em;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: .1rem;
  letter-spacing: -.005em;
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero-aside { max-width: 420px; }
}

/* Entrance — single soft reveal, no staggered theatrics */
.hero h1, .hero .lede, .hero .eyebrow, .hero-cta, .hero-aside {
  opacity: 0;
  animation: rise .55s cubic-bezier(.2,.7,.25,1) forwards;
}
.hero .eyebrow    { animation-delay: .05s; }
.hero h1          { animation-delay: .12s; }
.hero .lede       { animation-delay: .22s; }
.hero-cta         { animation-delay: .32s; }
.hero-aside       { animation-delay: .4s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================================
   Ticker — delivery log
   ========================================================================= */
.ticker {
  background: var(--navy);
  color: var(--paper);
  overflow: hidden;
  position: relative;
}
.ticker::before,
.ticker::after {
  content: ""; position: absolute; top: 0; bottom: 0;
  width: 60px; z-index: 3; pointer-events: none;
}
.ticker::before { left: 0;  background: linear-gradient(90deg, var(--navy), transparent); }
.ticker::after  { right: 0; background: linear-gradient(270deg, var(--navy), transparent); }

.ticker-label {
  position: absolute; top: 50%; left: clamp(1rem, 4vw, 3rem);
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: .66rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(244, 239, 224, .75);
  z-index: 4;
  padding-right: 1.1rem;
  background: var(--navy);
}

.ticker-track {
  display: flex; gap: 3rem;
  padding: .95rem 0 .95rem 220px;
  white-space: nowrap;
  animation: tick 110s linear infinite;
  will-change: transform;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes tick {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex; align-items: center; gap: 1rem;
  font-family: var(--mono);
  font-size: .8rem;
  color: rgba(244, 239, 224, .8);
  flex-shrink: 0;
}
.ticker-item .t-time { color: rgba(244, 239, 224, .55); }
.ticker-item .t-from { color: rgba(244, 239, 224, .95); }
.ticker-item .t-dir  { color: rgba(244, 239, 224, .65); padding: 0 .25rem; }
.ticker-item .t-ok   { color: #a3c79a; font-weight: 500; }
.ticker-item .t-ms   { color: rgba(244, 239, 224, .5); }
.ticker-item .sep    { opacity: .3; }

@media (max-width: 640px) {
  .ticker-label { font-size: .6rem; left: 1rem; padding-right: .7rem; }
  .ticker-track { padding-left: 140px; gap: 2rem; }
  .ticker-item  { font-size: .73rem; gap: .65rem; }
}

/* =========================================================================
   Section — generic
   ========================================================================= */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-bottom: 1px solid var(--rule);
}
.section.tint { background: var(--paper-2); }

.section-head {
  margin-bottom: clamp(2.25rem, 4vw, 3.25rem);
  max-width: 640px;
}
.section-kicker {
  font-family: var(--mono);
  font-size: .7rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 .8rem;
}
.section-head h2 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 72;
  font-weight: 500;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0 0 .75rem;
}
.section-head p {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  max-width: 52ch;
}

/* =========================================================================
   Steps
   ========================================================================= */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.step {
  padding: 1.85rem 1.85rem 2rem;
  border-right: 1px solid var(--rule);
}
.step:last-child { border-right: 0; }
.step .step-n {
  font-family: var(--mono);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  display: block;
}
.step h3 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 32;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0 0 .55rem;
}
.step p {
  font-family: var(--sans);
  font-size: .95rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .step  { border-right: 0; border-bottom: 1px solid var(--rule); }
  .step:last-child { border-bottom: 0; }
}

/* =========================================================================
   Features
   ========================================================================= */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 2.75rem;
  row-gap: 2.5rem;
}
.feat h4 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 32;
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 0 0 .55rem;
  color: var(--ink);
  border-top: 1.5px solid var(--ink);
  padding-top: 1rem;
}
.feat p {
  font-family: var(--sans);
  font-size: .94rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}
.feat code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--paper-3);
  padding: .05rem .35rem;
  border-radius: 2px;
  color: var(--ink);
}

@media (max-width: 860px) { .features { grid-template-columns: repeat(2, 1fr); column-gap: 2rem; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* =========================================================================
   Pricing — flat cards, no rotation, no stamp
   ========================================================================= */
.pricing {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
}
.price {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 1.9rem 1.65rem 1.9rem;
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.price:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 0 var(--ink);
}
.price.featured {
  background: var(--paper-2);
  border-width: 2px;
}
.price .price-badge {
  position: absolute;
  top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--navy);
  color: var(--paper);
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .3rem .75rem;
  white-space: nowrap;
}

.price-head {
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.1rem;
}
.price-tier {
  font-family: var(--mono);
  font-size: .7rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 .55rem;
}
.price-amount {
  font-family: var(--serif);
  font-variation-settings: "opsz" 72;
  font-weight: 500;
  font-size: 2.7rem;
  line-height: 1;
  letter-spacing: -.025em;
  color: var(--ink);
}
.price-amount .per {
  font-family: var(--mono);
  font-size: .7rem; font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: .12em; text-transform: uppercase;
  margin-left: .4rem;
  vertical-align: middle;
}

.price-features { list-style: none; padding: 0; margin: 0 0 1.4rem; flex: 1; }
.price-features li {
  padding: .55rem 0 .55rem 1.3rem;
  position: relative;
  font-family: var(--sans);
  font-size: .92rem;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule-soft);
}
.price-features li:last-child { border-bottom: 0; }
.price-features li::before {
  content: "✓";
  position: absolute; left: 0; top: .55rem;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
  font-size: .85rem;
}

.price-cta {
  display: block; width: 100%;
  padding: .78rem 1rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.price-cta:hover { background: var(--ink); color: var(--paper); }
.price.featured .price-cta { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.price.featured .price-cta:hover { background: var(--navy-deep); border-color: var(--navy-deep); }

@media (max-width: 1040px) {
  .pricing { grid-template-columns: repeat(2, 1fr); max-width: 700px; }
}
@media (max-width: 560px) {
  .pricing { grid-template-columns: 1fr; max-width: 440px; }
}

/* =========================================================================
   FAQ
   ========================================================================= */
.faq { border-top: 1px solid var(--rule); max-width: 860px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 1.3rem .5rem;
  transition: background .12s;
}
.faq details[open] { background: rgba(12, 20, 34, .02); }

.faq summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr 28px;
  gap: 1rem; align-items: baseline;
  font-family: var(--serif);
  font-variation-settings: "opsz" 32;
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -.005em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--ink-soft);
  justify-self: end;
  transition: transform .2s;
}
.faq details[open] summary::after { content: "−"; color: var(--ink); }

.faq .answer {
  font-family: var(--sans);
  font-size: .97rem;
  line-height: 1.6;
  color: var(--ink-soft);
  padding-top: .85rem;
  max-width: 60ch;
}

/* =========================================================================
   Close band
   ========================================================================= */
.close {
  padding: clamp(4rem, 8vw, 6rem) 0;
  text-align: center;
}
.close h2 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 72;
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 0 auto 1.8rem;
  max-width: 22ch;
}
.close .cta-sub { margin: 1.25rem auto 0; max-width: 30ch; }

/* =========================================================================
   Pricing-page back link (logged-in users)
   ========================================================================= */
.pricing-back {
  display: inline-block;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 0 1.25rem;
}
.pricing-back:hover { color: var(--ink); }

/* =========================================================================
   Credit summary (under pricing grid)
   ========================================================================= */
.credit-summary {
  max-width: 640px;
  margin: 2rem auto 0;
  text-align: center;
}
.credit-summary-facts {
  list-style: none;
  padding: 0;
  margin: 0 0 .85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem .55rem;
}
.credit-summary-facts li {
  background: var(--paper-2, #f6f1e6);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .4rem .9rem;
  font-size: .88rem;
  color: var(--ink);
  white-space: nowrap;
}
.credit-summary-facts li strong { font-weight: 600; }
.credit-summary p {
  margin: 0;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.credit-summary p a { color: inherit; }
.credit-summary p a:hover { color: var(--ink); }
@media (max-width: 520px) {
  .credit-summary-facts li { white-space: normal; }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-foot {
  border-top: 1px solid var(--rule);
  padding: 2.25rem clamp(1.25rem, 4vw, 3rem);
  display: flex; justify-content: space-between; gap: 1.25rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.site-foot a { color: var(--ink-soft); }
.site-foot a:hover { color: var(--ink); }
.site-foot .foot-brand {
  font-family: var(--serif);
  font-size: .92rem;
  text-transform: none;
  letter-spacing: -.01em;
  color: var(--ink);
  font-weight: 500;
}

/* =========================================================================
   Beta tag — sits next to the brand in the nav
   ========================================================================= */
.beta-tag {
  display: inline-block;
  margin-left: .55rem;
  padding: 1px 6px 2px;
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 3px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

/* =========================================================================
   Support dropdown — native <details> element, zero JS
   ========================================================================= */
.support-dd {
  position: relative;
  display: inline-block;
}
.support-trigger {
  /* <summary> styled to look like the other nav anchors */
  list-style: none;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 500;
  transition: color .12s;
  outline: none;
  user-select: none;
}
.support-trigger::-webkit-details-marker { display: none; }
.support-trigger::marker { content: ""; }
.support-trigger:hover,
.support-dd[open] .support-trigger { color: var(--ink); }

.support-pop {
  display: none;
  position: absolute;
  top: calc(100% + .8rem);
  right: 0;
  min-width: 220px;
  padding: 1rem 1.1rem 1.05rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(12, 20, 34, .08);
}
.support-dd[open] .support-pop { display: block; }
.support-cta {
  display: block;
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  /* !important to beat .site-nav .nav-links a:hover { color: var(--ink); } */
  color: var(--paper) !important;
  background: var(--ink);
  padding: .6rem .9rem;
  text-align: center;
  border-radius: 999px;
  border: 1px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.support-cta:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--paper) !important;
}
.support-note {
  margin: .9rem 0 .15rem;
  font-family: var(--mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  text-align: center;
  color: var(--ink-faint);
}
.support-email {
  margin: 0;
  font-family: var(--mono);
  font-size: .9rem;
  color: var(--ink);
  text-align: center;
  user-select: text;
  cursor: text;
  word-break: break-all;
}
@media (max-width: 640px) {
  .support-pop { right: -.5rem; min-width: 200px; }
}

/* =========================================================================
   Demo — "WhatsApp arrives. You reply."
   ========================================================================= */

/* Soften the section's bottom rule so the stage-wrap reads continuously */
.demo-section { padding-bottom: 0; border-bottom: 0; }

.demo-stage-wrap {
  position: relative;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(2.75rem, 5.5vw, 4.5rem) 0;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(100% / 12 - 1px),
      var(--rule-soft) calc(100% / 12 - 1px),
      var(--rule-soft) calc(100% / 12)
    );
}
.demo-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}

/* ---------- Phone columns ---------- */
.phone-col {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}
.phone-col .col-label {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .26em;
  color: var(--ink-soft);
}
.phone-col .col-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: .98rem;
  color: var(--ink-2);
  margin-top: -.45rem;
}

.phone {
  position: relative;
  color: var(--ink);
}
.phone svg.phone-frame {
  display: block;
  width: 100%;
  height: auto;
  color: var(--ink);
}
.phone-screen {
  position: absolute;
  overflow: hidden;
}

/* ---------- Smartphone (left) ---------- */
.phone--smart { width: 275px; }
.phone--smart .phone-screen {
  top: 6.4%; left: 7%; right: 7%; bottom: 5.4%;
  border-radius: 18px;
  background: #f8f4e6;
  padding: 0;
}

.wa-thread {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0;
}
.wa-head {
  background: var(--wa-sage-2, #b8c5a1);
  color: #1d2a14;
  padding: .55rem .7rem;
  display: flex; align-items: center; gap: .55rem;
  font-size: .78rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.wa-head .avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid rgba(0,0,0,.15);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: .7rem;
  font-weight: 500;
  color: var(--ink-2);
}
.wa-head .who { font-weight: 600; line-height: 1; }
.wa-head .who-sub {
  display: block;
  font-size: .58rem;
  font-weight: 400;
  opacity: .7;
  margin-top: 1px;
  font-family: var(--mono);
  letter-spacing: .04em;
}
.wa-body {
  flex: 1;
  padding: .9rem .8rem 1.1rem;
  display: flex; flex-direction: column;
  gap: .55rem;
  background:
    radial-gradient(circle at 18% 22%, rgba(199,210,179,.18), transparent 40%),
    radial-gradient(circle at 78% 65%, rgba(199,210,179,.14), transparent 45%),
    #efe9d6;
  font-size: .96rem;
  line-height: 1.35;
}
.wa-bubble {
  max-width: 82%;
  padding: .42rem .55rem .3rem;
  border-radius: 8px;
  font-family: var(--sans);
  position: relative;
  opacity: 0;
  transform: translateY(6px);
}
.wa-bubble.in {
  background: #ffffff;
  color: var(--ink);
  border-top-left-radius: 2px;
  align-self: flex-start;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.wa-bubble.out {
  background: #c7d2b3;
  color: #1a2410;
  border-top-right-radius: 2px;
  align-self: flex-end;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.wa-bubble .meta {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 3px;
  margin-top: 2px;
  font-size: .68rem;
  font-family: var(--mono);
  color: var(--ink-faint);
}
.wa-bubble.out .meta { color: rgba(26,36,16,.55); }
.wa-bubble .ticks {
  display: inline-flex; align-items: center;
  color: #2978d6;
  font-size: .68rem;
  letter-spacing: -.05em;
  margin-left: 2px;
}

/* ---------- Flip phone (right) ---------- */
.phone--flip { width: 220px; }
.phone--flip .phone-screen {
  top: 4.14%; left: 9.6%; right: 9.6%; height: 38.28%;
  border-radius: 5px;
  background: #c4d4ba;
  padding: .45rem .55rem .35rem;
  font-family: var(--mono);
  color: #0d1a08;
  font-size: .68rem;
  line-height: 1.32;
}

.sms-statusbar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .54rem;
  font-weight: 500;
  letter-spacing: .04em;
  border-bottom: 1px solid rgba(13, 26, 8, .25);
  padding-bottom: 3px;
  margin-bottom: 5px;
  /* Solid LCD-green band that covers the full screen width and top padding,
     so the SMS thread sliding up during the David transition can't peek
     under the INBOX / clock row. */
  background: #c4d4ba;
  position: relative;
  z-index: 2;
  margin-top: -.45rem;
  padding-top: .45rem;
  margin-left: -.55rem;
  padding-left: .55rem;
  margin-right: -.55rem;
  padding-right: .55rem;
}
.sms-statusbar .signal { display: inline-flex; align-items: end; gap: 1px; }
.sms-statusbar .signal i { display: block; width: 2px; background: #0d1a08; }
.sms-statusbar .signal i:nth-child(1){ height: 3px; }
.sms-statusbar .signal i:nth-child(2){ height: 4.5px; }
.sms-statusbar .signal i:nth-child(3){ height: 6px; }
.sms-statusbar .signal i:nth-child(4){ height: 7.5px; opacity:.4; }

.sms-thread {
  display: flex; flex-direction: column; gap: 5px;
  animation: smsScroll 26s ease-in-out infinite;
  will-change: transform;
}
@keyframes smsScroll {
  0%, 71%   { transform: translateY(0); }
  77%, 100% { transform: translateY(-58px); }
}
.sms-msg {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: inherit;
  line-height: inherit;
  opacity: 0;
}
.sms-msg.incoming { color: #0d1a08; }
.sms-msg.outgoing {
  color: #0d1a08;
  text-align: right;
  padding-right: 5px;
  border-right: 2px solid rgba(13,26,8,.45);
}
.sms-msg .typed {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  vertical-align: bottom;
}
.sms-msg .caret {
  display: inline-block;
  width: .45ch;
  background: rgba(13,26,8,.85);
  color: transparent;
  margin-left: 1px;
  animation: blinkCaret 1s steps(1) infinite;
}
@keyframes blinkCaret { 50% { background: transparent; } }

.pin-tag {
  margin: 2px 0;
  text-align: center;
  font-family: var(--mono);
  font-size: .48rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(13,26,8,.65);
  opacity: 0;
}

/* ---------- Wire / bead ---------- */
.wire {
  position: relative;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .9rem;
  padding: 1rem 0;
}
.wire-label {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--ink-2);
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .35rem .7rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  z-index: 2;
}
.wire-label .pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #b8c5a1;
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(184,197,161,.7); }
  70%  { box-shadow: 0 0 0 8px rgba(184,197,161,0); }
  100% { box-shadow: 0 0 0 0 rgba(184,197,161,0); }
}
.wire-track {
  position: relative;
  width: 100%; height: 1px;
  background: var(--rule);
}
.wire-track::before, .wire-track::after {
  content: "";
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink);
}
.wire-track::before { left: -2px; }
.wire-track::after  { right: -2px; }
.wire-bead {
  position: absolute;
  top: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
  left: 0;
  box-shadow: 0 0 0 4px rgba(12,20,34,.07);
  animation: bead 26s linear infinite;
}
@keyframes bead {
  0%, 7%    { left: 0;    opacity: 0; }
  9%        { left: 0;    opacity: 1; }
  13%       { left: 100%; opacity: 1; }
  15%, 21%  { left: 100%; opacity: 0; }
  23%       { left: 100%; opacity: 1; }
  29%       { left: 0;    opacity: 1; }
  31%, 63%  { left: 0;    opacity: 0; }
  65%       { left: 0;    opacity: 1; }
  71%       { left: 100%; opacity: 1; }
  73%, 81%  { left: 100%; opacity: 0; }
  83%       { left: 100%; opacity: 1; }
  89%       { left: 0;    opacity: 1; }
  91%, 100% { left: 0;    opacity: 0; }
}

/* ---------- Demo timeline (26s) ---------- */
.wa-thread--mom    { animation: momThreadShow    26s ease-in-out infinite; }
.wa-thread--david  { animation: davidThreadShow  26s ease-in-out infinite; }
@keyframes momThreadShow {
  0%, 1%    { opacity: 0; }
  3%, 56%   { opacity: 1; }
  60%, 100% { opacity: 0; }
}
@keyframes davidThreadShow {
  0%, 58%   { opacity: 0; }
  62%, 96%  { opacity: 1; }
  98%, 100% { opacity: 0; }
}

.wa-thread--mom .wa-bubble.in        { animation: waMomIn    26s ease-in-out infinite; }
.wa-thread--mom .wa-bubble.out.first { animation: waMomOut1  26s ease-in-out infinite; }
.wa-thread--mom .wa-bubble.out.second{ animation: waMomOut2  26s ease-in-out infinite; }
.wa-thread--david .wa-bubble.in      { animation: waDavidIn  26s ease-in-out infinite; }
.wa-thread--david .wa-bubble.out     { animation: waDavidOut 26s ease-in-out infinite; }
@keyframes waMomIn    { 0%, 1%   { opacity: 0; transform: translateY(6px); } 3%, 100% { opacity: 1; transform: translateY(0); } }
@keyframes waMomOut1  { 0%, 27%  { opacity: 0; transform: translateY(6px) scale(.96); } 30%, 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes waMomOut2  { 0%, 42%  { opacity: 0; transform: translateY(6px) scale(.96); } 45%, 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes waDavidIn  { 0%, 62%  { opacity: 0; transform: translateY(6px); } 65%, 100% { opacity: 1; transform: translateY(0); } }
@keyframes waDavidOut { 0%, 87%  { opacity: 0; transform: translateY(6px) scale(.96); } 90%, 100% { opacity: 1; transform: translateY(0) scale(1); } }

.sms-msg.mom-incoming     { animation: smsMomIn      26s linear infinite; }
.sms-msg.mom-out-1        { animation: smsMomOut1    26s linear infinite; }
.sms-msg.mom-out-1 .typed { animation: typeMomOut1   26s steps(15, end) infinite; }
.pin-tag.pin-mom          { animation: pinMomShow    26s linear infinite; }
.sms-msg.mom-out-2        { animation: smsMomOut2    26s linear infinite; }
.sms-msg.mom-out-2 .typed { animation: typeMomOut2   26s steps(13, end) infinite; }
.sms-msg.david-incoming   { animation: smsDavidIn    26s linear infinite; }
.sms-msg.david-out        { animation: smsDavidOut   26s linear infinite; }
.sms-msg.david-out .typed { animation: typeDavidOut  26s steps(18, end) infinite; }
.pin-tag.pin-david        { animation: pinDavidShow  26s linear infinite; }

@keyframes smsMomIn       { 0%, 9%  {opacity:0;} 12%,96% {opacity:1;} 98%,100% {opacity:0;} }
@keyframes smsMomOut1     { 0%, 15% {opacity:0;} 17%,96% {opacity:1;} 98%,100% {opacity:0;} }
@keyframes typeMomOut1    { 0%, 17% {width:0;}    22%,96% {width:100%;} 98%,100% {width:0;} }
@keyframes pinMomShow     { 0%, 20% {opacity:0;} 22%,96% {opacity:1;} 98%,100% {opacity:0;} }
@keyframes smsMomOut2     { 0%, 33% {opacity:0;} 35%,96% {opacity:1;} 98%,100% {opacity:0;} }
@keyframes typeMomOut2    { 0%, 35% {width:0;}    40%,96% {width:100%;} 98%,100% {width:0;} }
@keyframes smsDavidIn     { 0%, 69% {opacity:0;} 72%,96% {opacity:1;} 98%,100% {opacity:0;} }
@keyframes smsDavidOut    { 0%, 75% {opacity:0;} 77%,96% {opacity:1;} 98%,100% {opacity:0;} }
@keyframes typeDavidOut   { 0%, 77% {width:0;}    82%,96% {width:100%;} 98%,100% {width:0;} }
@keyframes pinDavidShow   { 0%, 80% {opacity:0;} 82%,96% {opacity:1;} 98%,100% {opacity:0;} }

/* ---------- Demo captions ---------- */
.demo-captions {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}
.demo-captions .cap { font-size: .92rem; }
.demo-captions .cap .num {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .35rem;
}
.demo-captions .cap h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.2;
  margin: 0 0 .35rem;
  letter-spacing: -.01em;
}
.demo-captions .cap p { margin: 0; color: var(--ink-soft); line-height: 1.5; }
.demo-captions .cap code {
  font-family: var(--mono);
  font-size: .94em;
  background: var(--paper-2);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ---------- Demo: stack on small screens ---------- */
@media (max-width: 880px) {
  .demo-stage { grid-template-columns: 1fr; gap: 2rem; }
  .wire { padding: 0; }
  .wire-track { width: 1px; height: 80px; }
  .wire-track::before { left: 50%; top: -2px; transform: translateX(-50%); }
  .wire-track::after  { left: 50%; top: auto; bottom: -2px; right: auto; transform: translateX(-50%); }
  .wire-bead { left: 50% !important; top: 0; animation: beadVert 26s linear infinite; }
  @keyframes beadVert {
    0%, 7%    { top: 0;    opacity: 0; }
    9%        { top: 0;    opacity: 1; }
    13%       { top: 100%; opacity: 1; }
    15%, 21%  { top: 100%; opacity: 0; }
    23%       { top: 100%; opacity: 1; }
    29%       { top: 0;    opacity: 1; }
    31%, 63%  { top: 0;    opacity: 0; }
    65%       { top: 0;    opacity: 1; }
    71%       { top: 100%; opacity: 1; }
    73%, 81%  { top: 100%; opacity: 0; }
    83%       { top: 100%; opacity: 1; }
    89%       { top: 0;    opacity: 1; }
    91%, 100% { top: 0;    opacity: 0; }
  }
  .demo-captions { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2rem; }
}
@media (max-width: 460px) { .demo-captions { grid-template-columns: 1fr; } }

/* Reduced motion — hold David's exchange (the latest) and skip motion */
@media (prefers-reduced-motion: reduce) {
  .wa-thread--mom { opacity: 0 !important; animation: none !important; }
  .wa-thread--david { opacity: 1 !important; animation: none !important; }
  .wa-bubble, .sms-msg, .pin-tag, .wire-bead, .sms-thread { animation: none !important; }
  .wa-thread--david .wa-bubble { opacity: 1 !important; transform: none !important; }
  .sms-msg, .pin-tag { opacity: 1 !important; }
  .sms-msg .typed { width: 100% !important; }
  .sms-msg .caret { display: none !important; }
  .sms-thread { transform: translateY(-58px); }
}

/* =========================================================================
   MOBILE REFINEMENTS
   Targeted polish for phones only. Desktop is intentionally left untouched.
   ========================================================================= */

/* ---------- Phones ≤ 640px ---------- */
@media (max-width: 640px) {

  /* Tighten vertical rhythm: sections and hero feel snappier on a small screen */
  .section { padding: 3rem 0; }
  .hero    { padding: 2.6rem 0 2.4rem; }
  .close   { padding: 3.4rem 0; }

  /* Hero copy — fits comfortably without dominating the viewport */
  .hero h1   { font-size: clamp(2.2rem, 11vw, 2.7rem); letter-spacing: -.022em; max-width: 14ch; margin-bottom: 1.2rem; }
  .hero .lede{ font-size: 1.04rem; line-height: 1.5; margin-bottom: 1.5rem; }
  .hero .eyebrow { margin-bottom: 1.1rem; }

  /* Spec card "At a glance" — slightly denser, easier to scan */
  .spec-card { padding: 1.05rem 1.1rem; }
  .spec-card dl { grid-template-columns: 7.5ch 1fr; gap: .45rem .9rem; }
  .spec-card h5 { margin-bottom: .65rem; padding-bottom: .5rem; }

  /* Section heads tighten */
  .section-head      { margin-bottom: 1.85rem; }
  .section-head h2   { font-size: 1.85rem; }
  .section-head p    { font-size: 1rem; }

  /* Steps — slightly more compact padding so 3 stacked don't feel endless */
  .step { padding: 1.45rem 1.4rem 1.55rem; }
  .step h3 { font-size: 1.22rem; }

  /* Features — tighter row spacing when stacked */
  .features { row-gap: 1.85rem; }

  /* Pricing — comfy buttons (44px tap target), tighter card padding */
  .price       { padding: 1.6rem 1.4rem; }
  .price-amount{ font-size: 2.4rem; }
  .price-cta   { padding: .9rem 1rem; min-height: 46px; }

  /* Pricing list — slightly tighter row separation */
  .price-features li { padding: .5rem 0 .5rem 1.25rem; font-size: .9rem; }

  /* Credit summary pills — tighter, friendlier on narrow viewports */
  .credit-summary { margin-top: 1.5rem; }
  .credit-summary-facts li { padding: .35rem .8rem; font-size: .82rem; }

  /* FAQ — slightly tighter row, larger tap target */
  .faq details { padding: 1.05rem .25rem; }
  .faq summary { font-size: 1.02rem; }
  .faq .answer { font-size: .94rem; padding-top: .7rem; }

  /* Close band — keep it punchy but not towering */
  .close h2 { font-size: clamp(1.7rem, 7vw, 2.2rem); margin-bottom: 1.4rem; }

  /* Footer wraps two-line cleanly */
  .site-foot { gap: .85rem 1rem; padding: 1.6rem 1.25rem 2rem; }
}

/* ---------- Demo: shrink phones on mobile so the section isn't a marathon ---------- */
@media (max-width: 640px) {
  .demo-section .section-head p { font-size: .98rem; }

  .demo-stage     { gap: 1.4rem; }
  .demo-stage-wrap{ padding: 2.4rem 0; }

  .phone--smart { width: 232px; }
  .phone--flip  { width: 188px; }

  /* Vertical wire is shorter */
  .wire        { padding: 0; }
  .wire-track  { height: 56px !important; }
  .wire-label  { font-size: .68rem; padding: .3rem .6rem; }

  /* Demo captions: tighter, single column already kicks in at ≤ 460 */
  .demo-captions    { margin-top: 2rem; gap: 1.25rem; padding-top: 1.2rem; }
  .demo-captions .cap h4 { font-size: 1.08rem; }
  .demo-captions .cap p  { font-size: .9rem; }

  /* Phone column labels — hold the line height tighter */
  .phone-col       { gap: .85rem; }
  .phone-col .col-label { font-size: .64rem; letter-spacing: .22em; }
  .phone-col .col-sub   { font-size: .92rem; margin-top: -.4rem; }
}

/* ---------- Smallest phones ≤ 380px ---------- */
@media (max-width: 380px) {
  .hero h1 { font-size: 2.05rem; max-width: 13ch; }
  .hero .lede { font-size: .98rem; }
  .section-head h2 { font-size: 1.65rem; }

  /* Demo phones squeeze a bit more */
  .phone--smart { width: 220px; }
  .phone--flip  { width: 178px; }

  /* Spec card: stack labels above values to avoid cramped 2-col on tiny phones */
  .spec-card dl { grid-template-columns: 1fr; gap: .15rem 0; }
  .spec-card dt { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; margin-top: .55rem; }
  .spec-card dt:first-child { margin-top: 0; }

  /* Pricing button stays ≥44px tap */
  .price-cta { padding: .92rem 1rem; }
}

/* ---------- Tap feedback on cards (mobile-only, has no hover effect on desktop) ---------- */
@media (hover: none) {
  .price:active   { transform: translateY(0); box-shadow: 2px 2px 0 0 var(--ink); transition: none; }
  .btn-primary:active { background: var(--navy-deep); }
}

/* ---------- iOS tap-highlight removal (cleaner active state) ---------- */
@media (max-width: 820px) {
  a, button, summary, .price-cta, .btn-primary {
    -webkit-tap-highlight-color: rgba(12, 20, 34, .08);
  }
}
