/* ==========================================================
   mieroz — video editor portfolio
   ========================================================== */

:root {
  --bg: #09090a;
  --bg-2: #0e0e10;
  --surface: #141417;
  --surface-2: #1b1b1f;
  --line: #2a2a30;
  --line-soft: #1e1e22;
  --text: #f3f2ee;
  --muted: #9a99a1;
  --dim: #64636b;
  --accent: #c8ff2e;
  --accent-ink: #0b0e00;
  --rec: #ff453a;

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 76px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* film grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[hidden] { display: none !important; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  font-weight: 600;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- record dot ---------- */
.rec {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 0 0 rgba(255, 69, 58, .6);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(255, 69, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 69, 58, 0); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: 14px 24px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--text); }
.btn-sm { padding: 10px 18px; font-size: .88rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled,
.site-header.nav-open {
  background: rgba(9, 9, 10, .8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.progress {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}
.bar {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.02em;
}
.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: var(--surface); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--text);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child { top: 24px; }
.nav-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(40px, 6vw, 80px);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -68px 0 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 78% 18%, rgba(200, 255, 46, .10), transparent 70%),
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 100% 96px,
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 96px 100%;
  -webkit-mask-image: radial-gradient(90% 80% at 50% 25%, #000 20%, transparent 80%);
  mask-image: radial-gradient(90% 80% at 50% 25%, #000 20%, transparent 80%);
  opacity: .8;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rec-badge, .avail { display: inline-flex; align-items: center; gap: 10px; }
.rec-badge #hero-tc { color: var(--text); font-variant-numeric: tabular-nums; }
.avail .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.wordmark {
  margin: clamp(12px, 3vw, 36px) 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 19.5vw, 15.5rem);
  line-height: .95;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.wm-line { display: block; overflow: hidden; padding-bottom: .06em; }
.ch {
  display: inline-block;
  transform: translateY(0);
}
.ch.o { color: var(--accent); }
.js .ch {
  transform: translateY(105%);
  animation: rise 1s var(--ease) forwards;
  animation-delay: calc(var(--i) * 70ms + 100ms);
}
@keyframes rise { to { transform: translateY(0); } }

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px 48px;
  margin-top: clamp(20px, 3vw, 36px);
}
.lede {
  max-width: 34ch;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.4;
  color: var(--text);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- timeline ---------- */
.timeline {
  --label: 44px;
  position: relative;
  margin-top: clamp(36px, 6vw, 72px);
  padding: 0 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.tl-ruler {
  position: relative;
  height: 30px;
  margin-left: var(--label);
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, var(--dim) 0 1px, transparent 1px 12.5%) 0 100% / 100% 100% no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 3.125%) 0 100% / 100% 40% no-repeat;
}
.tl-ruler span {
  position: absolute;
  top: 5px;
  padding-left: 6px;
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--muted);
  line-height: 1;
}
.tl-track {
  display: grid;
  grid-template-columns: var(--label) 1fr;
  align-items: center;
  margin-top: 10px;
}
.tl-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--dim);
}
.tl-lane {
  position: relative;
  height: 46px;
  margin-right: 10px;
}
.clip {
  --h: 200;
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--s);
  width: var(--l);
  padding: 0 10px;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-radius: 6px;
  background: hsl(var(--h) 38% 20%);
  border: 1px solid hsl(var(--h) 45% 34%);
  font-family: var(--font-mono);
  font-size: .68rem;
  color: hsl(var(--h) 60% 80%);
}
.clip-title {
  background: rgba(200, 255, 46, .14);
  border-color: rgba(200, 255, 46, .5);
  color: var(--accent);
}
.tl-audio .tl-lane { height: 54px; }
.wave {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(200, 255, 46, .05);
  border: 1px solid rgba(200, 255, 46, .22);
}
.wave i {
  flex: 1;
  min-width: 1px;
  border-radius: 2px;
  background: rgba(200, 255, 46, .55);
}

.tl-headwrap {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--label);
  right: 10px;
  pointer-events: none;
}
.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 38%;
  width: 0;
  border-left: 2px solid var(--accent);
  box-shadow: 0 0 14px rgba(200, 255, 46, .5);
}
.flag {
  position: absolute;
  top: 3px;
  left: 0;
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .65rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--bg-2);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 2.2rem;
  padding: 20px 1.1rem 20px 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-track span::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 1.1rem;
  flex: none;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding-block: clamp(72px, 10vw, 140px); }
.section-alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line-soft);
}
.sec-head { margin-bottom: clamp(32px, 5vw, 56px); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5.2vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.sec-sub {
  max-width: 52ch;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* reveal on scroll */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- work ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.chip:hover { color: var(--text); border-color: var(--dim); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: clamp(20px, 2.4vw, 32px);
}
.work {
  --hue: 20;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  animation: card-in .7s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
.work-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(110% 90% at 18% 8%, hsl(var(--hue) 85% 55% / .5), transparent 60%),
    linear-gradient(150deg, hsl(var(--hue) 50% 22%), hsl(calc(var(--hue) + 40) 55% 7%));
  transition: border-color .3s, transform .5s var(--ease);
}
.work-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 35%, transparent 60%, rgba(0, 0, 0, .55));
}
.work-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.work-num {
  position: absolute;
  left: 18px;
  bottom: 6px;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 1;
  letter-spacing: -.05em;
  color: hsl(var(--hue) 80% 85% / .16);
  transition: color .4s;
}
.work-cat, .work-dur {
  position: absolute;
  top: 14px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(9, 9, 10, .6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.work-cat { left: 14px; }
.work-dur { right: 14px; font-variant-numeric: tabular-nums; }
.work-play {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  opacity: 0;
  transform: scale(.7);
  transition: opacity .3s, transform .4s var(--ease);
}
.work-play svg { width: 20px; height: 20px; margin-left: 3px; }
.work-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 16px;
}
.work-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.work-year {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--dim);
}
.work:hover .work-thumb,
.work:focus-visible .work-thumb { border-color: var(--accent); }
.work:hover .work-thumb img,
.work:focus-visible .work-thumb img { transform: scale(1.05); }
.work:hover .work-play,
.work:focus-visible .work-play { opacity: 1; transform: none; }
.work:hover .work-num { color: hsl(var(--hue) 80% 85% / .3); }

/* ---------- about ---------- */
.about {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(36px, 7vw, 100px);
  align-items: start;
}
.statement {
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  max-width: 16ch;
}
.about-copy {
  margin-top: 28px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.12rem;
}
.principles { display: grid; }
.principles li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 18px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.principles li:last-child { border-bottom: 1px solid var(--line); }
.num {
  grid-row: span 2;
  padding-top: 5px;
  font-size: .78rem;
  color: var(--accent);
}
.principles h3, .service h3, .step h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.principles p { color: var(--muted); }

/* ---------- services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.service {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 2.6vw, 36px);
  border-left: 1px solid var(--line);
  background: var(--bg);
  transition: background .3s;
}
.service:first-child { border-left: 0; }
.service:hover { background: var(--surface); }
.service .num { padding: 0; margin-bottom: 36px; }
.service p { color: var(--muted); font-size: 1rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.toolkit {
  margin-top: 28px;
  color: var(--muted);
  font-size: .95rem;
}
.toolkit .mono {
  margin-right: 14px;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
}

/* ---------- process ---------- */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
  counter-reset: none;
}
.steps::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px);
}
.step { position: relative; }
.marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: .8rem;
}
.step p { margin-top: 10px; color: var(--muted); font-size: 1rem; max-width: 30ch; }

/* ---------- contact ---------- */
.contact { position: relative; isolation: isolate; }
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(50% 60% at 15% 20%, rgba(200, 255, 46, .08), transparent 70%);
}
.contact-title { font-size: clamp(2.4rem, 8vw, 6.5rem); line-height: 1; }
.contact-list { border-top: 1px solid var(--line); }
.contact-row {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr auto;
  align-items: center;
  gap: 16px 24px;
  width: 100%;
  padding: clamp(22px, 3.2vw, 38px) clamp(0px, 1vw, 12px);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s, padding .4s var(--ease);
}
.contact-row:hover,
.contact-row:focus-visible {
  background: var(--accent);
  color: var(--accent-ink);
  padding-inline: clamp(12px, 2vw, 28px);
  border-radius: 0;
  outline-offset: -3px;
}
.c-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
.c-label em { font-style: normal; color: var(--dim); text-transform: none; letter-spacing: 0; }
.contact-row:hover .c-label,
.contact-row:focus-visible .c-label,
.contact-row:hover .c-label em,
.contact-row:focus-visible .c-label em { color: rgba(11, 14, 0, .65); }
.c-value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 4.2vw, 3rem);
  letter-spacing: -.035em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.c-email { font-size: clamp(1.1rem, 3.4vw, 3rem); }
.c-arrow {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  line-height: 1;
  transition: transform .4s var(--ease);
}
.contact-row:hover .c-arrow,
.contact-row:focus-visible .c-arrow { transform: translate(4px, -4px) rotate(8deg); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: .9rem;
}
.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 32px;
}
.foot a { transition: color .2s; }
.foot a:hover { color: var(--accent); }

/* ---------- modal ---------- */
.modal {
  width: min(1040px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
}
.modal[open] { animation: modal-in .35s var(--ease); }
.modal::backdrop {
  background: rgba(5, 5, 6, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.modal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-tag {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}
.modal-close {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: .75rem;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.modal-close:hover { border-color: var(--text); background: var(--surface-2); }
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 72dvh;
  margin-inline: auto;
  background: #000;
}
.stage[data-format="vertical"] { aspect-ratio: 9 / 16; width: min(100%, calc(72dvh * 9 / 16)); }
.stage[data-format="square"] { aspect-ratio: 1; width: min(100%, 72dvh); }
.stage iframe, .stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.stage-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: radial-gradient(60% 60% at 50% 40%, var(--surface-2), #000);
}
.stage-empty strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--text);
}
.modal-info { padding: 22px 24px 28px; }
.modal-info h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -.02em;
}
.modal-info p { margin-top: 8px; max-width: 64ch; color: var(--muted); }
.modal-info p:empty { display: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 150;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: .92rem;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity .3s, transform .4s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .service:nth-child(3) { border-left: 0; }
  .service:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .steps::before { display: none; }
}

@media (max-width: 820px) {
  .hide-sm { display: none; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line-soft);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s, transform .3s var(--ease), visibility .25s;
  }
  .nav-open .nav { visibility: visible; opacity: 1; transform: none; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line-soft); border-radius: 0; font-size: .9rem; }
  .about { grid-template-columns: 1fr; }
  .statement { max-width: 20ch; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .timeline { --label: 32px; }
  .clip { font-size: .6rem; padding: 0 6px; }
  .tl-lane { height: 38px; }
  .tl-audio .tl-lane { height: 44px; }
  .services { grid-template-columns: 1fr; }
  .service { border-left: 0; border-top: 1px solid var(--line); }
  .service:first-child { border-top: 0; }
  .service .num { margin-bottom: 16px; }
  .steps { grid-template-columns: 1fr; row-gap: 32px; }
  .contact-row { grid-template-columns: 1fr auto; }
  .c-label { grid-column: 1 / -1; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .rec { animation: none; }
}
