/* ==========================================================================
   KORBIA  |  korbia.net
   Single stylesheet. No inline styles anywhere (strict CSP: style-src 'self').
   Sections: fonts, tokens, base, chrome (header/menu/rail), hero, band,
   purpose, build, origin, query, contact, footer, 404, motion, a11y.
   ========================================================================== */

/* ---------- Fonts (self hosted, OFL) ---------- */
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin.e3a28eade2.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-ext.5717f37059.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-italic-latin.5a51946dff.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-italic-latin-ext.d001482125.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin.18be452724.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-ext.79bfdab9ba.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Metric matched fallback so text does not jump when Archivo arrives */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 104%; ascent-override: 84.4%; descent-override: 20.2%; line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #FBF8F3;
  --ink: #2B0A17;
  --ink-2: #410F25;
  --wine: #76293D;
  --copper: #C4604D;
  --cream: #F6E9E2;

  --bg: #FBF8F3;
  --bg-2: #F4EDE4;
  --card: #FFFFFF;
  --fg: #3A0D20;
  --fg-soft: #6E4A56;
  --line: rgba(65, 15, 37, .16);
  --line-2: rgba(65, 15, 37, .32);
  --accent: #C4604D;
  --accent-ink: #A2452D;
  --on-accent: #1F0711;

  --inv-bg: #2B0A17;
  --inv-bg-2: #3A0F21;
  --inv-fg: #F6E9E2;
  --inv-soft: #CDB1A9;
  --inv-line: rgba(246, 233, 226, .17);
  --inv-accent: #F08A5D;

  --term-bg: #14070C;
  --term-fg: #F3E3DA;
  --term-soft: #B99A92;
  --term-line: rgba(246, 233, 226, .13);
  --term-accent: #F08A5D;

  --f-sans: "Archivo", "Archivo Fallback", "Helvetica Neue", Helvetica, Arial, "Noto Sans", sans-serif;
  --f-serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --hdr: 4.5rem;
  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --max: 90rem;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ts: 1;            /* hero title scale, tuned per language below */
  --scroll: 0;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #14080E;
  --bg-2: #1D0C15;
  --card: #1F0E17;
  --fg: #F6E9E2;
  --fg-soft: #C7ABA3;
  --line: rgba(246, 233, 226, .15);
  --line-2: rgba(246, 233, 226, .32);
  --accent: #F08A5D;
  --accent-ink: #F3A27E;
  --on-accent: #1F0711;
  --inv-bg: #270C18;
  --inv-bg-2: #34101F;
  --term-bg: #0E0508;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #14080E; --bg-2: #1D0C15; --card: #1F0E17; --fg: #F6E9E2; --fg-soft: #C7ABA3;
    --line: rgba(246, 233, 226, .15); --line-2: rgba(246, 233, 226, .32);
    --accent: #F08A5D; --accent-ink: #F3A27E; --on-accent: #1F0711;
    --inv-bg: #270C18; --inv-bg-2: #34101F; --term-bg: #0E0508;
    color-scheme: dark;
  }
}

/* Script specific font stacks. Latin faces stay first so KORBIA, numbers and code keep the brand type. */
:root:lang(ja) {
  --f-sans: "Archivo", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  --f-serif: "Instrument Serif", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
  --f-mono: "JetBrains Mono", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
}
:root:lang(ko) {
  --f-sans: "Archivo", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif;
  --f-serif: "Instrument Serif", AppleMyungjo, "Nanum Myeongjo", Batang, "Noto Serif KR", "Noto Serif CJK KR", serif;
  --f-mono: "JetBrains Mono", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif;
}
:root:lang(zh) {
  --f-sans: "Archivo", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --f-serif: "Instrument Serif", "Songti SC", STSong, SimSun, "Noto Serif SC", "Noto Serif CJK SC", serif;
  --f-mono: "JetBrains Mono", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-padding-top: calc(var(--hdr) + 1rem);
  overflow-x: clip;
  scrollbar-color: var(--accent) transparent;
  background: var(--bg);
}
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  background: var(--bg); color: var(--fg);
  font-family: var(--f-sans); font-size: 1.0625rem; line-height: 1.55; font-weight: 400;
  font-synthesis: none; text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  overflow-wrap: break-word;
}
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
h1, h2, h3, p, ol, ul, blockquote, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
table { border-collapse: collapse; }
code { font-family: var(--f-mono); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

:lang(ja), :lang(zh) { line-break: strict; }
:lang(ja) { word-break: auto-phrase; }
:lang(ko) { word-break: keep-all; }
:lang(de) { -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 10 5 5; }

.only-dark { display: none; }
[data-theme="dark"] .only-light { display: none; }
[data-theme="dark"] .only-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .only-light { display: none; }
  :root:not([data-theme]) .only-dark { display: block; }
}

.wrap { position: relative; z-index: 2; width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.ic { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.skip { position: fixed; left: 1rem; top: 1rem; z-index: 200; padding: .75rem 1rem; border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 650; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ---------- Fixed layers ---------- */
.gl { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .8s linear; }
.gl-on .gl { opacity: 1; }
.grain { position: fixed; inset: 0; z-index: 90; pointer-events: none; background: url("/assets/img/grain.b4e991290a.png") 0 0 / 128px 128px; opacity: .055; }
[data-theme="dark"] .grain { opacity: .075; }
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 55; pointer-events: none; }
.progress__bar { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--scroll)); }

/* ---------- Header ---------- */
.hdr { position: fixed; inset: 0 0 auto 0; height: var(--hdr); z-index: 50; transition: transform .55s var(--ease), background-color .35s linear, border-color .35s linear; border-bottom: 1px solid transparent; }
.hdr.is-scrolled { background: rgba(251, 248, 243, .82); background: color-mix(in oklab, var(--bg) 80%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-bottom-color: var(--line); }
[data-theme="dark"] .hdr.is-scrolled { background: rgba(20, 8, 14, .82); background: color-mix(in oklab, var(--bg) 80%, transparent); }
.hdr.is-hidden { transform: translateY(-101%); }
.menu-open .hdr { transform: none; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: transparent; }
/* without the main script nothing marks the header as scrolled, so there it always carries its backdrop */
html:not(.js) .hdr, .fallback .hdr { background: rgba(251, 248, 243, .82); background: color-mix(in oklab, var(--bg) 80%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-bottom-color: var(--line); }
.fallback[data-theme="dark"] .hdr { background: rgba(20, 8, 14, .82); background: color-mix(in oklab, var(--bg) 80%, transparent); }
@media (prefers-color-scheme: dark) { html:not(.js):not([data-theme]) .hdr { background: rgba(20, 8, 14, .82); background: color-mix(in oklab, var(--bg) 80%, transparent); } }
.hdr__in { height: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .65rem; min-height: 44px; }
.brand__mark { width: 44px; height: 44px; flex: none; transition: transform .7s var(--ease); }
.brand__mark img { width: 44px; height: 44px; }
.brand__name { font-weight: 800; font-stretch: 118%; letter-spacing: .16em; font-size: 1.02rem; line-height: 1; }

.nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.4vw, 2.4rem); }
.nav__a { position: relative; display: inline-flex; align-items: center; min-height: 44px; font-size: .92rem; font-weight: 560; letter-spacing: .005em; white-space: nowrap; }
.nav__a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .55rem; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .5s var(--ease); }
.nav__a.is-current::after { transform: scaleX(1); transform-origin: 0 50%; }

.tools { display: flex; align-items: center; gap: .15rem; }
.tool { min-width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; position: relative; transition: background-color .3s linear; }
.lang { position: relative; }
.lang__btn { gap: .4rem; padding-inline: .7rem; font-family: var(--f-mono); font-size: .78rem; font-weight: 600; letter-spacing: .06em; }
.lang__btn .ic { width: 1.1rem; height: 1.1rem; }
.lang__menu { position: absolute; right: 0; top: calc(100% + .6rem); width: max-content; min-width: 11.5rem; padding: .4rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px -24px rgba(43, 10, 23, .45); opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.97); transform-origin: 100% 0; transition: opacity .25s linear, transform .45s var(--ease), visibility 0s linear .45s; }
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.lang__a { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 44px; padding: 0 .85rem; border-radius: 11px; font-size: .95rem; font-weight: 520; }
.lang__a small { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; color: var(--fg-soft); }
.lang__a[aria-current="true"] { background: var(--bg-2); }
.lang__a[aria-current="true"] small { color: var(--accent-ink); }

.theme__ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; overflow: visible; }
.theme__sun, .theme__moon { transform-box: view-box; transform-origin: 50% 50%; transition: transform .7s var(--ease), opacity .3s linear; }
.theme__sun circle { fill: currentColor; stroke: none; }
.theme__moon { fill: currentColor; stroke: none; opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-theme="dark"] .theme__sun { opacity: 0; transform: rotate(90deg) scale(.4); }
[data-theme="dark"] .theme__moon { opacity: 1; transform: none; }
html:not(.js) .theme, html:not(.js) .burger { display: none; }
html:not(.js) .lang:focus-within .lang__menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

.burger { display: none; flex-direction: column; gap: 6px; }
.burger__l { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .5s var(--ease); }
.menu-open .burger__l:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-open .burger__l:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.menu { position: fixed; inset: 0; z-index: 45; display: none; flex-direction: column; justify-content: space-between; gap: 2rem; padding: calc(var(--hdr) + 1.5rem) var(--pad) calc(1.75rem + env(safe-area-inset-bottom)); background: var(--bg); clip-path: circle(0% at calc(100% - 2.6rem) 2.25rem); visibility: hidden; transition: clip-path .75s var(--ease-io), visibility 0s linear .75s; touch-action: none; overscroll-behavior: contain; }
.menu-open .menu { clip-path: circle(150% at calc(100% - 2.6rem) 2.25rem); visibility: visible; transition-delay: 0s; }
.menu__nav { display: flex; flex-direction: column; }
.menu__a { display: flex; align-items: baseline; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: clamp(1.7rem, 8.4vw, 3rem); font-weight: 800; font-stretch: 108%; letter-spacing: -.03em; line-height: 1.05; opacity: 0; transform: translateY(24px); transition: opacity .5s linear, transform .7s var(--ease); }
.menu__n { font-family: var(--f-mono); font-size: .75rem; font-weight: 500; letter-spacing: .08em; color: var(--accent-ink); }
.menu-open .menu__a { opacity: 1; transform: none; }
.menu-open .menu__a:nth-child(1) { transition-delay: .18s; }
.menu-open .menu__a:nth-child(2) { transition-delay: .24s; }
.menu-open .menu__a:nth-child(3) { transition-delay: .30s; }
.menu-open .menu__a:nth-child(4) { transition-delay: .36s; }
.menu__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; font-size: .95rem; opacity: 0; transition: opacity .5s linear; }
.menu-open .menu__foot { opacity: 1; transition-delay: .45s; }
.menu__mail { font-family: var(--f-mono); min-height: 44px; display: inline-flex; align-items: center; }
.menu__social { display: flex; gap: 1.25rem; }
.menu__social a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }

/* ---------- Section rail (wide screens) ----------
   Drawn in the accent colour, which reads on the paper and on the dark sections alike,
   so it needs no blend mode (those behave differently from one engine to the next). */
.rail { position: fixed; right: 1.35rem; top: 50%; z-index: 40; display: none; flex-direction: column; gap: 1.15rem; transform: translateY(-50%); color: var(--accent); }
.rail__line { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 1px; background: rgba(196, 96, 77, .34); background: color-mix(in srgb, currentColor 34%, transparent); }
.rail__fill { position: absolute; inset: 0; background: currentColor; transform-origin: 50% 0; transform: scaleY(var(--scroll)); }
.rail__a { position: relative; display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-start; gap: 2.2rem; height: 9px; }
.rail__a::before { content: ""; position: absolute; inset: -.575rem -1.35rem -.575rem -.5rem; }
.rail__dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: currentColor; transform: scale(.56); transition: transform .5s var(--ease); flex: none; }
.rail__t { position: relative; padding: .34rem .6rem; border-radius: 7px; background: var(--fg); color: var(--bg); box-shadow: 0 0 0 1px rgba(246, 233, 226, .16); font-family: var(--f-mono); font-size: .66rem; line-height: 1.2; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; opacity: 0; transform: translateX(8px); transition: opacity .3s linear, transform .5s var(--ease); pointer-events: none; }
.rail__a.is-current .rail__dot { transform: scale(1.5); }

/* ---------- Shared type ---------- */
.eyebrow { display: flex; align-items: center; gap: .8rem; font-family: var(--f-mono); font-size: .76rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-soft); }
.eyebrow__n { color: var(--accent-ink); font-weight: 600; }
.eyebrow__l { width: 2.75rem; height: 1px; background: var(--line-2); transform-origin: 0 50%; }
.eyebrow--c { justify-content: center; }
.h2 { font-size: clamp(calc(2rem * var(--hs, 1)), calc((1.1rem + 3.6vw) * var(--hs, 1)), calc(4.5rem * var(--hs, 1))); line-height: 1; font-weight: 780; font-stretch: 108%; letter-spacing: -.035em; text-wrap: balance; }
.h2 em, .statement em { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-stretch: 100%; letter-spacing: -.015em; font-size: 1.1em; color: var(--accent); }
.h2 b { font-family: var(--f-mono); font-weight: 600; font-stretch: 100%; letter-spacing: -.07em; font-size: .86em; }
.h2--c { text-align: center; margin-inline: auto; }
.lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.3rem); line-height: 1.5; color: var(--fg-soft); max-width: 34em; }
.lead--c { text-align: center; margin-inline: auto; }
.body { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); max-width: 36em; }
.link { position: relative; display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; font-weight: 600; }
.link .ic { width: 1rem; height: 1rem; transition: transform .45s var(--ease); }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: .6rem; height: 1.5px; background: currentColor; transform: scaleX(1); transform-origin: 0 50%; transition: transform .5s var(--ease); opacity: .35; }
:lang(ja) em, :lang(ko) em, :lang(zh) em { font-style: normal; font-size: 1em; letter-spacing: 0; }
:lang(ja) .h2 b, :lang(ko) .h2 b, :lang(zh) .h2 b { letter-spacing: -.01em; font-size: 1em; font-weight: 800; color: transparent; -webkit-text-stroke: .03em var(--fg); }
:lang(ja) .h2, :lang(ko) .h2, :lang(zh) .h2 { line-height: 1.16; letter-spacing: -.01em; font-weight: 700; }

/* ---------- Buttons ---------- */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: .95rem; min-height: 3.5rem; padding: .4rem .45rem .4rem 1.5rem; border-radius: 999px; font-weight: 650; font-size: 1rem; line-height: 1.15; letter-spacing: -.005em; transition: color .45s var(--ease); will-change: transform; }
.btn::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: var(--accent); transform: translateY(102%); transition: transform .55s var(--ease); }
.btn__i { width: 2.7rem; height: 2.7rem; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); transition: background-color .45s var(--ease), color .45s var(--ease), transform .55s var(--ease); }
.btn__i .ic { grid-area: 1 / 1; transition: transform .55s var(--ease), opacity .3s linear; }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--ghost { color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.ic--check { opacity: 0; transform: scale(.4) rotate(-30deg); }
.is-copied .ic--copy { opacity: 0; transform: scale(.4) rotate(30deg); }
.is-copied .ic--check { opacity: 1; transform: none; }

.chip { display: inline-flex; align-items: center; gap: .5rem; padding: .42rem .75rem; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--f-mono); font-size: .68rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; line-height: 1.2; }
.status { display: inline-flex; align-items: center; gap: .55rem; padding: .42rem .8rem .42rem .65rem; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--f-mono); font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; white-space: nowrap; }
.status__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.status__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(3.2); opacity: 0; } }

/* ---------- Stages (particle targets + static fallbacks) ---------- */
.stage { position: relative; width: 100%; aspect-ratio: 1; }
.stage__img, .stage__svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stage__svg { padding: 14%; fill: none; stroke: currentColor; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; color: var(--accent); overflow: visible; }
html:not(.js) .stage__svg ~ .stage__svg, html:not(.js) .stage__img ~ .stage__svg { display: none; }
.js .stage > * { display: none; }
.js.no-gl .stage > .is-on { display: block; animation: fade-in .6s linear both; }
.js.no-gl[data-theme="dark"] .stage > .only-light, .js.no-gl:not([data-theme="dark"]) .stage > .only-dark { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--hdr) + 1.5rem) 0 5.5rem; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr); align-items: center; gap: clamp(1.5rem, 3.5vw, 4rem); }
.hero__copy { container-type: inline-size; min-width: 0; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: clamp(1.1rem, 2.4vw, 2rem); }
.hero__eyebrow { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-soft); }
.hero__title { font-size: clamp(2.4rem, 6.2vw, 6rem); font-size: clamp(2.4rem, min(calc(13.4cqi * var(--ts)), calc(16svh * var(--ts))), 9.25rem); line-height: .93; font-weight: 800; font-stretch: 108%; letter-spacing: -.045em; text-transform: uppercase; }
.hero__title .l { display: block; }
.hero__title em { position: relative; display: inline-block; font-family: var(--f-serif); font-style: italic; font-weight: 400; font-stretch: 100%; font-size: 1.16em; line-height: .8; letter-spacing: -.02em; text-transform: none; color: var(--accent); }
.hero__title em::after { content: ""; position: absolute; left: -2%; right: -4%; bottom: -.1em; height: .2em; background: currentColor; -webkit-mask: url("/assets/img/flourish.5b84aab6d5.svg") 50% 50% / 100% 100% no-repeat; mask: url("/assets/img/flourish.5b84aab6d5.svg") 50% 50% / 100% 100% no-repeat; opacity: .9; }
.hero__title b { font-family: var(--f-mono); font-weight: 600; font-stretch: 100%; font-size: .9em; letter-spacing: -.075em; text-transform: lowercase; }
.hero__title b::after { content: ""; display: inline-block; width: .5em; height: .09em; margin-left: .08em; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__lead { margin-top: clamp(1.4rem, 2.6vw, 2.25rem); max-width: 33em; font-size: clamp(1.05rem, 1rem + .4vw, 1.35rem); line-height: 1.5; color: var(--fg-soft); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: clamp(1.5rem, 2.8vw, 2.4rem); }
.hero__stage { display: flex; justify-content: center; min-width: 0; }
.stage--hero { width: min(100%, 600px); }
.scrollhint { position: absolute; left: var(--pad); bottom: 1.75rem; z-index: 2; display: inline-flex; align-items: center; gap: .9rem; min-height: 44px; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-soft); }
.scrollhint__line { position: relative; width: 3.5rem; height: 1px; background: var(--line-2); overflow: hidden; }
.scrollhint__line::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: slide 2.4s var(--ease-io) infinite; }
@keyframes slide { 0% { transform: translateX(-101%); } 60%, 100% { transform: translateX(101%); } }

:lang(ja) .hero__title, :lang(ko) .hero__title, :lang(zh) .hero__title { line-height: 1.12; letter-spacing: -.02em; font-weight: 800; }
:lang(ja) .hero__title em, :lang(ko) .hero__title em, :lang(zh) .hero__title em { font-size: 1.04em; font-weight: 600; line-height: 1; }
:lang(ja) .hero__title b, :lang(ko) .hero__title b, :lang(zh) .hero__title b { font-size: 1em; letter-spacing: -.02em; font-weight: 800; color: transparent; -webkit-text-stroke: .026em var(--fg); }
:lang(ja) .hero__title em::after, :lang(ko) .hero__title em::after, :lang(zh) .hero__title em::after { bottom: -.16em; }
:lang(ja) .hero__title b::after, :lang(ko) .hero__title b::after, :lang(zh) .hero__title b::after { display: none; }

/* ---------- Marquee band ---------- */
.band { position: relative; z-index: 2; padding: clamp(.9rem, 1.6vw, 1.4rem) 0; background: var(--inv-bg); color: var(--inv-fg); overflow: hidden; transform: rotate(-1.6deg) scale(1.03); margin-block: clamp(1.5rem, 4vw, 3.5rem); }
.marquee { overflow: hidden; }
.marquee__track { display: flex; align-items: center; width: max-content; will-change: transform; }
.marquee__i { display: inline-flex; align-items: center; gap: clamp(1.25rem, 2.6vw, 2.5rem); padding-right: clamp(1.25rem, 2.6vw, 2.5rem); font-size: clamp(2rem, 6.2vw, 5.25rem); font-weight: 850; font-stretch: 122%; letter-spacing: -.03em; line-height: 1.05; text-transform: uppercase; white-space: nowrap; }
.marquee__i::after { content: ""; width: .28em; height: .28em; background: var(--inv-accent); transform: rotate(45deg); flex: none; }
.marquee--alt .marquee__i { color: transparent; -webkit-text-stroke: 1.25px var(--inv-soft); font-size: clamp(1.4rem, 3.8vw, 3.1rem); font-stretch: 100%; font-weight: 700; }
.marquee--alt { margin-top: .35rem; opacity: .8; }
html:not(.js) .marquee__track { flex-wrap: wrap; width: auto; justify-content: center; }
:lang(ja) .marquee__i, :lang(ko) .marquee__i, :lang(zh) .marquee__i { letter-spacing: 0; line-height: 1.25; }

/* ---------- Sections ---------- */
.sec { position: relative; padding: clamp(5rem, 11vw, 10.5rem) 0; }

/* Purpose */
.statement { margin: clamp(1.75rem, 3.5vw, 3rem) 0 0; max-width: 21.5em; font-size: clamp(1.7rem, 1rem + 3.2vw, 4rem); line-height: 1.08; font-weight: 620; font-stretch: 100%; letter-spacing: -.035em; }
.statement .lw { opacity: clamp(.16, calc(var(--p, 1) * (var(--n, 1) + 5) - var(--i, 0)), 1); }
:lang(ja) .statement, :lang(ko) .statement, :lang(zh) .statement { line-height: 1.32; letter-spacing: -.01em; font-weight: 650; }
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); margin-top: clamp(3.5rem, 8vw, 7rem); border-top: 1px solid var(--line-2); }
.principle { position: relative; padding: clamp(1.6rem, 2.8vw, 2.5rem) clamp(1.25rem, 2.4vw, 2.25rem) clamp(1.75rem, 3vw, 2.75rem); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); overflow: hidden; }
.principle:last-child { border-right-color: transparent; }
.principle::before { content: ""; position: absolute; inset: 0; background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 0%), rgba(196, 96, 77, .16), transparent 62%); opacity: 0; transition: opacity .5s linear; pointer-events: none; }
.principle__n { display: block; font-family: var(--f-serif); font-style: italic; font-size: clamp(3.25rem, 6vw, 5.25rem); line-height: .9; color: var(--accent); }
.principle__t { margin-top: clamp(1.75rem, 3.4vw, 3.25rem); font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem); line-height: 1.1; font-weight: 740; font-stretch: 106%; letter-spacing: -.025em; }
.principle__d { margin-top: .8rem; color: var(--fg-soft); max-width: 26em; }

/* Build */
.build { color: var(--inv-fg); --fg: var(--inv-fg); --fg-soft: var(--inv-soft); --line: var(--inv-line); --line-2: rgba(246, 233, 226, .34); --accent: var(--inv-accent); --accent-ink: var(--inv-accent); --bg: var(--inv-bg); }
.build__bg { position: absolute; inset: 0; overflow: hidden; background: var(--inv-bg); border-radius: var(--r, 0px) var(--r, 0px) 0 0; transform: scaleX(var(--sx, 1)); transform-origin: 50% 0; }
.build__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(38rem circle at var(--mx, 70%) var(--my, 20%), rgba(240, 138, 93, .13), transparent 62%); opacity: var(--glow, 0); transition: opacity .6s linear; }
.build__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6.5rem); align-items: start; }
.build__aside { position: sticky; top: calc(var(--hdr) + 1.5rem); }
.build__aside .h2 { margin-top: clamp(1.25rem, 2.4vw, 2rem); }
.build__aside .lead { margin-top: clamp(1.1rem, 2vw, 1.6rem); }
.stage--build { width: min(72%, 21rem); margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.pillars { border-top: 1px solid var(--line-2); }
.pillar { position: relative; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) auto; column-gap: clamp(.75rem, 2vw, 1.75rem); row-gap: 1rem; align-items: start; padding: clamp(1.9rem, 3.4vw, 3.1rem) 0; border-bottom: 1px solid var(--line); }
.pillar::before { content: ""; position: absolute; inset: 0 calc(var(--pad) * -1); background: rgba(246, 233, 226, .06); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .6s var(--ease); z-index: -1; }
.pillar.is-active::before { transform: scaleY(1); }
.pillar__n { padding-top: .5rem; font-family: var(--f-mono); font-size: .8rem; font-weight: 500; letter-spacing: .08em; color: var(--accent); }
.pillar__t { font-size: clamp(1.6rem, 1.1rem + 2.3vw, 3.1rem); line-height: 1.02; font-weight: 760; font-stretch: 110%; letter-spacing: -.035em; transition: transform .6s var(--ease), color .4s linear; }
.pillar.is-active .pillar__t { transform: translateX(.6rem); color: var(--accent); }
.pillar__d { margin-top: .85rem; max-width: 33em; color: var(--fg-soft); transition: transform .6s var(--ease); }
.pillar.is-active .pillar__d { transform: translateX(.6rem); }
.pillar .chip { margin-top: .45rem; }
.stage--mini { display: none; }
:lang(ja) .pillar__t, :lang(ko) .pillar__t, :lang(zh) .pillar__t { line-height: 1.2; letter-spacing: -.01em; }

/* Origin */
.origin__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2.5rem, 6vw, 6.5rem); align-items: start; }
.origin__copy .h2 { margin-top: clamp(1.25rem, 2.4vw, 2rem); }
.origin__copy .body { margin-top: clamp(1.25rem, 2.2vw, 1.75rem); color: var(--fg-soft); }
.origin__copy .h2 + .body { margin-top: clamp(1.75rem, 3.4vw, 2.75rem); }
.quote { margin-top: clamp(2rem, 4vw, 3.25rem); padding-top: clamp(1.5rem, 3vw, 2.25rem); border-top: 1px solid var(--line-2); font-family: var(--f-serif); font-style: italic; font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3.1rem); line-height: 1.05; letter-spacing: -.01em; color: var(--accent-ink); max-width: 16em; text-wrap: balance; }
:lang(ja) .quote, :lang(ko) .quote, :lang(zh) .quote { font-style: normal; line-height: 1.3; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem); }
.origin__mark { position: sticky; top: calc(var(--hdr) + 1.5rem); }
.stage--origin { width: min(100%, 26rem); margin-inline: auto; }
.mark { margin-top: clamp(1rem, 2vw, 1.75rem); }
.mark__h { font-family: var(--f-mono); font-size: .76rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-soft); padding-bottom: .9rem; }
.mark__list { border-top: 1px solid var(--line-2); }
.mark__b { position: relative; width: 100%; display: grid; grid-template-columns: minmax(5.5rem, 7.5rem) minmax(0, 1fr); align-items: baseline; gap: 1rem; min-height: 3.25rem; padding: .8rem 0 .8rem 1.4rem; border-bottom: 1px solid var(--line); text-align: start; transition: color .35s linear, padding-left .5s var(--ease); }
.mark__b::before { content: ""; position: absolute; left: 0; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background-color .3s linear, box-shadow .3s linear, transform .5s var(--ease); }
.mark__b[aria-pressed="true"]::before { background: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); transform: scale(1.3); }
.mark__t { font-weight: 720; font-stretch: 108%; letter-spacing: -.01em; }
.mark__d { color: var(--fg-soft); font-size: .98rem; }
.mark__b[aria-pressed="true"] .mark__t { color: var(--accent-ink); }

/* Query */
.query { background: var(--bg-2); }
.query__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5.5rem); align-items: center; }
.query__copy .h2 { margin-top: clamp(1.25rem, 2.4vw, 2rem); }
.query__copy .lead { margin-top: clamp(1.1rem, 2vw, 1.6rem); }
.qchips { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
html:not(.js) .qchips { display: none; }
.qchip { position: relative; display: inline-flex; align-items: center; gap: .7rem; min-height: 44px; max-width: 100%; padding: .55rem 1rem .55rem .85rem; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); text-align: start; transition: box-shadow .3s linear, background-color .3s linear, transform .5s var(--ease); }
.qchip::before { content: ""; width: 0; height: 0; border-left: 7px solid var(--accent); border-top: 5px solid transparent; border-bottom: 5px solid transparent; flex: none; transition: transform .5s var(--ease); }
.qchip code { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; font-size: clamp(.72rem, .66rem + .28vw, .86rem); line-height: 1.35; overflow-wrap: anywhere; }
.qchip[aria-pressed="true"] { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--accent); }
.console-wrap { min-width: 0; perspective: 75rem; }
.js .console { transform: rotateX(calc((1 - var(--p, 1)) * 18deg)) scale(calc(.9 + var(--p, 1) * .1)); transform-origin: 50% 100%; opacity: calc(.2 + var(--p, 1) * .8); }
.console { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; border-radius: 18px; background: var(--term-bg); color: var(--term-fg); border: 1px solid var(--term-line); box-shadow: 0 40px 90px -40px rgba(43, 10, 23, .65); overflow: hidden; font-family: var(--f-mono); font-size: clamp(.78rem, .72rem + .3vw, .92rem); line-height: 1.6; min-width: 0; }
.console__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.15rem; border-bottom: 1px solid var(--term-line); color: var(--term-soft); font-size: .72rem; letter-spacing: .08em; }
.console__state { display: inline-flex; align-items: center; gap: .5rem; text-transform: uppercase; }
.console__state .status__dot, .console__state .status__dot::after { background: var(--term-accent); }
.console__body { padding: 1.15rem 1.15rem 1.4rem; min-height: 19.5rem; }
.console__line { word-break: break-word; }
.console__p { color: var(--term-accent); }
.console__caret { display: inline-block; width: .55em; height: 1.05em; margin-left: .12em; vertical-align: -.16em; background: var(--term-accent); animation: blink 1.1s steps(1) infinite; }
.console__out { margin-top: .9rem; overflow-x: auto; }
.rs { min-width: 100%; }
.rs th { padding: 0 1.5rem .5rem 0; text-align: start; font-weight: 500; color: var(--term-soft); border-bottom: 1px dashed var(--term-line); white-space: nowrap; }
.rs td { padding: .5rem 1.5rem 0 0; vertical-align: top; }
.rs td:last-child, .rs th:last-child { padding-right: 0; white-space: nowrap; }
.rs a { color: var(--term-accent); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.rs__n { margin-top: .9rem; color: var(--term-soft); }
.rs tr.is-row { animation: row-in .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Contact */
.contact { padding-bottom: clamp(5rem, 10vw, 9rem); }
.contact__in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stage--contact { width: clamp(8.5rem, 17vw, 13rem); margin: clamp(1.25rem, 2.5vw, 2rem) 0 clamp(.25rem, 1vw, .75rem); }
.contact .h2 { max-width: 15em; }
.mail { margin-top: clamp(1.75rem, 4vw, 3.25rem); max-width: 100%; container-type: inline-size; width: 100%; }
.mail__a { font-variation-settings: "wght" var(--mw, 820); display: inline-block; font-size: clamp(1.9rem, 9.6vw, 8.5rem); font-size: clamp(1.9rem, 10.6cqi, 9rem); line-height: 1; font-weight: 820; font-stretch: 100%; letter-spacing: -.055em; white-space: nowrap; }
.mail__c { display: inline-block; transition: color .3s linear; }
.contact .lead { margin-top: clamp(1.25rem, 2.5vw, 2rem); }
.contact__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: clamp(1.5rem, 3vw, 2.4rem); }
.follow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .25rem 1.75rem; margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: clamp(1.25rem, 2.5vw, 1.75rem); border-top: 1px solid var(--line-2); width: min(100%, 44rem); }
.follow__t { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-soft); }

/* ---------- Footer ---------- */
.ftr { position: relative; z-index: 2; background: var(--inv-bg); color: var(--inv-fg); --fg: var(--inv-fg); --fg-soft: var(--inv-soft); --line: var(--inv-line); --line-2: rgba(246, 233, 226, .34); --accent: var(--inv-accent); --bg: var(--inv-bg); padding: clamp(2.5rem, 6vw, 5rem) 0 calc(1.5rem + env(safe-area-inset-bottom)); overflow: hidden; }
.ftr .wrap { container-type: inline-size; }
.wordmark { display: flex; justify-content: space-between; align-items: baseline; font-size: 18vw; font-size: 18.6cqi; line-height: .8; font-weight: 880; font-stretch: 125%; letter-spacing: 0; color: transparent; -webkit-text-stroke: 1.5px var(--inv-soft); user-select: none; padding-block: .06em .1em; }
.wordmark span { display: inline-flex; justify-content: center; width: .86em; font-variation-settings: "wght" var(--w, 880), "wdth" var(--wd, 125); transition: color .5s linear, -webkit-text-stroke-color .5s linear; }
.wordmark span:nth-child(5) { width: .42em; }
.wordmark span.is-hot, .wordmark.is-party span { color: var(--inv-accent); -webkit-text-stroke-color: var(--inv-accent); }
.ftr__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; margin-top: clamp(1.5rem, 3vw, 2.5rem); padding-top: clamp(1.1rem, 2vw, 1.5rem); border-top: 1px solid var(--line); }
.ftr__tag { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.2rem, 1rem + .9vw, 1.7rem); line-height: 1.15; color: var(--inv-accent); }
:lang(ja) .ftr__tag, :lang(ko) .ftr__tag, :lang(zh) .ftr__tag { font-style: normal; font-size: clamp(1.05rem, 1rem + .5vw, 1.35rem); }
.ftr__links { display: flex; flex-wrap: wrap; gap: 0 1.75rem; font-size: .95rem; }
.ftr__row--b { border-top: 0; padding-top: 0; margin-top: .5rem; color: var(--inv-soft); font-size: .85rem; }
.ftr__top .ic { width: 1rem; height: 1rem; }

/* ---------- 404 ---------- */
.nf { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--hdr) + 1.5rem) 0 3rem; }
.nf__in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stage--nf { width: min(100%, 44rem); aspect-ratio: 2.3; margin-bottom: clamp(.75rem, 2vw, 1.5rem); }
.nf__code { position: absolute; inset: 0; display: grid !important; place-items: center; font-size: clamp(6rem, 30vw, 17rem); line-height: .8; font-weight: 880; font-stretch: 125%; letter-spacing: -.04em; color: var(--accent); }
.js .nf__code { visibility: hidden; }
.js.no-gl .nf__code { visibility: visible; }
.nf__h { margin-top: clamp(1.1rem, 2.4vw, 1.75rem); max-width: 14em; }
.nf .lead { margin-top: clamp(1rem, 2vw, 1.5rem); }

/* ---------- Legal page (only built once site.config.json has the details) ---------- */
.legal { position: relative; padding: calc(var(--hdr) + clamp(2rem, 6vw, 4.5rem)) 0 clamp(4rem, 9vw, 7rem); }
.legal__in { max-width: 46rem; }
.legal h1 { margin-top: clamp(1.25rem, 2.4vw, 2rem); font-size: clamp(1.65rem, 1rem + 3.2vw, 3.75rem); line-height: 1.02; font-weight: 780; font-stretch: 100%; letter-spacing: -.035em; scroll-margin-top: calc(var(--hdr) + 1rem); }
.legal h1 ~ h1 { margin-top: clamp(3.5rem, 7vw, 5.5rem); }
.legal h2 { margin-top: 2.25rem; font-size: 1.15rem; line-height: 1.25; font-weight: 720; letter-spacing: -.01em; }
.legal p { margin-top: .7rem; color: var(--fg-soft); }
.legal a:not(.link) { color: var(--fg); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.legal code { font-size: .88em; padding: .1em .35em; border-radius: 5px; background: var(--bg-2); color: var(--fg); }
.legal hr { margin: clamp(3.5rem, 7vw, 5.5rem) 0; border: 0; border-top: 1px solid var(--line-2); }
.legal__stand { margin-top: 2.5rem !important; font-family: var(--f-mono); font-size: .78rem; letter-spacing: .08em; }
.legal__back { margin-top: 3rem; }

/* ---------- Cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; display: none; will-change: transform; }
.cursor__ring { display: block; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #D9714F; background: rgba(217, 113, 79, 0); opacity: 0; transform: scale(.4); transition: transform .5s var(--ease), background-color .3s linear, opacity .3s linear; }
.cursor.is-on .cursor__ring { opacity: 1; transform: scale(1); }
.cursor.is-on.is-link .cursor__ring { transform: scale(1.7); background: rgba(217, 113, 79, .16); }
.cursor.is-on.is-down .cursor__ring { transform: scale(.75); background: rgba(217, 113, 79, .3); }

/* ---------- Motion: reveals ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .eyebrow[data-reveal] { transform: none; }
.js .eyebrow[data-reveal] .eyebrow__l { transform: scaleX(0); transition: transform 1.1s var(--ease) .15s; }
.js .eyebrow[data-reveal].is-in .eyebrow__l { transform: none; }
.js .principle[data-reveal].is-in { transform: perspective(60rem) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.js .principle.is-tilting { transition: opacity .9s var(--ease), transform .25s linear; }

/* word masks for headings */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em .07em .16em; margin: -.1em -.07em -.16em; }
.w > span { display: inline-block; }
.js [data-words] { visibility: hidden; }
.js [data-words].is-split { visibility: visible; }
.js [data-words] .w > span { transform: translateY(112%) rotate(4deg); transform-origin: 0 100%; transition: transform 1.05s var(--ease); transition-delay: calc(var(--i, 0) * 55ms); }
.js [data-words].is-in .w > span { transform: none; }

/* hero entrance */
.js .hero__title { visibility: hidden; }
.js .hero__title.is-split { visibility: visible; }
.js .hero__title .l { overflow: hidden; padding: .1em .08em .16em; margin: -.1em -.08em -.16em; }
.js .hero__title .l > span { display: block; transform: translateY(112%); }
.js .hero__title em::after { clip-path: inset(0 100% 0 0); }
.js .hero [data-hero] { opacity: 0; transform: translateY(22px); }
.is-ready .hero__title .l > span { transform: none; transition: transform 1.25s var(--ease) calc(.15s + var(--i, 0) * .11s); }
.is-ready .hero__title em::after { clip-path: inset(0 0 0 0); transition: clip-path 1s var(--ease-io) 1.15s; }
.is-ready .hero [data-hero] { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.is-ready .hero [data-hero="1"] { transition-delay: .05s; }
.is-ready .hero [data-hero="3"] { transition-delay: .75s; }
.is-ready .hero [data-hero="4"] { transition-delay: .9s; }
.is-ready .hero [data-hero="5"] { transition-delay: 1.5s; }
.js .hdr__in { opacity: 0; }
.is-ready .hdr__in, .is-404 .hdr__in { opacity: 1; transition: opacity .9s linear .1s; }
.js .rail { opacity: 0; }
.is-ready .rail { opacity: 1; transition: opacity .9s linear 1.1s; }

/* language swap */
.i18n-swap { animation: swap-in .55s var(--ease) both; }
@keyframes swap-in { from { opacity: 0; transform: translateY(8px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }

/* failsafe: if the main script never arrives, show everything */
.fallback [data-reveal], .fallback .hero [data-hero], .fallback .hdr__in { opacity: 1 !important; transform: none !important; }
.fallback .rail { opacity: 1 !important; }
.fallback [data-words], .fallback .hero__title { visibility: visible !important; }
.fallback .hero__title .l > span, .fallback [data-words] .w > span { transform: none !important; }
.fallback .hero__title em::after { clip-path: none !important; }
.fallback .stage > :first-child { display: block !important; }
.fallback[data-theme="dark"] .stage > .only-light { display: none !important; }
.fallback[data-theme="dark"] .stage > .only-dark { display: block !important; }
.fallback .nf__code { visibility: visible !important; }
.fallback .console { transform: none !important; opacity: 1 !important; }
.fallback .eyebrow__l { transform: none !important; }
/* the main script arrived after the failsafe: it takes over without replaying anything */
.js.no-gl.is-late .stage > .is-on { animation: none; }

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

/* ---------- Hover (real pointers only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .nav__a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
  .tool:hover { background: var(--line); }
  .lang__a:hover { background: var(--bg-2); }
  .brand:hover .brand__mark { transform: rotate(-8deg) scale(1.08); }
  .btn:hover::before { transform: none; }
  .btn:hover { color: var(--on-accent); }
  .btn:hover .btn__i { background: var(--on-accent); color: var(--accent); transform: rotate(-12deg) scale(1.06); }
  .link:hover::after { transform: scaleX(0); transform-origin: 100% 50%; }
  .link:hover .ic { transform: translate(2px, -2px); }
  .principle:hover::before { opacity: 1; }
  .qchip:hover { background: var(--card); }
  .qchip:hover::before { transform: translateX(3px); }
  .mark__b:hover { padding-left: 1.75rem; }
  .rail__a:hover .rail__t { opacity: 1; transform: none; }
  .rail__a:not(.is-current):hover .rail__dot { transform: scale(1.1); }
  .mail__a:hover .mail__c { animation: hop .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); color: var(--accent); }
  .cursor { display: block; }
}
@keyframes hop { 0% { transform: none; } 35% { transform: translateY(-.16em) rotate(-4deg); } 100% { transform: none; } }

/* ---------- Layout breakpoints ---------- */
@media (min-width: 1280px) { .rail { display: flex; } }
@media (max-width: 1023px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .menu { display: flex; }
}
@media (max-width: 899px) {
  :root { --hdr: 4rem; }
  .hero { justify-content: flex-start; padding-bottom: 4.5rem; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .hero__stage { order: -1; }
  .stage--hero { width: min(74vw, 40svh, 25rem); }
  .scrollhint { display: none; }
  .build__grid, .origin__grid, .query__grid { grid-template-columns: minmax(0, 1fr); }
  .build__aside, .origin__mark { position: static; }
  .stage--build { display: none; }
  .stage--mini { display: block; grid-column: 3; grid-row: 1; width: clamp(4.25rem, 20vw, 6.5rem); margin: -.4rem 0 -.4rem .25rem; }
  .pillar { grid-template-columns: 2.4rem minmax(0, 1fr) auto; }
  .pillar .chip { grid-column: 2 / -1; justify-self: start; margin-top: 0; }
  .stage--origin { width: min(78vw, 22rem); }
  .console__body { min-height: 17.5rem; }
}
@media (max-width: 520px) {
  .btn { width: 100%; justify-content: space-between; }
  .hero__cta, .contact__cta { flex-direction: column; width: 100%; }
  .mark__b { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .ftr__row { flex-direction: column; align-items: flex-start; }
  .principle { border-right: 0; }
}
@media (max-width: 359px) { .brand__name { display: none; } }
@media (max-height: 560px) and (min-width: 900px) { .scrollhint { display: none; } }
@media (min-width: 900px) and (max-height: 800px) {
  .hero { padding-bottom: 3.75rem; }
  .hero__title { font-size: clamp(2.4rem, min(calc(13.4cqi * var(--ts)), calc(11.4vh * var(--ts))), 9.25rem); }
  .hero__meta { margin-bottom: 1rem; }
  .hero__lead { margin-top: 1.2rem; font-size: 1.08rem; }
  .hero__cta { margin-top: 1.35rem; }
  .scrollhint { bottom: .6rem; }
  .stage--hero { width: min(100%, 68vh); }
}
@media (min-width: 1800px) { :root { --max: 100rem; } .stage--hero { width: min(100%, 660px); } }

/* per language fit for the big hero title */
:root:lang(tr) { --ts: .95; --hs: .94; }
:root:lang(de) { --ts: .9; --hs: .84; }
:root:lang(es) { --ts: .92; --hs: .92; }
:root:lang(fr) { --ts: .86; --hs: .9; }
:root:lang(ja) { --ts: .86; }
:root:lang(ko) { --ts: .98; }
:root:lang(zh) { --ts: 1.06; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js .hero [data-hero] { transform: none; }
  .band { transform: none; }
  .js .console { transform: none; opacity: 1; }
  .build__bg { transform: none; border-radius: 0; }
  .status__dot::after, .scrollhint__line::after { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .gl, .grain, .progress, .rail, .cursor, .menu, .tools, .scrollhint, .band { display: none !important; }
  .hdr { position: static; }
  .js [data-reveal], .js .hero [data-hero], .js .hdr__in { opacity: 1 !important; transform: none !important; }
  .js [data-words], .js .hero__title { visibility: visible !important; }
  .js .w > span, .js .hero__title .l > span { transform: none !important; }
  .js .stage > :first-child { display: block; }
}
