/* ============ Tokens ============ */
:root {
  --bg: #F2EFE9;
  --bg-2: #E7E3DB;
  --card: #FAF8F4;
  --ink: #151412;
  --ink-2: #4A4740;
  --muted: #7A756C;
  --line: rgba(21, 20, 18, .14);
  --line-strong: rgba(21, 20, 18, .32);
  --accent: #FF5B23;
  --on-accent: #151412;
  --shadow: 0 18px 40px -22px rgba(21, 20, 18, .35);
  --grain-opacity: .07;
  --grain-blend: multiply;

  --f-display: "Unbounded", "Arial Black", sans-serif;
  --f-text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.7, 0, .2, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --gutter: clamp(16px, 4vw, 48px);
  --radius: 24px;
  --header-h: 72px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #121211;
  --bg-2: #1B1A18;
  --card: #1F1E1B;
  --ink: #EEEAE2;
  --ink-2: #BDB7AC;
  --muted: #8C867B;
  --line: rgba(238, 234, 226, .14);
  --line-strong: rgba(238, 234, 226, .32);
  --accent: #FF6B36;
  --on-accent: #121211;
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, .8);
  --grain-opacity: .09;
  --grain-blend: screen;
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s, color .4s;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.icon { width: 1.15em; height: 1.15em; flex: none; }
.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  margin: 0 0 1.4rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .icon { color: var(--accent); width: 1em; height: 1em; }
.eyebrow .num {
  display: inline-grid; place-items: center;
  min-width: 2.4em; height: 2.4em; padding: 0 .5em;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink); letter-spacing: 0;
}

/* grain: SVG noise, no gradients */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  opacity: var(--grain-opacity); mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ============ Loader ============ */
.loader { display: none; }
.js .loader {
  display: grid; place-items: end start;
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink); color: var(--bg);
  padding: var(--gutter);
  transition: transform .9s var(--ease);
}
.loader.is-done { transform: translateY(-100%); }
/* failsafe: never block the page if the script did not run */
.js .loader { animation: failsafeHide 0s 5s forwards; }
.js .hero-title .line-in { animation: failsafeShow 0s 5s forwards; }
@keyframes failsafeHide { to { visibility: hidden; } }
@keyframes failsafeShow { to { transform: none; } }
.loader.is-skip { display: none; }
.loader-inner { width: 100%; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.loader-name { font-family: var(--f-display); font-size: clamp(1.1rem, 2.6vw, 2rem); }
.loader-name i, .logo-text i { font-style: normal; color: var(--accent); }
.loader-count { font-family: var(--f-display); font-weight: 300; font-size: clamp(4rem, 16vw, 13rem); line-height: .8; font-variant-numeric: tabular-nums; }

/* ============ Cursor ============ */
.cursor { display: none; }
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor .pill { cursor: none; }
.has-cursor input, .has-cursor textarea { cursor: text; }
.cursor-dot, .cursor-ring {
  position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none;
  border-radius: 50%;
}
.cursor-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--accent); }
.cursor-ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), background-color .3s, border-color .3s, opacity .3s;
}
.cursor-label {
  font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--on-accent); opacity: 0; transition: opacity .2s; white-space: nowrap;
}
.cursor.is-hover .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--accent); }
.cursor.is-label .cursor-ring { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--accent); border-color: var(--accent); }
.cursor.is-label .cursor-label { opacity: 1; }
.cursor.is-label .cursor-dot { opacity: 0; }
.cursor.is-down .cursor-ring { transform: scale(.85); }
.cursor.is-hidden { opacity: 0; }

/* ============ Header ============ */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-inline: var(--gutter);
  transition: transform .5s var(--ease), background-color .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled { background: var(--bg); border-color: var(--line); }
.header.is-hidden { transform: translateY(-100%); }

.logo { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--f-display); font-weight: 500; font-size: 1rem; letter-spacing: -.01em; }
.logo-mark { width: 28px; height: 28px; transition: transform .6s var(--spring); }
.logo:hover .logo-mark { transform: rotate(-180deg); }

.nav { position: relative; display: flex; gap: .3rem; padding: .3rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.nav a {
  position: relative; z-index: 1;
  padding: .45rem .95rem; border-radius: 999px;
  font-size: .9rem; font-weight: 600;
  transition: color .35s var(--ease-out);
}
.nav a.is-hl { color: var(--bg); }
.nav-pill {
  position: absolute; left: 0; top: .3rem; bottom: .3rem; z-index: 0;
  width: 0; border-radius: 999px; background: var(--ink);
  opacity: 0; pointer-events: none;
  transition: transform .5s var(--ease-out), width .5s var(--ease-out), opacity .3s;
  will-change: transform, width;
}
.nav-pill.is-on { opacity: 1; }
.nav-pill.no-anim { transition: none; }

.lang { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); }
.lang a { min-width: 38px; height: 36px; padding: 0 .55rem; border-radius: 999px; display: grid; place-items: center; font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); transition: background-color .3s, color .3s; }
.lang a:hover { color: var(--ink); }
.lang a.is-active { background: var(--ink); color: var(--bg); }

.is-magnetic { transition: transform .5s var(--spring), color .4s var(--ease), border-color .4s, background-color .3s; }

.header-tools { display: flex; align-items: center; gap: .75rem; }
.status { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #2DB84D; box-shadow: 0 0 0 0 rgba(45, 184, 77, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(45, 184, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(45, 184, 77, 0); } }

.theme-toggle {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--card);
  display: grid; place-items: center; overflow: hidden;
  transition: border-color .3s, transform .3s var(--spring);
}
.theme-toggle:hover { border-color: var(--ink); transform: rotate(15deg); }
.theme-toggle .icon { position: absolute; width: 20px; height: 20px; transition: transform .6s var(--spring), opacity .3s; }
[data-theme="light"] .theme-toggle .icon-moon { transform: translateY(140%) rotate(90deg); opacity: 0; }
[data-theme="dark"] .theme-toggle .icon-sun { transform: translateY(-140%) rotate(-90deg); opacity: 0; }

.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--card); position: relative; }
.menu-toggle span { position: absolute; left: 13px; right: 13px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .4s var(--ease); }
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 95;
  background: var(--bg);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  font-family: var(--f-display); font-size: clamp(2rem, 10vw, 3.4rem); line-height: 1.15;
  padding: .2em 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(20px); animation: menuIn .6s var(--ease-out) forwards;
}
.mobile-menu nav a:nth-child(2) { animation-delay: .05s; }
.mobile-menu nav a:nth-child(3) { animation-delay: .1s; }
.mobile-menu nav a:nth-child(4) { animation-delay: .15s; }
.mobile-menu nav a:nth-child(5) { animation-delay: .2s; }
@keyframes menuIn { to { opacity: 1; transform: none; } }
.mobile-foot { display: flex; flex-direction: column; gap: .5rem; font-weight: 700; color: var(--muted); }

/* ============ Pull cord ============ */
.cord {
  position: fixed; top: 0; right: calc(var(--gutter) + 2px); z-index: 99;
  width: 40px; height: 170px;
  display: flex; flex-direction: column; align-items: center;
  touch-action: none;
}
.cord-svg { position: absolute; inset: 0; width: 40px; height: 200px; overflow: visible; pointer-events: none; }
.cord-line { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.cord-knob {
  position: absolute; left: 50%; top: 120px;
  width: 34px; height: 34px; margin-left: -17px;
  border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.cord-knob .icon { width: 16px; height: 16px; }
.cord:hover .cord-knob { transform: scale(1.1); }
.cord.is-hidden { opacity: 0; pointer-events: none; transition: opacity .3s; }

/* ============ Buttons & chips ============ */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  min-height: 56px; padding: 0 1.6rem;
  border-radius: 999px; border: 1.5px solid var(--ink);
  font-weight: 700; font-size: .98rem;
  transition: color .4s var(--ease), border-color .4s, transform .5s var(--spring);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; transform: translateY(101%);
  transition: transform .5s var(--ease);
}
.btn:hover::before { transform: none; }
.btn .icon { transition: transform .4s var(--ease); }
.btn:hover .icon { transform: translateX(3px) rotate(0deg); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid::before { background: var(--accent); }
.btn-solid:hover { color: var(--on-accent); border-color: var(--accent); }
.btn-ghost::before { background: var(--ink); }
.btn-ghost:hover { color: var(--bg); }
.btn-wide { width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 0 1.05rem;
  border-radius: 999px; border: 1.5px solid var(--line-strong);
  font-size: .9rem; font-weight: 600;
  transition: background-color .25s, color .25s, border-color .25s, transform .4s var(--spring);
}
.chip:hover { border-color: var(--ink); }
.chip:active { transform: scale(.94); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ============ Reveal ============ */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ============ Hero ============ */
.hero { padding-top: calc(var(--header-h) + clamp(32px, 6vw, 72px)); padding-bottom: clamp(48px, 8vw, 96px); }
.hero-eyebrow { margin-bottom: clamp(1.2rem, 3vw, 2.2rem); }
.hero-title {
  margin: 0 0 clamp(2rem, 5vw, 4rem);
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.35rem, 7.6vw, 7.6rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line-in { display: inline-block; white-space: nowrap; }
.js .hero-title .line-in { transform: translateY(110%); transition: transform 1.1s var(--ease); }
.is-loaded .hero-title .line-in { transform: none; }
.is-loaded .hero-title .line:nth-child(2) .line-in { transition-delay: .08s; }
.is-loaded .hero-title .line:nth-child(3) .line-in { transition-delay: .16s; }
.is-loaded .hero-title .line:nth-child(4) .line-in { transition-delay: .24s; }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-title .ch { display: inline-block; font-variation-settings: "wght" 400; transition: font-variation-settings .25s linear; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: stretch; }
.hero-copy { display: flex; flex-direction: column; gap: 2rem; }
.lead { margin: 0; font-size: clamp(1.05rem, 1.4vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-facts { margin: auto 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.hero-facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.hero-facts dt { color: var(--muted); }
.hero-facts dd { margin: 0; font-weight: 600; text-align: right; }

/* Playground */
.playground {
  position: relative;
  min-height: clamp(380px, 40vw, 540px);
  border: 1px solid var(--line-strong);
  border-radius: 32px;
  background: var(--bg-2);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.playground-top { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 0 22px; pointer-events: none; }
.playground-hint { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 700; color: var(--muted); }
.playground-hint .icon { width: 1.3em; height: 1.3em; animation: wiggle 2.4s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes wiggle { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-14deg); } 80% { transform: rotate(10deg); } 90% { transform: rotate(-6deg); } }
.playground-tools { display: flex; gap: .4rem; pointer-events: auto; }
.tool-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line-strong);
  transition: background-color .25s, color .25s, transform .4s var(--spring);
}
.tool-btn:hover { transform: translateY(-2px); border-color: var(--ink); }
.tool-btn:active { transform: scale(.9); }
.tool-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.playground-stage { position: absolute; inset: 0; }
.pill {
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; justify-content: center;
  padding: .72em 1.35em;
  border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--card); color: var(--ink);
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(14px, 1.45vw, 21px); line-height: 1;
  white-space: nowrap; user-select: none; -webkit-user-select: none;
  touch-action: none; cursor: grab;
  will-change: transform;
  opacity: 0;
  transition: background-color .3s, color .3s, border-color .3s, box-shadow .3s;
}
.pill.is-grab { cursor: grabbing; box-shadow: var(--shadow); }
.pill--ink { background: var(--ink); color: var(--bg); }
.pill--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pill--round { padding: 0; width: clamp(54px, 5.4vw, 74px); height: clamp(54px, 5.4vw, 74px); }
.pill--round .icon { width: 42%; height: 42%; }
.playground.is-ready .pill { opacity: 1; }
.playground.is-static .playground-stage { position: relative; display: flex; flex-wrap: wrap; align-content: flex-end; gap: .6rem; padding: 22px; flex: 1; }
.playground.is-static .pill { position: static; opacity: 1; cursor: default; }
.playground.is-static .playground-tools, .playground.is-static .playground-hint { display: none; }

/* ============ Marquee ============ */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: clamp(18px, 2.4vw, 30px) 0; user-select: none; }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-group { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); padding-right: clamp(20px, 3vw, 44px); }
.marquee span { font-family: var(--f-display); font-weight: 500; font-size: clamp(2rem, 5.4vw, 5rem); line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.marquee .outline { color: var(--muted); font-weight: 300; }
.marquee .icon { width: clamp(22px, 3vw, 42px); height: clamp(22px, 3vw, 42px); color: var(--accent); transition: transform .6s var(--spring); }
.marquee:hover .icon { transform: rotate(90deg) scale(1.15); }

/* ============ Sections ============ */
.section { padding: clamp(72px, 11vw, 160px) 0; }
.section-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 2rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head .eyebrow { grid-column: 1 / -1; }
.section-title { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(2.2rem, 6vw, 5.4rem); line-height: 1; letter-spacing: -.035em; }
.section-note { margin: 0; color: var(--muted); font-size: .95rem; max-width: 24ch; text-align: right; }

/* ============ Work ============ */
.work-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.view-switch { display: inline-flex; padding: 4px; border: 1px solid var(--line-strong); border-radius: 999px; }
.view-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; transition: background-color .25s, color .25s; }
.view-btn.is-active { background: var(--ink); color: var(--bg); }

.work-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.work-item { border-top: 1px solid var(--line); }
.work-item.is-hidden { display: none; }
.work-item.is-entering { animation: itemIn .6s var(--ease-out); }
@keyframes itemIn { from { opacity: 0; transform: translateY(16px); } }

.work-row {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 16rem) 4.5rem 3rem;
  align-items: center; gap: 1rem;
  width: 100%; text-align: left;
  padding: clamp(1.1rem, 2.2vw, 1.9rem) clamp(.5rem, 1.5vw, 1.25rem);
  transition: color .45s var(--ease);
}
.work-row::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .55s var(--ease);
}
.work-row:hover::before, .work-row:focus-visible::before { transform: scaleY(1); transform-origin: top; }
.work-row:hover, .work-row:focus-visible { color: var(--bg); }
.work-idx { font-size: .85rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; transition: color .45s; }
.work-row:hover .work-idx { color: var(--accent); }
.work-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.35rem, 3.2vw, 2.9rem); line-height: 1.05; letter-spacing: -.03em; transition: transform .55s var(--ease); }
.work-row:hover .work-title { transform: translateX(.6rem); }
.work-kind, .work-year { font-size: .95rem; color: inherit; opacity: .75; }
.work-year { text-align: right; font-variant-numeric: tabular-nums; }
.work-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; justify-self: end; transition: transform .55s var(--ease), background-color .3s, border-color .3s, color .3s; }
.work-row:hover .work-arrow { transform: rotate(45deg); background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.work-cover { display: none; }

/* Grid view */
.work-list.is-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); border: 0; }
.work-list.is-grid .work-item { border: 0; }
.work-list.is-grid .work-row {
  grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cover cover" "title arrow" "meta meta";
  gap: .5rem 1rem; padding: 0; overflow: visible;
}
.work-list.is-grid .work-row::before { display: none; }
.work-list.is-grid .work-row:hover { color: inherit; }
.work-list.is-grid .work-cover {
  display: block; grid-area: cover; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--radius); background: var(--bg-2); margin-bottom: .75rem;
  border: 1px solid var(--line);
}
.work-list.is-grid .work-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.work-list.is-grid .work-row:hover .work-cover img { transform: scale(1.05); }
.work-list.is-grid .work-idx { display: none; }
.work-list.is-grid .work-title { grid-area: title; font-size: clamp(1.25rem, 2.2vw, 1.9rem); }
.work-list.is-grid .work-row:hover .work-title { transform: none; }
.work-list.is-grid .work-arrow { grid-area: arrow; }
.work-list.is-grid .work-kind { grid-area: meta; }
.work-list.is-grid .work-year { display: none; }

.work-preview {
  position: fixed; left: 0; top: 0; z-index: 60;
  width: clamp(260px, 26vw, 400px); aspect-ratio: 16 / 10;
  pointer-events: none;
  opacity: 0; transition: opacity .35s;
}
.work-preview.is-on { opacity: 1; }
.work-preview-inner { position: relative; width: 100%; height: 100%; border-radius: 18px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow); transform: scale(.7); transition: transform .5s var(--spring); }
.work-preview.is-on .work-preview-inner { transform: scale(1); }
.work-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.work-preview img.is-active { opacity: 1; }

/* ============ Services ============ */
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); perspective: 1000px; }
.service {
  position: relative;
  display: flex; flex-direction: column; gap: 1rem;
  padding: clamp(1.4rem, 2.2vw, 2rem);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  transform-style: preserve-3d;
  transition: transform .6s var(--ease-out), border-color .3s, opacity .9s var(--ease-out);
}
.service:hover { border-color: var(--line-strong); }
.service-icon {
  width: 72px; height: 72px; border-radius: 20px;
  display: grid; place-items: center;
  background: var(--bg-2);
  transition: background-color .35s, color .35s, transform .6s var(--spring);
  transform: translateZ(30px);
}
.service-icon svg { width: 40px; height: 40px; }
.service-icon svg * { stroke-dasharray: 160; stroke-dashoffset: 0; }
.service:hover .service-icon { background: var(--accent); color: var(--on-accent); transform: translateZ(40px) rotate(-6deg); }
.service:hover .service-icon svg * { animation: draw 1s var(--ease-out); }
@keyframes draw { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }
.service h3 { margin: .6rem 0 0; font-family: var(--f-display); font-weight: 500; font-size: 1.45rem; letter-spacing: -.02em; transform: translateZ(20px); }
.service p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.service ul { list-style: none; margin: auto 0 0; padding: 1rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .45rem; font-size: .92rem; font-weight: 600; }
.service li { display: flex; align-items: center; gap: .6rem; }
.service li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

/* ============ Process ============ */
.process-ui { border: 1px solid var(--line); border-radius: 32px; background: var(--card); padding: clamp(1.4rem, 3vw, 3rem); }
.process-track { position: relative; padding-top: 14px; }
.process-rail { position: relative; height: 4px; margin: 0 22px; border-radius: 4px; background: var(--line); }
.process-fill { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.process-handle {
  position: absolute; top: 0; left: 22px;
  width: 32px; height: 32px; margin-left: -16px;
  border-radius: 50%; background: var(--accent);
  display: grid; place-items: center;
  touch-action: none; cursor: grab;
  box-shadow: var(--shadow);
  z-index: 2;
}
.process-handle span { width: 10px; height: 10px; border-radius: 50%; background: var(--on-accent); transition: transform .3s var(--spring); }
.process-handle:hover span, .process-handle.is-drag span { transform: scale(1.5); }
.process-handle.is-anim { transition: left .55s var(--ease); }
.process-stops { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 1.4rem; }
.process-stop { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; padding: .3rem 0; font-weight: 700; font-size: .95rem; color: var(--muted); transition: color .3s; }
.process-stop:nth-child(2) { align-items: center; text-align: center; transform: translateX(-17%); }
.process-stop:nth-child(3) { align-items: center; text-align: center; transform: translateX(17%); }
.process-stop:last-child { align-items: flex-end; text-align: right; }
.process-stop .icon { width: 22px; height: 22px; }
.process-stop.is-active, .process-stop:hover { color: var(--ink); }
.process-stop.is-active .icon { color: var(--accent); }

.process-panel { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.2rem, 4vw, 4rem); margin-top: clamp(2rem, 4vw, 3.5rem); padding-top: clamp(1.5rem, 3vw, 2.5rem); border-top: 1px solid var(--line); align-items: start; }
.process-num { font-family: var(--f-display); font-weight: 300; font-size: clamp(4.5rem, 12vw, 10rem); line-height: .8; letter-spacing: -.05em; color: var(--accent); font-variant-numeric: tabular-nums; }
.process-body h3 { margin: 0 0 .8rem; font-family: var(--f-display); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.02em; }
.process-body p { margin: 0 0 1.5rem; color: var(--ink-2); max-width: 56ch; font-size: 1.05rem; }
.process-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.process-meta div { padding: 1rem 1.2rem; border-radius: 18px; background: var(--bg-2); }
.process-meta dt { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.process-meta dd { margin: 0; font-weight: 600; }
.process-panel.is-swap .process-num, .process-panel.is-swap .process-body { animation: swapIn .55s var(--ease-out); }
@keyframes swapIn { from { opacity: 0; transform: translateY(14px); } }

/* ============ About ============ */
.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 6rem); align-items: center; }
.about-big { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.6rem); line-height: 1.2; letter-spacing: -.025em; margin: 0 0 2rem; }
.about-text > p:not(.about-big):not(.eyebrow) { color: var(--ink-2); max-width: 58ch; margin: 0 0 1.1rem; }
.tools { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tools li { padding: .5rem 1rem; border-radius: 999px; background: var(--bg-2); font-size: .88rem; font-weight: 600; transition: transform .4s var(--spring), background-color .25s, color .25s; }
.tools li:hover { transform: translateY(-4px) rotate(-3deg); background: var(--ink); color: var(--bg); }
.about-side { display: grid; place-items: center; min-height: 360px; }
.badge {
  position: relative; width: clamp(220px, 26vw, 340px); aspect-ratio: 1;
  border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center;
  touch-action: none; cursor: grab; user-select: none;
  box-shadow: var(--shadow);
  will-change: transform;
}
.badge.is-drag { cursor: grabbing; }
.badge-ring { position: absolute; inset: 6%; width: 88%; height: 88%; }
.badge-ring text { font-family: var(--f-display); font-size: 13px; font-weight: 500; text-transform: uppercase; fill: currentColor; }
.badge-mark { width: 32%; height: 32%; }

/* ============ Contact ============ */
.contact-title { margin: 0 0 clamp(2.5rem, 5vw, 4.5rem); font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 7.4vw, 7rem); line-height: 1; letter-spacing: -.04em; }
.contact-title span { color: var(--accent); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact-side { display: flex; flex-direction: column; gap: 2rem; }
.mail-copy {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; padding: 1.2rem 0; border-bottom: 2px solid var(--ink);
  font-family: var(--f-display); font-weight: 400; font-size: clamp(1.05rem, 2.4vw, 2rem); letter-spacing: -.02em; text-align: left;
}
.mail-copy-text { overflow-wrap: anywhere; transition: color .3s; }
.mail-copy:hover .mail-copy-text { color: var(--accent); }
.mail-copy-icon { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; }
.mail-copy-icon .icon { position: absolute; width: 20px; height: 20px; transition: transform .45s var(--spring), opacity .25s; }
.mail-copy .i-check { opacity: 0; transform: scale(.4); }
.mail-copy.is-copied .i-copy { opacity: 0; transform: scale(.4); }
.mail-copy.is-copied .i-check { opacity: 1; transform: none; }
.mail-copy.is-copied .mail-copy-icon { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mail-alt { margin: -1.2rem 0 0; color: var(--muted); }
.mail-alt a { color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line-strong); transition: border-color .3s, color .3s; }
.mail-alt a:hover { color: var(--accent); border-color: var(--accent); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.stat dt { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat:first-child dt { color: var(--accent); }
.stat dd { margin: .5rem 0 0; color: var(--muted); font-size: .92rem; line-height: 1.4; }
.clock { margin: 0; color: var(--muted); }
.clock strong { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }
.clock .colon { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.brief { display: grid; gap: 1.5rem; padding: clamp(1.4rem, 3vw, 2.5rem); border: 1px solid var(--line); border-radius: 32px; background: var(--card); }
.brief fieldset { border: 0; margin: 0; padding: 0; }
.brief legend { padding: 0; margin-bottom: .7rem; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field { display: grid; gap: .4rem; }
.field span { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: .8rem 0; border: 0; border-bottom: 1.5px solid var(--line-strong);
  background: transparent; font-size: 1.1rem; resize: vertical; outline: none;
  transition: border-color .3s;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field.is-error input, .field.is-error textarea { border-color: #D93A2B; }
.brief-note { margin: -.6rem 0 0; font-size: .85rem; color: var(--muted); text-align: center; }

/* ============ Footer ============ */
.footer { padding: clamp(48px, 7vw, 96px) 0 28px; border-top: 1px solid var(--line); overflow: hidden; }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.footer-top p { margin: 0; color: var(--muted); font-weight: 600; }
.to-top { width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; transition: background-color .3s, color .3s; }
.to-top:hover { background: var(--accent); color: var(--on-accent); }
.to-top .icon { width: 24px; height: 24px; }
.wordmark {
  margin: clamp(1.5rem, 4vw, 3rem) 0 clamp(1rem, 2vw, 1.5rem);
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(2rem, 8.3vw, 8.6rem); line-height: .9; letter-spacing: -.055em;
  white-space: nowrap; user-select: none;
}
.wordmark .ch { display: inline-block; transition: transform .5s var(--spring), color .3s; }
.wordmark .ch.is-up { transform: translateY(-18%) rotate(-6deg); color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; color: var(--muted); }
.footer-bottom a { color: var(--ink); transition: color .3s; }
.footer-bottom a:hover { color: var(--accent); }

/* ============ Case dialog ============ */
.case {
  width: min(1120px, calc(100% - 24px)); max-width: none;
  height: calc(100dvh - 24px); max-height: none;
  margin: auto; padding: 0;
  border: 0; border-radius: 28px;
  background: var(--bg); color: var(--ink);
  overflow: hidden;
}
.case[open] { animation: caseIn .7s var(--ease); }
.case.is-closing { animation: caseOut .45s var(--ease) forwards; }
.case::backdrop { background: rgba(10, 10, 9, .62); backdrop-filter: blur(6px); }
@keyframes caseIn { from { transform: translateY(60px) scale(.97); opacity: 0; } }
@keyframes caseOut { to { transform: translateY(40px) scale(.98); opacity: 0; } }
.case-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.case-close {
  position: sticky; top: 16px; float: right; margin: 16px 16px -60px 0; z-index: 3;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  transition: transform .5s var(--spring), background-color .3s;
}
.case-close:hover { transform: rotate(90deg); background: var(--accent); color: var(--on-accent); }
.case-media { aspect-ratio: 16 / 9; background: var(--bg-2); }
.case-media img, .case-media video { width: 100%; height: 100%; object-fit: cover; }
.case-media video { object-fit: contain; background: #0E0D0C; }
.case-media.is-vertical:has(video) { aspect-ratio: auto; height: min(78vh, 760px); background: #0E0D0C; }
.case-body .case-link { margin-top: .5rem; }
.case-gallery.is-vertical { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-gallery.is-vertical img { aspect-ratio: 9 / 16; }
.case-body .case-link .icon { width: 1.1em; height: 1.1em; }
.case-content { padding: clamp(1.5rem, 4vw, 3.5rem); }
.case-title { margin: 0 0 1.2rem; font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.035em; }
.case-lead { margin: 0 0 2rem; font-size: clamp(1.1rem, 1.6vw, 1.4rem); color: var(--ink-2); max-width: 52ch; }
.case-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 2.5rem; border-top: 1px solid var(--line); }
.case-facts div { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); }
.case-facts dt { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.case-facts dd { margin: .25rem 0 0; font-weight: 600; }
.case-body { columns: 2 320px; column-gap: 3rem; color: var(--ink-2); }
.case-body p { margin: 0 0 1rem; break-inside: avoid; }
.case-tags { list-style: none; padding: 0; margin: 2rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.case-tags li { padding: .45rem .95rem; border-radius: 999px; border: 1.5px solid var(--line-strong); font-size: .88rem; font-weight: 600; }
.case-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 2.5rem; }
.case-gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; background: var(--bg-2); }
.case-next {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .3rem 1rem;
  width: 100%; padding: 1.8rem 0 .4rem; border-top: 2px solid var(--ink); text-align: left;
}
.case-next-label { grid-column: 1; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.case-next-title { grid-column: 1; font-family: var(--f-display); font-size: clamp(1.4rem, 3.4vw, 2.6rem); letter-spacing: -.03em; line-height: 1.05; }
.case-next .icon { grid-column: 2; grid-row: 1 / span 2; width: 40px; height: 40px; transition: transform .5s var(--ease); }
.case-next:hover .icon { transform: translateX(8px); }
.case-next:hover .case-next-title { color: var(--accent); }
.case-play {
  position: relative; display: block; width: 100%; height: 100%;
}
.case-play img { width: 100%; height: 100%; object-fit: cover; }
.case-play-btn {
  position: absolute; left: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px);
  display: inline-flex; align-items: center; gap: .8rem;
  padding: 8px 22px 8px 8px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 1rem;
  box-shadow: var(--shadow);
  transition: transform .5s var(--spring);
}
.case-play:hover .case-play-btn { transform: scale(1.06); }
.case-play-circle { width: 52px; height: 52px; border-radius: 50%; background: var(--on-accent); color: var(--accent); display: grid; place-items: center; }
.case-play-circle .icon { width: 22px; height: 22px; margin-left: 3px; }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 160;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .8rem 1.2rem; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: .95rem;
  transform: translate(-50%, calc(100% + 48px)); transition: transform .55s var(--spring);
  pointer-events: none;
}
.toast .icon { color: var(--accent); }
.toast.is-on { transform: translate(-50%, 0); }

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .status { display: none; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-row { grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 11rem) 3rem; }
  .work-year { display: none; }
}
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .nav { display: none; }
  .menu-toggle { display: block; }
  .cord { display: none; }
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-facts { margin-top: 0; }
  .section-head { grid-template-columns: 1fr; }
  .section-note { text-align: left; margin-top: 1rem; }
  .work-row { grid-template-columns: 2.2rem minmax(0, 1fr) 2.6rem; gap: .5rem .75rem; }
  .work-kind { grid-column: 2; grid-row: 2; font-size: .85rem; }
  .work-arrow { grid-column: 3; grid-row: 1 / span 2; width: 38px; height: 38px; }
  .work-list.is-grid { grid-template-columns: 1fr; }
  .work-list.is-grid .work-row { grid-template-columns: minmax(0, 1fr) auto; }
  .work-list.is-grid .work-kind { grid-column: auto; grid-row: auto; }
  .work-list.is-grid .work-arrow { grid-column: auto; grid-row: auto; }
  .process-panel { grid-template-columns: 1fr; }
  .process-stop span { font-size: .8rem; }
  .process-meta { grid-template-columns: 1fr; }
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-side { min-height: 280px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .header-tools { gap: .45rem; }
  .lang a { min-width: 34px; height: 34px; padding: 0 .4rem; }
  .theme-toggle, .menu-toggle { width: 40px; height: 40px; }
  .menu-toggle span { left: 11px; right: 11px; }
  .menu-toggle span:first-child { top: 15px; }
  .menu-toggle span:last-child { top: 23px; }
  .logo-text { font-size: .9rem; }
  .stats { grid-template-columns: 1fr; }
  .contact-actions .btn { flex: 1 1 100%; }
  .service-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .process-stop span { display: none; }
  .process-stop .icon { width: 24px; height: 24px; }
  .footer-bottom { flex-direction: column; }
  .case { width: 100%; height: 100dvh; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============ v3: human details ============ */
:root {
  --f-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --paper: #FBFAF6;
  --paper-ink: #2A2723;
  --tape: rgba(255, 214, 150, .62);
  --on-ink-line: rgba(242, 239, 233, .2);
  interpolate-size: allow-keywords;
}
:root[data-theme="dark"] { --paper: #ECE7DD; --on-ink-line: rgba(18, 18, 17, .18); --tape: rgba(255, 196, 120, .5); }

.hand-note { font-family: var(--f-hand); font-weight: 600; font-size: clamp(1.3rem, 1.8vw, 1.65rem); line-height: 1.05; color: var(--accent); pointer-events: none; }

/* scribble under the accent word */
.hero-title .line { padding-bottom: .14em; }
.hero-title em { position: relative; }
.scribble { position: absolute; left: -2%; bottom: .02em; width: 104%; height: .2em; overflow: visible; pointer-events: none; }
.scribble path { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.js .scribble path { stroke-dasharray: 330; stroke-dashoffset: 330; }
.is-loaded .scribble path { animation: drawLine 1.1s 1s var(--ease-out) forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* polaroid */
.hero .wrap { position: relative; }
.polaroid {
  position: absolute; z-index: 3;
  top: clamp(4px, 1.2vw, 24px); right: var(--gutter);
  width: clamp(140px, 13vw, 210px); margin: 0;
  padding: 10px 10px 0; background: var(--paper);
  box-shadow: var(--shadow), 0 2px 6px rgba(0, 0, 0, .12);
  transform: rotate(5deg);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  will-change: transform;
}
.polaroid.is-drag { cursor: grabbing; }
.polaroid img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; pointer-events: none; filter: saturate(.9) contrast(1.03); }
.polaroid figcaption { font-family: var(--f-hand); font-weight: 600; font-size: clamp(1.1rem, 1.5vw, 1.45rem); color: var(--paper-ink); text-align: center; padding: .35rem 0 .55rem; }
.tape { position: absolute; top: -13px; left: 50%; width: 46%; height: 26px; margin-left: -23%; background: var(--tape); transform: rotate(-4deg); }

/* note above the playground */
.playground-wrap { position: relative; display: flex; flex-direction: column; }
.playground-wrap .playground { flex: 1; }
.pg-note { position: absolute; z-index: 4; top: -2.6rem; left: 1.4rem; display: flex; align-items: flex-start; gap: .25rem; transform: rotate(-3deg); }
.hand-arrow { width: 54px; height: 40px; flex: none; transform: translateY(12px) rotate(12deg); }

/* sound toggle (same look as the theme toggle) */
.sound-toggle {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--card);
  display: grid; place-items: center;
  transition: border-color .3s, background-color .3s, color .3s, transform .3s var(--spring);
}
.sound-toggle:hover { border-color: var(--ink); transform: scale(1.06); }
.sound-toggle .icon { width: 20px; height: 20px; }
.sound-toggle .icon-sound-on { display: none; }
.sound-toggle[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.sound-toggle[aria-pressed="true"] .icon-sound-on { display: block; }
.sound-toggle[aria-pressed="true"] .icon-sound-off { display: none; }

/* logo secret */
.logo.is-secret .logo-mark { animation: spinOnce .9s var(--spring); color: var(--accent); }
@keyframes spinOnce { to { transform: rotate(720deg); } }

/* section rail */
.rail { position: fixed; right: 18px; top: 50%; z-index: 80; display: flex; flex-direction: column; gap: 10px; transform: translateY(-50%); }
.rail a { position: relative; display: flex; align-items: center; justify-content: flex-end; width: 22px; height: 16px; }
.rail i { width: 6px; height: 6px; border-radius: 99px; background: var(--line-strong); transition: height .45s var(--spring), background-color .3s; }
.rail a:hover i { background: var(--ink); }
.rail a.is-active i { height: 24px; background: var(--accent); }
.rail-label {
  position: absolute; right: 20px; white-space: nowrap;
  padding: .3rem .65rem; border-radius: 99px;
  background: var(--ink); color: var(--bg); font-size: .75rem; font-weight: 700;
  opacity: 0; transform: translateX(6px); pointer-events: none;
  transition: opacity .25s, transform .35s var(--ease-out);
}
.rail a:hover .rail-label, .rail a:focus-visible .rail-label, .rail a.is-flash .rail-label { opacity: 1; transform: none; }

/* section titles slide up from a mask */
.js .section-title[data-reveal] { opacity: 1; transform: none; overflow: hidden; padding-bottom: .1em; }
.section-title > span { display: inline-block; }
.js .section-title[data-reveal] > span { transform: translateY(110%); transition: transform 1s var(--ease); }
.js .section-title[data-reveal].is-in > span { transform: none; }

/* pricing calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.calc-form { display: grid; gap: 2rem; padding: clamp(1.4rem, 3vw, 2.5rem); border: 1px solid var(--line); border-radius: 32px; background: var(--card); }
.calc-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.calc-form legend { padding: 0; margin-bottom: .8rem; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.calc-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.calc-type {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: .1rem .9rem; align-items: center;
  padding: 1rem 1.1rem; border-radius: 20px; border: 1.5px solid var(--line-strong); text-align: left;
  transition: border-color .25s, background-color .3s, color .3s, transform .45s var(--spring);
}
.calc-type:hover { border-color: var(--ink); transform: translateY(-3px); }
.calc-type:active { transform: scale(.97); }
.calc-type-icon { grid-row: 1 / span 2; width: 44px; height: 44px; padding: 7px; border-radius: 13px; background: var(--bg-2); transition: background-color .3s, color .3s, transform .5s var(--spring); }
.calc-type-name { font-family: var(--f-display); font-weight: 500; font-size: 1.02rem; letter-spacing: -.01em; }
.calc-type-meta { font-size: .82rem; color: var(--muted); line-height: 1.3; }
.calc-type.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.calc-type.is-active .calc-type-meta { color: inherit; opacity: .65; }
.calc-type.is-active .calc-type-icon { background: var(--accent); color: var(--on-accent); transform: rotate(-8deg); }

.switch { position: relative; display: inline-flex; align-items: center; gap: .85rem; cursor: pointer; font-weight: 600; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: none; width: 54px; height: 30px; border-radius: 99px; background: var(--line-strong); transition: background-color .3s; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .5s var(--spring); }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(24px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 3px; }

.calc-result {
  position: sticky; top: calc(var(--header-h) + 28px);
  display: grid; gap: 1rem;
  padding: clamp(1.4rem, 3vw, 2.5rem); border-radius: 32px;
  background: var(--ink); color: var(--bg);
}
.calc-hand { position: absolute; top: -2.1rem; left: 1.8rem; transform: rotate(-3deg); }
.calc-result > * { min-width: 0; }
.calc-label { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .6; }
.calc-price { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.7rem, 2.7vw, 2.9rem); line-height: 1.05; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.calc-price small { font-size: .42em; letter-spacing: 0; opacity: .7; }
.calc-dash { opacity: .45; padding: 0 .06em; }
.calc-price.is-bump { animation: bump .5s var(--spring); }
@keyframes bump { 35% { transform: scale(1.05); } }
.calc-days { margin: 0; display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--accent); }
.calc-incl { list-style: none; margin: .25rem 0; padding: 1rem 0 0; border-top: 1px solid var(--on-ink-line); display: grid; gap: .45rem; }
.calc-incl li { display: flex; gap: .65rem; align-items: flex-start; font-size: .95rem; line-height: 1.4; }
.calc-incl li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: .5em; border-radius: 50%; background: var(--accent); }
.calc-incl li.is-new { animation: itemIn .5s var(--ease-out); }
.calc-note { margin: 0; font-size: .85rem; opacity: .62; }
.calc-result .btn-solid { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.calc-result .btn-solid::before { background: var(--bg); }
.calc-result .btn-solid:hover { color: var(--ink); border-color: var(--bg); }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.faq-head { position: sticky; top: calc(var(--header-h) + 28px); }
.faq-head .section-title { margin-bottom: 1.5rem; }
.faq-aside { margin: 0; color: var(--muted); max-width: 32ch; }
.faq-aside a { color: var(--ink); font-weight: 700; border-bottom: 1.5px solid var(--accent); }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.4rem 0; list-style: none; cursor: pointer;
  font-family: var(--f-display); font-weight: 400; font-size: clamp(1.08rem, 1.8vw, 1.45rem); letter-spacing: -.02em; line-height: 1.25;
  transition: color .25s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-icon { position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line-strong); color: var(--ink); transition: transform .5s var(--spring), background-color .3s, border-color .3s, color .3s; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; border-radius: 2px; background: currentColor; }
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon { transform: rotate(135deg); background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.faq-body p { margin: 0 0 1.6rem; max-width: 60ch; color: var(--ink-2); }
.faq-item::details-content { block-size: 0; overflow: hidden; transition: block-size .5s var(--ease), content-visibility .5s allow-discrete; }
.faq-item[open]::details-content { block-size: auto; }

@media (max-width: 1300px) {
  .status { display: none; }
}
@media (max-width: 1100px) {
  .rail { display: none; }
  .polaroid { position: relative; top: auto; right: auto; width: 128px; margin: 0 0 1.4rem 8px; transform: rotate(-4deg); }
}
@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; }
  .calc-result { position: relative; top: auto; margin-top: 1.5rem; }
  .faq-grid { grid-template-columns: 1fr; }
  .faq-head { position: static; }
  .playground-wrap { margin-top: 2.4rem; }
}
@media (max-width: 560px) {
  .sound-toggle { display: none; }
  .hero-title { font-size: clamp(1.9rem, 8.6vw, 2.6rem); }
  .hero-title .line-in { white-space: normal; }
  .polaroid figcaption { font-size: 1rem; }
  .calc-types { grid-template-columns: 1fr; }
  .calc-price { font-size: clamp(1.6rem, 8.5vw, 2.3rem); }
}
@media (prefers-reduced-motion: reduce) {
  .js .scribble path { stroke-dashoffset: 0; }
}

/* theme switch: circular reveal */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
