/* The home page's phone story (Oct 28, 2026). As the visitor scrolls, the business line rings (lines pulse out of
   the top of the phone, ring after ring), Ringerang answers, the call plays with the voice
   bars moving, "Client confirmed" appears with a check mark drawn in a circle, and the owner's text slides in.

   No scripts: everything is tied to scrolling with CSS. Browsers that can't do that, and visitors who ask for less
   motion, get the still version: the steps as a list beside the phone's finished screen. This file is only loaded on
   the home page. It draws a phone, so it uses a phone's rounded corners and circles (site.css keeps controls square). */

.story {
  --stage: #111316;
  --stage-2: #1b1e22;
  --on-stage: #f3f4f6;
  --on-stage-2: #c5cad0;
  --on-stage-muted: #9aa1a9;
  --stage-line: #2c3136;
  --ring: #f39a62;
  --confirm: #6cc48f;
  --confirm-deep: #1f6b45;
  --screen: #0c0d0f;
  --bubble-ai: #22262b;
  --bubble-caller: #9a3412;
  position: relative;
  color: var(--on-stage);
  background:
    radial-gradient(48rem 30rem at 12% 8%, rgba(243, 154, 98, .07), transparent 70%),
    linear-gradient(180deg, var(--stage) 0%, var(--stage-2) 48%, var(--stage) 100%);
  padding: 120px 0 112px;
  overflow-x: clip;
}
.story ::selection { background: #9a3412; color: #fff; }
.story-head { text-align: center; margin-bottom: 56px; }
.story-head h2 { color: var(--on-stage); font-size: clamp(2.1rem, 4.8vw, 3.6rem); letter-spacing: -0.035em; line-height: 1.02;
  max-width: 14em; margin: 0 auto 18px; text-wrap: balance; }
.story-head p { color: var(--on-stage-2); font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 30em; margin: 0 auto; text-wrap: balance; }

/* Still layout (the default): the steps as a numbered list on the left, the finished phone on the right. */
.story-stage { display: grid; grid-template-columns: minmax(0, 30rem) auto; justify-content: center; gap: 56px clamp(56px, 8vw, 120px);
  align-items: center; }
.story-steps { list-style: none; margin: 0; padding: 0; counter-reset: story; max-width: 30rem; }
.story-steps li { counter-increment: story; padding: 18px 0 18px 44px; border-top: 1px solid var(--stage-line); position: relative; }
.story-steps li:last-child { border-bottom: 1px solid var(--stage-line); }
.story-steps li::before { content: counter(story); position: absolute; left: 0; top: 20px; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--stage-line); color: var(--ring); font: 600 .8rem/24px var(--mono); text-align: center; }
.story-steps h3 { color: var(--on-stage); font-size: 1.2rem; margin: 0 0 4px; }
.story-steps p { color: var(--on-stage-2); margin: 0; max-width: 32em; }
.story-progress { display: none; }

/* The phone. Sizes inside the screen follow the phone's width (container units), so it stays a phone at any size. */
.phone { position: relative; margin: 0; justify-self: center; display: grid; justify-items: center; }
.phone-body { position: relative; z-index: 1; height: min(76svh, 640px); aspect-ratio: 9 / 19.2; padding: 1.6%;
  border-radius: 13% / 6.2%;
  background: linear-gradient(150deg, #3a3f45 0%, #16181b 32%, #0b0c0e 70%, #2a2e33 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .10) inset, 0 2px 1px rgba(255, 255, 255, .08) inset,
    0 50px 90px -30px rgba(0, 0, 0, .75), 0 20px 40px -20px rgba(0, 0, 0, .6); }
.phone::before, .phone::after { content: ""; position: absolute; z-index: 0; inset: 8% -38% 14%; border-radius: 50%; pointer-events: none;
  filter: blur(46px); }
.phone::before { background: radial-gradient(closest-side, rgba(194, 65, 12, .6), rgba(194, 65, 12, 0)); opacity: .35; }
.phone::after { background: radial-gradient(closest-side, rgba(108, 196, 143, .45), rgba(108, 196, 143, 0)); opacity: .55; }
.phone-screen { position: relative; height: 100%; overflow: hidden; border-radius: 11.4% / 5.4%; container-type: inline-size;
  background: radial-gradient(120% 60% at 50% 0%, #1f2328 0%, var(--screen) 62%); color: var(--on-stage); font-size: 4.6cqw; line-height: 1.35; }
.island { position: absolute; z-index: 5; top: 3.4cqw; left: 50%; width: 30cqw; height: 8.6cqw; margin-left: -15cqw; border-radius: 99px; background: #000; }
.phone-label { margin-top: 18px; color: var(--on-stage-muted); font: 500 .78rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase; }

/* Lines pulsing out of the top of the phone while it rings. */
.ring-lines { position: absolute; z-index: 2; left: 50%; bottom: 100%; width: 70%; margin-left: -35%; height: auto; overflow: visible;
  opacity: 0; }
.ring-lines path { fill: none; stroke: var(--ring); stroke-width: 3.2; stroke-linecap: round; transform-box: view-box; transform-origin: 100px 80px; }

/* Screens: ringing, on the call, confirmed. Each fills the screen; only one shows at a time. */
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 20cqw 7cqw 9cqw; }
.scr-ring, .scr-call { opacity: 0; }
.scr-ring { align-items: center; text-align: center; padding-top: 30cqw; }
.scr-ring .scr-small { margin: 0; color: var(--on-stage-muted); font-size: 4.8cqw; }
.scr-ring .scr-big { margin: 3cqw 0 2cqw; font-family: var(--display); font-weight: 700; font-size: 9.4cqw; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; }
.scr-buttons { margin-top: auto; width: 100%; display: flex; justify-content: space-between; padding: 0 6cqw; }
.scr-buttons span { width: 18cqw; height: 18cqw; border-radius: 50%; display: grid; place-items: center; }
.scr-buttons svg { width: 8cqw; height: 8cqw; fill: #fff; }
.b-decline { background: #c2382b; }
.b-decline svg { transform: rotate(135deg); }
.b-answer { background: #2f9e5d; box-shadow: 0 0 0 0 rgba(47, 158, 93, .6); }

.call-status { display: flex; align-items: center; gap: 2.4cqw; margin: 0; font-size: 4.4cqw; color: var(--confirm); font-weight: 600; }
.live-dot { width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: var(--confirm); box-shadow: 0 0 0 1.4cqw rgba(108, 196, 143, .18); }
.call-who { margin: 1.6cqw 0 0; font-family: var(--display); font-size: 7cqw; font-weight: 700; letter-spacing: -0.02em; }
.voice { display: flex; align-items: center; gap: 1.6cqw; height: 10cqw; margin: 3cqw 0 4cqw; }
.voice span { width: 2cqw; height: 100%; border-radius: 1cqw; background: linear-gradient(180deg, var(--ring), #c2410c); transform-origin: 50% 50%;
  transform: scaleY(.3); }
.voice span:nth-child(2n) { transform: scaleY(.55); }
.voice span:nth-child(3n) { transform: scaleY(.8); }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2.6cqw; font-size: 4.4cqw; line-height: 1.3; }
.lines li { max-width: 88%; padding: 2.6cqw 3.6cqw; border-radius: 4cqw; }
.lines .who { display: block; font-size: 3.3cqw; font-weight: 600; opacity: .7; margin-bottom: .6cqw; }
.l-ai { align-self: flex-start; background: var(--bubble-ai); color: var(--on-stage); border-bottom-left-radius: 1.2cqw; }
.lines[data-n="6"] { gap: 2.1cqw; font-size: 4.05cqw; }
.lines[data-n="6"] li { padding: 2.2cqw 3.4cqw; }
.l-caller { align-self: flex-end; background: var(--bubble-caller); color: #fff; border-bottom-right-radius: 1.2cqw; }

.scr-done { align-items: center; justify-content: center; text-align: center; padding-top: 12cqw; }
.check { width: 36cqw; height: 36cqw; overflow: visible; }
.check circle { fill: rgba(108, 196, 143, .12); stroke: var(--confirm); stroke-width: 3.4; stroke-dasharray: 176; stroke-dashoffset: 0;
  transform: rotate(-90deg); transform-origin: 50% 50%; }
.check path { fill: none; stroke: var(--confirm); stroke-width: 4.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 44;
  stroke-dashoffset: 0; }
.done-title { margin: 5cqw 0 2cqw; color: var(--confirm); font-family: var(--display); font-weight: 750; font-size: 9.2cqw; letter-spacing: -0.02em; }
.done-detail { margin: 0; color: var(--on-stage-2); font-size: 4.8cqw; line-height: 1.45; }

/* The owner's text, dropping in like a notification. */
.sms-note { position: absolute; z-index: 4; top: 15cqw; left: 4cqw; right: 4cqw; padding: 3.4cqw 4cqw 3.8cqw; border-radius: 6cqw;
  /* Solid, not frosted: a backdrop blur on something that moves draws with gaps in some browsers (Safari most). */
  background: linear-gradient(180deg, #3a3f45 0%, #30353a 100%);
  box-shadow: 0 6cqw 12cqw -4cqw rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08) inset; font-size: 4.2cqw; line-height: 1.36; }
.sms-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 1.6cqw; color: var(--on-stage-2); font-size: 3.4cqw; }
.sms-app { display: flex; align-items: center; gap: 2cqw; font-weight: 600; letter-spacing: .02em; }
.sms-app i { width: 5.4cqw; height: 5.4cqw; border-radius: 1.4cqw; background: linear-gradient(160deg, #e0601c, #9a3412); }
.sms-note .who { margin: 0 0 .8cqw; font-weight: 700; color: #fff; }
.sms-note .sms-body { margin: 0; color: #e4e7eb; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .story { padding: 88px 0 80px; }
  .story-head { margin-bottom: 40px; }
  .story-stage { grid-template-columns: 1fr; gap: 40px; }
  .phone { order: -1; }
  .phone-body { height: min(68svh, 560px); }
  .story-steps { max-width: none; }
}

/* ---------------------------------------------------------------- the moving version */
/* The ring, the answer button, and the voice bars also move only as the visitor scrolls: nothing loops on its own,
   so there is nothing that needs a pause button (WCAG 2.2.2). Each runs over its own part of the story (see below). */
@keyframes s-ring-pulse {
  0%, 4% { opacity: 1; transform: scale(1); }
  24% { opacity: 0; transform: scale(1.14); }
  24.1% { opacity: 0; transform: scale(.7); }
  33% { opacity: 1; transform: scale(1); }
  57% { opacity: 0; transform: scale(1.14); }
  57.1% { opacity: 0; transform: scale(.7); }
  66% { opacity: 1; transform: scale(1); }
  90% { opacity: 0; transform: scale(1.14); }
  90.1%, 100% { opacity: 0; transform: scale(.7); }
}
@keyframes s-answer {
  0% { box-shadow: 0 0 0 0 rgba(47, 158, 93, .6); }
  30% { box-shadow: 0 0 0 5cqw rgba(47, 158, 93, 0); }
  30.1% { box-shadow: 0 0 0 0 rgba(47, 158, 93, .6); }
  63% { box-shadow: 0 0 0 5cqw rgba(47, 158, 93, 0); }
  63.1% { box-shadow: 0 0 0 0 rgba(47, 158, 93, .6); }
  96%, 100% { box-shadow: 0 0 0 5cqw rgba(47, 158, 93, 0); }
}
@keyframes s-talk { 0% { transform: scaleY(.25); } 3.57% { transform: scaleY(1); } 7.14% { transform: scaleY(.25); } 10.71% { transform: scaleY(1); } 14.29% { transform: scaleY(.25); } 17.86% { transform: scaleY(1); } 21.43% { transform: scaleY(.25); } 25% { transform: scaleY(1); } 28.57% { transform: scaleY(.25); } 32.14% { transform: scaleY(1); } 35.71% { transform: scaleY(.25); } 39.29% { transform: scaleY(1); } 42.86% { transform: scaleY(.25); } 46.43% { transform: scaleY(1); } 50% { transform: scaleY(.25); } 53.57% { transform: scaleY(1); } 57.14% { transform: scaleY(.25); } 60.71% { transform: scaleY(1); } 64.29% { transform: scaleY(.25); } 67.86% { transform: scaleY(1); } 71.43% { transform: scaleY(.25); } 75% { transform: scaleY(1); } 78.57% { transform: scaleY(.25); } 82.14% { transform: scaleY(1); } 85.71% { transform: scaleY(.25); } 89.29% { transform: scaleY(1); } 92.86% { transform: scaleY(.25); } 96.43% { transform: scaleY(1); } 100% { transform: scaleY(.25); } }
/* Scroll keyframes: percentages are how far through the story the visitor has scrolled. */
@keyframes s-ring-lines { 0%, 13% { opacity: 1; } 15.5%, 100% { opacity: 0; } }
@keyframes s-ring { 0%, 14% { opacity: 1; transform: none; } 17%, 100% { opacity: 0; transform: scale(.96); } }
@keyframes s-call { 0%, 17% { opacity: 0; transform: translateY(6cqw); filter: none; } 21%, 56% { opacity: 1; transform: none; filter: none; }
  59%, 100% { opacity: 0; transform: translateY(-6cqw); filter: blur(4px); } }
@keyframes s-line-1 { 0%, 22% { opacity: 0; transform: translateY(4cqw) scale(.96); } 26%, 100% { opacity: 1; transform: none; } }
@keyframes s-line-2 { 0%, 31% { opacity: 0; transform: translateY(4cqw) scale(.96); } 35%, 100% { opacity: 1; transform: none; } }
@keyframes s-line-3 { 0%, 40% { opacity: 0; transform: translateY(4cqw) scale(.96); } 44%, 100% { opacity: 1; transform: none; } }
@keyframes s-line-4 { 0%, 48% { opacity: 0; transform: translateY(4cqw) scale(.96); } 52%, 100% { opacity: 1; transform: none; } }
/* Trade pages' calls run 6 bubbles (the greeting plus 5 lines): the same window, one bubble every 5%. */
@keyframes s6-line-1 { 0%, 21.5% { opacity: 0; transform: translateY(4cqw) scale(.96); } 24.5%, 100% { opacity: 1; transform: none; } }
@keyframes s6-line-2 { 0%, 26.5% { opacity: 0; transform: translateY(4cqw) scale(.96); } 29.5%, 100% { opacity: 1; transform: none; } }
@keyframes s6-line-3 { 0%, 31.5% { opacity: 0; transform: translateY(4cqw) scale(.96); } 34.5%, 100% { opacity: 1; transform: none; } }
@keyframes s6-line-4 { 0%, 36.5% { opacity: 0; transform: translateY(4cqw) scale(.96); } 39.5%, 100% { opacity: 1; transform: none; } }
@keyframes s6-line-5 { 0%, 41.5% { opacity: 0; transform: translateY(4cqw) scale(.96); } 44.5%, 100% { opacity: 1; transform: none; } }
@keyframes s6-line-6 { 0%, 47% { opacity: 0; transform: translateY(4cqw) scale(.96); } 50%, 100% { opacity: 1; transform: none; } }
@keyframes s-done { 0%, 59% { opacity: 0; transform: scale(.92); filter: blur(6px); } 63%, 100% { opacity: 1; transform: none; filter: none; } }
@keyframes s-circle { 0%, 60% { stroke-dashoffset: 176; } 67%, 100% { stroke-dashoffset: 0; } }
@keyframes s-tick { 0%, 66% { stroke-dashoffset: 44; } 71%, 100% { stroke-dashoffset: 0; } }
@keyframes s-done-title { 0%, 66% { opacity: 0; transform: translateY(3cqw); } 71%, 100% { opacity: 1; transform: none; } }
@keyframes s-sms { 0%, 76% { opacity: 0; transform: translateY(-34cqw) scale(.94); } 84%, 100% { opacity: 1; transform: none; } }
@keyframes s-glow-warm { 0% { opacity: .9; } 58% { opacity: .75; } 68%, 100% { opacity: .15; } }
@keyframes s-glow-green { 0%, 58% { opacity: 0; } 70%, 100% { opacity: .8; } }
@keyframes s-progress { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes s-progress-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes s-cap-1 { 0%, 13% { opacity: 1; transform: none; } 16%, 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes s-cap-2 { 0%, 14% { opacity: 0; transform: translateY(14px); } 17%, 24% { opacity: 1; transform: none; } 27%, 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes s-cap-3 { 0%, 25% { opacity: 0; transform: translateY(14px); } 28%, 36% { opacity: 1; transform: none; } 39%, 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes s-cap-4 { 0%, 37% { opacity: 0; transform: translateY(14px); } 40%, 54% { opacity: 1; transform: none; } 57%, 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes s-cap-5 { 0%, 55% { opacity: 0; transform: translateY(14px); } 58%, 72% { opacity: 1; transform: none; } 75%, 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes s-cap-6 { 0%, 73% { opacity: 0; transform: translateY(14px); } 76%, 100% { opacity: 1; transform: none; } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* A tall track with the stage pinned inside it: scrolling through the track plays the story. */
    .story-track { height: 520vh; view-timeline: --story block; }
    .story-stage { position: sticky; top: 0; height: 100vh; height: 100svh; grid-template-columns: minmax(0, 27rem) auto; }
    .story-copy { position: relative; display: grid; grid-template-columns: 2px minmax(0, 1fr); gap: 0 32px; align-items: center; }
    .story-progress { display: block; grid-row: 1; grid-column: 1; align-self: stretch; height: 11rem; margin: auto 0; background: var(--stage-line);
      position: relative; overflow: hidden; }
    .story-progress::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--ring), var(--confirm));
      transform-origin: 0 0; animation: s-progress linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
    .story-steps { grid-row: 1; grid-column: 2; display: grid; min-height: 11rem; align-items: center; }
    .story-steps li { grid-area: 1 / 1; padding: 0; border: 0; }
    .story-steps li:last-child { border: 0; }
    .story-steps li::before { display: none; }
    .story-steps h3 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); letter-spacing: -0.03em; line-height: 1.04; margin-bottom: 14px; }
    .story-steps p { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--on-stage-2); }
    .story-steps li { animation: s-cap-1 linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
    .story-steps li:nth-child(2) { animation-name: s-cap-2; }
    .story-steps li:nth-child(3) { animation-name: s-cap-3; }
    .story-steps li:nth-child(4) { animation-name: s-cap-4; }
    .story-steps li:nth-child(5) { animation-name: s-cap-5; }
    .story-steps li:nth-child(6) { animation-name: s-cap-6; }

    .ring-lines { animation: s-ring-lines linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
    /* Three pulses while it rings (the first 13% of the story), each line a beat after the one inside it. */
    .ring-lines path { animation: s-ring-pulse linear both; animation-timeline: --story; animation-range: contain 0% contain 13%; }
    .ring-lines .r2 { animation-range: contain .8% contain 13.8%; }
    .ring-lines .r3 { animation-range: contain 1.6% contain 14.6%; }
    .b-answer { animation: s-answer linear both; animation-timeline: --story; animation-range: contain 0% contain 13%; }
    /* The voice bars move while the call plays (17% to 59%), each bar out of step with its neighbors. */
    .voice span { animation: s-talk linear both; animation-timeline: --story; animation-range: contain 17% contain 59%; }
    .voice span:nth-child(2) { animation-range: contain 18.7% contain 60.7%; }
    .voice span:nth-child(3) { animation-range: contain 17.6% contain 59.6%; }
    .voice span:nth-child(4) { animation-range: contain 19.3% contain 61.3%; }
    .voice span:nth-child(5) { animation-range: contain 18.1% contain 60.1%; }
    .voice span:nth-child(6) { animation-range: contain 19.8% contain 61.8%; }
    .voice span:nth-child(7) { animation-range: contain 17.3% contain 59.3%; }
    .voice span:nth-child(8) { animation-range: contain 18.9% contain 60.9%; }
    .voice span:nth-child(9) { animation-range: contain 17.9% contain 59.9%; }

    .scr-ring { animation: s-ring linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
    .scr-call { animation: s-call linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
    .lines li { animation: s-line-1 linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
    .lines li:nth-child(2) { animation-name: s-line-2; }
    .lines li:nth-child(3) { animation-name: s-line-3; }
    .lines li:nth-child(4) { animation-name: s-line-4; }
    .lines[data-n="6"] li:nth-child(1) { animation-name: s6-line-1; }
    .lines[data-n="6"] li:nth-child(2) { animation-name: s6-line-2; }
    .lines[data-n="6"] li:nth-child(3) { animation-name: s6-line-3; }
    .lines[data-n="6"] li:nth-child(4) { animation-name: s6-line-4; }
    .lines[data-n="6"] li:nth-child(5) { animation-name: s6-line-5; }
    .lines[data-n="6"] li:nth-child(6) { animation-name: s6-line-6; }
    .scr-done { animation: s-done linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
    .check circle { animation: s-circle linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
    .check path { animation: s-tick linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
    .done-title, .done-detail { animation: s-done-title linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
    .sms-note { animation: s-sms linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
    .phone::before { animation: s-glow-warm linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }
    .phone::after { animation: s-glow-green linear both; animation-timeline: --story; animation-range: contain 0% contain 100%; }

    @media (max-width: 900px) {
      .story-track { height: 560vh; }
      .story-stage { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 24px; padding-top: 7svh; }
      .story-copy { grid-template-columns: 1fr; gap: 16px; }
      .story-progress { grid-row: 1; height: 2px; width: 100%; margin: 0; }
      .story-progress::after { background: linear-gradient(90deg, var(--ring), var(--confirm)); animation-name: s-progress-x; }
      .story-steps { grid-row: 2; grid-column: 1; min-height: 9.5em; align-items: start; }
      .story-steps h3 { font-size: 1.6rem; margin-bottom: 8px; }
      .story-steps p { font-size: 1rem; }
      .phone-body { height: min(57svh, 500px); }
      .ring-lines { width: 60%; margin-left: -30%; }
      .phone-label { margin-top: 10px; }
    }
  }
}
