/* Entier — home page. Motion is opt-in: hidden-initial states only under html.js + no-preference. */

/* ---------- accents ---------- */
html[data-accent="kinetic"], [data-accent="kinetic"] { --accent: var(--lime); }
html[data-accent="studio"],  [data-accent="studio"]  { --accent: var(--violet); }
html[data-accent="noteout"], [data-accent="noteout"] { --accent: var(--blue); }
html[data-accent="neutral"], [data-accent="neutral"] { --accent: var(--neutral); }

body { overflow-x: clip; }

/* ---------- ambient glow + grain ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; background: var(--bg); overflow: hidden; pointer-events: none; }
.ambient i {
  position: absolute; inset: -25%; opacity: 0;
  transition: opacity 1.6s var(--ease-in-out);
  background:
    radial-gradient(55% 45% at 78% 12%, color-mix(in oklab, var(--tone) 18%, transparent), transparent 70%),
    radial-gradient(45% 40% at 12% 88%, color-mix(in oklab, var(--tone) 10%, transparent), transparent 70%);
}
.ambient i[data-tone="neutral"] { --tone: var(--neutral); }
.ambient i[data-tone="kinetic"] { --tone: var(--lime); }
.ambient i[data-tone="studio"]  { --tone: var(--violet); }
.ambient i[data-tone="noteout"] { --tone: var(--blue); }
html[data-accent="neutral"] .ambient i[data-tone="neutral"],
html[data-accent="kinetic"] .ambient i[data-tone="kinetic"],
html[data-accent="studio"]  .ambient i[data-tone="studio"],
html[data-accent="noteout"] .ambient i[data-tone="noteout"] { opacity: 1; }

.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}
@media (max-width: 47.99em) { .grain { display: none; } }
@media (prefers-reduced-data: reduce) { .grain, .ambient i { display: none; } }

/* ---------- nav ---------- */
.nav-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: calc(.75rem + env(safe-area-inset-top)) var(--gutter) 0;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  width: min(100%, var(--wrap));
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .5rem .55rem .5rem 1rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: background-color .5s, border-color .5s, box-shadow .5s, width .6s var(--ease-out);
}
html.is-scrolled .nav {
  width: min(100%, 56rem);
  background: rgb(10 10 15 / .74);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
  box-shadow: 0 10px 40px -20px rgb(0 0 0 / .9);
}
@supports not (backdrop-filter: blur(1px)) { html.is-scrolled .nav { background: rgb(10 10 15 / .95); } }
@media (prefers-contrast: more) { html.is-scrolled .nav { background: var(--bg); } }

.wordmark {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .005em; line-height: 1;
}
.wordmark .mark { width: 1.05em; height: 1.05em; fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round; transition: stroke .6s; }
.nav__links { display: flex; gap: .15rem; }
.nav__links a {
  display: inline-block; padding: .5rem .85rem; border-radius: var(--r-pill);
  font-size: var(--step--1); font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color .2s, background-color .2s;
}
.nav__links a:hover { color: var(--ink); background: rgb(255 255 255 / .06); }
.nav__links a.is-active { color: var(--accent); }
.nav__toggle {
  display: none; align-items: center; gap: .6rem;
  padding: .55rem .95rem; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); font-size: var(--step--1); font-weight: 500; background: rgb(10 10 15 / .5);
}
.nav__burger { display: inline-flex; flex-direction: column; gap: 4px; }
.nav__burger i { width: 16px; height: 1.5px; background: currentColor; }
@media (max-width: 47.99em) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
}

/* ---------- mobile menu (native dialog) ---------- */
.menu {
  position: fixed; inset: 0; z-index: 200; width: 100%; height: 100vh; height: 100dvh;
  background: var(--bg); color: var(--ink);
  padding: calc(.9rem + env(safe-area-inset-top)) var(--gutter) calc(1.5rem + env(safe-area-inset-bottom));
  opacity: 0; translate: 0 -10px;
  transition: opacity .3s var(--ease-out), translate .3s var(--ease-out), display .3s allow-discrete, overlay .3s allow-discrete;
}
.menu[open] { opacity: 1; translate: 0 0; }
@starting-style { .menu[open] { opacity: 0; translate: 0 -10px; } }
.menu.is-closing { opacity: 0; translate: 0 -10px; }
.menu::backdrop { background: transparent; }
.menu__inner { height: 100%; display: flex; flex-direction: column; }
.menu__bar { display: flex; justify-content: space-between; align-items: center; }
.menu__close { padding: .55rem 1rem; border: 1px solid var(--line-2); border-radius: var(--r-pill); font-weight: 500; font-size: var(--step--1); }
.menu__links { margin: auto 0; display: grid; }
.menu__links a {
  display: flex; align-items: baseline; gap: 1rem;
  font-family: var(--font-display); font-size: var(--step-5); line-height: 1.1;
  text-decoration: none; padding: .55rem 0; border-bottom: 1px solid var(--line);
}
.menu__links li:first-child a { border-top: 1px solid var(--line); }
.menu__num { font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent); }
.menu__foot { color: var(--ink-3); font-size: var(--step--1); }
body:has(.menu[open]) { overflow: hidden; }

/* ---------- scroll progress (staircase ticks) ---------- */
.progress {
  position: fixed; right: calc(1rem + env(safe-area-inset-right)); top: 50%; translate: 0 -50%; z-index: 90;
  height: min(36vh, 300px); width: 14px; display: none; opacity: 0; transition: opacity .5s;
}
@media (min-width: 64em) { .progress { display: block; } }
html.is-scrolled .progress { opacity: 1; }
.progress__track { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.progress__fill { position: absolute; inset: 0; background: var(--accent); transform-origin: top; transform: scaleY(var(--scroll, 0)); transition: background-color .6s; }
@supports (animation-timeline: scroll()) and (animation-range: entry 0% cover 100%) {
  .progress__fill { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}
.progress__steps { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.progress__steps i { width: 7px; height: 1px; background: var(--line-2); translate: 4px 0; transition: background-color .3s, width .3s; }
.progress__steps i.is-on { background: var(--accent); width: 10px; }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: grid; align-content: center;
  padding: calc(var(--section-pad) * .9) 0 var(--space-3xl);
  overflow: clip;
  background:
    radial-gradient(70% 60% at 72% 18%, color-mix(in oklab, var(--violet) 13%, transparent), transparent 70%),
    radial-gradient(50% 50% at 18% 82%, color-mix(in oklab, var(--lime) 7%, transparent), transparent 70%);
}
.hero__field { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: 0; transition: opacity 1.8s ease; }
.hero__field.is-live { opacity: 1; }
.hero__inner { position: relative; }
.hero__eyebrow { margin-bottom: var(--space-m); }
.hero__title { font-size: var(--step-hero); line-height: .96; letter-spacing: -0.025em; max-width: 20ch; }
.hero__title .w { display: inline-block; }
.hero__title em {
  background: linear-gradient(90deg, var(--lime), var(--violet) 50%, var(--blue));
  background-size: 540% 100%; background-position: calc((var(--i, 0) - 2) * 25%) 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__title .w:nth-of-type(3) { --i: 2; } .hero__title .w:nth-of-type(4) { --i: 3; } .hero__title .w:nth-of-type(5) { --i: 4; }
.hero__title .w:nth-of-type(6) { --i: 5; } .hero__title .w:nth-of-type(7) { --i: 6; }
.hero__lede { margin-top: var(--space-l); }
.hero__cta { margin-top: var(--space-l); display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__cue {
  position: absolute; left: 50%; bottom: 1.6rem; translate: -50% 0;
  width: 2.5rem; height: 2.5rem; padding: .6rem; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--ink-2);
  transition: color .2s, border-color .2s;
}
.hero__cue:hover { color: var(--ink); border-color: var(--ink-2); }
.hero__cue svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }

@media (prefers-reduced-motion: no-preference) {
  html.js .hero__title .w { opacity: 0; translate: 0 .35em; filter: blur(8px); }
  html.js.fonts-ready .hero__title .w { animation: word-in .9s var(--ease-out) both; animation-delay: calc(140ms + var(--i, 0) * 70ms); }
  .hero__title .w:nth-of-type(2) { --i: 1; }
  @keyframes word-in { to { opacity: 1; translate: 0 0; filter: blur(0); } }
  html.js :is(.hero__eyebrow, .hero__lede, .hero__cta) { opacity: 0; translate: 0 10px; }
  html.js .hero__cue { opacity: 0; translate: -50% 10px; }
  html.js.fonts-ready :is(.hero__eyebrow, .hero__lede, .hero__cta) { animation: fade-up .8s var(--ease-out) both; }
  html.js.fonts-ready .hero__eyebrow { animation-delay: 0ms; }
  html.js.fonts-ready .hero__lede { animation-delay: 640ms; }
  html.js.fonts-ready .hero__cta { animation-delay: 760ms; }
  html.js.fonts-ready .hero__cue { animation: cue-in .8s var(--ease-out) 1400ms both, bob 2.4s var(--ease-in-out) 2300ms infinite; }
  @keyframes cue-in { to { opacity: 1; translate: -50% 0; } }
  @keyframes fade-up { to { opacity: 1; translate: 0 0; } }
  @keyframes bob { 0%, 100% { translate: -50% 0; } 50% { translate: -50% 5px; } }
  @media (max-width: 47.99em) { html.js .hero__title .w { filter: none; } }
}

/* ---------- reveal (opt-in) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; translate: 0 18px; transition: opacity .75s var(--ease-out), translate .75s var(--ease-out); transition-delay: var(--d, 0ms); }
  html.js .reveal.is-in { opacity: 1; translate: 0 0; }
  html.js .reveal:nth-child(2) { --d: 70ms; }
  html.js .reveal:nth-child(3) { --d: 140ms; }
  html.js .reveal:nth-child(4) { --d: 210ms; }
  html.js .reveal:nth-child(5) { --d: 280ms; }
  html.js .reveal:nth-child(6) { --d: 350ms; }
  html.js .reveal:nth-child(7) { --d: 420ms; }
}

/* ---------- index strip ---------- */
.index { padding: var(--space-3xl) 0 var(--space-2xl); }
.section-head { margin-bottom: var(--space-xl); }
.section-title { font-size: var(--step-6); margin-top: var(--space-s); max-width: 14ch; }
.index__list { border-top: 1px solid var(--line); }
.index__row {
  display: grid; grid-template-columns: 3ch auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-m);
  padding: var(--space-m) .25rem; border-bottom: 1px solid var(--line);
  text-decoration: none; border-radius: var(--r-1);
  transition: padding-left .45s var(--ease-out), background-color .3s;
}
.index__row:hover { padding-left: 1rem; background: rgb(255 255 255 / .025); }
.index__num { font-family: var(--font-mono); color: var(--ink-3); font-size: var(--step--1); }
.index__body { display: grid; gap: .3rem; }
.index__name { font-family: var(--font-display); font-size: var(--step-4); line-height: 1; transition: color .3s; }
.index__desc { color: var(--ink-2); max-width: 46ch; }
.index__meta { font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.index__arrow { font-size: var(--step-2); color: var(--ink-3); transition: translate .35s var(--ease-out), color .3s; }
.index__row:hover .index__arrow { translate: 6px 0; color: var(--ink); }
.index__list li:nth-child(1) .index__row:hover .index__name { color: var(--violet); }
.index__list li:nth-child(2) .index__row:hover .index__name { color: var(--lime); }
.index__list li:nth-child(3) .index__row:hover .index__name { color: var(--blue); }
@media (max-width: 47.99em) {
  .index__row { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-s); }
  .index__num, .index__meta { display: none; }
}

/* ---------- chapters ---------- */
.chapter { position: relative; padding: var(--section-pad) 0; }
.chapter + .chapter { border-top: 1px solid var(--line); }
.chapter__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.chapter__grid--flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.chapter__grid--flip .chapter__text { order: 2; }
.chapter__grid--flip .chapter__demo { order: 1; }
.chapter__title {
  display: flex; align-items: center; gap: .75rem; margin-top: var(--space-m);
  font-weight: 600; font-size: var(--step-2); letter-spacing: -0.01em;
}
.app-icon--lg { width: 2.5rem; height: 2.5rem; }
.chapter__thesis { font-size: var(--step-5); margin-top: var(--space-s); max-width: 15ch; line-height: 1.02; }
.chapter__text .prose { margin-top: var(--space-m); }
.chapter__text .chips { margin-top: var(--space-m); }
.chapter__cta { margin-top: var(--space-l); display: flex; flex-wrap: wrap; gap: .75rem; }
.chapter__cta--center { justify-content: center; margin-top: var(--space-2xl); }
@media (max-width: 63.99em) {
  .chapter__grid { grid-template-columns: 1fr; }
  .chapter__grid--flip .chapter__text { order: 1; }
  .chapter__grid--flip .chapter__demo { order: 2; }
}

/* demo controls */
.demo-controls { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem 1rem; font-size: var(--step--1); color: var(--ink-2); }
.demo-controls__field { display: grid; gap: .3rem; font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.demo-controls select {
  appearance: none; -webkit-appearance: none;
  padding: .5rem 2rem .5rem .75rem; border-radius: var(--r-1); border: 1px solid var(--line-2);
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23b4b1c0' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right .7rem center / 10px;
  color: var(--ink); font-family: var(--font-mono); font-size: .85rem; letter-spacing: 0; text-transform: none;
}
.demo-controls__hint { flex-basis: 100%; font-size: var(--step--2); color: var(--ink-3); }

/* ---------- 01 Kinetic: storefront demo ---------- */
.storefront { display: grid; gap: var(--space-s); }
.browser {
  position: relative; border-radius: var(--r-3); overflow: hidden;
  border: 1px solid var(--line-2); background: #0e0e14;
  box-shadow: 0 50px 100px -50px rgb(0 0 0 / .9), 0 0 80px -30px color-mix(in oklab, var(--lime) 30%, transparent);
}
.browser__bar { display: flex; align-items: center; gap: .4rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: #15151d; }
.browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: #3b3b48; }
.browser__url { margin-left: .5rem; flex: 1; padding: .3rem .7rem; border-radius: 6px; background: rgb(255 255 255 / .05); font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.store:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.store {
  height: clamp(380px, 48vh, 540px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  background: #f6f5f2; color: #1b1b22; scrollbar-width: thin; scrollbar-color: #c9c7c1 transparent;
  color-scheme: light;
}
.store__announce { background: #1b1b22; color: #f6f5f2; font-size: 10px; text-align: center; padding: 6px; letter-spacing: .04em; }
.store__nav { display: flex; align-items: center; gap: 14px; padding: 12px 18px; font-size: 11px; border-bottom: 1px solid #e6e4df; background: #fff; }
.store__nav b { font-weight: 700; margin-right: 6px; font-size: 12px; }
.store__nav span { color: #555; }
.store__nav em { margin-left: auto; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #333; }
.store__hero {
  --fg: #0b1a0f; --btn-bg: #0b1a0f; --btn-fg: #fff;
  margin: 16px 18px 0; padding: 40px 24px 36px; border-radius: 14px; text-align: center; color: var(--fg);
  background: radial-gradient(120% 120% at 80% 0%, #d9ff8a, transparent 50%), linear-gradient(135deg, #b9ff4a, #3ddc84 55%, #118a5a);
}
.store__hero--2 { --fg: #fff; --btn-bg: #fff; --btn-fg: #1b1b22; background: radial-gradient(120% 120% at 20% 0%, #4b4b70, transparent 55%), linear-gradient(135deg, #1b1b22, #2f2f44); }
.store__kicker { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.store__h { font-family: var(--font-display); font-size: 26px; line-height: 1; margin-top: 6px; }
.store__btn { display: inline-block; margin-top: 14px; padding: 7px 14px; border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg); font-size: 10px; font-weight: 600; }
.store__label { margin: 22px 18px 10px; font-size: 11px; font-weight: 600; }
.store__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 18px; }
.card { background: #fff; border-radius: 10px; padding: 8px; box-shadow: 0 1px 0 #e6e4df; }
.tee { aspect-ratio: 1; border-radius: 8px; background: #eeede9; position: relative; overflow: hidden; }
.tee::before { content: ""; position: absolute; left: 22%; right: 22%; top: 26%; bottom: 14%; border-radius: 8px 8px 6px 6px; background: var(--tee); }
.tee::after { content: ""; position: absolute; left: 12%; right: 12%; top: 24%; height: 26%; border-radius: 10px 10px 0 0; background: var(--tee); clip-path: polygon(0 0, 100% 0, 100% 60%, 82% 100%, 18% 100%, 0 60%); }
.tee--1 { --tee: #e76f51; } .tee--2 { --tee: #2a9d8f; } .tee--3 { --tee: #264653; }
.tee--4 { --tee: #e9c46a; } .tee--5 { --tee: #8ab17d; } .tee--6 { --tee: #6d597a; }
.card__t { height: 7px; width: 70%; margin-top: 8px; border-radius: 4px; background: #dcdbd6; }
.card__p { font-size: 10px; margin-top: 6px; font-weight: 600; }
.store__foot { text-align: center; font-size: 9px; color: #777; padding: 28px 0 20px; }

/* animation targets */
.kv { animation-duration: .85s; animation-fill-mode: both; animation-timing-function: var(--ease-out); }
html.js .storefront.is-armed .kv:not(.is-in) { opacity: 0; }
.store__grid .kv:nth-child(2) { animation-delay: 80ms; }
.store__grid .kv:nth-child(3) { animation-delay: 160ms; }
.store__grid .kv:nth-child(4) { animation-delay: 240ms; }
.store__grid .kv:nth-child(5) { animation-delay: 320ms; }
.store__grid .kv:nth-child(6) { animation-delay: 400ms; }
@media (prefers-reduced-motion: reduce) { .kv { animation-name: fadeIn !important; animation-duration: .3s; } }

.pick { position: absolute; pointer-events: none; border: 1.5px dashed var(--lime); border-radius: 10px; opacity: 0; transition: opacity .35s; box-shadow: 0 0 0 4px rgb(155 255 46 / .12); }
.pick.is-on { opacity: 1; }
.pick__label { position: absolute; top: -22px; left: -1.5px; font-family: var(--font-mono); font-size: 10px; background: var(--lime); color: #0a0a0f; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translate3d(0, 40px, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInDown { from { opacity: 0; transform: translate3d(0, -40px, 0); } to { opacity: 1; transform: none; } }
@keyframes zoomIn { from { opacity: 0; transform: scale3d(.3, .3, .3); } 50% { opacity: 1; } to { transform: none; } }
@keyframes flipInX {
  from { transform: perspective(400px) rotate3d(1, 0, 0, 90deg); opacity: 0; animation-timing-function: ease-in; }
  40% { transform: perspective(400px) rotate3d(1, 0, 0, -20deg); animation-timing-function: ease-in; }
  60% { transform: perspective(400px) rotate3d(1, 0, 0, 10deg); opacity: 1; }
  80% { transform: perspective(400px) rotate3d(1, 0, 0, -5deg); }
  to { transform: perspective(400px); }
}
@keyframes blurInUp { from { opacity: 0; filter: blur(12px); transform: translate3d(0, 30px, 0); } to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes clipInLeft { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes backInUp { 0% { transform: translateY(120px) scale(.7); opacity: .7; } 80% { transform: translateY(0) scale(.7); opacity: .7; } to { transform: scale(1); opacity: 1; } }
@keyframes bounceIn {
  from, 20%, 40%, 60%, 80%, to { animation-timing-function: cubic-bezier(.215, .61, .355, 1); }
  0% { opacity: 0; transform: scale3d(.3, .3, .3); }
  20% { transform: scale3d(1.1, 1.1, 1.1); }
  40% { transform: scale3d(.9, .9, .9); }
  60% { opacity: 1; transform: scale3d(1.03, 1.03, 1.03); }
  80% { transform: scale3d(.97, .97, .97); }
  to { opacity: 1; transform: scale3d(1, 1, 1); }
}
@keyframes lightSpeedInRight { from { transform: translate3d(100%, 0, 0) skewX(-30deg); opacity: 0; } 60% { transform: skewX(20deg); opacity: 1; } 80% { transform: skewX(-5deg); } to { transform: none; } }
@keyframes jackInTheBox { from { opacity: 0; transform: scale(.1) rotate(30deg); transform-origin: center bottom; } 50% { transform: rotate(-10deg); } 70% { transform: rotate(3deg); } to { opacity: 1; transform: scale(1); } }

/* ---------- 02 Kinetic Studio ---------- */
.chapter--studio { background: linear-gradient(180deg, transparent, rgb(139 124 255 / .045) 25%, rgb(139 124 255 / .045) 75%, transparent); }
.chapter__head { max-width: 42rem; }
.studio__intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-xl); align-items: end; margin-top: var(--space-l); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-m) var(--space-l); }
.stats li { display: grid; gap: .3rem; padding-left: var(--space-s); border-left: 1px solid var(--line-2); }
.stat__n { font-family: var(--font-display); font-size: var(--step-5); line-height: .95; color: var(--accent); }
.stats span { font-family: var(--font-mono); font-size: var(--step--2); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }

.reel { margin-top: var(--space-2xl); perspective: 1400px; }
.reel__tilt { transform-style: preserve-3d; transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); will-change: transform; }
@media (hover: none) and (prefers-reduced-motion: no-preference) {
  .reel__tilt { animation: orbit 14s var(--ease-in-out) infinite alternate; }
  @keyframes orbit { from { transform: rotateX(3deg) rotateY(-4deg); } to { transform: rotateX(-3deg) rotateY(4deg); } }
}
.reel__frame {
  position: relative; border-radius: var(--r-4); overflow: hidden; background: #0c0b14;
  border: 1px solid rgb(139 124 255 / .35);
  box-shadow: 0 60px 120px -50px rgb(91 63 230 / .6), 0 0 0 1px rgb(255 255 255 / .04) inset;
}
.reel__play { display: block; width: 100%; position: relative; }
.reel__play img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; opacity: .82; transition: opacity .4s, transform 1s var(--ease-out); }
.reel__play:hover img { opacity: 1; transform: scale(1.015); }
.reel__badge {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: inline-flex; align-items: center; gap: .8rem; text-align: left;
  padding: .6rem 1.2rem .6rem .6rem; border-radius: var(--r-pill);
  background: rgb(10 10 15 / .82); border: 1px solid rgb(255 255 255 / .16); color: var(--ink); white-space: nowrap;
  transition: transform .35s var(--ease-out), border-color .3s;
}
.reel__badge svg { width: 2.6rem; height: 2.6rem; padding: .7rem .6rem .7rem .8rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.reel__badge b { display: block; font-weight: 600; }
.reel__badge small { display: block; font-family: var(--font-mono); font-size: .68rem; color: var(--ink-3); margin-top: .1rem; }
.reel__play:hover .reel__badge { transform: scale(1.04); border-color: rgb(255 255 255 / .3); }
.reel__play:focus-visible { outline-offset: -4px; }
.reel__light {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; mix-blend-mode: screen;
  background: radial-gradient(38% 38% at 50% 50%, rgb(255 255 255 / .14), transparent 70%);
  translate: calc(var(--lx, 0) * 1%) calc(var(--ly, 0) * 1%);
}
.reel__tilt:hover .reel__light { opacity: 1; }

.ways { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-m); margin-top: var(--space-2xl); }
.way {
  padding: var(--space-l); border-radius: var(--r-3); border: 1px solid var(--line); background: rgb(255 255 255 / .025);
  display: grid; gap: var(--space-m); align-content: start;
}
.way__title { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; display: grid; gap: .55rem; }
.way__k { font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.way__p { color: var(--ink-2); }
.types { display: flex; flex-wrap: wrap; gap: .4rem; }
.types li { padding: .35em .7em; border-radius: var(--r-1); border: 1px solid var(--line); font-size: var(--step--1); color: var(--ink-2); }
.samples { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.sample {
  position: relative; height: 8rem; padding: 2.1rem .9rem .9rem; border-radius: var(--r-2);
  background: var(--bg-2); border: 1px solid var(--line); display: grid; align-content: end; overflow: hidden;
}
.sample__k { position: absolute; top: .7rem; left: .9rem; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.sample p { font-size: var(--step-1); font-weight: 500; line-height: 1.15; }
.sample--text p { font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); position: relative; }
.sample--text p::before { content: attr(data-text); visibility: hidden; display: block; }      /* reserves the final height */
.sample--text p .js-typewriter { position: absolute; inset: 0; }
.sample--text p .js-typewriter::after { content: ""; display: inline-block; width: 2px; height: .85em; margin-left: 2px; background: var(--accent); vertical-align: -.08em; animation: blink 1s steps(2) infinite; }
.sample--counter p { font-family: var(--font-display); font-weight: 400; font-size: var(--step-3); color: var(--accent); }
.sample--hover { transition: transform .35s var(--ease-out), box-shadow .35s, border-color .35s; }
.sample--hover:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -22px color-mix(in oklab, var(--accent) 70%, transparent); border-color: color-mix(in oklab, var(--accent) 55%, transparent); }
.sample--gradient { border: 0; color: #fff; background: linear-gradient(120deg, #2a1b8a, #5b3fe6, #3fa3ff, #2a1b8a); background-size: 300% 100%; animation: flow 7s linear infinite; }
.sample--gradient .sample__k { color: rgb(255 255 255 / .75); }
@keyframes flow { to { background-position: 300% 0; } }
.facts { display: grid; gap: .7rem; margin-top: auto; }
.facts li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .75rem; padding-top: .7rem; border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--ink-2); }
.facts__k { font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); padding-top: .15em; }
@media (max-width: 29.99em) { .facts li { grid-template-columns: 1fr; gap: .25rem; } }
@keyframes blink { 50% { opacity: 0; } }

.marquee {
  display: grid; gap: .6rem; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__row { display: flex; width: max-content; animation: marquee 52s linear infinite; }
.marquee__row--rev { animation-direction: reverse; }
.marquee:hover .marquee__row { animation-play-state: paused; }
.marquee__track { display: flex; gap: .6rem; padding-right: .6rem; }
.marquee__track li {
  display: inline-flex; align-items: center; gap: .55em; padding: .45em .85em; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: rgb(255 255 255 / .03); font-size: var(--step--1); white-space: nowrap; color: var(--ink-2);
}
.marquee__track li::before { content: ""; width: .7em; height: .7em; border-radius: 50%; background: var(--g); box-shadow: 0 0 12px -2px rgb(255 255 255 / .35); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__row { animation: none; width: auto; }
  .marquee__track { flex-wrap: wrap; padding: 0; }
  .marquee__track + .marquee__track { display: none; }
}

.gallery {
  margin-top: var(--space-2xl); display: grid; grid-auto-flow: column; grid-auto-columns: min(80%, 38rem); gap: var(--space-m);
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-s); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.gallery li { scroll-snap-align: start; }
.gallery figure { display: grid; gap: .6rem; }
.gallery img { border-radius: var(--r-2); border: 1px solid var(--line); background: var(--bg-2); width: 100%; height: auto; }
.gallery figcaption { font-family: var(--font-mono); font-size: var(--step--2); color: var(--ink-3); letter-spacing: .02em; }

@media (max-width: 63.99em) {
  .studio__intro { grid-template-columns: 1fr; }
  .ways { grid-template-columns: 1fr; }
}
@media (max-width: 29.99em) { .samples { grid-template-columns: 1fr; } .stats { gap: var(--space-m); } }

/* ---------- 03 NoteOut ---------- */
.noteout__demo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: var(--space-l); align-items: start; }
.phone { display: grid; gap: var(--space-s); }
.phone__screen {
  position: relative; width: min(100%, 330px); aspect-ratio: 9 / 18.4; margin-inline: auto;
  border-radius: 44px; border: 1px solid var(--line-2); background: #15171d;
  box-shadow: 0 50px 100px -50px rgb(0 0 0 / .9), inset 0 0 0 7px #1f2229, 0 0 90px -30px color-mix(in oklab, var(--blue) 35%, transparent);
  padding: 2.6rem 1.2rem 1.4rem; display: flex; flex-direction: column; color: #eceef2; overflow: hidden;
  color-scheme: dark;
}
.no-top { position: absolute; top: .85rem; left: 1.9rem; right: 1.9rem; display: flex; justify-content: space-between; align-items: center; font-size: .72rem; font-weight: 600; }
.no-status { display: flex; gap: 3px; align-items: center; }
.no-status i { height: 8px; width: 3px; border-radius: 1px; background: #eceef2; }
.no-status i:nth-child(2) { height: 10px; } .no-status i:nth-child(3) { width: 16px; height: 8px; border-radius: 2px; margin-left: 4px; }
.no-tools { display: flex; justify-content: space-between; margin-top: .4rem; color: #9ca1ab; }
.no-tools span { display: flex; gap: .55rem; }
.no-ic { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; font-size: .85rem; font-style: normal; }
.no-ic--menu { background: linear-gradient(#9ca1ab 0 2px, transparent 2px 5px, #9ca1ab 5px 7px, transparent 7px 10px, #9ca1ab 10px 12px, transparent 12px); width: 16px; height: 12px; }
.no-tag { text-align: center; font-weight: 700; font-size: 1.1rem; margin-top: 1.6rem; }
.no-words { display: flex; margin-top: .65rem; border-radius: 8px; overflow: hidden; background: #22252d; }
.no-words li { flex: 1; text-align: center; padding: .48rem .2rem; font-size: .78rem; color: #cfd3da; transition: background-color .3s, color .3s; }
.no-words li.is-on { background: var(--blue); color: #fff; }
.no-hint { margin-top: .65rem; font-size: .72rem; color: #8a8f99; line-height: 1.4; }
.no-history { margin-top: auto; display: grid; gap: .35rem; margin-bottom: .6rem; }
.no-history li { font-size: .7rem; background: #1d2027; border-radius: 8px; padding: .45rem .6rem; color: #c9ccd3; display: grid; gap: .15rem; animation: slot .5s var(--ease-out) both; }
.no-history li b { font-weight: 600; color: #eceef2; display: flex; justify-content: space-between; gap: .5rem; }
.no-history li b small { font-weight: 400; color: #8a8f99; font-size: .62rem; }
.no-history li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes slot { from { opacity: 0; translate: 0 8px; } }
.no-input textarea {
  width: 100%; resize: none; min-height: 4.8rem;
  background: #1a1d24; border: 1px solid #2c303a; border-radius: 10px; padding: .55rem .65rem;
  font-size: .8rem; line-height: 1.4; color: #eceef2;
}
.no-input textarea::placeholder { color: #6f747f; }
.no-input textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 0; }
.no-submit { margin-top: .55rem; width: 100%; padding: .72rem; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 600; font-size: .85rem; transition: transform .2s, opacity .3s; }
.no-submit:active { transform: scale(.98); }
.no-submit[disabled] { opacity: .55; cursor: default; }
.no-toast {
  position: absolute; left: 50%; bottom: 6rem; translate: -50% 10px;
  padding: .5rem .95rem; border-radius: 999px; background: #fff; color: #0a0a0f;
  font-size: .78rem; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .3s, translate .3s var(--ease-out);
}
.no-toast.is-on { opacity: 1; translate: -50% 0; }
.shots { display: grid; gap: var(--space-s); padding-top: var(--space-xl); }
.shots img { border-radius: 24px; border: 1px solid var(--line); width: 100%; height: auto; }
@media (max-width: 47.99em) {
  .noteout__demo { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr 1fr; padding-top: 0; }
}

/* ---------- studio ---------- */
.studio { padding: var(--section-pad) 0 var(--space-2xl); border-top: 1px solid var(--line); }
.studio__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2xl); align-items: start; }
.studio__text .prose { margin-top: var(--space-m); }
.principles { border-top: 1px solid var(--line); }
.principles li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: var(--space-s); padding: var(--space-m) 0; border-bottom: 1px solid var(--line); }
.principles li:nth-child(2) { padding-left: 2rem; }
.principles li:nth-child(3) { padding-left: 4rem; }
.principles__n { font-family: var(--font-mono); color: var(--accent); font-size: var(--step--1); padding-top: .4em; }
.principles h3 { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; }
.principles p { grid-column: 2; color: var(--ink-2); margin-top: .5rem; }
.studio__contact { margin-top: var(--space-2xl); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-m); align-items: end; padding-top: var(--space-l); border-top: 1px solid var(--line); }
.studio__address p { margin-top: .75rem; font-size: var(--step-1); line-height: 1.4; }
.studio__support { color: var(--ink-3); max-width: 30ch; }
@media (max-width: 63.99em) {
  .studio__grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .principles li:nth-child(2) { padding-left: 1rem; }
  .principles li:nth-child(3) { padding-left: 2rem; }
}

/* ---------- footer ---------- */
.site-footer { padding: var(--space-2xl) 0 var(--space-l); border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgb(0 0 0 / .45)); }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-l); }
.site-footer__brand p { margin-top: .75rem; color: var(--ink-3); font-family: var(--font-display); font-style: italic; font-size: var(--step-1); }
.site-footer__h { font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .75rem; }
.site-footer ul { display: grid; gap: .4rem; list-style: none; padding: 0; }
.site-footer a:not(.wordmark) { text-decoration: none; color: var(--ink-2); }
.site-footer a:not(.wordmark):hover { color: var(--ink); text-decoration: underline; }
.site-footer address { color: var(--ink-2); line-height: 1.5; }
.site-footer__legal { margin-top: var(--space-xl); padding-top: var(--space-m); border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: var(--step--1); color: var(--ink-3); }
@media (max-width: 47.99em) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

/* ---------- video dialog ---------- */
.video {
  position: fixed; inset: 0; z-index: 210; width: 100%; height: 100vh; height: 100dvh;
  background: rgb(5 5 8 / .93); color: var(--ink);
  display: none; place-items: center; padding: var(--gutter);
  opacity: 0; transition: opacity .3s, display .3s allow-discrete, overlay .3s allow-discrete;
}
.video[open] { display: grid; opacity: 1; }
@starting-style { .video[open] { opacity: 0; } }
.video.is-closing { opacity: 0; }
.video::backdrop { background: transparent; }
.video__stack { width: min(100%, 1100px); }
.video__frame { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-3); overflow: hidden; background: #000; box-shadow: 0 60px 120px -40px rgb(0 0 0 / .9); }
.video__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video__alt { margin-top: 1rem; font-size: var(--step--1); color: var(--ink-3); }
.video__alt a { color: var(--ink-2); }
.video__close {
  position: absolute; top: calc(1rem + env(safe-area-inset-top)); right: 1rem;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--line-2);
  display: grid; place-items: center; color: var(--ink); background: rgb(10 10 15 / .6);
}
.video__close svg { width: 1rem; height: 1rem; }
body:has(.video[open]) { overflow: hidden; }

.site-footer__place { color: var(--ink-2); }
