/* aleksei.eu — styles
   Tokens first, then one block per section.
   Anything animated is gated behind html.motion (added by main.js when the
   visitor has not asked for reduced motion), so without JS or with
   reduce-motion the page is a calm, fully visible document. */

:root {
  --bg: #0b0c0d;
  --bg-2: #121416;
  --bg-3: #1a1d20;
  --line: rgba(236, 233, 227, 0.11);
  --line-2: rgba(236, 233, 227, 0.22);
  --text: #ece9e3;
  --text-2: rgba(236, 233, 227, 0.82);
  --muted: #a19d95;
  --dim: #77736c;
  --accent: #d4f36b;
  --accent-soft: rgba(212, 243, 107, 0.14);
  --accent-line: rgba(212, 243, 107, 0.35);
  --todo: #ffb38a;

  --f-sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --nav-h: 64px;
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ol, ul { list-style: none; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.mono { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.02em; }
.sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
em { font-family: var(--f-serif); font-style: italic; font-weight: 500; letter-spacing: -0.01em; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: top 0.2s;
}
.skip:focus { top: 16px; }

/* scroll progress + film grain */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 120; pointer-events: none; }
.progress span {
  display: block; height: 100%; background: var(--accent);
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}
.grain {
  position: fixed; inset: 0; z-index: 110; pointer-events: none; opacity: 0.05;
  background-image: url("../img/grain.svg");
}

/* shared bits */
.label {
  display: flex; align-items: center; gap: 12px;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem;
  margin-bottom: 22px;
}
.label::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.section-head { margin-bottom: clamp(48px, 8vw, 96px); }
.section-title {
  font-size: clamp(2.4rem, 6.4vw, 5.6rem); line-height: 0.98; letter-spacing: -0.04em; max-width: 15ch;
}
.section-sub { margin-top: 20px; color: var(--muted); font-size: 1.1rem; }
.section-intro {
  max-width: 54ch; color: var(--muted); font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  margin: calc(-1 * clamp(20px, 4vw, 48px)) 0 clamp(40px, 6vw, 64px);
}
.arrow-link {
  color: var(--text); text-decoration: none; font-weight: 500;
  border-bottom: 1px solid var(--line-2); padding-bottom: 3px;
  transition: color 0.3s, border-color 0.3s;
}
.arrow-link span[aria-hidden] { display: inline-block; transition: transform 0.4s var(--ease); }
.arrow-link:hover { color: var(--accent); border-color: var(--accent); }
.arrow-link:hover span[aria-hidden] { transform: translate(3px, -1px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h);
  transition: background-color 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 12, 13, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__in { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; text-decoration: none;
}
.brand__tld { color: var(--dim); }
.brand__mark {
  width: 11px; height: 11px; background: var(--accent); border-radius: 2px;
  transition: transform 0.6s var(--ease);
}
.brand:hover .brand__mark { transform: rotate(90deg) scale(1.15); }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a {
  color: var(--muted); text-decoration: none; font-size: 0.95rem; position: relative;
  transition: color 0.25s;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease);
}
.nav__links a:hover, .nav__links a.is-current { color: var(--text); }
.nav__links a:hover::after, .nav__links a.is-current::after { transform: scaleX(1); transform-origin: left; }

.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 2px; }
.lang a {
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-decoration: none;
  padding: 5px 10px; border-radius: 999px; color: var(--muted); transition: color 0.25s, background-color 0.25s;
}
.lang a:hover { color: var(--text); }
.lang a[aria-current] { background: var(--accent); color: var(--bg); font-weight: 600; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; isolation: isolate; overflow: hidden;
  display: grid; grid-template-rows: 1fr auto;
}
.hero__media { position: absolute; inset: -4% 0 -4%; z-index: -2; will-change: transform; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; transform: scale(1.06); }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 80% at 70% 30%, transparent 0%, rgba(11, 12, 13, 0.35) 70%),
    linear-gradient(180deg, rgba(11, 12, 13, 0.7) 0%, rgba(11, 12, 13, 0.2) 30%, rgba(11, 12, 13, 0.55) 62%, var(--bg) 100%);
}
.hero__inner { align-self: end; padding-top: calc(var(--nav-h) + 10vh); padding-bottom: clamp(28px, 6vh, 64px); }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; }
.hero__clock { display: inline-flex; align-items: center; gap: 8px; }
.hero__clock::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-line);
}
.hero__clock time { color: var(--text); font-variant-numeric: tabular-nums; }
.hero__title {
  font-size: clamp(3.3rem, 10.6vw, 10.4rem); line-height: 0.9; letter-spacing: -0.05em;
  margin: 0.32em 0 0.34em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero__title .line > span { display: inline-block; }
.hero__title em { color: var(--accent); font-size: 1.16em; line-height: 0; padding-right: 0.03em; letter-spacing: -0.03em; }
.hero__lead { max-width: 36ch; font-size: clamp(1.06rem, 1.55vw, 1.32rem); line-height: 1.5; color: var(--text-2); }
.hero__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-bottom: 26px; color: var(--muted);
}
.hero__scroll { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; }
.hero__scroll:hover { color: var(--text); }
.hero__scroll-line { position: relative; width: 1px; height: 34px; background: var(--line-2); overflow: hidden; }
.hero__scroll-line::after { content: ''; position: absolute; left: 0; width: 1px; height: 40%; background: var(--accent); top: -40%; }
.hero__credit { color: var(--dim); font-size: 0.7rem; }

@media (prefers-reduced-motion: no-preference) {
  .js .hero__media img { animation: drift 36s ease-in-out infinite alternate; }
  .js .hero__title .line > span { transform: translateY(108%); animation: rise 1.2s var(--ease) forwards; }
  .js .hero__title .line:nth-child(2) > span { animation-delay: 0.14s; }
  .js .hero__meta, .js .hero__lead, .js .hero__foot { opacity: 0; animation: fade 1.2s var(--ease) forwards; }
  .js .hero__meta { animation-delay: 0.05s; }
  .js .hero__lead { animation-delay: 0.45s; }
  .js .hero__foot { animation-delay: 0.8s; }
  .hero__scroll-line::after { animation: drip 2.2s var(--ease-io) infinite; }
  .hero__clock::before { animation: ping 2.4s ease-out infinite; }
}
@keyframes drift { from { transform: scale(1.06) translateX(-1.6%); } to { transform: scale(1.13) translateX(1.6%); } }
@keyframes rise { to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drip { 0% { top: -40%; } 60%, 100% { top: 100%; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 var(--accent-line); } 80%, 100% { box-shadow: 0 0 0 8px transparent; } }

/* ---------- statement ---------- */
.statement { padding: clamp(110px, 18vw, 220px) 0; }
.statement__text {
  font-size: clamp(1.9rem, 4.7vw, 4.5rem); line-height: 1.1; letter-spacing: -0.035em; font-weight: 500;
  max-width: 21ch;
}
.motion .statement { height: 230vh; padding: 0; }
.motion .statement__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; }
.motion .statement__text .w { opacity: var(--o, 0.13); transition: opacity 0.15s linear; }

/* ---------- story ---------- */
.story { padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 10vw, 140px); }
.story__grid { display: grid; grid-template-columns: minmax(250px, 5fr) 7fr; gap: clamp(32px, 6vw, 110px); }
.rail__sticky { position: sticky; top: calc(var(--nav-h) + 7vh); display: grid; gap: 44px; }
.odo {
  font-family: var(--f-mono); font-weight: 500; font-size: clamp(4rem, 8.8vw, 8.6rem);
  line-height: 1; height: 1em; letter-spacing: -0.07em; display: flex; overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.odo__col { display: block; height: 1em; overflow: hidden; }
.odo__strip { display: flex; flex-direction: column; transform: translateY(calc(var(--d, 0) * -1em)); }
.odo__strip span { display: block; height: 1em; line-height: 1; }
.odo__text { display: block; font-size: 0.46em; line-height: 2.17; letter-spacing: -0.03em; color: var(--text); }
.odo__text.is-todo { color: var(--todo); }
.motion .odo__strip { transition: transform 1.1s var(--ease); transition-delay: calc(var(--c, 0) * 70ms); }
.motion .odo__text { animation: fade 0.6s var(--ease); }
.rail__age { color: var(--accent); margin-top: 14px; font-size: 0.9rem; letter-spacing: 0.04em; }
.motion .rail__age.flip { animation: fade 0.6s var(--ease); }

.rail__nav { position: relative; padding-left: 22px; }
.rail__line { position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.rail__line span { position: absolute; inset: 0; background: var(--accent); transform-origin: 50% 0; transform: scaleY(var(--rp, 0)); }
.rail__nav ol { display: grid; gap: 2px; }
.rail__nav a {
  display: flex; align-items: baseline; gap: 14px; padding: 6px 0; text-decoration: none;
  color: var(--dim); font-size: 0.98rem; transition: color 0.3s, transform 0.5s var(--ease);
}
.rail__nav a .mono { font-size: 0.7rem; }
.rail__nav a:hover { color: var(--text); }
.rail__nav a.is-active { color: var(--text); transform: translateX(6px); }
.rail__nav a.is-active .mono { color: var(--accent); }

.chapters { display: grid; gap: clamp(110px, 18vh, 190px); padding-top: 1vh; }
.chapter { scroll-margin-top: calc(var(--nav-h) + 32px); }
.chapter__when { display: flex; align-items: center; gap: 10px; color: var(--muted); margin-bottom: 20px; }
.chapter__n {
  color: var(--accent); border: 1px solid var(--accent-line); border-radius: 999px; padding: 2px 9px; font-size: 0.7rem;
}
.is-todo .chapter__when > span:not(.chapter__n) { color: var(--todo); }
.chapter__kicker { color: var(--muted); font-size: 1.02rem; margin-bottom: 6px; }
.chapter__title { font-size: clamp(2.05rem, 4.3vw, 3.7rem); line-height: 1.02; letter-spacing: -0.038em; margin-bottom: 28px; }
.chapter__body p { font-size: clamp(1.05rem, 1.32vw, 1.19rem); line-height: 1.68; color: var(--text-2); max-width: 58ch; }
.chapter__body p + p { margin-top: 1em; }
.chapter__body strong { color: var(--text); font-weight: 600; }
.chapter__link { margin-top: 26px; font-size: 1.05rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tags li {
  font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px;
}

.photo { margin-top: 48px; }
.photo__frame { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 10; background: var(--bg-2); }
.photo__frame img { width: 100%; height: 118%; object-fit: cover; transform: translate3d(0, var(--py, -8%), 0); }
.photo figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; color: var(--dim); font-size: 0.7rem; }

.plates { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 22px; margin-top: 44px; }
.plate { display: grid; gap: 10px; }
.plate__card {
  display: grid; place-items: center; min-height: 100px; padding: 16px 22px;
  background: #fff; border-radius: 14px; text-decoration: none;
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.plate__card img { width: 190px; height: auto; }
.plate--wide .plate__card img { width: 300px; }
a.plate__card:hover { transform: translateY(-4px) rotate(-0.6deg); box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.95), 0 0 0 1px var(--accent-line); }
.plate figcaption { color: var(--dim); font-size: 0.68rem; }

/* reveal (motion only) */
.motion [data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.motion [data-reveal].is-in { opacity: 1; transform: none; }
.motion .chapter > [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.motion .chapter > [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.motion .chapter > [data-reveal]:nth-child(n + 4) { transition-delay: 0.22s; }
.motion .photo[data-reveal] { opacity: 1; transform: none; }
.motion .photo[data-reveal] .photo__frame { clip-path: inset(9% 7% 9% 7% round var(--radius)); transition: clip-path 1.5s var(--ease); }
.motion .photo[data-reveal].is-in .photo__frame { clip-path: inset(0 0 0 0 round var(--radius)); }
.motion .photo[data-reveal] figcaption { opacity: 0; transition: opacity 1s 0.6s; }
.motion .photo[data-reveal].is-in figcaption { opacity: 1; }

/* ---------- explore ---------- */
.explore {
  padding: clamp(100px, 14vw, 200px) 0;
  border-top: 1px solid var(--line);
  background: radial-gradient(55% 45% at 85% 0%, rgba(212, 243, 107, 0.06), transparent 70%);
}
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; isolation: isolate; overflow: hidden;
  border: 1px solid var(--line); border-radius: 22px; padding: 26px 26px 30px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  transition: border-color 0.4s, transform 0.7s var(--ease);
}
.card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(380px circle at var(--x, 50%) var(--y, 0%), rgba(212, 243, 107, 0.1), transparent 65%);
}
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }
.motion .card[data-reveal] { transition-delay: calc(var(--i, 0) * 0.1s); }
.card__art {
  aspect-ratio: 240 / 140; margin-bottom: 26px; padding: 12px; color: var(--accent);
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.015);
}
.card__art svg { width: 100%; height: 100%; overflow: visible; }
.card__n { color: var(--dim); font-size: 0.7rem; }
.card__title { font-size: clamp(1.35rem, 1.9vw, 1.7rem); line-height: 1.15; letter-spacing: -0.025em; margin: 8px 0 12px; }
.card__text { color: var(--muted); line-height: 1.62; }
.explore__cta { margin-top: clamp(40px, 6vw, 64px); font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--muted); }
.explore__cta .arrow-link { margin-left: 6px; }

/* card illustrations */
.art line, .art rect, .art path, .art circle, .art polygon { vector-effect: non-scaling-stroke; }
.art--ai .art__lines line { stroke: var(--line-2); stroke-width: 1; }
.art--ai .art__pulses line { vector-effect: none; stroke: var(--accent); stroke-width: 1.1; stroke-linecap: round; stroke-dasharray: 0.16 2; stroke-dashoffset: 0.16; opacity: 0; }
.art--ai .art__nodes circle { fill: var(--bg-2); stroke: var(--accent); stroke-width: 1.5; }
.art--biz .art__grid line { stroke: var(--line); stroke-dasharray: 2 4; }
.art--biz .art__bars rect { fill: rgba(212, 243, 107, 0.22); transform-box: fill-box; transform-origin: 50% 100%; }
.art--biz .art__trend { vector-effect: none; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.art--biz .art__dot { fill: var(--accent); }
.art--biz .art__ring { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.art--cctv { overflow: hidden !important; }
.art--cctv .art__mount { stroke: var(--muted); stroke-width: 2; }
.art--cctv .art__head { transform-box: view-box; transform-origin: 14px 24px; }
.art--cctv .art__head rect { fill: var(--bg-3); stroke: var(--text); stroke-width: 1.4; }
.art--cctv .art__cone { fill: url(#cone); }
.art--cctv .art__rec { fill: #ff5a4f; }
.art--cctv .art__floor { stroke: var(--line-2); }
.art--cctv .art__person { transform: translate(var(--x, 120px), var(--y, 0px)); }
.art--cctv .art__person rect { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 2; }
.art--cctv .art__person circle, .art--cctv .art__person .art__body { fill: var(--text); stroke: none; }
.art--cctv .art__person line { stroke: var(--text); stroke-width: 2.4; stroke-linecap: round; }
.art--cctv .art__count { font-family: var(--f-mono); font-size: 14px; fill: var(--text); font-variant-numeric: tabular-nums; }
.art--cctv .art__count-label { fill: var(--muted); font-size: 10px; letter-spacing: 0.08em; }

/* Per-element delays and offsets live here rather than in style="" attributes,
   so the Content-Security-Policy can forbid inline styles. */
.card:nth-child(2) { --i: 1; }
.card:nth-child(3) { --i: 2; }
.art__pulses line:nth-child(1) { --d: 0s; }
.art__pulses line:nth-child(2) { --d: 0.6s; }
.art__pulses line:nth-child(3) { --d: 1.1s; }
.art__pulses line:nth-child(4) { --d: 1.7s; }
.art__pulses line:nth-child(5) { --d: 2.2s; }
.art__pulses line:nth-child(6) { --d: 2.8s; }
.art__nodes circle:nth-child(1) { --d: 0s; }
.art__nodes circle:nth-child(2) { --d: 0.4s; }
.art__nodes circle:nth-child(3) { --d: 0.8s; }
.art__nodes circle:nth-child(4) { --d: 0.6s; }
.art__nodes circle:nth-child(5) { --d: 1s; }
.art__nodes circle:nth-child(6) { --d: 1.4s; }
.art__nodes circle:nth-child(7) { --d: 1.2s; }
.art__nodes circle:nth-child(8) { --d: 1.7s; }
.art__bars rect:nth-child(1) { --d: 0s; }
.art__bars rect:nth-child(2) { --d: 0.12s; }
.art__bars rect:nth-child(3) { --d: 0.24s; }
.art__bars rect:nth-child(4) { --d: 0.36s; }
.art__bars rect:nth-child(5) { --d: 0.48s; }
.art__person:nth-child(1) { --d: 0s; --x: 80px; --y: -4px; }
.art__person:nth-child(2) { --d: -2.1s; --x: 140px; --y: 0px; }
.art__person:nth-child(3) { --d: -4.2s; --x: 200px; --y: 4px; }

.motion .art--ai .art__pulses line { animation: travel 3.4s var(--ease-io) infinite; animation-delay: var(--d); }
.motion .art--ai .art__nodes circle { animation: node 3.4s ease-in-out infinite; animation-delay: var(--d); }
.motion .art--biz .art__bars rect { transform: scaleY(0); transition: transform 1.1s var(--ease); transition-delay: var(--d); }
.motion .art--biz .art__trend { stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease) 0.5s; }
.motion .art--biz .art__dot { opacity: 0; transition: opacity 0.4s 1.9s; }
.motion .card.is-live .art--biz .art__bars rect { transform: none; }
.motion .card.is-live .art--biz .art__trend { stroke-dashoffset: 0; }
.motion .card.is-live .art--biz .art__dot { opacity: 1; }
.motion .card.is-live .art--biz .art__ring { animation: ring 2.2s ease-out 2s infinite; }
.motion .art--cctv .art__head { animation: sweep 5.5s ease-in-out infinite alternate; }
.motion .art--cctv .art__rec { animation: blink 1.4s steps(2, jump-none) infinite; }
.motion .art--cctv .art__person { animation: walk 6.3s linear infinite; animation-delay: var(--d); }
.motion .card:not(.is-live) .art * { animation-play-state: paused !important; }

@keyframes travel { 0% { stroke-dashoffset: 0.16; opacity: 1; } 85% { opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }
@keyframes node { 0%, 100% { fill: var(--bg-2); } 30% { fill: var(--accent); } 55% { fill: var(--bg-2); } }
@keyframes ring { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(3.4); } }
@keyframes sweep { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
@keyframes blink { 0% { opacity: 1; } 100% { opacity: 0.15; } }
@keyframes walk {
  0% { transform: translate(52px, var(--y)); opacity: 0; }
  10% { opacity: 1; }
  86% { opacity: 1; }
  100% { transform: translate(226px, var(--y)); opacity: 0; }
}

/* ---------- guiding thoughts (inline quotes) ---------- */
html:lang(et) .pull { quotes: '„' '“'; }
html:lang(ru) .pull { quotes: '«' '»'; }
.pull { position: relative; margin-top: 40px; padding: 2px 0 2px 26px; }
.pull::before {
  content: ''; position: absolute; left: 0; top: 0.3em; bottom: 0.25em; width: 2px; border-radius: 2px;
  background: var(--accent); transform-origin: 50% 0;
}
.pull blockquote p {
  font-size: clamp(1.35rem, 2.1vw, 1.75rem); line-height: 1.3; letter-spacing: -0.022em; font-weight: 500; color: var(--text);
  max-width: 30ch;
}
.pull blockquote p::before { content: open-quote; color: var(--accent); }
.pull blockquote p::after { content: close-quote; color: var(--accent); }
.pull blockquote[lang='la'] p {
  font-family: var(--f-serif); font-style: italic; font-size: clamp(1.95rem, 3.2vw, 2.75rem);
  line-height: 1.05; letter-spacing: -0.01em; color: var(--accent);
}
.pull blockquote[lang='la'] p::before, .pull blockquote[lang='la'] p::after { content: none; }
.pull__tr { margin-top: 10px; color: var(--muted); font-size: 1rem; }

.pull--wide { margin-top: clamp(72px, 10vw, 130px); padding-left: 0; }
.pull--wide::before { display: none; }
.pull--wide blockquote::before {
  content: '“'; display: block; font-family: var(--f-serif); font-style: italic; color: var(--accent);
  font-size: clamp(4rem, 8vw, 6.5rem); line-height: 0.6; height: 0.4em; margin-bottom: 0.12em;
}
.pull--wide blockquote p { font-size: clamp(1.7rem, 3.6vw, 3.1rem); line-height: 1.14; letter-spacing: -0.03em; max-width: 26ch; }
.pull--wide blockquote p::before, .pull--wide blockquote p::after { content: none; }

.motion .pull[data-reveal]::before { transform: scaleY(0); transition: transform 1.2s var(--ease) 0.35s; }
.motion .pull[data-reveal].is-in::before { transform: none; }

/* ---------- footer ---------- */
.foot {
  position: relative; isolation: isolate; overflow: clip;
  padding: clamp(100px, 14vw, 200px) 0 28px; border-top: 1px solid var(--line);
  background: radial-gradient(70% 60% at 15% 100%, rgba(212, 243, 107, 0.07), transparent 70%);
}
.foot__bg { position: absolute; inset: 0; z-index: -1; opacity: 0.17; }
.foot__bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.35) contrast(1.05); }
.foot__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgba(11, 12, 13, 0.35) 45%, rgba(11, 12, 13, 0.85) 100%); }
.foot__title { font-size: clamp(3.2rem, 11.5vw, 10.6rem); line-height: 0.9; letter-spacing: -0.055em; }
.foot__note { color: var(--muted); margin: 26px 0 44px; font-size: clamp(1.1rem, 1.6vw, 1.3rem); }
.foot__mail {
  display: inline-block; font-size: clamp(1.45rem, 4.2vw, 3.1rem); letter-spacing: -0.025em; font-weight: 500;
  text-decoration: none; padding-bottom: 8px; overflow-wrap: anywhere;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 2px no-repeat;
  transition: color 0.3s, background-size 0.6s var(--ease);
}
.foot__mail:hover { color: var(--accent); background-size: 0 2px; background-position: 100% 100%; }
.foot__portfolio { margin-top: 40px; font-size: 1.05rem; }
.foot__bottom {
  margin-top: clamp(90px, 13vw, 170px); padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px;
  color: var(--dim); font-size: 0.72rem;
}
.foot__top { text-decoration: none; color: var(--muted); }
.foot__top:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cards { grid-template-columns: 1fr; max-width: 620px; }
}
@media (max-width: 900px) {
  .story__grid { grid-template-columns: 1fr; gap: 0; }
  .rail {
    position: sticky; top: var(--nav-h); z-index: 20;
    margin: 0 calc(-1 * var(--gutter)) 40px; padding: 10px var(--gutter);
    background: rgba(11, 12, 13, 0.78);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .rail__sticky { position: static; display: block; }
  .rail__when { display: flex; align-items: baseline; gap: 16px; }
  .odo { font-size: 2.3rem; }
  .rail__age { margin: 0; }
  .rail__nav { display: none; }
  .chapters { gap: 110px; }
  .chapter { scroll-margin-top: calc(var(--nav-h) + 90px); }
}
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__lang { margin-left: auto; }
  .hero__credit { display: none; }
  .hero__media img { object-position: 38% 55%; }
  .plate--wide .plate__card img { width: 250px; }
  .motion .statement { height: 190vh; }
  .foot__bottom { justify-content: flex-start; }
}
