/* VULLKI — layout, components, states. Spec §5–§6; look from design/style-tile. */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- type ---------- */
.label { font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.3em; text-transform: uppercase; color: var(--silver-lt); }
.eyebrow { display: block; margin-bottom: 18px; color: var(--text-3); }
.headline-silver, .headline-silver .word {
  background: var(--brushed-grain), var(--silver-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.headline-silver.is-split { background: none; }
.headline-silver .word { display: inline-block; padding-bottom: 0.08em; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; text-wrap: balance; }
.h1 { font-size: 92px; line-height: 1; letter-spacing: -0.01em; }
.h2 { font-size: 64px; line-height: 1.02; letter-spacing: -0.01em; }
.body-lg { font-size: 20px; line-height: 1.5; }
.on-live-bg .headline-silver { filter: drop-shadow(0 0 28px rgba(0, 0, 0, 0.85)); }
.on-live-bg .body-lg { text-shadow: 0 0 22px rgba(0, 0, 0, 0.9), 0 0 4px rgba(0, 0, 0, 0.6); }
.on-live-bg .legal { text-shadow: 0 0 16px rgba(0, 0, 0, 0.9); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font: 500 15px/1 var(--font-body); color: var(--text);
  padding: 14px 22px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), transparent); backdrop-filter: blur(var(--blur-button));
  transition: background var(--t-card) var(--ease-out-soft), border-color var(--t-card) var(--ease-out-soft), transform 0.2s var(--ease-out-soft);
}
.btn:hover { background: linear-gradient(0deg, var(--surface), transparent); border-color: var(--border-bright); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: linear-gradient(180deg, #E8E8E8, #BDBDBD); color: #0A0A0A; border-color: transparent; }
.btn.primary:hover { background: linear-gradient(180deg, #F2F2F2, #C9C9C9); }
.btn.sm { padding: 10px 16px; font-size: 13.5px; }
.ext { font-size: 0.9em; opacity: 0.8; }

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: 50; top: 16px; left: 50%; transform: translateX(-50%);
  width: min(1200px, calc(100% - 32px));
  display: flex; align-items: center; gap: 14px;
  padding: 10px 10px 10px 22px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface-nav); backdrop-filter: blur(var(--blur-nav)); -webkit-backdrop-filter: blur(var(--blur-nav));
}
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand svg { width: 30px; height: 20px; fill: #ECECEE; }
.wm { font: 600 16px/1 var(--font-mark); letter-spacing: 0.38em; padding-left: 0.1em; }
.nav-links { margin: 0 0 0 auto; padding: 0; list-style: none; display: flex; gap: 28px; font-size: 14px; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }
.nav-github { padding: 10px 18px; font-size: 14px; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; transition: transform 0.4s var(--ease-out-soft); }
.menu-btn span:first-child { top: 18px; } .menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.menu { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 96px 16px 0; }
.stage {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(860px, calc(100svh - 112px)); border-radius: var(--radius-stage); border: 1px solid var(--border);
  background: var(--bg); display: grid; place-items: center; text-align: center;
}
.stage > canvas, .stage > .mist-fallback, .stage > .grain { position: absolute; inset: 0; width: 100%; height: 100%; }
.mist-fallback { overflow: hidden; pointer-events: none; }
.mist-fallback::before {
  content: ""; position: absolute; inset: -20%; filter: blur(60px); opacity: 0.42; transform: rotate(-50deg);
  background:
    radial-gradient(40% 18% at 30% 40%, #fff 0, transparent 70%),
    radial-gradient(30% 12% at 65% 30%, #d8d8d8 0, transparent 70%),
    radial-gradient(45% 14% at 55% 70%, #bdbdbd 0, transparent 70%),
    radial-gradient(25% 10% at 20% 75%, #e6e6e6 0, transparent 70%);
}
html.webgl2 :is(.stage, .closing-stage) > .mist-fallback { display: none; }
html.no-webgl canvas.mist { display: none; }
/* Scrim: a soft dark well behind the copy so silver text stays crisp over live smoke (as in the DΛЯK Audio hero). */
.stage::after, .closing-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 58% 52% at 50% 56%, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.55) 45%, transparent 80%);
}
.stage::after { z-index: 1; }
.closing-stage::after { z-index: -1; }
.grain {
  pointer-events: none; opacity: 0.18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.story-mark { width: 230px; height: auto; fill: url(#satin); filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.8)); }
.hero-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; padding: 48px 20px 64px; }
.hero-inner .story-mark { margin-bottom: 36px; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: rgba(13, 13, 13, 0.5); backdrop-filter: blur(var(--blur-pill)); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--eye); box-shadow: 0 0 10px var(--eye), 0 0 2px var(--eye); }
.hero-copy h1 { margin: 24px 0 18px; }
.hero-copy p { max-width: 600px; margin: 0 auto 30px; }
.ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- story (static layout; story.js upgrades it) ---------- */
.story { position: relative; padding: 120px 24px 40px; }
.chapters { max-width: 1080px; margin: 0 auto; display: grid; gap: 72px; }
.chapter .label { color: var(--text-3); }
.chapter h2 { margin: 14px 0 12px; }
.chapter p { margin: 0; max-width: 560px; color: var(--text-2); font-size: 19px; }

/* ---------- sections ---------- */
.section { padding: 120px 24px; }
.wrap { max-width: 1200px; margin: 0 auto; }
.section-head { margin-bottom: 44px; }

/* ---------- tool cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card {
  --a: var(--c-neutral);
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 40%), var(--surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
  transition: transform var(--t-card) var(--ease-out-soft), border-color var(--t-card) var(--ease-out-soft);
}
.card::before {
  content: ""; position: absolute; inset: -1px -1px auto; height: 140px; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0, color-mix(in srgb, var(--a) 22%, transparent), transparent 70%);
  opacity: 0; transition: opacity var(--t-card) var(--ease-out-soft);
}
.card:is(:hover, :focus-within) { transform: translateY(-2px); border-color: color-mix(in srgb, var(--a) 45%, transparent); }
.card:is(:hover, :focus-within)::before { opacity: 1; }
.card-top { position: relative; display: flex; align-items: center; gap: 14px; }
.ico { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: #0a0a0a; overflow: hidden; display: grid; place-items: center; font: 500 15px var(--font-display); color: var(--silver-lt); transition: color var(--t-card), border-color var(--t-card); }
.ico img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.8); transition: filter var(--t-card) var(--ease-out-soft); }
.card:is(:hover, :focus-within) .ico img { filter: none; }
.card:is(:hover, :focus-within) .ico { color: var(--a); border-color: color-mix(in srgb, var(--a) 40%, transparent); }
.card h3 { font: 500 21px/1.2 var(--font-display); letter-spacing: -0.01em; }
.card p { position: relative; margin: 16px 0 18px; color: var(--text-2); font-size: 15px; line-height: 1.55; flex: 1; }
.tags { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tag { font: 500 10px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--silver-lt); border: 1px solid var(--border); border-radius: var(--radius-tag); padding: 6px 8px; transition: color var(--t-card), border-color var(--t-card); }
.card:is(:hover, :focus-within) .tag.k { color: var(--a); border-color: color-mix(in srgb, var(--a) 40%, transparent); }
.act { position: relative; display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }

.forge {
  grid-column: 1 / -1; position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
  min-height: 220px; padding: 36px; border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--surface-deep);
}
.forge .mist-fallback { position: absolute; inset: -40% -10% -40% 40%; opacity: 0.6; z-index: -1; }
.forge h3 { font: 400 42px/1.05 var(--font-display); margin-top: 14px; }
.forge p { margin: 0 0 16px; color: var(--text-2); font-size: 16px; }

/* ---------- maker ---------- */
.maker p { max-width: 760px; font: 400 clamp(26px, 3.2vw, 38px)/1.3 var(--font-display); color: var(--text); margin: 0; text-wrap: balance; }
.maker [data-maker] { font-family: var(--font-mark); font-weight: 600; letter-spacing: 0.2em; font-size: 0.8em; }

/* ---------- closing ---------- */
.closing { position: relative; overflow: hidden; isolation: isolate; padding: 0 16px 16px; }
.closing-stage { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-stage); border: 1px solid var(--border); min-height: 620px; display: grid; place-items: center; text-align: center; padding: 96px 20px 120px; }
.closing-stage > canvas, .closing-stage > .mist-fallback, .closing-stage > .grain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.closing-stage .mist-fallback::before { opacity: 0.7; }
.closing h2 { margin: 0 0 32px; }
.legal { position: absolute; left: 0; right: 0; bottom: 28px; font: 500 11px var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-2); }

.edge-fade { position: fixed; z-index: 40; inset: auto 0 0 0; height: 90px; pointer-events: none; backdrop-filter: blur(7px); -webkit-mask-image: linear-gradient(to bottom, transparent, #000); mask-image: linear-gradient(to bottom, transparent, #000); }

/* ---------- breakpoints (designv2: 1200 / 810) ---------- */
@media (max-width: 1199.98px) {
  .h1 { font-size: 74px; }
  .h2 { font-size: 56px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 809.98px) {
  body { font-size: 17px; }
  .h1, .h2 { font-size: 44px; }
  .body-lg { font-size: 18px; }
  .nav { padding-left: 18px; }
  .nav-links, .nav .nav-github { display: none; }
  .menu-btn { display: block; margin-left: auto; }
  html:not(.js) .nav-links { display: flex; gap: 14px; font-size: 13px; }
  html:not(.js) .menu-btn { display: none; }
  .menu {
    position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, 0.94); backdrop-filter: blur(var(--blur-nav));
    flex-direction: column; justify-content: center; gap: 28px; padding: 0 32px;
  }
  .menu.is-open { display: flex; }
  .menu a { font: 400 40px/1.1 var(--font-display); }
  .story-mark { width: 170px; }
  .cards, .forge { grid-template-columns: 1fr; }
  .forge { padding: 26px; }
  .forge h3 { font-size: 32px; }
  .section { padding: 96px 16px; }
  .story { padding: 96px 16px 24px; }
}
