/* ==========================================================================
   Space Island — site styles (v2)
   Final palette: pure black #000000 ground, Starlight + white type, measured gold.
   Layout concept: a star chart — a fixed sky canvas behind a normal scrolling page.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2");
  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 Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  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"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2");
  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"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  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;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --black: #000000;
  --white: #FFFFFF;
  --starlight: #EDE6D8;
  --gold: #C9A04A;
  --dust: #3E3E3E;           /* brand dot colour on black */
  --muted: #A39E92;          /* warm grey from Starlight, 7.6:1 on black */
  --dim: #6E6A62;
  --line: #222222;
  --line-2: #2E2E2E;

  --p-itsy: #2B59FF;
  --p-minik: #3A5BD9;
  --p-anlik: #1FD1C1;
  --p-porta: #B8F500;

  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}
@media (max-width: 879px) { :root { --header-h: 64px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--black); color: var(--starlight); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--black); color: var(--starlight);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@media (min-width: 1200px) { body { font-size: 18px; } }
html.menu-open, html.menu-open body { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--white); }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--gold); color: var(--black); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
section[id], [id].entry { scroll-margin-top: var(--header-h); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.mono { font-family: var(--mono); }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--starlight); color: var(--black); font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform .2s var(--ease);
}
.skip:focus { transform: none; }

/* ---------- The sky: one fixed canvas behind the page ---------- */
.sky { position: fixed; inset: 0 0 auto 0; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; }
.sky canvas { width: 100%; height: 100%; }
.sky.is-static { position: absolute; }
html.no-js .sky { display: none; }
main, .site-footer { position: relative; z-index: 1; }
.approach, .about, .contact, .site-footer { background: var(--black); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--starlight); color: var(--black);
  font: 600 15px/1 var(--sans); letter-spacing: -.005em; text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.btn:hover { background: var(--white); color: var(--black); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn[href="#work"]:hover svg { transform: translateY(3px); }
.btn--ghost { background: transparent; color: var(--starlight); border-color: rgba(237, 230, 216, .32); }
.btn--ghost:hover { background: transparent; color: var(--white); border-color: var(--starlight); }
.btn--gold { background: var(--gold); color: var(--black); }
.btn--gold:hover { background: var(--starlight); }
.btn--gold:hover svg { transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box;
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
}
.site-header.is-scrolled, html.menu-open .site-header {
  background: rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: rgba(255, 255, 255, .07);
}
html.menu-open .site-header { background: var(--black); border-bottom-color: transparent; }
.bar { height: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 32px; width: auto; }
@media (max-width: 879px) { .brand img { height: 26px; } }
.nav ul { display: flex; gap: clamp(20px, 2.6vw, 40px); }
.nav a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--muted); transition: color .25s var(--ease); }
.nav a:hover, .nav a.is-current { color: var(--starlight); }
.nav-n { font: 500 10px/1 var(--mono); letter-spacing: .04em; color: var(--dim); transition: color .25s var(--ease); }
.nav a.is-current .nav-n { color: var(--gold); }
.menu-btn {
  display: none; align-items: center; gap: 12px; min-height: 44px; padding: 0 4px 0 14px; margin-right: -4px;
  background: transparent; color: var(--starlight); border: 0; border-radius: 999px;
  font: 500 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.menu-btn-icon { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(237, 230, 216, .3); }
.menu-btn-icon i { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .4s var(--ease), top .4s var(--ease); }
.menu-btn-icon i:first-child { top: 14px; }
.menu-btn-icon i:last-child { top: 20px; right: 14px; }
.menu-btn[aria-expanded="true"] .menu-btn-icon i:first-child { top: 17px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn-icon i:last-child { top: 17px; right: 10px; transform: rotate(-45deg); }
@media (max-width: 879px) { .nav { display: none; } .menu-btn { display: inline-flex; } }

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--black);
  padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 40px) var(--gutter) max(32px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; transition: opacity .35s var(--ease);
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }
.menu ol { display: grid; gap: 4px; }
.menu li { overflow: hidden; }
.menu a {
  display: flex; align-items: baseline; gap: 14px; padding: 6px 12px 6px 0; width: fit-content;
  font-size: clamp(2.5rem, 13vw, 4.5rem); font-weight: 600; line-height: 1.02; letter-spacing: -.035em;
  text-decoration: none; color: var(--starlight);
  transform: translateY(105%); transition: transform .6s var(--ease);
}
.menu a .nav-n { font-size: 12px; color: var(--gold); transform: translateY(-1.6em); }
.menu.is-open a { transform: none; }
.menu.is-open li:nth-child(2) a { transition-delay: .05s; }
.menu.is-open li:nth-child(3) a { transition-delay: .1s; }
.menu.is-open li:nth-child(4) a { transition-delay: .15s; }
.menu-foot { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 880px) { .menu { display: none !important; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: max(100svh, 660px);
  display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 32px) 0 clamp(32px, 7vh, 72px);
}
html.no-js .hero { background-image: radial-gradient(circle, var(--dust) 1.2px, transparent 1.8px); background-size: 26px 26px; }
.hero-copy { position: relative; width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.kicker { display: inline-block; margin-bottom: clamp(16px, 2.4vw, 28px); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hero-title { font-size: clamp(2.6rem, 8.2vw, 8.25rem); font-weight: 600; line-height: .9; letter-spacing: -.045em; color: var(--starlight); }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .09em; margin-bottom: -.09em; }
.hero-title .line > span { display: inline-block; }
.hero-title .line:last-child > span { color: var(--white); }
.hero-foot { margin-top: clamp(24px, 3.4vw, 44px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.hero-lede { max-width: 36ch; color: var(--muted); font-size: clamp(16px, 1.25vw, 18px); line-height: 1.55; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }
.hero-fig { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-variant-numeric: tabular-nums; }
.hero-fig span:first-child { color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 759px) { .hero-side { align-items: flex-start; } .hero-fig { display: none; } }

@media (prefers-reduced-motion: no-preference) {
  html.js .hero-title .line > span { transform: translateY(108%); animation: rise 1.1s var(--ease) forwards; }
  html.js .hero-title .line:nth-child(1) > span { animation-delay: .5s; }
  html.js .hero-title .line:nth-child(2) > span { animation-delay: .62s; }
  html.js .hero-title .line:nth-child(3) > span { animation-delay: .74s; }
  html.js .kicker, html.js .hero-foot { opacity: 0; animation: fade 1s var(--ease) 1.1s forwards; }
  html.js .kicker { animation-delay: .35s; }
}
@keyframes rise { to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Section scaffolding ---------- */
.work, .approach, .about, .contact { position: relative; padding-block: clamp(104px, 14vw, 200px); }
.section-head { display: grid; gap: clamp(16px, 2vw, 24px); }
.label { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.label span { color: var(--gold); }
.label::after { content: ""; flex: 0 1 64px; height: 1px; background: var(--line-2); }
.section-title { font-size: clamp(2.3rem, 5.6vw, 5.25rem); font-weight: 600; line-height: .98; letter-spacing: -.035em; max-width: 14ch; text-wrap: balance; }
.section-intro { max-width: 44ch; color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); }

/* ---------- Work: the chart ---------- */
.work { padding-bottom: clamp(48px, 8vw, 120px); }
.chart-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 112px); margin-top: clamp(24px, 4vw, 48px); }
.chart { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; justify-content: center; }
.chart-inner { position: relative; width: 100%; max-width: 460px; isolation: isolate; }
.chart-inner::before {
  content: ""; position: absolute; inset: -18% -22%; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, var(--dust) 1px, transparent 1.6px);
  background-size: 22px 22px; background-position: center;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  opacity: calc(var(--handoff, 1) * .9);
}
.chart-mark { width: 100%; height: auto; overflow: visible; --c: var(--p-itsy); }
html.js .chart-mark, html.js .intro-mark { opacity: var(--handoff, 1); }
.chart-mark.c0 { --c: var(--p-itsy); } .chart-mark.c1 { --c: var(--p-minik); } .chart-mark.c2 { --c: var(--p-anlik); } .chart-mark.c3 { --c: var(--p-porta); }
.chart-mark .star, .chart-mark .ray {
  fill: var(--starlight); stroke: var(--starlight); stroke-width: .7; stroke-linejoin: round;
  opacity: .22;
  transition: opacity .7s var(--ease), fill .7s var(--ease), stroke .7s var(--ease), transform .9s var(--ease);
}
.chart-mark .star { transform-box: fill-box; transform-origin: center; }
.chart-mark .body.is-past .star, .chart-mark .body.is-past .ray { opacity: .62; }
.chart-mark .body.is-on .star { fill: var(--c); stroke: var(--c); opacity: 1; transform: scale(1.16); }
.chart-mark .body.is-on .ray { fill: var(--c); stroke: var(--c); opacity: 1; }
html.no-js .chart-mark .star, html.no-js .chart-mark .ray { opacity: 1; }
.chart-mark .orbit { transition: transform 1s var(--ease-io); }
.chart-mark .orbit circle {
  fill: none; stroke: var(--c); stroke-width: .3; stroke-dasharray: .6 2.4; stroke-linecap: round;
  transform-box: fill-box; transform-origin: center; transition: stroke .7s var(--ease);
}
@media (prefers-reduced-motion: no-preference) { .chart-mark .orbit circle { animation: spin 28s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.chart-readout {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-top: clamp(20px, 3vw, 36px); padding-top: 14px; border-top: 1px solid var(--line-2);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums;
}
.chart-readout b { color: var(--starlight); font-weight: 500; }
.ro-name { color: var(--starlight); text-transform: none; letter-spacing: .02em; }

.chart-intro { display: none; }
.intro-mark .star, .intro-mark .ray { fill: var(--starlight); stroke: var(--starlight); stroke-width: .7; stroke-linejoin: round; }

.entry { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-block: 8vh; }
.entry article { flex: 1 1 auto; min-width: 0; max-width: 40rem; transition: opacity .6s var(--ease); }
html.js .entry:not(.is-on) article { opacity: .45; }
.p0 { --c: var(--p-itsy); } .p1 { --c: var(--p-minik); } .p2 { --c: var(--p-anlik); } .p3 { --c: var(--p-porta); }
.entry-label { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.planet { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; transition: box-shadow .6s var(--ease); }
.entry.is-on .planet { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 22%, transparent); }
.entry-name { margin-top: 18px; font-size: clamp(3rem, 8vw, 7.25rem); font-weight: 600; line-height: .92; letter-spacing: -.05em; }
.entry-name a { text-decoration: none; color: var(--starlight); transition: color .4s var(--ease); }
.entry-name a:hover { color: var(--white); }
.entry-desc { margin-top: 18px; max-width: 30ch; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.35; color: var(--starlight); letter-spacing: -.01em; }
.entry-desc em { font-style: normal; color: var(--gold); }
.visit {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--starlight); text-decoration: none; border-bottom: 1px solid var(--line-2);
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.visit svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.visit:hover { color: var(--white); border-color: var(--c); }
.visit:hover svg { transform: translate(2px, -2px); }

/* ---------- Product scenes ---------- */
.scene {
  position: relative; width: 100%; max-width: 480px; height: 284px; margin: 30px 0 24px;
  border: 1px solid var(--line-2); border-radius: 16px; background: var(--black); overflow: hidden;
  transition: border-color .8s var(--ease);
}
.entry.is-on .scene { border-color: color-mix(in srgb, var(--c) 34%, var(--line-2)); }
.caret { display: inline-block; width: .5em; height: 1.05em; margin-left: 2px; vertical-align: -.16em; background: var(--c); opacity: 0; }
.scene.is-playing .caret { opacity: 1; animation: caret 1s steps(1) infinite; }
.scene.is-playing.s-done .caret { opacity: 0; animation: none; }
@keyframes caret { 50% { opacity: 0; } }

/* itsy.page — a tiny page forms at its own address */
.scene-itsy { padding: 18px; }
.it-browser { height: 100%; display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; transition: border-color .6s var(--ease), box-shadow .6s var(--ease); }
.it-bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-bottom: 1px solid var(--line-2); flex: none; }
.it-dots { display: flex; gap: 5px; }
.it-dots i { width: 7px; height: 7px; border-radius: 50%; background: #2A2A2A; }
.it-url { flex: 1; min-width: 0; height: 24px; display: flex; align-items: center; padding: 0 10px; border-radius: 999px; border: 1px solid #1F1F1F; font-size: 12px; white-space: nowrap; overflow: hidden; }
.it-host { color: var(--dim); }
.it-slug { color: var(--starlight); }
.it-page { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 14px 22px; }
.it-avatar { width: 28px; height: 28px; fill: var(--c); transition: transform .7s var(--ease), opacity .4s var(--ease); }
.it-title { min-height: 1em; font-size: 28px; font-weight: 600; line-height: 1; letter-spacing: -.035em; color: var(--white); }
.it-line { min-height: 1.5em; font-size: 14px; color: var(--muted); }
.it-btn { margin-top: 6px; display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: 999px; background: var(--c); color: var(--white); font-size: 13px; font-weight: 600; transition: transform .6s var(--ease), opacity .4s var(--ease); }
.scene-itsy.is-playing:not(.s-avatar) .it-avatar { opacity: 0; transform: scale(.2) rotate(-90deg); }
.scene-itsy.is-playing:not(.s-btn) .it-btn { opacity: 0; transform: translateY(8px) scale(.9); }
.scene-itsy.s-live .it-browser { border-color: color-mix(in srgb, var(--c) 70%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 12%, transparent); }

/* minik.cc — the long address evaporates into a short one */
.scene-minik { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 22px 26px; }
.mk-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.mk-long { min-height: 4.5em; font-size: 12.5px; line-height: 1.5; color: var(--muted); word-break: break-all; }
.mk-long .ch { display: inline-block; white-space: pre; transition: opacity .5s var(--ease), transform .7s var(--ease), filter .5s var(--ease); }
.mk-long .ch.gone { opacity: 0; transform: translateY(-12px) scale(.3); filter: blur(2px); }
.mk-short { min-height: 1.3em; margin-bottom: 4px; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; letter-spacing: -.03em; color: var(--white); white-space: nowrap; }
.mk-slug { color: var(--starlight); border-bottom: 2px solid var(--c); }
.mk-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mk-count b { color: var(--starlight); font-weight: 500; }
.mk-arrow { color: var(--c); }

/* Anlık — moments arrive one photograph at a time */
.scene-anlik { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 5vw, 40px); padding: 18px 22px; }
.an-frame { position: relative; width: 180px; height: 242px; flex: none; border-radius: 8px; border: 1px solid var(--line-2); }
.an-photo { position: absolute; left: 10px; top: 10px; width: calc(100% - 20px); height: calc(100% - 46px); opacity: 0; transform: scale(1.05); transition: opacity 1s var(--ease), transform 1.6s var(--ease); }
.an-photo.is-shown { opacity: 1; transform: none; }
.an-time { position: absolute; left: 12px; bottom: 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--starlight); font-variant-numeric: tabular-nums; }
.an-live { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.scene-anlik.is-playing .an-live { animation: blink 1.6s ease-in-out infinite; }
.an-steam { stroke-dasharray: 3 5; }
.scene-anlik.is-playing .an-steam { animation: steam 2.4s linear infinite; }
@keyframes steam { to { stroke-dashoffset: -16; } }
@keyframes blink { 50% { opacity: .25; } }
.an-strip { display: grid; gap: 14px; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.an-strip li { display: flex; align-items: center; gap: 10px; transition: color .5s var(--ease); }
.an-strip i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid currentColor; transition: background-color .5s var(--ease), box-shadow .5s var(--ease); }
.an-strip li.is-past { color: var(--muted); }
.an-strip li.is-past i { background: var(--muted); }
.an-strip li.is-on { color: var(--starlight); }
.an-strip li.is-on i { background: var(--c); border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }

/* Portaficta — a description becomes a site */
.scene-porta { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.pf-prompt { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 12px; color: var(--starlight); white-space: nowrap; overflow: hidden; }
.pf-sign { color: var(--c); }
.pf-site { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; transition: opacity .6s var(--ease), transform .7s var(--ease), border-color .6s var(--ease); }
.pf-nav { display: flex; align-items: center; justify-content: space-between; transition: opacity .5s var(--ease); }
.pf-logo { font-size: 12px; font-weight: 600; color: var(--starlight); }
.pf-links { display: flex; gap: 6px; }
.pf-links i { width: 22px; height: 5px; border-radius: 3px; background: #2A2A2A; }
.pf-hero { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pf-h { min-height: 2.1em; max-width: 12ch; font-size: 21px; font-weight: 600; line-height: 1.05; letter-spacing: -.03em; color: var(--white); }
.pf-vase { width: 54px; height: 72px; flex: none; transition: opacity .6s var(--ease), transform .8s var(--ease); }
.pf-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pf-tiles span { height: 42px; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--line-2); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.pf-tiles svg { width: 36px; height: 27px; }
.scene-porta.is-playing:not(.s-site) .pf-site { opacity: 0; transform: translateY(10px); }
.scene-porta.is-playing:not(.s-nav) .pf-nav { opacity: 0; }
.scene-porta.is-playing:not(.s-vase) .pf-vase { opacity: 0; transform: translateY(10px) scale(.85); }
.scene-porta.is-playing:not(.s-tiles) .pf-tiles span { opacity: 0; transform: translateY(8px); }
.scene-porta.s-tiles .pf-tiles span:nth-child(2) { transition-delay: .12s; }
.scene-porta.s-tiles .pf-tiles span:nth-child(3) { transition-delay: .24s; }
.scene-porta.s-live .pf-site { border-color: color-mix(in srgb, var(--c) 60%, transparent); }

@media (max-width: 959px) {
  .chart-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 24px; }
  .chart {
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 5; height: auto;
    margin-inline: calc(-1 * var(--gutter)); padding: 10px var(--gutter);
    justify-content: flex-start; background: rgba(0, 0, 0, .88);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-block: 1px solid var(--line);
  }
  html.js .chart-mark { opacity: 1; }
  .chart-inner { display: flex; align-items: center; gap: 16px; max-width: none; }
  .chart-inner::before { display: none; }
  .chart-mark { width: 60px; flex: none; }
  .chart-readout { flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; padding: 0; border: 0; }
  .ro-name { font-size: 15px; }
  .chart-intro { display: block; width: min(76vw, 340px); margin: clamp(48px, 12vw, 80px) auto 0; }
  .intro-mark { width: 100%; height: auto; overflow: visible; }
  .entry { min-height: 0; padding-block: 64px 24px; }
  .entry article { max-width: none; }
  html.js .entry:not(.is-on) article { opacity: .55; }
}
@media (max-width: 420px) {
  .scene { height: 268px; }
  .an-frame { width: 150px; height: 206px; }
  .pf-h { font-size: 18px; }
}

/* ---------- Approach ---------- */
.approach { border-top: 1px solid var(--line); }
.principles { display: grid; gap: clamp(64px, 9vw, 132px); margin-top: clamp(64px, 9vw, 128px); }
.principle { width: min(100%, 38rem); }
.principle:nth-child(even) { margin-left: auto; }
.p-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.principle:nth-child(even) .p-head { flex-direction: row-reverse; }
.p-star { width: 22px; height: 22px; flex: none; fill: var(--starlight); stroke: var(--starlight); stroke-width: .7; stroke-linejoin: round; }
.p-ray { flex: 1; height: 1px; background: linear-gradient(90deg, var(--starlight), rgba(237, 230, 216, .15)); transform-origin: left center; }
.principle:nth-child(even) .p-ray { background: linear-gradient(270deg, var(--starlight), rgba(237, 230, 216, .15)); transform-origin: right center; }
.p-n { font-size: 12px; letter-spacing: .1em; color: var(--gold); }
.principle h3 { font-size: clamp(1.75rem, 3vw, 2.75rem); font-weight: 600; line-height: 1.05; letter-spacing: -.03em; }
.principle p { margin-top: 14px; color: var(--muted); max-width: 36em; }
@media (min-width: 960px) { .principle:nth-child(3) { margin-left: 6%; } .principle:nth-child(4) { margin-right: 6%; } }
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] { opacity: .001; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
  html.js [data-reveal].is-in { opacity: 1; transform: none; }
  html.js .principle .p-ray { transform: scaleX(0); transition: transform 1.4s var(--ease) .2s; }
  html.js .principle.is-in .p-ray { transform: none; }
  html.js .principle .p-star { transform: scale(.4) rotate(-45deg); opacity: 0; transition: transform 1s var(--ease), opacity .6s var(--ease); }
  html.js .principle.is-in .p-star { transform: none; opacity: 1; }
}

/* ---------- About ---------- */
.about { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 120px); align-items: end; }
.about-head { display: grid; gap: clamp(20px, 3vw, 32px); }
.about-title { font-size: clamp(3.6rem, 11vw, 10rem); font-weight: 600; line-height: .86; letter-spacing: -.055em; color: var(--white); }
.about-title .amp { color: var(--gold); font-weight: 400; }
.about-words { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.about-words span { color: var(--starlight); }
.about-words i { font-style: normal; color: var(--dim); margin-inline: 6px; }
.about-copy { display: grid; gap: 16px; max-width: 30rem; padding-bottom: 10px; }
.about-lead { font-size: clamp(1.35rem, 2.2vw, 1.9rem); line-height: 1.2; letter-spacing: -.02em; color: var(--starlight); }
.about-copy p:not(.about-lead) { color: var(--muted); }
@media (max-width: 879px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contact ---------- */
.contact { border-top: 1px solid var(--line); overflow: hidden; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 48px; align-items: center; }
.contact-copy { display: grid; gap: clamp(20px, 2.4vw, 32px); }
.contact-title { font-size: clamp(3rem, 8.6vw, 8.5rem); font-weight: 600; line-height: .9; letter-spacing: -.05em; color: var(--starlight); }
.contact-text { max-width: 40ch; color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); }
.contact-email {
  justify-self: start; overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 3.4vw, 2.75rem); font-weight: 500; letter-spacing: -.025em; line-height: 1.15;
  color: var(--white); text-decoration: none;
  background-image: linear-gradient(var(--gold), var(--gold)); background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%;
  padding-bottom: 6px; transition: background-size .5s var(--ease), color .3s var(--ease);
}
.contact-email:hover { color: var(--gold); background-size: 100% 2px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-mark { position: relative; isolation: isolate; display: grid; place-items: center; aspect-ratio: 1; }
.contact-mark::before {
  content: ""; position: absolute; inset: -30%; z-index: -1;
  background-image: radial-gradient(circle, var(--dust) 1px, transparent 1.6px); background-size: 22px 22px; background-position: center;
  -webkit-mask-image: radial-gradient(closest-side, #000 25%, transparent 100%); mask-image: radial-gradient(closest-side, #000 25%, transparent 100%);
}
.contact-mark img { width: min(100%, 260px); height: auto; }
@media (prefers-reduced-motion: no-preference) { .contact-mark img { animation: drift 11s ease-in-out infinite; } }
@keyframes drift { 0%, 100% { transform: translateY(-6px) rotate(-.6deg); } 50% { transform: translateY(8px) rotate(.6deg); } }
@media (max-width: 879px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-mark { order: -1; width: 112px; aspect-ratio: auto; place-items: start; }
  .contact-mark::before { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(48px, 6vw, 80px) max(40px, env(safe-area-inset-bottom)); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 4fr); gap: 40px; }
.footer-brand img { width: 220px; height: auto; }
.footer-note { margin-top: 20px; font-size: 11px; letter-spacing: .06em; color: var(--dim); max-width: 30ch; line-height: 1.6; }
.footer-h { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.footer-col ul { display: grid; gap: 2px; }
.footer-col a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; color: var(--muted); font-size: 15px; }
.footer-col a:hover { color: var(--starlight); }
.footer-legal { display: grid; gap: 8px; align-content: start; font-size: 11.5px; letter-spacing: .03em; line-height: 1.6; color: var(--muted); }
.footer-legal .footer-h { margin-bottom: 4px; }
.footer-legal a { color: var(--starlight); text-decoration: none; display: inline-flex; min-height: 28px; align-items: center; }
.footer-legal a:hover { color: var(--gold); }
.reg-office:empty { display: none; }
.footer-copy { margin-top: 8px; color: var(--dim); }
@media (max-width: 879px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand, .footer-legal { grid-column: 1 / -1; }
}

/* ---------- Document pages (privacy, 404) ---------- */
.doc-page .site-header { background: rgba(0, 0, 0, .8); border-bottom-color: rgba(255, 255, 255, .07); }
.doc { max-width: 46rem; padding-block: calc(var(--header-h) + clamp(72px, 10vw, 140px)) clamp(80px, 10vw, 140px); }
.doc h1 { margin-top: 20px; font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 600; line-height: .95; letter-spacing: -.045em; }
.doc .doc-meta { margin-top: 18px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.doc h2 { margin-top: 48px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; color: var(--white); }
.doc p, .doc li { margin-top: 12px; color: var(--muted); max-width: 62ch; }
.doc ul { margin-top: 8px; }
.doc li { position: relative; padding-left: 20px; margin-top: 8px; }
.doc li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.doc a { color: var(--starlight); }
.doc a:hover { color: var(--gold); }
.doc .lede { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.45; color: var(--starlight); margin-top: 28px; }
.lost { min-height: 100svh; display: grid; place-items: center; padding: 96px var(--gutter); background-image: radial-gradient(circle, var(--dust) 1px, transparent 1.6px); background-size: 26px 26px; background-position: center; }
.lost-card { display: grid; gap: 24px; justify-items: start; max-width: 40rem; background: var(--black); padding: 28px 32px 32px 0; box-shadow: 0 0 0 32px var(--black); }
.lost img { width: 72px; height: auto; }
.lost h1 { font-size: clamp(2.6rem, 8vw, 6rem); font-weight: 600; line-height: .92; letter-spacing: -.045em; }
.lost p { color: var(--muted); max-width: 34ch; }
@media (prefers-reduced-motion: no-preference) { .lost img { animation: drift 11s ease-in-out infinite; } }

/* ---------- Reduced motion: hard stop ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .menu, .sky, .chart, .scene, .hero-fig { display: none !important; }
  html, body { background: #fff; color: #000; }
  .entry { min-height: 0; }
}
