/* ============================================================
   ME AS FLAME — Broadcast Network
   Stage black + clean white + royal-blue signal. One voice:
   Archivo (variable, width axis) — display sits film-wide,
   copy sits quiet. Blue is a signal, not decoration.
   Everything rounds: 18px surfaces, pill chips.
   ============================================================ */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin.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: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin-ext.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: "Archivo";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-italic-latin.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;
}

:root {
  color-scheme: dark;
  --bg: #0a0d14;
  --bg-deep: #06080d;
  --surface: #121826;
  --ink: #f2f5fa;
  --muted: rgba(242, 245, 250, 0.64);
  --faint: rgba(242, 245, 250, 0.4);
  --line: rgba(242, 245, 250, 0.14);
  --line-strong: rgba(242, 245, 250, 0.32);
  --signal: #4169e1;
  --glow: #9db8ff;
  --radius: 18px;
  --pad-x: clamp(18px, 4.5vw, 64px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: "Archivo", -apple-system, "Noto Sans Thai", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--signal);
  color: #06080d;
}

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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: #232c40;
  border-radius: 999px;
  border: 2px solid var(--bg-deep);
}

::-webkit-scrollbar-thumb:hover {
  background: #3a4a6e;
}

body.modal-open {
  overflow: hidden;
}

body.is-loaded .page-loader {
  opacity: 0;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
}

svg path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

/* --- Loader: the ignition --- */

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg-deep);
  transition: opacity 520ms var(--ease-out), clip-path 620ms var(--ease-out);
}

.page-loader span {
  position: relative;
  font-size: clamp(26px, 5.5vw, 68px);
  font-weight: 850;
  font-stretch: 125%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.page-loader span::after {
  position: absolute;
  right: 0;
  bottom: -10px;
  left: 0;
  height: 3px;
  background: var(--signal);
  content: "";
  transform-origin: left;
  animation: load-line 900ms var(--ease-out) both;
}

/* --- Topbar --- */

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px var(--pad-x);
  border-bottom: 1px solid var(--line);
  background: rgba(4, 6, 10, 0.86);
  backdrop-filter: blur(14px);
  transform: translateY(-100%);
  animation: nav-drop 800ms 380ms var(--ease-out) forwards;
}

.brand,
.nav-links,
.hero-actions,
.tools,
.segments,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  width: clamp(150px, 16vw, 230px);
  height: 32px;
  overflow: hidden;
  align-items: center;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.nav-links {
  gap: clamp(18px, 3vw, 38px);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  transition: color 200ms ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  background: var(--signal);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms var(--ease-out);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* --- Hero: projection --- */

.hero {
  position: relative;
  min-height: 88svh;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--bg-deep);
}

.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
}

.hero-bg img.active {
  opacity: 1;
}

/* The reel itself: cinematic speed, warm grade from the palette. */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  filter: saturate(1.04) contrast(1.03);
  transition: opacity 1.4s ease, transform 12s var(--ease-out);
}

.hero-video.is-ready {
  opacity: 1;
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(4, 6, 10, 0.94) 0%, rgba(4, 6, 10, 0.68) 56%, rgba(4, 6, 10, 0.4) 100%),
    linear-gradient(0deg, var(--bg-deep) 0%, rgba(4, 6, 10, 0) 26%);
}

/* Stage vignette: the showreel lives inside a lit frame, not edge to edge */
.hero-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 30% 60%, transparent 55%, rgba(4, 6, 10, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  width: min(900px, 100%);
  min-height: 88svh;
  padding: 140px var(--pad-x) 138px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--paper);
  text-shadow: 0 18px 60px rgba(65, 105, 225, 0.25);
  font-size: clamp(52px, 8.2vw, 118px);
  font-weight: 850;
  font-stretch: 125%;
  letter-spacing: -0.015em;
  line-height: 0.92;
  text-transform: uppercase;
  transform: translateY(30px);
  opacity: 0;
  animation: rise-in 860ms 560ms var(--ease-out) forwards;
}

.hero-content > p {
  max-width: 60ch;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.9vw, 19px);
  line-height: 1.68;
  transform: translateY(24px);
  opacity: 0;
  animation: rise-in 820ms 700ms var(--ease-out) forwards;
}

.hero-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  color: var(--glow);
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateY(20px);
  opacity: 0;
  animation: rise-in 780ms 820ms var(--ease-out) forwards;
}

/* The running reel timecode — tabular digits so it never jitters. */
.hero-timecode {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(65, 105, 225, 0.5);
  animation: pulse 2.4s ease-out infinite;
}

/* --- Keyframes --- */

@keyframes load-line {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes nav-drop {
  to { transform: translateY(0); }
}

@keyframes rise-in {
  to { transform: translateY(0); opacity: 1; }
}

@keyframes ticker {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@keyframes pulse {
  60% { box-shadow: 0 0 0 9px rgba(65, 105, 225, 0); }
  100% { box-shadow: 0 0 0 9px rgba(65, 105, 225, 0); }
}

/* --- Ticker: marquee under the hero --- */

.hero-ticker {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(10px);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: clamp(28px, 5vw, 72px);
  padding: 13px 0;
  animation: ticker 30s linear infinite;
}

.ticker-track span::after {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: clamp(28px, 5vw, 72px);
  border-radius: 50%;
  background: var(--signal);
  content: "";
  vertical-align: middle;
}

.ticker-track span {
  color: var(--muted);
  font-size: clamp(13px, 1.6vw, 17px);
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- Hero CTA: the one blue pill --- */

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 13px 30px;
  border-radius: 999px;
  background: var(--signal);
  color: #fff;
  font-size: 14.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 12px 36px rgba(65, 105, 225, 0.35);
  transition: transform 220ms var(--ease-out), box-shadow 220ms ease, background 220ms ease;
}

.hero-cta:hover {
  background: #5578e8;
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(65, 105, 225, 0.45);
}

.hero-cta::after {
  width: 14px;
  height: 14px;
  content: "";
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M13 6l6 6-6 6"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M13 6l6 6-6 6"/></svg>') center / contain no-repeat;
}

/* --- Toolbar: the index row --- */

.about-section,
.toolbar,
.studio-band {
  display: flex;
  gap: 22px;
  align-items: end;
  justify-content: space-between;
  padding: 34px var(--pad-x) 24px;
}

.toolbar {
  position: sticky;
  z-index: 12;
  top: 68px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 6, 10, 0.9);
  backdrop-filter: blur(14px);
  padding-top: 14px;
  padding-bottom: 12px;
}

/* Agency slate heading: headline carries its own weight, pitch rides right */
.toolbar-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 16px;
}

.toolbar-head h2 {
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.toolbar-head p {
  color: var(--muted);
  font-size: 14px;
  margin-left: auto;
  max-width: 340px;
  text-align: right;
}

@media (max-width: 940px) {
  .toolbar-head { flex-wrap: wrap; gap: 8px 14px; }
  .toolbar-head p { margin-left: 0; text-align: left; }
}

.tools {
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 12px;
  justify-content: flex-start;
}

.toolbar .segments {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 34px;
  padding: 3px;
}

.search-box {
  display: flex;
  align-items: center;
  width: min(250px, 100%);
  min-height: 36px;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: rgba(242, 245, 250, 0.04);
  color: var(--faint);
  transition: border-color 200ms ease;
}

.search-box:focus-within {
  border-color: var(--line-strong);
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-box input::placeholder {
  color: var(--faint);
}

.select-filter {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(242, 245, 250, 0.04);
  color: var(--faint);
  font-size: 13.5px;
  font-weight: 600;
}

.select-filter select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  max-width: 170px;
  cursor: pointer;
}

.select-filter select option {
  background: var(--surface);
  color: var(--ink);
}

.segments {
  min-height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  scrollbar-width: none;
}

.segments::-webkit-scrollbar {
  display: none;
}

.segments button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 17px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.segments button:hover {
  color: var(--ink);
}

.segments button.active {
  background: var(--signal);
  color: #06080d;
}

/* --- Video grid: mixed-size boards, not equal tiles ------------------------ */

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 40px 22px;
  padding: 36px var(--pad-x) 88px;
}

/* The billboard: a featured card every 5th position spans 2 columns.
   --fg is the deck it lands on (4 slots per 2 rows), read live off the
   rendered children, so inserts (group tiles) don't desync the rhythm. */
.video-card {
  --fg: 0;
  min-width: 0;
  transform: translateY(34px);
  opacity: 0;
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
}

.video-grid > .video-card {
  counter-increment: fgcounter;
}

.video-card.is-featured {
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  grid-row: span 2;
}

.video-card.is-featured .poster {
  aspect-ratio: auto;
  height: auto;
  flex: 1;
  min-height: 0;
}

.video-card.is-featured .poster img,
.video-card.is-featured .poster video {
  height: 100%;
}

.video-card.is-featured .card-copy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 18px;
  align-items: baseline;
  padding-top: 16px;
}

.video-card.is-featured .card-copy p {
  margin: 0;
  font-size: 12px;
}

.video-card.is-featured .card-copy h3 {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 750;
  font-stretch: 118%;
}

.video-card.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.video-card.hidden {
  display: none;
}

.poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a0d14;
  color: var(--ink);
  cursor: pointer;
  transform: translate3d(0, 0, 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: border-color 240ms ease, transform 240ms var(--ease-out);
}

.poster img,
.poster video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out), opacity 300ms ease, filter 300ms ease;
  filter: saturate(0.92);
}

.poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(4, 6, 10, 0) 55%, rgba(4, 6, 10, 0.55));
  transition: opacity 240ms ease;
}

/* The scanner: a light sweep across the print on hover, from the palette. */
.poster::before {
  position: absolute;
  inset: -1px;
  z-index: 1;
  content: "";
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(157, 184, 255, 0.18) 46%,
    rgba(65, 105, 225, 0.1) 52%,
    transparent 68%
  );
  transform: translateX(-110%);
  pointer-events: none;
}

.poster:hover::before {
  transform: translateX(110%);
  transition: transform 900ms var(--ease-out);
}

.poster:hover {
  border-color: var(--line-strong);
}

.poster:hover img,
.poster:hover video {
  transform: scale(1.04);
  filter: saturate(1.05);
}

.duration {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  background: rgba(4, 6, 10, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.play-icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(242, 245, 250, 0.5);
  border-radius: 50%;
  background: rgba(4, 6, 10, 0.55);
  color: var(--ink);
  backdrop-filter: blur(6px);
  transform: translate(-50%, -50%);
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease, transform 220ms var(--ease-out);
}

.play-icon svg {
  width: 20px;
  height: 20px;
}

.play-icon svg path {
  fill: currentColor;
  stroke: none;
}

.poster:hover .play-icon {
  background: var(--signal);
  border-color: var(--signal);
  color: #06080d;
  transform: translate(-50%, -50%) scale(1.06);
}

/* --- Card copy --- */

.card-copy {
  padding-top: 13px;
}

.video-card:hover .card-copy {
  transform: translateY(2px);
}

.video-card:hover .poster {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 8px 28px rgba(65, 105, 225, 0.18);
}

/* Live preview: the cover video starts playing under the cursor —
   the card is a screen, not a poster. */
/* Live preview rides on top of the poster image — never in flow,
   or the featured card's height jumps and shoves the whole grid. */
.poster video[data-preview] {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.video-card:hover .poster video {
  filter: saturate(1.05);
}

.video-card:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
}

.card-copy p,
.modal-copy p {
  margin: 0 0 5px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.card-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
  transition: color 200ms ease;
}

.video-card:hover .card-copy h3 {
  color: #fff;
}

/* Title nudges aside on hover to reveal a detail line, like a slate. */

/* Generate AI: posters only, no text under the video. */
.video-card[data-category="vdo-ai"][data-vdoai="gen"] .card-copy,
.video-card[data-category="vdo-ai"][data-vdoai="gen"].is-featured .card-copy {
  display: none;
}

/* --- Studio band --- */

.studio-band {
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  padding-top: 64px;
  padding-bottom: 64px;
  position: relative;
}

/* Blue rule along the band's top edge — the agency signature stripe */
.studio-band::before {
  position: absolute;
  top: 0;
  left: var(--pad-x);
  width: 64px;
  height: 3px;
  content: "";
  background: var(--signal);
}

.studio-band > div {
  max-width: 700px;
}

.studio-band h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 3.6vw, 46px);
  font-weight: 750;
  font-stretch: 118%;
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.studio-band dl {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.studio-band dl > div {
  padding: 4px 22px;
  border-left: 1px solid var(--line);
}

.studio-band dt {
  color: var(--ink);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: color 240ms ease;
}

.studio-band dl > div {
  border-left: 1px solid var(--line);
  padding: 4px 22px;
}

.studio-band dl > div:hover dt {
  color: var(--glow);
}

.studio-band dl > div:hover {
  box-shadow: inset 3px 0 0 var(--signal);
}

.studio-band dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

/* --- Footer --- */

.footer {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 28px;
  padding: 30px var(--pad-x) 42px;
  border-top: 2px solid var(--signal);
  background: var(--bg-deep);
  color: var(--muted);
}

.footer p {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  font-stretch: 121%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  font-variant-numeric: tabular-nums;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}

.footer a:hover {
  color: var(--glow);
  text-decoration-color: var(--glow);
}

/* --- Modal: screening room --- */

.icon-button,
.primary-action,
.secondary-action {
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 6, 10, 0.7);
  color: var(--ink);
  backdrop-filter: blur(6px);
  transition: border-color 200ms ease, color 200ms ease;
}

.icon-button:hover {
  border-color: var(--signal);
  color: var(--glow);
}

.modal {
  width: min(1060px, calc(100vw - 32px));
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.modal::backdrop {
  background: rgba(3, 5, 9, 0.82);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(65, 105, 225, 0.16),
    0 24px 90px rgba(65, 105, 225, 0.14);
  animation: modal-in 320ms var(--ease-out);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.close-modal {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
}

.share-modal {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 60px;
}

.modal video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.modal video::-webkit-media-controls-download-button {
  display: none;
}

.modal-copy {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line);
}

.modal-copy p {
  margin: 0;
}

.modal-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 750;
  font-stretch: 115%;
}

/* --- Share toast --- */

.share-toast {
  position: fixed;
  z-index: 99;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s var(--ease-out);
  padding: 11px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Reveal (driven by IntersectionObserver) --- */

.reveal {
  transform: translateY(34px);
  transition:
    opacity 720ms var(--ease-out),
    transform 720ms var(--ease-out);
  opacity: 0;
}

.reveal.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* --- VDO-AI & organization vault tiles --- */

.vdoai-tile {
  grid-column: 1 / -1;
}

.group-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  width: 100%;
  margin: 0;
  padding: 24px clamp(20px, 3.4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(100deg, rgba(65, 105, 225, 0.08) 0%, rgba(65, 105, 225, 0) 40%),
    var(--surface);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 240ms ease,
    background 240ms ease,
    transform 240ms var(--ease-out);
}

.group-tile:hover,
.group-tile.is-open {
  transform: translateY(-2px);
  border-color: var(--signal);
  background:
    linear-gradient(100deg, rgba(65, 105, 225, 0.14) 0%, rgba(65, 105, 225, 0) 42%),
    var(--surface);
}

.group-tile:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.group-tile-media {
  position: relative;
  order: 2;
  margin-left: auto;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 18px;
}

.group-tile-count {
  display: flex;
  align-items: baseline;
  gap: 9px;
  line-height: 1;
}

.group-tile-count-num {
  color: var(--ink);
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 800;
  font-stretch: 125%;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

.group-tile-count-unit {
  color: var(--glow);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.group-tile-play {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  transition:
    transform 240ms var(--ease-out),
    background 240ms ease,
    color 240ms ease,
    border-color 240ms ease;
}

.group-tile-play svg {
  width: 20px;
  height: 20px;
}

.group-tile-play svg path {
  fill: currentColor;
  stroke: none;
}

.group-tile:hover .group-tile-play,
.group-tile.is-open .group-tile-play {
  border-color: var(--signal);
  background: var(--signal);
  color: #06080d;
  transform: scale(1.06);
}

.group-tile-body {
  position: relative;
  order: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.group-tile-kicker {
  display: block;
  color: var(--ink);
  font-size: clamp(19px, 2.2vw, 26px);
  font-weight: 750;
  font-stretch: 118%;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-transform: uppercase;
}

.group-tile.is-open .group-tile-kicker {
  color: var(--glow);
}

.group-tile-note {
  color: var(--muted);
  font-size: 13.5px;
}

.group-tile-enter {
  margin-top: 12px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--glow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.group-tile-enter svg {
  width: 15px;
  height: 15px;
  transition: transform 240ms var(--ease-out);
}

.group-tile:hover .group-tile-enter svg {
  transform: translateX(4px);
}

.group-tile.is-open .group-tile-enter {
  color: var(--muted);
}

.group-tile.is-open .group-tile-enter svg {
  transform: rotate(90deg);
}

.group-tile-enter-open {
  display: none;
}

.group-tile.is-open .group-tile-enter-closed {
  display: none;
}

.group-tile.is-open .group-tile-enter-open {
  display: inline;
}

.group-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
}

.group-back svg {
  width: 15px;
  height: 15px;
  color: var(--glow);
}

.group-back:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.group-back:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* --- Sub-pages: About --- */

.page-head {
  position: relative;
  min-height: 46svh;
  display: grid;
  align-content: end;
  overflow: hidden;
  isolation: isolate;
  padding: 130px var(--pad-x) 48px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(90% 140% at 88% -10%, rgba(65, 105, 225, 0.12) 0%, rgba(65, 105, 225, 0) 55%),
    var(--bg);
}

.page-head h1 {
  max-width: 820px;
  font-size: clamp(40px, 6.4vw, 92px);
}

.page-head > p {
  max-width: 60ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.8vw, 18px);
}

.about-section {
  align-items: stretch;
  gap: clamp(28px, 6vw, 88px);
  padding-top: 80px;
  padding-bottom: 72px;
}

.about-copy {
  max-width: 520px;
}

.about-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4.4vw, 56px);
  font-weight: 800;
  font-stretch: 121%;
  letter-spacing: -0.015em;
  line-height: 0.98;
  text-transform: uppercase;
}

.about-copy p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.9vw, 18px);
  line-height: 1.7;
}

.about-details {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  min-width: min(100%, 560px);
}

.about-details article {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.about-details h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 750;
  font-stretch: 115%;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.about-details p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

.about-details a {
  color: var(--glow);
  text-decoration: underline;
  text-decoration-color: rgba(157, 184, 255, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 200ms ease, color 200ms ease;
}

.about-details a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.contact-section {
  display: flex;
  gap: clamp(24px, 5vw, 72px);
  align-items: stretch;
  justify-content: space-between;
  padding: 78px var(--pad-x) 96px;
  border-top: 1px solid var(--line);
}

/* --- Responsive --- */

@media (max-width: 940px) {
  .about-section,
  .studio-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar {
    position: static;
  }

  .tools {
    flex: 1 1 100%;
    width: 100%;
    flex-wrap: wrap;
  }

  .toolbar .segments {
    flex: 1 1 100%;
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 16px;
  }

  .video-grid > .video-card.is-featured {
    grid-column: span 2;
    grid-row: auto;
  }

  .video-card.is-featured .poster {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .about-details {
    width: 100%;
  }

  .studio-band dl {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact-section {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 60px;
    padding-inline: 16px;
  }

  .nav-links {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 62svh;
  }

  .hero-content {
    padding: 100px 16px 84px;
  }

  h1 {
    font-size: clamp(40px, 12.5vw, 64px);
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-block: 28px 64px;
  }

  .about-section {
    padding-top: 54px;
  }

  .about-details {
    grid-template-columns: 1fr;
  }

  .studio-band dl {
    grid-template-columns: 1fr;
  }

  .studio-band dl > div {
    padding: 14px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .studio-band dl > div:first-child {
    border-top: 0;
    padding-top: 4px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .group-tile {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .group-tile-media {
    order: 1;
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  .group-tile-body {
    order: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .ticker-track {
    animation: none;
  }
}
