/* =========================================================
   STORY
   ========================================================= */
.story-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(30px, 6vw, 100px); }
.story-stick { position: sticky; top: max(90px, calc(50vh - 330px)); height: max-content; display: grid; justify-items: center; gap: 22px; }
.story-phone { transition: background .6s; }
.story-phone::after { /* coloured halo */
  content: ""; position: absolute; inset: -60px; z-index: -1; border-radius: 50%; filter: blur(50px); opacity: .9;
  background: var(--halo, var(--blue-strong)); transition: background .7s var(--ease);
}
.story-phone[data-screen="1"] { --halo: var(--peach-strong); }
.story-phone[data-screen="2"] { --halo: var(--lavender-strong); }
.story-phone[data-screen="3"] { --halo: var(--mint-strong); }
.scr { opacity: 0; transform: scale(.94) translateY(16px); transition: opacity .55s var(--ease), transform .7s var(--ease); pointer-events: none; }
.story-phone[data-screen="0"] .scr-capture,
.story-phone[data-screen="1"] .scr-polish,
.story-phone[data-screen="2"] .scr-send,
.story-phone[data-screen="3"] .scr-proof { opacity: 1; transform: none; }
.story-progress { display: flex; gap: 8px; }
.story-progress i { width: 26px; height: 6px; border-radius: 6px; background: var(--line-strong); transition: width .4s var(--ease), background-color .4s; }
.story-progress i.on { width: 52px; background: var(--text); }

/* capture */
.scr-capture { background: radial-gradient(circle at 30% 20%, #6b4a32, #3b2618 60%, #24170f); color: #fff; padding: 52px 14px 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cam-bar { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: .8rem; }
.cam-bar em { font-style: normal; background: rgba(0,0,0,.45); padding: 5px 10px; border-radius: 99px; font-size: .68rem; }
.cam-doc { position: relative; width: 82%; flex: 1; margin-top: 4px; }
.cam-page {
  position: absolute; inset: 4% 2%; background: #f4f1ea; color: #222; border-radius: 3px; padding: 18px 14px; display: grid; gap: 7px; align-content: start;
  transform: perspective(500px) rotateX(10deg) rotateZ(-3deg); box-shadow: 0 20px 40px rgba(0,0,0,.4);
}
.cam-page b { font: 700 .62rem/1.25 var(--f-body); text-align: center; margin-bottom: 6px; }
.cam-page i { height: 4px; background: #c9c5bc; border-radius: 2px; } .cam-page i.s { width: 60%; }
.cam-sig { font: italic 1.1rem var(--f-serif); margin-top: 10px; color: #233; }
.cam-doc::before { content: ""; position: absolute; inset: 4% 2%; background: color-mix(in srgb, var(--scan) 32%, transparent); border: 2px solid var(--scan); z-index: 2; transform: perspective(500px) rotateX(10deg) rotateZ(-3deg); border-radius: 3px; }
.corner { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--scan); z-index: 3; }
.c1 { top: 2%; left: 0; } .c2 { top: 1%; right: 0; } .c3 { bottom: 1%; left: 3%; } .c4 { bottom: 3%; right: 1%; }
.scanline { position: absolute; left: 2%; right: 2%; height: 3px; background: var(--scan); box-shadow: 0 0 18px 4px var(--scan); z-index: 3; animation: scanl 2.6s ease-in-out infinite; }
@keyframes scanl { 0%, 100% { top: 6%; } 50% { top: 92%; } }
.cam-ready { background: var(--scan); color: #04262c; font: 700 .72rem/1 var(--f-body); padding: 7px 12px; border-radius: 99px; }
.cam-shutter { width: 60px; height: 60px; border-radius: 50%; border: 4px solid var(--scan); display: grid; place-items: center; }
.cam-shutter i { width: 44px; height: 44px; border-radius: 50%; background: #fff; }
.cam-strip { display: flex; gap: 6px; } .cam-strip span { width: 30px; height: 38px; border-radius: 4px; background: #e9e5dc; opacity: .6; } .cam-strip .on { opacity: 1; outline: 2px solid var(--scan); }

/* polish */
.scr-polish { background: #15181c; color: #fff; padding: 52px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.pol-bar { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; }
.pol-bar span:last-child { color: #6CB4FF; }
.scr-send .pol-bar span:last-child { color: inherit; }
.pol-page { position: relative; flex: 1; background: #fbfaf6; color: #222; border-radius: 6px; padding: 22px 16px; display: grid; gap: 9px; align-content: start; }
.pol-page b { font: 700 .72rem/1 var(--f-body); letter-spacing: .06em; margin-bottom: 6px; }
.pol-page i { height: 5px; background: #d6d2c8; border-radius: 3px; } .pol-page i.s { width: 55%; }
.pol-page i.hl { background: #FFE478; height: 10px; margin: -2px 0; }
.pol-sigline { margin-top: 26px; border-top: 1.5px solid #888; padding-top: 4px; position: relative; }
.pol-sigline small { font-size: .6rem; color: #777; }
.sig { position: absolute; bottom: 14px; left: 0; width: 80%; fill: none; stroke: #1747a6; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; }
.story-phone[data-screen="1"] .sig { animation: draw 2.2s .4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pol-note { position: absolute; right: 12px; top: 44%; font: italic 1rem var(--f-serif); color: #d6452b; transform: rotate(-6deg); }
.pol-tools { display: flex; justify-content: center; gap: 10px; }
.pol-tools span { width: 40px; height: 40px; border-radius: 12px; background: #262b31; display: grid; place-items: center; font-size: .9rem; }
.pol-tools .on { background: #6CB4FF; color: #0b1f36; }
.pol-tools .hl-ico::before { content: ""; width: 16px; height: 8px; background: #FFE478; border-radius: 2px; }

/* send */
.scr-send { padding: 52px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.snd-thumbs { display: flex; gap: 6px; align-items: end; background: var(--surface-muted); padding: 10px; border-radius: 14px; }
.snd-thumbs i { width: 36px; height: 46px; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; }
.snd-thumbs small { margin-left: auto; font-size: .65rem; color: var(--text-soft); }
.snd-label { font-size: .7rem; font-weight: 700; color: var(--text-soft); }
.snd-to { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; font-size: .74rem; }
.snd-to b { display: block; }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--pink-strong); color: var(--tile-text); display: grid; place-items: center; font-weight: 700; flex: none; }
.digits em { font-style: normal; display: inline-block; border-radius: 4px; padding: 0 2px; transition: background-color .3s; }
.story-phone[data-screen="2"] .digits em { animation: digit 2.4s var(--ease) infinite; }
.digits em:nth-child(2) { animation-delay: .3s !important; } .digits em:nth-child(3) { animation-delay: .6s !important; } .digits em:nth-child(4) { animation-delay: .9s !important; }
@keyframes digit { 0%, 30% { background: var(--yellow-strong); color: var(--tile-text); } 45%, 100% { background: transparent; } }
.ok { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--mint-strong); color: var(--tile-text); display: grid; place-items: center; font-size: .7rem; font-weight: 800; flex: none; }
.snd-row { display: flex; justify-content: space-between; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: .74rem; }
.snd-row small { display: block; color: var(--text-soft); font-size: .62rem; }
.switch { width: 38px; height: 22px; border-radius: 99px; background: #3fbf6a; position: relative; } .switch::after { content: ""; position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.snd-warn { background: var(--yellow); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: .66rem; font-weight: 600; }
.snd-btn { margin-top: auto; background: var(--ink); color: var(--ink-text); border-radius: 999px; text-align: center; padding: 14px; font-weight: 600; font-size: .85rem; }

/* proof */
.scr-proof { padding: 56px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.prf-title { font: 750 1.45rem/1 var(--f-display); letter-spacing: -.04em; margin-bottom: 6px; }
.prf-step { display: flex; gap: 10px; align-items: center; border-radius: 16px; padding: 12px; color: var(--tile-text); font-size: .76rem; }
.prf-step span { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.75); color: #1b7a43; display: grid; place-items: center; font-weight: 800; flex: none; }
.prf-step small { display: block; opacity: .7; font-size: .62rem; }
.p-mint { background: var(--mint-strong); } .p-blue { background: var(--blue-strong); }
.prf-step.big { padding: 18px 12px; }
.story-phone[data-screen="3"] .prf-step { animation: pop .6s var(--spring) both; }
.story-phone[data-screen="3"] .prf-step:nth-of-type(2) { animation-delay: .2s; } .story-phone[data-screen="3"] .prf-step:nth-of-type(3) { animation-delay: .4s; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.95); } }
.prf-receipt { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 14px; padding: 12px; font-size: .78rem; }
.prf-receipt small { width: 100%; order: 3; color: var(--text-soft); font-size: .64rem; }
.prf-receipt span { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--ink-text); display: grid; place-items: center; }

/* chapters */
.chapters { list-style: none; margin: 0; padding: 0; }
.chapter { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; gap: 20px; position: relative; opacity: .88; transition: opacity .6s var(--ease); }
.chapter.active { opacity: 1; }
.ch-num { position: absolute; top: 50%; right: 0; translate: 0 -50%; z-index: -1; font: 800 clamp(8rem, 18vw, 16rem)/1 var(--f-display); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px var(--line-strong); }
.ch-tag { justify-self: start; align-self: flex-start; font: 600 .78rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; padding: 8px 14px; border-radius: 999px; color: var(--tile-text); }
.tag-blue { background: var(--blue-strong); } .tag-peach { background: var(--peach-strong); } .tag-lav { background: var(--lavender-strong); } .tag-mint { background: var(--mint-strong); }
.chapter h3 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); }
.chapter > p:not(.ch-tag) { color: var(--text-muted); font-size: 1.1rem; max-width: 50ch; }

@media (max-width: 900px) {
  /* story: phone sticks at top, chapters scroll beneath */
  .story-grid { grid-template-columns: 1fr; gap: 0; }
  .story-stick { top: 76px; z-index: 2; padding: 10px 0 16px; background: linear-gradient(var(--canvas) 85%, transparent); }
  .story-phone { width: 168px; border-radius: 30px; padding: 6px; }
  .story-phone .phone-screen { inset: 6px; border-radius: 25px; transform-origin: top left; width: calc((100% - 12px) * 1.7857); height: calc((100% - 12px) * 1.7857); scale: .56; }
  .story-phone .scr { transform: none; }
  .story-phone::before { width: 50px; height: 14px; top: 12px; }
  .story-phone::after { inset: -20px; filter: blur(30px); opacity: .6; }
  .story-progress { display: none; }
  .chapter { min-height: 70vh; justify-content: flex-start; padding-top: 20px; }
  .ch-num { top: 20px; translate: 0 0; font-size: 7rem; }
}
@media (max-width: 560px) {
  .story-phone { width: 140px; }
  .story-phone .phone-screen { scale: .465; width: calc((100% - 12px) * 2.15); height: calc((100% - 12px) * 2.15); }
}
