/* ==========================================================================
   hop · case study · shared foundation
   Design system after Fuse (quiet white or true black, soft tiles, black pills, centred grotesk heads),
   navigation after hozefa.work (liquid-glass pill, chapter pill with lens and progress rim).
   Every page commits to one mode: body.light or body.dark. Nothing switches mid-page.
   ========================================================================== */
:root {
  --font-sans: "Sohne", "Sohne Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Signifier", "Signifier Fallback", Georgia, serif;
  --font-hand: "Schoolbell", "Comic Sans MS", "Segoe Print", cursive;
  --accent: #6E4BFF;      /* hop violet: the big days, the lens, the one highlight per view */
  --go: #2FB344;          /* hop green: the rings */
  --warm: #FF7A2F;        /* the fox */
  --alert: #E0533A;
  --gutter: clamp(20px, 4.4vw, 64px);
  --nav-top: clamp(12px, 2.2vh, 20px);
  --nav-h: 52px;
  --r-tile: 28px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --frame: 0 0 0 2.5px #111214, 0 0 0 3.5px #C9CBD0;      /* iPhone 18 Pro thin outline, from the prototype */
  --frame-r: 14.86% / 6.85%;
  /* light mode, the default */
  --bg: #FFFFFF; --tile: #F5F5F6; --tile-2: #ECECEE; --ink: #0B0B0C; --ink-2: #5F5F66; --ink-3: #9C9CA3;
  --line: rgba(11, 11, 12, 0.09); --line-2: rgba(11, 11, 12, 0.16);
  --glass-tint: rgba(255, 255, 255, .45); --glass-text-glow: rgba(255, 255, 255, .9); --lens: rgba(255, 255, 255, .94);
  color-scheme: light;
}
body.dark {
  --bg: #000000; --tile: #121214; --tile-2: #1C1C1F; --ink: #F5F5F7; --ink-2: #A1A1A8; --ink-3: #6C6C73;
  --line: rgba(255, 255, 255, 0.1); --line-2: rgba(255, 255, 255, 0.18);
  --glass-tint: rgba(36, 36, 40, .5); --glass-text-glow: rgba(0, 0, 0, .6); --lens: rgba(255, 255, 255, .16);
  color-scheme: dark;
}

@supports (font-variation-settings: normal) {
  @font-face { font-family: "Sohne"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/sohne-vf.woff2) format("woff2"); }
}
@supports not (font-variation-settings: normal) {
  @font-face { font-family: "Sohne"; font-weight: 400; font-display: swap; src: url(../fonts/soehne-buch.woff2) format("woff2"); }
  @font-face { font-family: "Sohne"; font-weight: 500; font-display: swap; src: url(../fonts/soehne-kraftig.woff2) format("woff2"); }
}
@font-face { font-family: "Signifier"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/signifier-regular.woff2) format("woff2"); }
@font-face { font-family: "Signifier"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/signifier-italic.woff2) format("woff2"); }
@font-face { font-family: "Sohne Fallback"; src: local("Helvetica Neue"), local("Arial"); size-adjust: 98%; ascent-override: 106%; descent-override: 23.5%; line-gap-override: 0%; }
@font-face { font-family: "Signifier Fallback"; src: local("Georgia"); size-adjust: 96.4%; ascent-override: 103%; descent-override: 31%; line-gap-override: 0%; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; font-synthesis: none; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font-sans); letter-spacing: -0.003em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: clip; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
main, footer { overflow-x: clip; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; left: 16px; top: 16px; z-index: 200; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); transform: translateY(-160%); transition: transform .3s var(--ease-out); }
.skip-link:focus { transform: none; }
.wrap { max-width: 1240px; margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.wrap--narrow { max-width: 980px; }
@media (max-width: 600px) { .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); } }

/* ---------- type ---------- */
.display { font: 500 clamp(54px, 9vw, 136px)/0.94 var(--font-sans); letter-spacing: -0.045em; text-wrap: balance; }
.display-serif { font: 400 clamp(52px, 8.4vw, 128px)/0.98 var(--font-serif); letter-spacing: -0.03em; text-wrap: balance; }
.display-serif em, .h2s em, .statement em { font-style: italic; }
.h2 { font: 500 clamp(36px, 5vw, 70px)/1.02 var(--font-sans); letter-spacing: -0.035em; text-wrap: balance; }
.h2s { font: 400 clamp(36px, 5vw, 70px)/1.04 var(--font-serif); letter-spacing: -0.025em; text-wrap: balance; }
.h3 { font: 500 clamp(24px, 2.4vw, 32px)/1.12 var(--font-sans); letter-spacing: -0.022em; text-wrap: balance; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; color: var(--ink-2); max-width: 46ch; text-wrap: pretty; }
.small { font-size: 14px; line-height: 1.5; }
.mute { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.center { text-align: center; }
.cx { margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); }
.eyebrow b { font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
.label { font-size: 13px; letter-spacing: 0.02em; color: var(--ink-3); margin-bottom: 10px; }
.live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--go); animation: live 1.8s infinite; flex: none; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(47, 179, 68, .45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(47, 179, 68, 0); } }
.statement { font: 400 clamp(32px, 4.6vw, 64px)/1.12 var(--font-serif); letter-spacing: -0.02em; text-wrap: balance; }
.statement .w { opacity: var(--o, 1); transition: opacity .25s linear; }

/* ---------- pills ---------- */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px 0 22px; border-radius: 999px; border: 1px solid var(--ink); font-weight: 450; font-size: 15px; color: var(--ink); transition: color .45s var(--ease-out), border-color .45s var(--ease-out); white-space: nowrap; }
.btn svg { width: 15px; height: 15px; transition: transform .5s var(--ease-out); }
.btn::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: var(--ink); transform: translateY(102%); transition: transform .55s var(--ease-out); }
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: none; }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid::before { background: var(--accent); }
.btn--solid:hover { border-color: var(--accent); color: #fff; }
.btn:hover svg { transform: translateX(3px); }

/* ---------- tiles ---------- */
.tile { background: var(--tile); border-radius: var(--r-tile); padding: clamp(24px, 2.6vw, 34px); min-width: 0; }

/* ---------- the phone (iPhone 18 Pro thin outline) ---------- */
.phone { position: relative; border-radius: var(--frame-r); overflow: hidden; background: #fff; box-shadow: var(--frame), 0 50px 80px -40px rgba(31,32,37,.38), 0 18px 30px -22px rgba(31,32,37,.22); aspect-ratio: 296 / 642; }
body.dark .phone { box-shadow: 0 0 0 2.5px #2A2A2E, 0 0 0 3.5px #8E9096, 0 50px 90px -40px rgba(0,0,0,.8); }
.phone > img, .phone > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Navigation (after hozefa.work)
   ========================================================================== */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; pointer-events: none; }
.nav { pointer-events: auto; position: absolute; top: calc(var(--nav-top) + env(safe-area-inset-top, 0px)); left: 50%; translate: -50% 0; display: flex; align-items: center; height: var(--nav-h); padding: 0 6px; border-radius: 999px; isolation: isolate; font: 400 15px/1 var(--font-sans); transition: transform .7s var(--ease-out), opacity .45s var(--ease-out); max-width: calc(100vw - 24px); }
.site-header.is-resting .nav { transform: translateY(calc(-100% - var(--nav-top) - 18px)); opacity: 0; }
.site-header.is-resting .nav * { pointer-events: none; }
.glass { position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; box-shadow: 0 0 0 .5px var(--line-2), 0 18px 40px -18px rgba(20,18,30,.36), 0 4px 12px -6px rgba(20,18,30,.16); transform: translateZ(0); }
.glass__refraction, .glass__tint, .glass__shine { position: absolute; inset: 0; border-radius: inherit; }
.glass__refraction { -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%); }
.glass__tint { background: var(--glass-tint); }
.glass__shine { background: radial-gradient(220px 70px at var(--mx, 22%) var(--my, -10%), rgba(255,255,255,.5), rgba(255,255,255,0) 70%), linear-gradient(180deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,0) 42%);
  box-shadow: inset 0 1.5px .5px rgba(255,255,255,.95), inset 0 -1.5px 1px rgba(255,255,255,.6), inset 1.5px 0 1px rgba(255,255,255,.4), inset -1.5px 0 1px rgba(255,255,255,.4), inset 0 -8px 16px -10px rgba(11,11,12,.14); }
body.dark .glass__shine { background: radial-gradient(220px 70px at var(--mx, 22%) var(--my, -10%), rgba(255,255,255,.14), rgba(255,255,255,0) 70%); box-shadow: inset 0 1px .5px rgba(255,255,255,.28), inset 0 -1px 1px rgba(255,255,255,.1), inset 0 0 0 .5px rgba(255,255,255,.12); }
.nav__brand { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 40px; color: var(--ink); }
.nav__brand svg { width: 30px; height: 18px; }
.nav__menu { display: flex; align-items: center; gap: 2px; min-width: 0; }
.nav__link { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; white-space: nowrap; color: var(--ink); text-shadow: 0 0 10px var(--glass-text-glow); }
.nav__link:not([aria-current]) { color: var(--ink-2); }
.nav__link span { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 12px; }
.nav__sep { width: 1px; height: 16px; margin: 0 5px; background: var(--line-2); flex: none; }
.nav__lens { position: absolute; z-index: 0; left: 0; top: 6px; width: 64px; height: calc(100% - 12px); border-radius: 999px; background: var(--lens); box-shadow: 0 1px 2px rgba(11,11,12,.08), 0 8px 18px -8px rgba(11,11,12,.26), inset 0 1px .5px rgba(255,255,255,.9); pointer-events: none; }
@media (max-width: 640px) { .nav { font-size: 13.5px; } .nav__link { padding: 0 9px; } .nav__link span { display: none; } .nav__brand { width: 36px; } .nav__sep { display: none; } }

.subnav { position: fixed; z-index: 49; left: 50%; top: calc(var(--nav-top) + var(--nav-h) + 10px + env(safe-area-inset-top, 0px)); display: flex; align-items: center; height: 44px; padding: 0 4px 0 6px; border-radius: 999px; isolation: isolate; font: 400 14px/1 var(--font-sans); translate: -50% -10px; opacity: 0; visibility: hidden; transition: translate .6s var(--ease-out), opacity .4s var(--ease-out), visibility 0s linear .6s, top .7s var(--ease-out); max-width: calc(100vw - 24px); }
.subnav.is-shown { translate: -50% 0; opacity: 1; visibility: visible; transition-delay: 0s; }
.subnav.is-up { top: calc(var(--nav-top) + env(safe-area-inset-top, 0px)); }
.subnav__title { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 10px; font-weight: 500; white-space: nowrap; color: var(--ink); }
.subnav__title .live { width: 7px; height: 7px; }
.subnav__sep { flex: none; width: 1px; height: 16px; margin: 0 4px 0 2px; background: var(--line-2); }
.subnav__list { position: relative; display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.subnav__list::-webkit-scrollbar { display: none; }
.subnav__link { position: relative; z-index: 1; display: flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 999px; color: var(--ink-2); white-space: nowrap; transition: color .35s var(--ease-out); text-shadow: 0 0 10px var(--glass-text-glow); }
.subnav__link:hover, .subnav__link[aria-current] { color: var(--ink); }
.subnav__lens { position: absolute; z-index: 0; left: 0; top: 0; width: 0; height: 36px; border-radius: 999px; background: var(--lens); box-shadow: 0 0 0 .5px var(--line), 0 4px 12px -4px rgba(11,11,12,.18); opacity: 0; pointer-events: none; transition: translate .6s var(--ease-out), width .6s var(--ease-out), opacity .3s; }
.subnav__progress { position: absolute; left: 18px; right: 18px; bottom: 0; height: 1.5px; border-radius: 2px; overflow: hidden; pointer-events: none; }
.subnav__progress i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
@media (max-width: 819px) {
  .subnav { top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); translate: -50% 12px; padding: 0 4px; }
  .subnav.is-up { top: auto; }
  .subnav__title, .subnav__sep { display: none; }
  .subnav__link { padding: 0 11px; }
  .subnav__progress { top: 0; bottom: auto; }
}

/* ---------- sections ---------- */
.sec { position: relative; padding-block: clamp(96px, 12vw, 168px); }
.sec__head { display: flex; flex-direction: column; gap: 18px; margin-bottom: clamp(40px, 5vw, 64px); }
.sec__head.center { align-items: center; text-align: center; }
.page-hero { position: relative; padding-top: clamp(150px, 20vh, 210px); padding-bottom: clamp(80px, 10vw, 140px); }

/* ---------- next chapter (Apple-style hand-off) ---------- */
.next { padding-block: clamp(80px, 10vw, 140px) clamp(40px, 5vw, 64px); }
.next__card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; padding: clamp(28px, 4vw, 56px); border-radius: 36px; background: var(--tile); transition: background-color .5s var(--ease-out); }
.next__card:hover { background: var(--tile-2); }
.next__k { font-size: 14px; color: var(--ink-3); margin-bottom: 14px; }
.next__t { font: 400 clamp(40px, 6vw, 88px)/1 var(--font-serif); letter-spacing: -0.03em; }
.next__s { margin-top: 14px; color: var(--ink-2); font-size: 17px; max-width: 48ch; }
.next__go { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); transition: transform .6s var(--ease-out); }
.next__go svg { width: 22px; height: 22px; }
.next__card:hover .next__go { transform: translateX(6px) rotate(-45deg); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-block: 28px 40px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-3); }

/* ---------- scenes (sticky stages that step on scroll) ---------- */
.scene { position: relative; height: calc((var(--steps, 1) + 1) * 72vh + 28vh); }
.scene__stick { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.scene__stick > .wrap { width: 100%; }
@media (prefers-reduced-motion: reduce) { .scene { height: auto; } .scene__stick { position: relative; height: auto; padding-block: 96px; } }

/* ---------- motion helpers: only things that start below the fold are hidden, and only with JS + motion ---------- */
.motion [data-reveal].is-pre { opacity: 0; transform: translateY(28px); }
.motion [data-reveal] { transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
