/* AAS — aasolve.com
   One family, one accent. Light and dark via prefers-color-scheme.
   The page is a motherboard: the hero is a pinned stage where the platform is
   assembled as you scroll, a signal then rides a copper spine down the page and
   powers on each section ("chip"). Scrubbing uses CSS scroll-driven animations;
   site.js provides the same thing through --p / stroke-dashoffset where the
   browser lacks them. Reduced motion: everything shown in its final state. */

:root {
  --paper: #F4F5F2;
  --paper-2: #EBEEEA;
  --ink: #141A1F;
  --ink-2: #4A5550;
  --line: #C9CFCB;
  --teal: #0E6B63;
  --teal-ink: #0A4E48;
  --tint: #D9EEE8;
  --on-teal: #F4F5F2;

  /* Motherboard layer: copper traces and pins, chip package, silkscreen */
  --trace: #B9835A;
  --trace-a: 0.6;
  --pin: #A9734B;
  --chip: var(--paper-2);
  --chip-line: #CBC6BC;
  --silk: #7C8782;
  --glow: #2FB3A3;

  --font: "Avenir Next", "Avenir", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --measure: 62ch;
  --max: 1120px;
  --gutter: clamp(24px, 6vw, 72px);
  --gap: clamp(40px, 6vw, 80px);
  --fx: calc(var(--gutter) / 2);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.125rem, 1.05rem + 0.4vw, 1.3rem);
  --step-2: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.5rem + 3.6vw, 4.25rem);
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1614;
    --paper-2: #16201D;
    --ink: #E6EBE8;
    --ink-2: #A3B0AA;
    --line: #27342F;
    --teal: #3FB8A8;
    --teal-ink: #7DD6CA;
    --tint: #16302B;
    --on-teal: #0F1614;

    --trace: #D7966A;
    --trace-a: 0.55;
    --pin: #C98B60;
    --chip-line: #33403A;
    --silk: #8E9A94;
    --glow: #5EE3D0;
  }
}

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

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.015em; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 12px; top: -60px;
  padding: 8px 12px; background: var(--teal); color: var(--on-teal);
  border-radius: 4px; text-decoration: none; z-index: 10;
}
.skip:focus { top: 12px; }

/* Scroll progress: a thin copper line along the top edge */
.progress {
  position: fixed; top: 0; left: 0; z-index: 20;
  width: 100%; height: 2px;
  background: var(--trace);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .progress { animation: progress linear both; animation-timeline: scroll(root block); }
}
.no-tl .progress { transform: scaleX(var(--sp, 0)); }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Header -------------------------------------------------------------- */

.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 1.05rem; text-decoration: none; letter-spacing: -0.01em;
}
.mark { display: block; width: 30px; height: 30px; }

.nav { display: flex; gap: 26px; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 0.95rem; white-space: nowrap; }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.menu-btn {
  display: none;
  font: inherit; font-size: 0.95rem;
  background: none; border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink); padding: 6px 12px; cursor: pointer;
}

@media (max-width: 760px) {
  .menu-btn { display: inline-block; }
  .nav {
    display: none;
    position: absolute; left: var(--gutter); right: var(--gutter); top: 64px;
    flex-direction: column; gap: 0;
    background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px;
    padding: 6px 0; z-index: 5;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 18px; font-size: 1.05rem; color: var(--ink); }
  .nav a + a { border-top: 1px solid var(--line); }
}

/* Main holds the board layer behind everything ------------------------ */

#main {
  position: relative;
  isolation: isolate;
  padding-bottom: clamp(56px, 8vw, 112px);
  overflow-x: clip;
}

/* Scrubbed stages ------------------------------------------------------
   A .stage is a tall element with a named view timeline; its sticky .stage-pin
   stays on screen while the stage scrolls through. Every .scrub inside runs its
   keyframes over the part of the stage given by --s / --e (0..1). */

.stage { position: relative; }
.stage-pin { position: sticky; top: 0; min-height: 100vh; }
.stage-hero { view-timeline-name: --hero; view-timeline-axis: block; }
.stage-ec { view-timeline-name: --ec; view-timeline-axis: block; }

.scrub {
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-fill-mode: both;
}
@supports (animation-timeline: view()) {
  .stage-hero .scrub { animation-timeline: --hero; }
  .stage-ec .scrub { animation-timeline: --ec; }
  .scrub { animation-range: contain calc(var(--s, 0) * 100%) contain calc(var(--e, 1) * 100%); }
}
/* Browsers without scroll timelines: the animations are paused and site.js
   seeks their currentTime from the stage's scroll progress every frame. */
.no-tl .scrub, .no-tl .hero .stage-pin::before { animation-play-state: paused; animation-timeline: auto !important; }
.no-tl .progress { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .scrub { animation: none !important; }
  .stage { height: auto !important; min-height: 0 !important; }
  .stage-pin { position: static; min-height: 0; }
}

/* Hero: the opening stage ---------------------------------------------- */

.stage-hero { height: 280vh; }
.hero .stage-pin {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  overflow: hidden;
}
.hero .stage-pin { max-width: 1240px; }
/* board texture: a dot grid with its own parallax */
.hero .stage-pin::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -80px; bottom: -80px;
  background-image: radial-gradient(circle, var(--line) 1px, transparent 1.4px);
  background-size: 28px 28px;
  opacity: 0.55;
  pointer-events: none;
  animation: drift-far 1s linear both;
}
@supports (animation-timeline: view()) {
  .hero .stage-pin::before { animation-timeline: --hero; animation-range: contain 0% contain 100%; }
}
@media (prefers-reduced-motion: reduce) { .hero .stage-pin::before { animation: none; } }
@keyframes drift-far { from { transform: translateY(60px); } to { transform: translateY(-60px); } }

.hero-text { position: relative; --s: 0; --e: 1; animation-name: drift; }
@keyframes drift { from { transform: translateY(18px); } to { transform: translateY(-18px); } }

.hero h1 {
  font-size: var(--step-4);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  max-width: 16ch;
  text-wrap: balance;
}

.lede {
  margin-top: 28px;
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 52ch;
  color: var(--ink-2);
  --s: 0.74; --e: 0.86;
}
.actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.hero .actions { --s: 0.82; --e: 0.94; }
.rise { animation-name: rise; }
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade { animation-name: fade; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.btn {
  display: inline-block;
  padding: 14px 22px;
  background: var(--teal); color: var(--on-teal);
  border-radius: 8px; text-decoration: none; font-weight: 600;
}
.btn:hover { background: var(--teal-ink); }

.link { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; color: var(--ink); }
.link:hover { color: var(--teal); }

/* The schematic: an SVG wire layer under HTML component "chips" with 3D entry. */
.schematic { margin: 0; width: 100%; max-width: 580px; justify-self: end; container-type: inline-size; }
.board-fig { position: relative; aspect-ratio: 520 / 440; perspective: 1100px; }
.wires-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wires path { stroke: var(--teal); stroke-width: 2; stroke-dasharray: 220; animation-name: wire-draw; }
.wires path.out { stroke: var(--trace); stroke-opacity: var(--trace-a); stroke-width: 2.5; stroke-linecap: butt; }
.dotfill { fill: var(--teal); }
.w1 { --s: 0.44; --e: 0.56; } .w2 { --s: 0.46; --e: 0.58; } .w3 { --s: 0.48; --e: 0.60; }
.w4 { --s: 0.50; --e: 0.62; } .w5 { --s: 0.52; --e: 0.64; } .w6 { --s: 0.54; --e: 0.66; }
.out { --s: 0.80; --e: 0.86; }
@keyframes wire-draw {
  0% { opacity: 0; stroke-dashoffset: 220; }
  2% { opacity: 1; }
  100% { opacity: 1; stroke-dashoffset: 0; }
}
.surge path {
  stroke: var(--glow); stroke-width: 4; stroke-dasharray: 34 300; stroke-dashoffset: -300;
  opacity: 0; animation-name: surge;
}
.s1 { --s: 0.64; --e: 0.73; } .s2 { --s: 0.65; --e: 0.74; } .s3 { --s: 0.66; --e: 0.75; }
.s4 { --s: 0.65; --e: 0.74; } .s5 { --s: 0.66; --e: 0.75; } .s6 { --s: 0.67; --e: 0.76; }
.s-out { --s: 0.86; --e: 0.94; }
@keyframes surge {
  from { opacity: 1; stroke-dashoffset: 34; }
  to { opacity: 1; stroke-dashoffset: -300; }
}

.node {
  position: absolute;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--paper-2);
  border: 1.5px solid var(--line);
  border-radius: 6px;
  font-size: clamp(8px, 2.5cqw, 13px);
  line-height: 1.3;
  text-align: center;
  animation-name: node-in;
  will-change: transform, opacity;
  --tz: -260px; --rx: 0deg; --ry: 0deg;
}
.node b { font-weight: 600; color: var(--ink); }
.node span { color: var(--ink-2); font-size: 0.92em; }
.n1 { left: 2.69%; top: 12.27%; width: 20%; height: 10.9%; --tx: -160px; --ty: -70px; --ry: -45deg; --s: 0.10; --e: 0.30; }
.n2 { left: 77.3%; top: 12.27%; width: 20%; height: 10.9%; --tx: 160px; --ty: -70px; --ry: 45deg; --s: 0.13; --e: 0.33; }
.n3 { left: 0; top: 44.5%; width: 14.23%; height: 10.9%; --tx: -220px; --ty: 0px; --ry: -50deg; --s: 0.16; --e: 0.36; }
.n4 { left: 85.77%; top: 44.5%; width: 14.23%; height: 10.9%; --tx: 220px; --ty: 0px; --ry: 50deg; --s: 0.19; --e: 0.39; }
.n5 { left: 2.69%; top: 76.8%; width: 20%; height: 10.9%; --tx: -160px; --ty: 70px; --ry: -45deg; --s: 0.22; --e: 0.42; }
.n6 { left: 77.3%; top: 76.8%; width: 20%; height: 10.9%; --tx: 160px; --ty: 70px; --ry: 45deg; --s: 0.25; --e: 0.45; }
@keyframes node-in {
  0% { opacity: 0; transform: translate3d(var(--tx), var(--ty), var(--tz)) rotateX(var(--rx)) rotateY(var(--ry)); }
  40% { opacity: 1; }
  100% { opacity: 1; transform: translate3d(0, 0, 0) rotateX(0) rotateY(0); }
}
.core {
  left: 36.54%; top: 34.09%; width: 26.92%; height: 31.82%;
  border: 2px solid var(--line); border-radius: 10px;
  font-size: clamp(9px, 2.9cqw, 15px);
  gap: 2px;
  animation-name: core-in;
  --s: 0.04; --e: 0.26;
}
.core b, .core span { position: relative; color: var(--teal-ink); }
.core span { font-size: 0.8em; }
.core-lit {
  position: absolute; inset: -2px; border-radius: 10px;
  background: var(--tint); border: 2px solid var(--teal);
  animation-name: fade; --s: 0.72; --e: 0.80;
}
.core-glow {
  position: absolute; inset: -16px; border-radius: 24px; z-index: -1;
  box-shadow: 0 0 56px 14px color-mix(in srgb, var(--glow) 40%, transparent);
  animation-name: glow-on; --s: 0.72; --e: 0.84;
}
@keyframes core-in {
  from { opacity: 0; transform: translate3d(0, 50px, -420px) rotateX(32deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotateX(0); }
}
@keyframes glow-on {
  0% { opacity: 0; }
  55% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* Narrow screens: nothing is pinned. Each scrub is bound to its subject instead
   (the figure, the phone) and plays while that subject is fully on screen. */
@media (max-width: 860px) {
  .stage-hero { height: auto; min-height: 0; }
  .board-fig { view-timeline-name: --hero; view-timeline-axis: block; }
  .hero .stage-pin { position: static; min-height: 0; grid-template-columns: 1fr; padding-top: clamp(40px, 8vw, 72px); padding-bottom: clamp(48px, 7vw, 96px); overflow: visible; }
  .hero .stage-pin::before { display: none; }
  .hero-text, .lede, .hero .actions { animation-name: none; }
  .schematic { max-width: 480px; justify-self: start; }
  .board-fig { perspective: none; overflow: clip; }
  .node { --tz: 0px; --ry: 0deg; will-change: auto; }
  .n1, .n5 { --tx: -60px; } .n2, .n6 { --tx: 60px; } .n3 { --tx: -80px; } .n4 { --tx: 80px; }
}

/* Board layer: generated by site.js ----------------------------------- */

.board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.board .tr {
  fill: none;
  stroke: var(--trace);
  stroke-opacity: var(--trace-a);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: butt;
  stroke-dasharray: var(--dash);
  stroke-dashoffset: var(--from);
}
.board .tr.spine { stroke-width: 2.5; }
.board .pin { fill: none; stroke: var(--pin); stroke-opacity: 0.5; stroke-width: 2.5; stroke-linecap: round; }
.board .via { fill: var(--trace); fill-opacity: 0.8; }
.board .via-hole { fill: var(--paper); }
/* the signal riding the spine at the reader's position */
.board .sig { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 44 var(--dash); stroke-dashoffset: 44; }
.board .sig-glow { stroke: var(--glow); stroke-width: 14; stroke-opacity: 0.22; }
.board .sig-mid { stroke: var(--glow); stroke-width: 6; stroke-opacity: 0.55; }
.board .sig-core { stroke: var(--teal-ink); stroke-width: 2.25; }
@media (prefers-color-scheme: dark) { .board .sig-core { stroke: #EAFFFB; } }

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .board .tr.anim { animation: trace-draw linear both; animation-timeline: scroll(root block); }
    .board .sig.anim { animation: signal-ride linear both; animation-timeline: scroll(root block); }
  }
}
@keyframes trace-draw { from { stroke-dashoffset: var(--from); } to { stroke-dashoffset: 0; } }
@keyframes signal-ride { from { stroke-dashoffset: 44; } to { stroke-dashoffset: calc(44 - var(--dash)); } }

@media (prefers-reduced-motion: reduce) {
  .board .tr { animation: none !important; stroke-dashoffset: 0 !important; }
  .board .sig { display: none; }
}

/* pins light up in sequence when the chip powers on */
@media (prefers-reduced-motion: no-preference) {
  .board .pins.on line { animation: pin-light 0.6s both; animation-delay: calc(var(--i, 0) * 24ms); }
}
@keyframes pin-light {
  0% { stroke: var(--pin); stroke-opacity: 0.5; }
  35% { stroke: var(--glow); stroke-opacity: 1; }
  100% { stroke: var(--pin); stroke-opacity: 0.85; }
}

/* Sections are chips ---------------------------------------------------- */

.section {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--gap) + clamp(36px, 4vw, 56px)) var(--gutter) clamp(36px, 4vw, 56px);
}
.section::before {
  content: "";
  position: absolute;
  top: var(--gap); bottom: 0; left: var(--fx); right: var(--fx);
  border: 1px solid var(--chip-line);
  border-radius: 18px;
  background: var(--chip);
  z-index: -1;
  transition: border-color 0.8s var(--ease);
}
.section::after {
  content: "";
  position: absolute;
  top: calc(var(--gap) + 16px); left: calc(var(--fx) + 16px);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--chip-line);
  transition: background-color 0.8s var(--ease);
}
.silk {
  position: absolute;
  top: calc(var(--gap) + 13px); right: calc(var(--fx) + 18px);
  font-size: 11px; line-height: 1;
  letter-spacing: 0.12em;
  color: var(--silk);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.section.on::before { border-color: color-mix(in srgb, var(--teal) 55%, var(--chip-line)); }
.section.on::after { background: var(--teal); }

/* power-on: dimmed and 24px low until the signal arrives */
@media (prefers-reduced-motion: no-preference) {
  .section .body {
    opacity: 0.6;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }
  .products .body { transform: none; }
  .section.on .body { opacity: 1; transform: translateY(0); }
  .section .silk { opacity: 0.4; }
  .section.on .silk { opacity: 1; animation: silk-flicker 0.7s steps(1, end) both; }
  .section.on h2 .ch { animation: boot 0.5s both; animation-delay: calc(var(--i, 0) * 22ms); }
}
.section h2 .ch { display: inline-block; white-space: pre; }
@keyframes silk-flicker {
  0% { opacity: 0.4; } 18% { opacity: 1; } 28% { opacity: 0.3; } 42% { opacity: 1; }
  55% { opacity: 0.5; } 68% { opacity: 1; } 100% { opacity: 1; }
}
@keyframes boot {
  0% { opacity: 0.25; transform: translateY(5px); }
  30% { opacity: 1; transform: translateY(0); }
  45% { opacity: 0.4; }
  60% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}

.section h2 {
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section h3 { font-size: var(--step-2); margin-bottom: 12px; }
.section p { max-width: var(--measure); color: var(--ink-2); }
.section h3 + p { color: var(--ink); }

.section-note { margin: -16px 0 32px; color: var(--ink-2); }

.pads::before {
  content: "";
  position: absolute;
  top: -2px; left: 0;
  width: 34px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--pin) 0 6px, transparent 6px 13px);
  opacity: 0.55;
  border-radius: 1px;
}

/* Services: a ruled 2x2 list, not cards */
.service-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(32px, 5vw, 72px);
}
.service-list li {
  position: relative;
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
}
.service-list li p { color: var(--ink-2); }
@media (max-width: 720px) {
  .service-list { grid-template-columns: 1fr; }
}

/* Process: a real sequence, so it is numbered */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--tint); color: var(--teal-ink);
  font-weight: 700; font-size: 0.95rem;
  margin-bottom: 18px;
}
.steps h3 { font-size: var(--step-1); }
.steps p { color: var(--ink-2); }
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
}

/* Work: cards with a kicker, no shadows; a light tilt on hover (fine pointers) */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 28px 24px;
  display: flex; flex-direction: column;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .card {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.3s var(--ease);
  }
}
.card.pads::before { top: -2px; left: 26px; }
.card-kicker { color: var(--teal-ink); font-weight: 600; font-size: 0.95rem; margin-bottom: 10px; }
.card h3 { font-size: var(--step-1); line-height: 1.2; }
.card p { color: var(--ink-2); }
.chips { margin-top: auto; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: 0.85rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 11px; background: var(--paper-2);
}
@media (min-width: 721px) {
  .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
}

/* Products: Expense Collector, the big chip --------------------------- */
.products::before {
  background: color-mix(in srgb, var(--tint) 32%, var(--paper-2));
  border-color: color-mix(in srgb, var(--teal) 32%, var(--chip-line));
}
.product-intro {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.product-name { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.025em; margin-bottom: 0; }
.product-tagline {
  margin-top: 14px;
  font-size: var(--step-2);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 24ch;
  text-wrap: balance;
}
.product-intro .actions { margin-top: 24px; }
.product-avail { margin-top: 14px; font-size: 0.92rem; max-width: 48ch; line-height: 1.5; }
.product-avail + .product-avail { margin-top: 8px; }

/* The scene: a phone on the left, scrubbed in three steps, features highlighted in sync */
.stage-ec { height: 260vh; margin-top: clamp(32px, 5vw, 64px); }
.ec-pin {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: 100vh;
}
.phone {
  position: relative;
  width: min(100%, 250px);
  aspect-ratio: 9 / 18.5;
  margin: 0 auto;
  border-radius: 36px;
  background: var(--ink);
  box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --s: 0; --e: 0.06;
}
.phone::before {
  content: ""; position: absolute; left: 50%; top: 14px; width: 60px; height: 6px;
  margin-left: -30px; border-radius: 3px; background: rgba(128, 128, 128, 0.35); z-index: 2;
}
.screen {
  position: absolute; inset: 9px; border-radius: 28px; overflow: hidden;
  background: #F7F8F5; font-size: 11px; line-height: 1.3; color: #1A1F1D;
  --sc-ink2: #5F6763; --sc-line: #D9DCD6; --sc-2: #ECEEE9; --sc-teal: #0E6B63;
}
.scene { position: absolute; inset: 0; }
.sc-a { background: #141917; animation-name: scene-a; --s: 0.05; --e: 0.38; opacity: 0; }
.sc-b { animation-name: scene-b; --s: 0.34; --e: 0.73; opacity: 0; }
.sc-c { animation-name: fade; --s: 0.70; --e: 0.76; }
@keyframes scene-a { 0% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes scene-b { 0% { opacity: 0; } 12% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }

/* step 1: the receipt on the camera, the outline snaps to it, it straightens */
.paper {
  position: absolute; left: 20%; top: 20%; width: 60%; height: 56%;
  background: #FBFBF7; border-radius: 3px; padding: 10% 9%;
  display: flex; flex-direction: column; gap: 7%;
  transform-origin: 50% 50%;
  --s: 0.22; --e: 0.33;
}
.ln { display: block; height: 4px; border-radius: 2px; background: #C9CCC6; width: 80%; }
.ln.h { height: 6px; background: #5B615D; width: 60%; }
.ln.s { width: 50%; }
.tot { display: block; margin-top: auto; height: 7px; width: 70%; border-radius: 2px; background: #2D3330; align-self: flex-end; }
.straighten { animation-name: straighten; }
@keyframes straighten {
  from { transform: rotate(-7deg) scale(1); }
  to { transform: rotate(0deg) scale(1.3) translateY(-3%); }
}
.outline {
  position: absolute; inset: -5px; border: 2px solid var(--glow); border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 0 24px color-mix(in srgb, var(--glow) 40%, transparent);
  opacity: 0; animation-name: snap; --s: 0.08; --e: 0.24;
}
@keyframes snap {
  0% { opacity: 0; transform: rotate(8deg) scale(1.25); }
  30% { opacity: 0.6; transform: rotate(3deg) scale(1.1); }
  60% { opacity: 1; transform: rotate(0) scale(1); }
  85% { opacity: 1; transform: rotate(0) scale(1); }
  100% { opacity: 0; transform: rotate(0) scale(1); }
}

/* step 2: fields fill in, the supplier is verified */
.thumb {
  margin: 14% 10% 6%; width: 32%; padding: 5% 4%; background: #FBFBF7; border: 1px solid var(--sc-line);
  border-radius: 3px; display: flex; flex-direction: column; gap: 4px;
}
.thumb .ln { height: 3px; } .thumb .ln.h { height: 4px; }
.form { margin: 0 10%; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--sc-line); }
.row em { font-style: normal; color: var(--sc-ink2); }
.row b { font-weight: 600; text-align: right; }
.type-in { animation-name: type-in; }
.row:nth-child(1) .val { --s: 0.42; --e: 0.46; }
.row:nth-child(2) .val { --s: 0.47; --e: 0.51; }
.row:nth-child(3) .val { --s: 0.52; --e: 0.56; }
.row:nth-child(4) .val { --s: 0.57; --e: 0.61; }
@keyframes type-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
.badge {
  margin: 12px 10% 0; display: inline-flex; align-items: center; gap: 5px;
  color: var(--sc-teal); font-weight: 600; font-size: 10.5px; --s: 0.61; --e: 0.64;
}
.badge svg { width: 14px; height: 14px; }
.tick { fill: none; stroke: var(--sc-teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; animation-name: check-draw; --s: 0.62; --e: 0.67; }
@keyframes check-draw { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }

/* step 3: the monthly package drops into the envelope */
.pack { position: absolute; left: 50%; top: 14%; margin-left: -48px; display: flex; gap: 8px; opacity: 0; animation-name: to-env; --s: 0.76; --e: 0.88; --dy: 108px; }
.file {
  position: relative; width: 44px; height: 56px; border: 1.5px solid var(--sc-ink2); border-radius: 4px; background: #fff;
  display: grid; place-items: end center; padding-bottom: 6px; font-size: 10px; font-weight: 700; color: #1A1F1D;
  clip-path: polygon(0 0, 70% 0, 100% 22%, 100% 100%, 0 100%);
}
.file::before { content: ""; position: absolute; right: 0; top: 0; width: 13px; height: 12px; border-left: 1.5px solid var(--sc-ink2); border-bottom: 1.5px solid var(--sc-ink2); background: var(--sc-2); }
@keyframes to-env {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  70% { opacity: 1; transform: translateY(var(--dy)) scale(0.55); }
  100% { opacity: 0; transform: translateY(var(--dy)) scale(0.45); }
}
.env {
  position: absolute; left: 50%; top: 42%; width: 128px; height: 86px; margin-left: -64px;
  border: 1.5px solid var(--sc-ink2); border-radius: 7px; background: #fff; perspective: 320px;
}
.env::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56%;
  background: var(--sc-2); clip-path: polygon(0 100%, 50% 0, 100% 100%);
}
.flap {
  position: absolute; left: -1.5px; right: -1.5px; top: -1.5px; height: 58%;
  background: #D9EEE8; border: 1.5px solid var(--sc-teal); clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0; animation-name: flap-close; --s: 0.86; --e: 0.92;
}
@keyframes flap-close { from { transform: rotateX(180deg); } to { transform: rotateX(0deg); } }
.sent { position: absolute; left: 8%; right: 8%; top: 66%; text-align: center; color: var(--sc-teal); font-weight: 600; font-size: 12px; --s: 0.90; --e: 0.97; }

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(24px, 3vw, 40px);
}
.features li { position: relative; padding: 20px 0 24px; border-top: 1px solid var(--line); }
.features h4 { font-size: var(--step-1); line-height: 1.2; margin-bottom: 8px; }
.features p { color: var(--ink-2); font-size: 0.97rem; }
.feat { animation-name: feat; }
.f1 { --s: 0.04; --e: 0.36; }
.f2, .f3 { --s: 0.36; --e: 0.70; }
.f4, .f5, .f6 { --s: 0.70; --e: 0.98; animation-name: feat-last; }
@keyframes feat { 0% { opacity: 0.6; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0.6; } }
@keyframes feat-last { 0% { opacity: 0.6; } 15% { opacity: 1; } 100% { opacity: 1; } }

@media (max-width: 1000px) {
  .product-intro { grid-template-columns: 1fr; }
  .product-tagline { max-width: 32ch; }
}
@media (max-width: 860px) {
  .stage-ec { height: auto; min-height: 0; }
  .ec-pin { position: static; grid-template-columns: 1fr; min-height: 0; gap: 32px; }
  .phone { width: min(100%, 230px); view-timeline-name: --ec; view-timeline-axis: block; }
  .feat { animation-name: none; }
}
@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; }
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.about-text p { color: var(--ink); max-width: 56ch; }
.about-text p + p { margin-top: 18px; }
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div {
  display: grid; grid-template-columns: 9em 1fr; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* Contact */
.contact-lede { color: var(--ink); font-size: var(--step-1); max-width: 40ch; }
.contact-email {
  display: inline-block;
  margin-top: 28px;
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--teal);
  text-decoration: none;
  border-bottom: 3px solid var(--teal);
  line-height: 1.2;
  word-break: break-all;
}
.contact-email:hover { color: var(--teal-ink); border-color: var(--teal-ink); }
.office { margin-top: 36px; font-style: normal; color: var(--ink-2); line-height: 1.6; }

/* Narrow screens: no package outline, a single spine down the left margin,
   each chip reduced to its top rule and silkscreen label. */
@media (max-width: 860px) {
  .section { padding-top: calc(var(--gap) + 30px); padding-bottom: 30px; }
  .section::before {
    left: var(--gutter); right: var(--gutter); bottom: auto;
    height: 0;
    border: 0; border-top: 1px solid var(--chip-line);
    border-radius: 0;
    background: none;
  }
  .products::before { border-top-color: color-mix(in srgb, var(--teal) 45%, var(--chip-line)); }
  .section.on::before { border-top-color: color-mix(in srgb, var(--teal) 60%, var(--chip-line)); }
  .section::after { display: none; }
  .silk { top: calc(var(--gap) - 19px); right: var(--gutter); }
  .section-note { margin-top: -12px; }
}

/* Footer ---------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}
.foot .legal, .foot .copy {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  font-size: 0.9rem;
  color: var(--ink-2);
}
.foot .legal { padding-top: 28px; display: flex; flex-wrap: wrap; gap: 6px 0; }
.foot .legal span + span::before { content: "/"; margin: 0 10px; color: var(--line); }
.foot .copy { padding-top: 10px; padding-bottom: 28px; }

/* 404 */
.notfound {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 12vw, 160px) var(--gutter);
  min-height: 60vh;
}
.notfound h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.03em; max-width: 14ch; }
.notfound p { margin-top: 24px; max-width: 48ch; color: var(--ink-2); font-size: var(--step-1); }
.notfound .actions { margin-top: 32px; }
