/* ==========================================================
   Ethan Blake — portfolio
   Dark by default, light theme via [data-theme="light"]
   ========================================================== */

:root {
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --wrap: 1240px;
  --pad: clamp(20px, 4vw, 48px);
  --radius: 18px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A090D;
  --bg-2: #0F0E14;
  --surface: #14131A;
  --surface-2: #1B1A23;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .14);
  --text: #EEEBF3;
  --muted: #9591A3;
  --faint: #5E5A6B;
  --accent: #8577FF;
  --accent-2: #C06AF2;
  --grad: linear-gradient(115deg, #6C5BFF 0%, #A54BEA 100%);
  --grad-text: linear-gradient(100deg, #A79BFF 0%, #D59AF7 60%, #F0C8FF 100%);
  --glow: rgba(123, 108, 255, .32);
  --aurora-a: rgba(91, 75, 255, .34);
  --aurora-b: rgba(160, 43, 224, .24);
  --aurora-c: rgba(64, 120, 255, .16);
  --shadow: 0 40px 80px -40px rgba(0, 0, 0, .9);
  --grain: .055;
  --topbar: rgba(10, 9, 13, .62);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F1EC;
  --bg-2: #ECE9E2;
  --surface: #FBFAF7;
  --surface-2: #FFFFFF;
  --line: rgba(22, 18, 32, .085);
  --line-2: rgba(22, 18, 32, .16);
  --text: #15121B;
  --muted: #625D6C;
  --faint: #A29DAA;
  --accent: #5B4BFF;
  --accent-2: #9A2BE0;
  --grad: linear-gradient(115deg, #5B4BFF 0%, #9A2BE0 100%);
  --grad-text: linear-gradient(100deg, #4B3BEF 0%, #8A2BD6 70%, #B03ED8 100%);
  --glow: rgba(91, 75, 255, .2);
  --aurora-a: rgba(91, 75, 255, .16);
  --aurora-b: rgba(160, 43, 224, .12);
  --aurora-c: rgba(255, 170, 120, .14);
  --shadow: 0 40px 70px -45px rgba(40, 20, 80, .45);
  --grain: .04;
  --topbar: rgba(243, 241, 236, .7);
}

/* ---------- base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 380;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .5s var(--ease-io), color .5s var(--ease-io);
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

em { font-style: italic; }

/* film grain */
.grain {
  position: fixed; inset: -50%;
  z-index: 100; pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- labels ---------- */
.eyebrow, .kicker, .tc, .clip-meta, .svc-num, .badge, .step-tc, .tl-head, .tl-labels, .caps-inner, .count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.kicker { color: var(--muted); display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--line-2); }
.count { color: var(--faint); letter-spacing: .08em; }

/* ---------- buttons ---------- */
.btn {
  --h: 50px;
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  height: var(--h); padding: 0 22px;
  border-radius: 999px;
  font-size: 15px; font-weight: 450; letter-spacing: -.005em;
  white-space: nowrap;
  transition: transform .5s var(--ease-out), background-color .3s, border-color .3s, box-shadow .4s var(--ease-out), color .3s;
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease-out); }
.btn-small { --h: 38px; padding: 0 16px; font-size: 13.5px; background: var(--text); color: var(--bg); }
.btn-small:hover { transform: translateY(-1px); }
.cta-sm { display: none; }

.btn-primary {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 30px -10px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .25);
  overflow: hidden;
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease-out);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover { box-shadow: 0 16px 40px -12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover svg { transform: translateY(2px); }
.offer .btn-primary:hover svg { transform: translateX(3px); }
.btn-primary > * { position: relative; z-index: 1; }

.btn-ghost { border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.btn-ghost:hover { border-color: var(--text); }

.text-link {
  display: inline-flex; gap: 6px; align-items: center;
  font-size: 14px; color: var(--text);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size .5s var(--ease-out);
}
.text-link:hover { background-size: 100% 1px; }

/* ---------- scroll playhead ---------- */
.scrub { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.scrub-fill {
  display: block; height: 100%; width: 100%;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background-color .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  background: var(--topbar);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom-color: var(--line);
}
.topbar-inner { height: 72px; display: flex; align-items: center; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 500; letter-spacing: -.01em; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 6px 18px -6px var(--glow); transition: transform .6s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-name { font-size: 15.5px; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  position: relative; padding: 8px 14px; border-radius: 999px;
  font-size: 14px; color: var(--muted);
  transition: color .3s, background-color .3s;
}
.nav a:hover { color: var(--text); background: var(--line); }

.topbar-tools { display: flex; align-items: center; gap: 12px; }
.tc { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; letter-spacing: .08em; padding: 0 6px; font-variant-numeric: tabular-nums; }
.tc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.theme-toggle {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  transition: border-color .3s, transform .5s var(--ease-out);
}
.theme-toggle:hover { border-color: var(--text); transform: rotate(20deg); }
.theme-toggle svg { position: absolute; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; transition: opacity .4s, transform .6s var(--ease-out); }
.theme-toggle .i-moon { fill: currentColor; stroke: none; }
[data-theme="dark"] .theme-toggle .i-moon { opacity: 0; transform: rotate(-90deg) scale(.5); }
[data-theme="light"] .theme-toggle .i-sun { opacity: 0; transform: rotate(90deg) scale(.5); }

/* View-transition theme switch */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 9999; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 168px 0 72px; isolation: isolate; }

.aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.aurora span:nth-child(1) { width: 52vw; height: 52vw; max-width: 760px; max-height: 760px; left: 48%; top: -18%; background: var(--aurora-a); animation: drift1 22s var(--ease-io) infinite alternate; }
.aurora span:nth-child(2) { width: 38vw; height: 38vw; max-width: 560px; max-height: 560px; left: 70%; top: 18%; background: var(--aurora-b); animation: drift2 26s var(--ease-io) infinite alternate; }
.aurora span:nth-child(3) { width: 30vw; height: 30vw; max-width: 460px; max-height: 460px; left: 30%; top: 30%; background: var(--aurora-c); animation: drift3 30s var(--ease-io) infinite alternate; }
@keyframes drift1 { to { transform: translate(-12%, 10%) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-22%, -8%) scale(.9); } }
@keyframes drift3 { to { transform: translate(18%, -12%) scale(1.15); } }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); padding: 8px 14px 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 50%, transparent); }
.rec { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: rec 2s infinite; }
@keyframes rec {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  margin-top: 30px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(54px, 9.4vw, 140px);
  line-height: .94;
  letter-spacing: -.025em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero-title .line > span { display: inline-block; }
.hero-title em, .section-title em, .contact-title em, .offer-text em {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding-right: .06em;
  margin-right: -.06em;
}

.hero-foot { margin-top: 44px; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.hero-lede { max-width: 520px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* entrance */
.hero-in { opacity: 0; transform: translateY(26px); filter: blur(8px); }
.hero-title .hero-in { transform: translateY(105%); filter: none; opacity: 1; }
.is-loaded .hero-in {
  opacity: 1; transform: none; filter: none;
  transition: opacity 1.1s var(--ease-out), transform 1.2s var(--ease-out), filter 1.1s var(--ease-out);
  transition-delay: calc(var(--d) * 90ms + 80ms);
}

/* ---------- signature timeline ---------- */
.timeline {
  margin-top: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tl-head {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 11px;
}
.tl-seq { color: var(--faint); }
.tl-now { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.tl-now-label { color: var(--faint); }
.tl-now #tlClip { display: inline-block; min-width: 14ch; transition: opacity .25s; }
.tl-tc { color: var(--accent); font-variant-numeric: tabular-nums; min-width: 12ch; text-align: right; }

.tl-body { display: grid; grid-template-columns: 52px 1fr; }
.tl-labels { display: grid; grid-template-rows: 22px 30px 58px 38px 30px; border-right: 1px solid var(--line); color: var(--faint); font-size: 10px; }
.tl-labels span { display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); }
.tl-labels span:first-child { grid-row: 2; }
.tl-labels::before { content: ""; grid-row: 1; border-bottom: 1px solid var(--line); }

.tl-tracks { position: relative; display: grid; grid-template-rows: 22px 30px 58px 38px 30px; }
.tl-ruler {
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 10%) 0 100% / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 2%) 0 100% / 100% 5px no-repeat;
}
.tl-track { position: relative; border-bottom: 1px solid var(--line); }
.tl-a2 { border-bottom: 0; }

.fx {
  position: absolute; top: 6px; bottom: 6px; left: var(--x); width: var(--w);
  display: flex; align-items: center; padding: 0 8px;
  border-radius: 6px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; white-space: nowrap; overflow: hidden;
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.clipblock {
  position: absolute; top: 5px; bottom: 5px; left: var(--x); width: var(--w);
  border-radius: 7px;
  background-image: var(--img);
  background-size: auto 100%;
  background-repeat: repeat-x;
  background-position: 0 50%;
  outline: 1px solid var(--line-2);
  outline-offset: -1px;
  filter: saturate(.55) brightness(.72);
  transition: filter .5s var(--ease-out), outline-color .4s, transform .5s var(--ease-out);
}
[data-theme="light"] .clipblock { filter: saturate(.6) brightness(.95) contrast(.9); }
.clipblock.is-live { filter: none; outline: 1.5px solid var(--accent); }

.tl-a1 svg { width: 100%; height: 100%; }
.tl-a1 rect { fill: color-mix(in srgb, var(--accent) 55%, var(--muted)); opacity: .7; }
.tl-a2 .bed {
  position: absolute; top: 6px; bottom: 6px; left: 0; right: 0;
  display: flex; align-items: center; padding: 0 10px;
  border-radius: 6px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; color: var(--muted);
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 18%, transparent) 0 2px, transparent 2px 5px);
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, transparent);
}

.playhead {
  position: absolute; top: 0; bottom: 0; left: 0; width: 0;
  transform: translateX(var(--ph, 0px));
  z-index: 3; pointer-events: none;
}
.playhead::before { content: ""; position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.ph-cap { position: absolute; top: 2px; left: -6px; width: 12px; height: 14px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); }

/* ---------- capabilities ---------- */
.caps { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.caps-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; padding-top: 22px; padding-bottom: 22px; color: var(--muted); font-size: 11px; }
.caps-inner span { display: inline-flex; align-items: center; gap: 10px; }
.caps-inner span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

/* ---------- section heads ---------- */
.work, .process { padding: 140px 0 40px; }
.section-head { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: end; margin-bottom: 64px; }
.section-head .kicker { grid-column: 1 / -1; }
.section-title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(44px, 6.2vw, 88px); line-height: .98; letter-spacing: -.02em; }
.section-note { color: var(--muted); max-width: 300px; font-size: 15px; }

/* ---------- services ---------- */
.service {
  display: grid;
  grid-template-columns: minmax(260px, 4fr) 8fr;
  gap: 48px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.svc-text { position: sticky; top: 112px; align-self: start; }
.svc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.svc-num { color: var(--accent); font-size: 12px; }
.badge { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 10px; }
.badge-core { color: var(--text); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.service h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(34px, 3.6vw, 48px); line-height: 1.02; letter-spacing: -.015em; margin-bottom: 16px; }
.service p { color: var(--muted); max-width: 420px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.chips li { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.svc-text .text-link { margin-top: 22px; }

.svc-reel { container-type: inline-size; --gap: 18px; --cw: min(248px, calc((100cqi - 2 * var(--gap)) / 3)); display: flex; gap: var(--gap); align-items: flex-start; flex-wrap: wrap; }

/* clip card */
.clip {
  --w: var(--cw);
  position: relative;
  display: block;
  width: var(--w);
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  isolation: isolate;
  transform: translateZ(0);
  transition: transform .7s var(--ease-out), border-color .4s, box-shadow .6s var(--ease-out);
}
.clip-wide { --w: calc(var(--cw) * 2 + var(--gap)); aspect-ratio: 16 / 9; }

.clip-media, .clip-media img, .clip-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip-media img { transition: transform 1.2s var(--ease-out), opacity .5s; }
.clip-media video { opacity: 0; transition: opacity .5s var(--ease-out); }
.clip.is-playing .clip-media video { opacity: 1; }

.clip::before {
  /* spotlight that follows the cursor */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .14), transparent 60%);
  opacity: 0; transition: opacity .4s;
}
.clip::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 4, 10, .82) 100%);
}
.clip:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 40px 70px -30px var(--glow); }
.clip:hover::before { opacity: 1; }
.clip:hover .clip-media img { transform: scale(1.045); }

.clip-play {
  position: absolute; z-index: 3; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .6s var(--ease-out), background-color .3s;
}
.clip-play svg { width: 15px; height: 15px; fill: #fff; margin-left: 2px; }
.clip:hover .clip-play { transform: scale(1.12); background: rgba(255, 255, 255, .26); }

.clip-info { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 14px; display: grid; gap: 4px; color: #fff; }
.clip-title { font-size: 14.5px; font-weight: 500; line-height: 1.3; letter-spacing: -.005em; }
.clip-meta { font-size: 10px; color: rgba(255, 255, 255, .66); letter-spacing: .1em; }

/* ---------- process ---------- */
.process { padding-bottom: 120px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.steps li { padding: 30px 28px 34px 0; border-right: 1px solid var(--line); position: relative; }
.steps li + li { padding-left: 28px; }
.steps li:last-child { border-right: 0; }
.steps li::before { content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 1px; background: var(--grad); transition: width 1.2s var(--ease-out); transition-delay: calc(var(--i) * 140ms + 200ms); }
.steps li.is-in::before { width: 100%; }
.step-tc { color: var(--accent); font-size: 11px; }
.steps h3 { font-family: var(--font-serif); font-weight: 400; font-size: 30px; line-height: 1.1; margin: 18px 0 10px; }
.steps p { color: var(--muted); font-size: 15px; }

.offer {
  margin-top: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: 34px 38px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    var(--surface);
}
.offer-text { margin-top: 14px; font-family: var(--font-serif); font-size: clamp(26px, 2.8vw, 38px); line-height: 1.15; max-width: 640px; }

/* ---------- contact ---------- */
.contact { padding: 150px 0 140px; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; left: 50%; top: 100%; width: 1100px; height: 700px; transform: translate(-50%, -55%);
  background: radial-gradient(closest-side, var(--aurora-a), transparent);
  filter: blur(30px); pointer-events: none;
}
.contact-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.contact-title { margin-top: 26px; font-family: var(--font-serif); font-weight: 400; font-size: clamp(46px, 7.4vw, 112px); line-height: .98; letter-spacing: -.025em; }
.mail-link {
  margin-top: 40px;
  font-size: clamp(20px, 2.4vw, 30px); letter-spacing: -.01em;
  background: linear-gradient(currentColor, currentColor) 50% 100% / 0 1px no-repeat;
  padding-bottom: 4px;
  transition: background-size .6s var(--ease-out);
}
.mail-link:hover { background-size: 100% 1px; }
.contact-actions { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--faint); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.disclaimer { max-width: 640px; text-align: right; }

/* ---------- player ---------- */
.player {
  /* fit both width and height: 56px title row + video must stay inside ~86% of the screen */
  width: min(92vw, 1100px, calc((86vh - 56px) * 16 / 9)); max-width: none; max-height: 92vh;
  padding: 56px 0 0; border: 0; background: transparent; color: var(--text);
  overflow: visible;
}
.player[data-ratio="9/16"] { width: min(92vw, calc((86vh - 56px) * 9 / 16)); }
.player::backdrop { background: rgba(4, 3, 8, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.player[open] .player-inner { animation: pop .6s var(--ease-out); }
.player[open]::backdrop { animation: fade .4s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.player-inner { position: relative; }
.player-frame { width: 100%; aspect-ratio: var(--r, 16 / 9); border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .8); }
.player-frame { position: relative; }
.player-frame video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; cursor: pointer; }
.player-paused {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; pointer-events: none;
  background: rgba(10, 9, 13, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transform: scale(.85); transition: opacity .25s, transform .35s var(--ease-out);
}
.player-paused svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.player-frame.is-paused .player-paused { opacity: 1; transform: none; }
.player-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 18px;
  display: flex; align-items: flex-end; cursor: pointer; touch-action: none;
}
.player-track { position: relative; width: 100%; height: 3px; background: rgba(255, 255, 255, .22); transition: height .2s; }
.player-progress:hover .player-track, .player-progress.is-drag .player-track { height: 6px; }
.player-fill {
  position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--accent), var(--accent-2, var(--accent)));
}
.player-head {
  position: absolute; top: -56px; left: 2px; right: 56px; height: 40px; /* sits in .player top padding */
  display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0;
}
.player-title { color: #F4F1F8; font-size: 15px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-close {
  position: absolute; top: -52px; right: 0;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .25); color: #fff;
  transition: transform .5s var(--ease-out), background-color .3s;
}
.player-close:hover { transform: rotate(90deg); background: rgba(255, 255, 255, .1); }
.player-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 11px 18px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-size: 14px; pointer-events: none;
  transition: opacity .4s, transform .6s var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(32px); filter: blur(6px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out), filter 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms); }
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }
.service[data-reveal] .clip { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out), border-color .4s, box-shadow .6s var(--ease-out); }
.service[data-reveal].is-in .clip { opacity: 1; transform: none; }
.service[data-reveal].is-in .clip:hover { transform: translateY(-6px); }
.service .clip:nth-child(2) { transition-delay: .12s; }
.service .clip:nth-child(3) { transition-delay: .24s; }
.service[data-reveal].is-in .clip:hover { transition-delay: 0s; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav, .tc { display: none; }
  .topbar-tools { margin-left: auto; }
  .service { grid-template-columns: 1fr; gap: 32px; }
  .svc-text { position: static; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:nth-child(2) { border-right: 0; }
  .steps li:nth-child(3) { padding-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section-head { grid-template-columns: 1fr; }
  .tl-now { display: none; }
  .tl-tc { margin-left: auto; }
}

@media (max-width: 640px) {
  .hero { padding-top: 128px; }
  .btn-small { --h: 34px; padding: 0 14px; font-size: 13px; }
  .cta-lg { display: none; }
  .cta-sm { display: inline; }
  .svc-reel { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); margin: 0 calc(var(--pad) * -1); padding: 4px var(--pad) 24px; scrollbar-width: none; }
  .svc-reel::-webkit-scrollbar { display: none; }
  .clip { --w: 64vw; flex: none; scroll-snap-align: start; }
  .clip-wide { --w: 86vw; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 26px 0; border-right: 0; }
  .steps li + li { border-top: 1px solid var(--line); }
  .offer { padding: 28px 24px; }
  .disclaimer { text-align: left; }
  .tl-labels, .tl-tracks { grid-template-rows: 20px 26px 46px 30px 26px; }
  .fx { font-size: 0; }
  .tl-seq { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .hero-in, [data-reveal], .service[data-reveal] .clip { opacity: 1 !important; transform: none !important; filter: none !important; }
}
