/* ==========================================================================
   WebGrow — home page composition
   Scenes: hero (pinned before/after film) · how · first impressions (pinned
   annotations) · work · routes · faq · closing.
   ========================================================================== */


/* 1 · Hero ----------------------------------------------------------------- */
.hero { position: relative; background: var(--ink); }
.hero__sticky {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding: calc(var(--header-h) + 32px) 0 64px;
  overflow: clip;
}
.js-motion .hero { height: 220svh; }
.js-motion .hero__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 0;
  padding-bottom: 32px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58% 60% at 96% 4%, rgba(213, 245, 154, 0.11), transparent 70%),
    radial-gradient(46% 52% at 0% 100%, rgba(185, 161, 250, 0.085), transparent 72%);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(60% 55% at 72% 42%, #000 10%, transparent 78%);
  mask-image: radial-gradient(60% 55% at 72% 42%, #000 10%, transparent 78%);
  opacity: 0.55;
}

.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: center;
}
.hero__copy { grid-column: 1 / span 5; position: relative; z-index: 1; }
.hero__visual { grid-column: 6 / -1; position: relative; z-index: 2; }

.hero__copy .eyebrow { margin-bottom: 28px; }
.hero__title { margin-bottom: 30px; }
.hero__offer {
  max-width: 24ch;
  font-size: var(--fs-lead);
  line-height: 1.4;
  color: var(--text);
  text-wrap: balance;
}
.hero__price {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  font-size: var(--fs-body);
  color: var(--muted);
}
.hero__price::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero__price strong { color: var(--text); }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 38px;
}

.hero__stage { transform-origin: 0 0; will-change: transform; }
.hero__static-cap { margin-top: 22px; font-size: var(--fs-small); color: var(--muted); }
.hero__static-cap strong { color: var(--text); font-weight: 600; }
.js-motion .hero__static-cap { display: none; }

/* first paint = all "before"; hero.js sweeps the line in */
.js-motion .hero .ba { --x: 100; }
.js-motion .hero .ba__screen { --p: 1; }

/* captions of the pinned film */
.hero__caps { display: none; }
.js-motion .hero__caps {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  /* the next section overlaps the pin by --r-xl as it releases; keep captions clear of it */
  padding: 0 var(--gutter) max(calc(var(--r-xl) + 20px), env(safe-area-inset-bottom));
  pointer-events: none;
}
.hero-cap {
  grid-area: 1 / 1;
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  opacity: 0;
  visibility: hidden;
  translate: 0 14px;
  transition: opacity 0.45s var(--ease), translate 0.7s var(--ease-emph), visibility 0s linear 0.45s;
}
.hero-cap.is-active {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  pointer-events: auto;
  transition: opacity 0.6s var(--ease) 0.08s, translate 0.9s var(--ease-emph) 0.08s, visibility 0s;
}
.hero-cap__tag {
  font: italic 400 clamp(1.875rem, 1.4rem + 1.2vw, 2.5rem) / 1 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--paper);
}
.hero-cap__tag--after { color: var(--accent); }
.hero-cap__text { max-width: 46ch; color: var(--muted); line-height: 1.45; }
.hero-cap--cta .hero-cap__tag { color: var(--text); }
.hero-cap__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.hero-cap__note { font-size: var(--fs-small); color: var(--faint); }

@media (max-width: 899px) {
  .hero__sticky { justify-content: flex-start; padding-top: calc(var(--header-h) + 22px); }
  .hero__grid { grid-template-columns: minmax(0, 1fr); row-gap: 34px; }
  .hero__copy,
  .hero__visual { grid-column: 1; }
  .hero__copy .eyebrow { margin-bottom: 18px; }
  .hero__title { margin-bottom: 18px; }
  .hero__price { margin-top: 12px; }
  .hero__actions { margin-top: 26px; gap: 8px 22px; }
  .js-motion .hero { height: 210svh; }
  .js-motion .hero__caps { padding-bottom: max(calc(var(--r-xl) + 12px), env(safe-area-inset-bottom)); }
  .hero-cap { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 8px; }
  .hero-cap__tag { font-size: 1.875rem; }
  .hero-cap__text { font-size: 1rem; }
}


/* Shared section head ------------------------------------------------------ */
.section-head--split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 22px;
  align-items: end;
  margin-bottom: clamp(56px, 7vw, 96px);
}
.section-head--split > .eyebrow { grid-column: 1 / -1; }
.section-head--split > .headline { grid-column: 1 / span 7; }
.section-head__lede { max-width: 38ch; font-size: 1.125rem; line-height: 1.55; color: var(--muted); }
.section-head--split > .section-head__lede,
.section-head--split > .section-head__aside { grid-column: 9 / -1; padding-bottom: 0.4em; }
.section-head__aside { display: grid; justify-items: start; gap: 14px; }
.on-paper .section-head__lede { color: var(--paper-muted); }

@media (max-width: 899px) {
  .section-head--split > .headline,
  .section-head--split > .section-head__lede,
  .section-head--split > .section-head__aside { grid-column: 1 / -1; }
  .section-head--split { row-gap: 18px; }
}


/* 2 · How it works (paper sheet over the hero) ------------------------------ */
.how {
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * var(--r-xl));
  padding: var(--section-y) 0 calc(var(--section-y) + var(--r-xl));
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(20px, 2.6vw, 40px);
}
.steps::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(22, 23, 27, 0.18);
  transform-origin: left center;
}
/* the list itself only draws its rail; each step reveals on its own */
.js-motion .steps[data-reveal]:not(.is-in) { opacity: 1; transform: none; }
.js-motion .steps::before { transform: scaleX(0); transition: transform 1.6s var(--ease-emph) 0.15s; }
.js-motion .steps.is-in::before { transform: scaleX(1); }

.step { position: relative; padding-top: 38px; }
.step::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--paper-ink);
}
.step:last-child::before { background: var(--accent); }
.step__num {
  display: block;
  margin-bottom: 18px;
  font: 600 var(--fs-label) / 1 var(--font-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-muted);
}
.step__visual {
  display: grid;
  place-items: center;
  height: clamp(168px, 15vw, 204px);
  margin-bottom: 28px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(213, 245, 154, 0.1), transparent 60%),
    var(--ink);
  overflow: hidden;
  color: var(--text);
}
.step__title { font: 400 var(--fs-h3) / 1.05 var(--font-display); letter-spacing: -0.01em; color: var(--paper-ink); }
.step__text { max-width: 34ch; margin-top: 12px; color: var(--paper-muted); }

/* step 1 — a URL being typed */
.url-pill {
  display: inline-flex;
  align-items: center;
  height: 50px;
  padding: 0 6px 0 20px;
  border-radius: 999px;
  background: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: var(--fs-small);
  white-space: nowrap;
}
.url-pill__muted { color: var(--faint); }
.url-pill__text { color: var(--text); }
.url-pill__caret {
  width: 1.5px;
  height: 18px;
  margin-left: 2px;
  background: var(--accent);
}
.js-motion .url-pill__caret { animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.url-pill__go {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

/* step 2 — schematic before/after (CSS drawing, not a capture) */
.mini-ba {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(78%, 280px);
  aspect-ratio: 16 / 9.5;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 40px -20px rgba(0, 0, 0, 0.8);
}
.mini-ba::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  box-shadow: var(--accent-glow);
}
.mini-ba__before,
.mini-ba__after { display: flex; flex-direction: column; gap: 7%; padding: 14% 12%; }
.mini-ba__before { background: #d9d4c7; }
.mini-ba__before i { height: 5px; border-radius: 2px; background: #b3ac9b; }
.mini-ba__before i.s { width: 62%; }
.mini-ba__after { background: #121318; }
.mini-ba__after .k { height: 9px; width: 86%; border-radius: 3px; background: var(--accent); }
.mini-ba__after b { height: 4px; border-radius: 2px; background: rgba(245, 243, 238, 0.35); }
.mini-ba__after b.s { width: 70%; }
.mini-ba__after .v { height: 4px; width: 38%; border-radius: 2px; background: var(--violet); opacity: 0.85; }
.mini-ba__btn { height: 10px; width: 44%; margin-top: auto; border-radius: 999px; background: var(--accent); }

/* step 3 — the two outcomes */
.decide { display: grid; gap: 10px; width: min(80%, 290px); }
.decide__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}
.decide__opt span:last-child { font-weight: 500; opacity: 0.75; }
.decide__opt--yes { background: var(--accent); color: var(--accent-ink); }
.decide__opt--no { box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); }

@media (max-width: 899px) {
  .steps { grid-template-columns: minmax(0, 1fr); row-gap: 56px; }
  .steps::before { display: none; }
  .step { padding-top: 28px; border-top: 1px solid rgba(22, 23, 27, 0.16); }
  .step::before { display: none; }
}


/* 3 · First impressions (pinned annotations) -------------------------------- */
.impression {
  position: relative;
  z-index: 3;
  margin-top: calc(-1 * var(--r-xl));
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background:
    radial-gradient(55% 45% at 100% 0%, var(--glow-olive), transparent 72%),
    var(--ink);
}
.impression__sticky { padding: var(--section-y) 0; }

.impression__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: clamp(28px, 4vh, 56px);
  align-items: end;
}
.impression__head { grid-column: 1 / span 8; }
.impression__head .eyebrow { margin-bottom: 20px; }
.impression__lede { grid-column: 9 / -1; max-width: 34ch; padding-bottom: 0.4em; color: var(--muted); font-size: 1.125rem; line-height: 1.55; }
.annot-legend { grid-column: 1 / span 4; grid-row: 2; align-self: center; }
.annot { grid-column: 6 / -1; grid-row: 2; align-self: center; }
.annot__device {
  width: min(100%, calc((100svh - var(--header-h) - var(--fs-h2) * 1.9 - 170px) * 1.6));
  margin-left: auto;
}
.annot__caption { text-align: right; }

@media (min-width: 900px) {
  .js-motion .impression__track { height: 210svh; }
  .js-motion .impression__sticky {
    position: sticky;
    top: 0;
    height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + 12px) 0 28px;
  }
  .js-motion .impression__sticky > .container { width: 100%; }
}

@media (max-width: 899px) {
  .impression__grid { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .impression__head,
  .impression__lede,
  .annot,
  .annot-legend { grid-column: 1; grid-row: auto; }
  .annot { order: 3; justify-self: center; padding-left: 44px; --pin-off: 32px; margin-block: 12px 8px; }
  .annot-legend { order: 4; }
  .annot__device {
    --dev-r: 38px;
    width: min(64vw, 300px);
    padding: 8px;
    border-radius: var(--dev-r);
    background: var(--device-bezel);
  }
  .annot__device .device__bar { display: none; }
  .annot__device .device__screen { aspect-ratio: 390 / 844; border-radius: 30px; }
  .annot__caption { text-align: left; }
}


/* 4 · Work ----------------------------------------------------------------- */
.work { position: relative; padding: var(--section-y) 0; background: var(--ink); }
.work::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--line);
}
.work__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(20px, 2.4vw, 36px);
  row-gap: 56px;
}
@media (max-width: 1099px) and (min-width: 900px) {
  .case-card__body { padding-right: 0; }
}
@media (max-width: 899px) {
  .work__grid { grid-template-columns: minmax(0, 1fr); }
}


/* 5 · Website or Shopify ---------------------------------------------------- */
.routes {
  padding: var(--section-y) 0;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}
.routes__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  column-gap: clamp(32px, 5.5vw, 88px);
  transition:
    opacity 0.9s var(--ease-emph),
    transform 1.1s var(--ease-emph),
    grid-template-columns 0.7s var(--ease-emph);
}
@media (hover: hover) and (min-width: 900px) {
  .routes__split:has(.route--web:hover) { grid-template-columns: minmax(0, 1.14fr) 1px minmax(0, 1fr); }
  .routes__split:has(.route--shop:hover) { grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1.14fr); }
  .routes__split:has(.route:hover) .route:not(:hover) { opacity: 0.62; }
}
.routes__divider {
  position: relative;
  background: linear-gradient(180deg, transparent, rgba(213, 245, 154, 0.45) 18%, rgba(213, 245, 154, 0.45) 82%, transparent);
}
.routes__divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--ink-2);
  box-shadow: inset 0 0 0 1px rgba(213, 245, 154, 0.45);
  font: italic 400 1.25rem / 1 var(--font-display);
  color: var(--accent);
}

.route { display: flex; flex-direction: column; transition: opacity 0.5s var(--ease); }
.route__label {
  font: 600 var(--fs-label) / 1 var(--font-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.route__title {
  max-width: 15ch;
  margin-top: 22px;
  font: 400 clamp(2.125rem, 1.4rem + 1.7vw, 3.375rem) / 1 var(--font-display);
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.route__text { max-width: 44ch; margin-top: 22px; color: var(--muted); }
.route__ticks { margin-top: 34px; border-bottom: 1px solid var(--line); }
.route__ticks li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.route__ticks li::before {
  content: "";
  flex: 0 0 auto;
  width: 11px;
  height: 6px;
  margin-top: -4px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  rotate: -45deg;
}
.route__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 24px;
  margin-top: auto;
  padding-top: 44px;
}
.route__price {
  font: 400 clamp(3.25rem, 2rem + 3.4vw, 5.5rem) / 0.88 var(--font-display);
  letter-spacing: -0.02em;
}
.route__price span {
  display: block;
  margin-bottom: 12px;
  font: 600 var(--fs-label) / 1 var(--font-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 899px) {
  .routes__split { grid-template-columns: minmax(0, 1fr); row-gap: 56px; }
  .routes__divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(213, 245, 154, 0.45) 18%, rgba(213, 245, 154, 0.45) 82%, transparent);
  }
}


/* 6 · FAQ ------------------------------------------------------------------ */
.faq-section { padding: var(--section-y) 0; background: var(--ink-2); }
.faq-section__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 48px;
  align-items: start;
}
.faq-section__head { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 40px); }
.faq-section__head .headline { margin-top: 22px; }
.faq-section__note { margin-top: 26px; color: var(--muted); }
.faq-section__note a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 5px;
}
.faq-section__note a:hover { color: var(--accent); }
.faq { grid-column: 6 / -1; }

@media (max-width: 899px) {
  .faq-section__head,
  .faq { grid-column: 1 / -1; }
  .faq-section__head { position: static; }
  .faq__a p { padding-right: 0; }
}


/* 7 · Closing -------------------------------------------------------------- */
.closing {
  overflow: clip;
  padding-top: calc(var(--section-y) * 1.1);
  background:
    radial-gradient(70% 70% at 50% 125%, rgba(213, 245, 154, 0.13), transparent 70%),
    radial-gradient(42% 46% at 0% 0%, var(--glow-violet), transparent 72%),
    var(--ink);
}
.closing__title { margin-top: 28px; font-size: var(--fs-display); }
.closing__sub { max-width: 40ch; margin-top: 30px; font-size: var(--fs-lead); line-height: 1.45; color: var(--muted); }
.closing .cta-bar { margin-top: clamp(64px, 9vw, 128px); }
.cta-bar__action {
  transition:
    background-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    translate 0.6s var(--ease-emph),
    transform var(--dur-fast) var(--ease);
}
