/* Hyper-personalized → Infinitely scalable: the animation section built earlier, unchanged apart from scoping. */
/* Tokens taken from the Figma redesign (node 869:4068) */
:root {
  --paper: #f4f4f4;
  --rule: #eaeaea;
  --ink: #232323;
  --ink-75: rgba(35, 35, 35, 0.75);
  --ink-40: rgba(35, 35, 35, 0.4);
  --card: #ffffff;
  --red: #b23225;                 /* one red across the site (was #e0271e from the earlier file) */
  --red-deep: #8f281e;
  --red-wash: rgba(178, 50, 37, 0.1);
  --shadow-card:
    0 43px 6px rgba(0,0,0,0), 0 28px 5.5px rgba(0,0,0,0.01), 0 16px 4.5px rgba(0,0,0,0.04),
    0 7px 3.5px rgba(0,0,0,0.07), 0 2px 2px rgba(0,0,0,0.08);
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.vp button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }

/* (column rules now come from the page grid) */
.vp .wrap { position: relative; z-index: 1; width: min(calc(1200 * var(--u) * 1728 / 1440), 100% - 48px); margin: 0 auto; }


/* ---------- section ---------- */
.vp { position: relative; z-index: 1; height: 340vh; font-family: var(--font); color: var(--ink); }
.vp-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; }
/* the animation sits centred, its words centred beneath it; the two statements trade places in one spot */
.vp-grid { display: flex; flex-direction: column; align-items: center; gap: calc(36 * var(--u)); }
.vp-text { order: 1; width: 100%; }   /* the words lead, the animation follows */
.props { list-style: none; margin: 0; padding: 0; display: grid; text-align: center; }
.prop { grid-area: 1 / 1; opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 600ms cubic-bezier(.2,.7,.2,1), transform 600ms cubic-bezier(.2,.7,.2,1); }
.prop.on { opacity: 1; transform: none; pointer-events: auto; }
.prop-hit { display: block; width: 100%; text-align: center !important; cursor: default !important; }
.prop-line { display: none; }
.prop-title {
  display: block; font-weight: 500; font-size: var(--fs-h2); line-height: 1.214; letter-spacing: var(--tr-h2); color: var(--black);
}
.prop-title em { font-style: italic; color: var(--brand); }
.prop-body { display: block; }
.prop-desc {
  margin: calc(14 * var(--u)) auto 0; font-size: var(--fs-body); line-height: var(--lh-body); letter-spacing: var(--tr-body); color: var(--muted);
}
/* the frame takes what the viewport leaves after the words below it */
.frame-wrap { order: 2; position: relative; width: min(calc(1180 * var(--u)), 100%, calc((100svh - 64px - 310 * var(--u)) * 900 / 620)); }
.vp-pin { padding-top: calc(100 * var(--u)); box-sizing: border-box; }   /* clear of the fixed navbar */
.frame {
  position: relative; width: 100%; aspect-ratio: 900 / 620;
  overflow: hidden; isolation: isolate;
  /* no box: everything dissolves into the page, column rules and all */
  /* soft on every side: an ellipse for the sides, a short vertical fade so nothing meets the top or bottom edge */
  -webkit-mask-image: radial-gradient(57% 68% at 50% 52%, #000 56%, transparent 95%), linear-gradient(180deg, transparent 0%, #000 7%, #000 86%, transparent 99%);
  -webkit-mask-composite: source-in;
          mask-image: radial-gradient(57% 68% at 50% 52%, #000 56%, transparent 95%), linear-gradient(180deg, transparent 0%, #000 7%, #000 86%, transparent 99%);
          mask-composite: intersect;
}
/* mesh gradient: warm light behind her, cool haze around, dissolving into the page */
.mesh {
  /* palette comes from the site itself: paper, bone, a diluted blush of the brand red, a faint ember of the deep red, graphite haze */
  --c-glow: 236, 222, 208;   /* bone light behind her */
  --c-blush: 224, 120, 108;  /* #e0271e, heavily diluted */
  --c-ember: 168, 5, 0;      /* #a80500, a whisper by the phone */
  --c-haze: 150, 152, 158;   /* graphite */
  --c-haze2: 176, 176, 180;
  --c-core: 250, 247, 243;
  position: absolute; inset: -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(34% 44% at var(--wx, 57%) var(--wy, 40%), rgba(var(--c-glow), var(--wa, 0.9)), rgba(var(--c-glow), 0) 72%),
    radial-gradient(24% 30% at var(--rx, 64%) var(--ry, 30%), rgba(var(--c-blush), var(--ra, 0.24)), rgba(var(--c-blush), 0) 70%),
    radial-gradient(26% 26% at var(--px, 40%) var(--py, 62%), rgba(var(--c-ember), var(--pa, 0.1)), rgba(var(--c-ember), 0) 70%),
    radial-gradient(40% 44% at var(--cx, 84%) var(--cy, 80%), rgba(var(--c-haze), var(--ca, 0.3)), rgba(var(--c-haze), 0) 72%),
    radial-gradient(36% 40% at var(--kx, 14%) var(--ky, 18%), rgba(var(--c-haze2), var(--ka, 0.26)), rgba(var(--c-haze2), 0) 72%),
    radial-gradient(60% 62% at 52% 46%, rgba(var(--c-core), 0.95) 0%, rgba(var(--c-core), 0) 80%);
  filter: blur(18px);
}
/* alternates, for comparison: ?mesh=graphite (no red at all) · ?mesh=dawn (the earlier amber) */
.mesh.graphite { --c-glow: 236, 235, 233; --c-blush: 196, 196, 200; --c-ember: 120, 120, 126; --c-haze: 140, 142, 148; --c-haze2: 168, 168, 172; }
.mesh.dawn { --c-glow: 244, 178, 112; --c-blush: 255, 226, 170; --c-ember: 229, 160, 148; --c-haze: 160, 182, 214; --c-haze2: 176, 192, 216; --c-core: 247, 239, 230; }
.frame::after { /* film grain over everything, like the references */
  content: ""; position: absolute; inset: 0; z-index: 3000; pointer-events: none;
  background-image: var(--grain); background-size: 180px; opacity: 0.075; mix-blend-mode: overlay;
}
.frame-edge { display: none; }
.world { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-origin: 0 0; z-index: 1; }

.figure { position: absolute; width: 420px; height: 640px; left: -210px; top: -320px; will-change: transform, opacity, filter; }
.figure svg { width: 100%; height: 100%; display: block; overflow: visible; }
.figure.clay { width: 536px; height: 757px; left: -207px; top: -474px; }   /* canvas 1192x1685: extra room behind her for the long-exposure trails */
.figure.clay img {
  width: 100%; height: 100%; display: block; user-select: none; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent 97%); mask-image: linear-gradient(180deg, #000 74%, transparent 97%);
}

/* ---------- cards
   Both kinds are laid out at 2x (360x252) and scaled to 180x126 inside the panel, so Chrome rasterises their
   text at twice the density: tilted in 3D they stay crisp instead of going soft and jagged. */
.panel { position: absolute; width: 180px; height: 126px; left: -90px; top: -63px; border-radius: 12px; -webkit-font-smoothing: antialiased; }
.detail, .msg { position: absolute; left: 0; top: 0; width: 360px; height: 252px; transform: scale(0.5); transform-origin: 0 0; border-radius: 24px; }

/* ---------- signal cards: what we know about one viewer, each with where it came from and a glimpse of the data */
.detail {
  padding: 24px 26px 24px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,0.95), rgba(255,255,255,0) 60%),
    linear-gradient(165deg, rgba(255,253,250,0.9), rgba(250,245,239,0.74));
  -webkit-backdrop-filter: blur(24px) saturate(1.15); backdrop-filter: blur(24px) saturate(1.15);
  box-shadow:
    0 30px 40px -18px rgba(60,30,10,0.14), 0 10px 14px -6px rgba(60,30,10,0.08), 0 2px 3px rgba(0,0,0,0.05),
    inset 0 1.5px 0 rgba(255,255,255,1), inset 0 0 0 1px rgba(255,255,255,0.7), 0 0 0 1px rgba(60,40,20,0.06);
  display: grid; grid-template-rows: auto 1fr auto; color: var(--ink);
}
.detail > * { opacity: var(--front, 1); }
.detail .k { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(35,35,35,0.42); }
.detail .k svg { flex: none; width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.detail .src { margin-left: auto; font-size: 15px; font-weight: 500; letter-spacing: 0.02em; text-transform: none; color: rgba(35,35,35,0.5);
  padding: 5px 11px 5px 10px; border-radius: 999px; background: rgba(35,35,35,0.045); box-shadow: inset 0 0 0 1px rgba(35,35,35,0.06); display: inline-flex; align-items: center; gap: 7px; }
.detail .src::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3fae6a; box-shadow: 0 0 0 3px rgba(63,174,106,0.16); }
.detail .v { align-self: end; font-weight: 500; font-size: 50px; line-height: 1; letter-spacing: -0.05em; }
.detail .v em { font-style: normal; color: var(--red); }
.detail .sub { margin-top: 10px; font-size: 18px; letter-spacing: -0.015em; color: rgba(35,35,35,0.5); display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.detail .sub b { font-weight: 500; color: rgba(35,35,35,0.72); }
/* name: an initial, like a contact */
.detail .who { display: flex; align-items: center; gap: 16px; align-self: end; }
.detail .av { flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 26px; font-weight: 500; letter-spacing: -0.03em;
  background: radial-gradient(120% 120% at 25% 20%, #f08a4b, #b8321a 60%, #7a1e10); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 4px 10px -2px rgba(150,40,10,0.35); }
/* language: the voice it will be spoken in */
.detail .wave { display: flex; align-items: center; gap: 3px; height: 22px; }
.detail .wave i { width: 3px; border-radius: 2px; background: rgba(35,35,35,0.32); }
/* cares about: topics as chips */
.detail .chips { display: flex; gap: 8px; margin-top: 12px; }
.detail .chips span { font-size: 16px; letter-spacing: -0.01em; padding: 6px 12px; border-radius: 999px; background: rgba(35,35,35,0.05); color: rgba(35,35,35,0.62); white-space: nowrap; }
/* moment: where they are in the journey */
.detail .steps { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.detail .steps i { height: 6px; flex: 1; border-radius: 3px; background: rgba(35,35,35,0.09); }
.detail .steps i.done { background: rgba(35,35,35,0.55); }
.detail .steps i.now { background: var(--red); box-shadow: 0 0 0 3px rgba(178,50,37,0.14); }
/* tone: a dial between formal and warm */
.detail .dial { margin-top: 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; font-size: 15px; color: rgba(35,35,35,0.42); }
.detail .dial .track { position: relative; height: 4px; border-radius: 2px; background: linear-gradient(90deg, rgba(35,35,35,0.1), rgba(224,95,40,0.55)); }
.detail .dial .track::after { content: ""; position: absolute; left: 78%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.05); }
.panel .msg { opacity: 0; }

/* ---------- the videos: one template, a different greeting every time (pure UI: no faces) */
.msg {
  padding: 26px 28px 28px; display: grid; grid-template-rows: auto 1fr auto; color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #fcfaf8);
  box-shadow:
    0 26px 34px -18px rgba(60,30,10,0.16), 0 8px 12px -6px rgba(60,30,10,0.08), 0 2px 3px rgba(0,0,0,0.04),
    inset 0 1.5px 0 #fff, 0 0 0 1px rgba(60,40,20,0.07);
}
.msg .top { display: flex; align-items: center; gap: 12px; font-size: 18px; letter-spacing: -0.01em; color: rgba(35,35,35,0.45); font-variant-numeric: tabular-nums; }
.msg .play { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; box-shadow: 0 4px 10px -3px rgba(0,0,0,0.3); }
.msg .play::before { content: ""; margin-left: 3px; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.msg .lang { margin-left: auto; font-size: 15px; font-weight: 500; letter-spacing: 0.06em; color: rgba(35,35,35,0.5); padding: 5px 10px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(35,35,35,0.12); }
.msg .say { align-self: center; font-weight: 500; font-size: 44px; line-height: 1; letter-spacing: -0.05em; white-space: nowrap; }
.msg .say span { background: linear-gradient(transparent 86%, rgba(35,35,35,0.16) 86%, rgba(35,35,35,0.16) 96%, transparent 96%); }
.msg.mine .say span { color: var(--red); background: linear-gradient(transparent 86%, rgba(178,50,37,0.28) 86%, rgba(178,50,37,0.28) 96%, transparent 96%); }
/* the voice waveform is the progress bar: played in ink, still to come in grey */
.msg .wv { position: relative; height: 34px; }
.msg .wv > div { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; }
.msg .wv i { width: 4px; border-radius: 2px; background: rgba(35,35,35,0.13); }
.msg .wv .on { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.msg .wv .on i { background: var(--ink); }
.msg.mine .wv .on i { background: var(--red); }
.msg .wv .on.live { animation: listen var(--d) linear infinite; }
@keyframes listen { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.tile { position: absolute; width: 180px; height: 126px; left: -90px; top: -63px; opacity: 0; will-change: transform, opacity; border-radius: 12px; }

.dotfield { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* counter, inside the frame */
.count {
  position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); z-index: 3001; pointer-events: none; opacity: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; white-space: nowrap;
}
.count .n { font-weight: 500; font-size: var(--fs-body); letter-spacing: var(--tr-body); font-variant-numeric: tabular-nums; color: var(--ink); }
.count .l { font-size: var(--fs-small); letter-spacing: -0.01em; color: var(--ink-40); }

/* review controls (?controls) */
.controls {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50;
  display: flex; gap: 12px; align-items: center; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card); font-size: 12px;
}
.controls[hidden] { display: none; }
.controls button { background: var(--ink); color: #fff; padding: 6px 12px; border-radius: 999px; }
.controls input { width: 240px; accent-color: var(--ink); }

@media (max-width: 860px) {
  .vp-pin { align-items: flex-start; padding-top: 48px; }
  .vp-grid { gap: 24px; }
  .vp { height: 260vh; }
  .vp-pin { align-items: flex-start; padding-top: 100px; }   /* clears the phone navbar (10 + 76) while pinned */
  .vp-grid { gap: 8px; }
  .frame-wrap { width: min(100%, calc((100svh - 150px) * 430 / 700)); margin: 0 auto; }
  .frame { aspect-ratio: 430 / 700;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(180deg, transparent, #000 10%, #000 88%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(180deg, transparent, #000 10%, #000 88%, transparent);
    -webkit-mask-composite: source-in; mask-composite: intersect; }
  /* the mesh gets its own round fade, sized to the phone frame, so it never shows an edge; the figure stays crisp */
  .mesh { inset: 4%; filter: blur(24px);
    -webkit-mask-image: radial-gradient(50% 50% at 50% 48%, #000 35%, transparent 100%); mask-image: radial-gradient(50% 50% at 50% 48%, #000 35%, transparent 100%); }
  .count .n { font-size: 20px; } .count .l { font-size: 13px; }
  .count { position: relative; left: auto; bottom: auto; transform: none; margin-top: 4px; }
}
