/* ==========================================================================
   Pedro AdeA — v1
   Tokens
   ========================================================================== */
:root {
  --white: #ffffff;
  --paper: #f5f5f7;
  --line: #e6e6eb;
  --line-strong: #d2d2d7;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --ink-3: #6e6e73;
  --ghost: #c7c7cc;
  --ghost-text: #8e8e93;

  --blue: #0859d4;
  --blue-deep: #0647a9;
  --blue-ink: #ffffff;
  --blue-soft: #d7e5fb;

  --black: #000000;
  --night: #161617;
  --night-2: #232325;
  --night-line: #333336;
  --night-text: #f5f5f7;
  --night-muted: #a1a1a6;

  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --radius: 14px;
  --radius-lg: 28px;
  --cell: 60px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  scrollbar-color: var(--line-strong) var(--white);
}

body {
  margin: 0;
  overflow-x: clip; /* only the work rail scrolls sideways */
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  caret-color: var(--blue);
}

::selection { background: var(--blue); color: var(--blue-ink); }

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

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

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.caps { letter-spacing: -0.02em; }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip:focus { transform: none; }

/* ==========================================================================
   Pills and buttons
   ========================================================================== */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
}
.pill:active { transform: scale(0.97); }
.pill--lg { min-height: 52px; padding: 0 26px; font-size: 17px; }

.pill--ink { background: var(--ink); color: var(--white); }
.pill--ink:hover { background: #000; }

.pill--blue { background: var(--blue); color: var(--blue-ink); }
.pill--blue:hover { background: var(--blue-deep); }

.pill--line { border-color: var(--line-strong); color: var(--ink); background: var(--white); }
.pill--line:hover { border-color: var(--ink); }

.pill--white { background: var(--white); color: var(--blue); }
.pill--white:hover { background: var(--blue-soft); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s, color 0.2s;
}
.icon-btn:hover { border-color: var(--ink); }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.header.is-scrolled {
  background: var(--white);
  border-bottom-color: var(--line);
}
.header__inner {
  height: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.header__logo {
  justify-self: start;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.03em;
}
.header__nav { display: flex; gap: 32px; }
.header__nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s;
}
.header__nav a:hover { color: var(--ink); }
.header__actions { justify-self: end; display: flex; gap: 8px; align-items: center; }
.header__actions .pill { min-height: 44px; }

/* ==========================================================================
   Canvas (cell grid ground)
   ========================================================================== */
.canvas {
  position: relative;
  isolation: isolate;
}
.canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  background-position: center center;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 30%, transparent 85%);
  pointer-events: none;
}
.canvas__lit {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.canvas__lit span {
  position: absolute;
  width: var(--cell);
  height: var(--cell);
  background: var(--blue-soft);
  opacity: 0;
  animation: cell 1.6s var(--ease-out) forwards;
}
@keyframes cell {
  0% { opacity: 0; }
  15% { opacity: 0.9; }
  100% { opacity: 0; }
}

/* ==========================================================================
   Selection frame (signature)
   ========================================================================== */
.select { position: relative; display: inline-block; }
.select__frame {
  position: absolute;
  inset: -0.08em -0.18em -0.1em;
  border: 1.5px solid var(--blue);
  pointer-events: none;
}
.h {
  position: absolute;
  width: 11px; height: 11px;
  background: var(--white);
  border: 1.5px solid var(--blue);
}
.h--tl { top: -6px; left: -6px; }
.h--tc { top: -6px; left: calc(50% - 5.5px); }
.h--tr { top: -6px; right: -6px; }
.h--bl { bottom: -6px; left: -6px; }
.h--bc { bottom: -6px; left: calc(50% - 5.5px); }
.h--br { bottom: -6px; right: -6px; }

.select__tab {
  position: absolute;
  left: -0.18em;
  bottom: calc(100% + 0.08em + 8px);
  padding: 4px 8px;
  background: var(--blue);
  color: var(--blue-ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 48px) var(--gutter) 120px;
  overflow: hidden;
}
.hero__stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero__stage .select { font-size: clamp(3.25rem, 9.6vw, 9.5rem); }
.hero__title {
  font-size: 1em;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.045em;
  white-space: nowrap;
}
.hero__sub {
  max-width: 40ch;
  margin-top: clamp(48px, 5vw, 64px);
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: balance;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* Reserved hero image: 9:16 monitor, floats upper right */
.hero__monitor {
  position: absolute;
  z-index: 1;
  top: calc(var(--header-h) + 5vh);
  right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  width: clamp(150px, 13vw, 210px);
  margin: 0;
}
.hero__media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 55%, rgba(8,89,212,0.10) 100%),
    var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px rgba(29, 29, 31, 0.25);
}
.hero__tc {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 11px;
}
.rec {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

/* Timeline fragment, lower left */
.hero__strip {
  position: absolute;
  z-index: 1;
  left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  bottom: 14vh;
  width: clamp(220px, 21vw, 300px);
  padding: 12px 12px 14px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -24px rgba(29, 29, 31, 0.3);
}
.strip__ruler {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.strip__track {
  display: flex;
  gap: 2px;
  height: 22px;
}
.strip__track i {
  flex: 0 0 var(--w);
  border-radius: 4px;
  background: var(--line-strong);
}
.strip__track i:nth-child(even) { background: var(--ghost); }
.strip__track i.is-sel { background: var(--blue); }
.strip__track--audio { height: 14px; margin-top: 4px; }
.strip__track--audio i {
  background:
    repeating-linear-gradient(90deg, var(--ghost) 0 2px, transparent 2px 4px),
    var(--paper);
}
.strip__head {
  position: absolute;
  top: 36px; bottom: 8px;
  left: 38%;
  width: 2px;
  background: var(--ink);
}
.strip__head::before {
  content: "";
  position: absolute;
  top: -5px; left: -4px;
  width: 10px; height: 8px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
}
.hero__scroll::after {
  content: "";
  width: 1px;
  height: 28px;
  background: linear-gradient(var(--ink-3), transparent);
}

/* ==========================================================================
   Hero floats: tool tiles and multiplayer cursors
   ========================================================================== */
.floats, .cursors {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.tile {
  position: absolute;
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 14px 22px rgba(29, 29, 31, 0.14));
}
.tile--logo { object-fit: contain; }
.tile--scene {
  --s: clamp(92px, 8.4vw, 128px);
  width: var(--s);
  height: var(--s);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--white);
  object-fit: cover;
  filter: none;
  box-shadow: 0 18px 28px -12px rgba(29, 29, 31, 0.22);
}
.tile--cut       { left: 7%;  top: 16%; }
.tile--captions  { left: 11%; top: 41%; }
.tile--capcut    { left: 22%; top: 64%; }
.tile--waveform  { left: 30%; top: 80%; }
.tile--premiere  { right: 25%; top: 12%; }
.tile--ai        { right: 8%;  top: 64%; }
.tile--color     { right: 22%; top: 70%; }
.tile--keyframes { right: 36%; top: 80%; }

.cursor {
  position: absolute;
  left: 0; top: 0;
  display: flex;
  align-items: flex-start;
  gap: 2px;
  --c: var(--ink);
  transform: translate3d(var(--x, -200px), var(--y, -200px), 0);
  transition: transform var(--t, 1.6s) cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.cursor svg {
  flex: none;
  fill: var(--c);
  stroke: var(--white);
  stroke-width: 1.5;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(29, 29, 31, 0.25));
  transition: transform 0.15s;
}
.cursor span {
  margin-top: 16px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--c);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.cursor.is-click svg { transform: scale(0.82); }
.cursor--pedro   { --c: var(--blue); }
.cursor--client  { --c: var(--ink); }
.cursor--traffic { --c: var(--ink-2); }
.cursor--creator { --c: var(--ink); }
.cursor--agency  { --c: var(--ink-3); }

/* Motion toggle (WCAG 2.2.2: pause moving content) */
.motion-toggle {
  position: absolute;
  z-index: 4;
  right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.motion-toggle:hover { border-color: var(--ink); color: var(--ink); }
.motion-off .tile,
.motion-off .canvas__lit span { animation-play-state: paused; }

/* ==========================================================================
   Rail bar: ruler over the clips
   ========================================================================== */
.railbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
}
.railbar__pos {
  display: none;
  margin-left: auto;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.scrub { display: none; }

/* ==========================================================================
   Work
   ========================================================================== */
.work { padding: clamp(96px, 12vw, 160px) 0 clamp(96px, 10vw, 140px); }

.statement {
  max-width: 1000px;
  margin: 0 auto clamp(64px, 8vw, 104px);
  text-align: center;
}
.statement__title {
  font-size: clamp(3rem, 8.4vw, 7.5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.statement__sub {
  max-width: 30ch;
  margin: 32px auto 0;
  font-size: clamp(20px, 2.1vw, 28px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
/* scroll fill: JS splits words; ghost until reached */
.is-fill .w { color: var(--ghost-text); transition: color 0.35s var(--ease-out); }
.is-fill .w.on { color: var(--ink); }

/* Rail of clips */
.rail-wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(40px, 4vw, 56px) clamp(16px, 2vw, 28px);
}

.clip__link {
  position: relative; /* contains the sr-only label so it can't escape the scrolling rail */
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius);
}
.clip__link:focus-visible { outline-offset: 8px; }

.clip__frame {
  position: relative;
  margin-bottom: 20px;
}
.clip__thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  outline: 1px solid rgba(29, 29, 31, 0.08);
  outline-offset: -1px;
  object-fit: cover;
  border-radius: var(--radius);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 33.333% 25%;
  background-position: -1px -1px;
  transition: transform 0.6s var(--ease-out);
}
.clip__play {
  position: absolute;
  left: 14px; bottom: 14px;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 6px 16px -8px rgba(29, 29, 31, 0.4);
  transition: background-color 0.25s, color 0.25s;
}
.clip__out {
  position: absolute;
  top: 12px; right: 12px;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.clip__frame .select__frame {
  inset: -6px;
  border-radius: calc(var(--radius) + 4px);
  opacity: 0;
  transition: opacity 0.25s, inset 0.4s var(--ease-out);
}
.clip__frame .h { opacity: 0; transition: opacity 0.25s 0.05s; }

.clip__link:hover .select__frame,
.clip__link:focus-visible .select__frame { opacity: 1; inset: -8px; }
.clip__link:hover .h,
.clip__link:focus-visible .h { opacity: 1; }
.clip__link:hover .clip__play,
.clip__link:focus-visible .clip__play { background: var(--blue); color: var(--blue-ink); }
.clip__link:hover .clip__out,
.clip__link:focus-visible .clip__out { opacity: 1; transform: none; }
.clip__link:focus-visible { outline: none; }

.clip__tag { color: var(--ink-3); margin-bottom: 10px; }
.clip__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
  text-wrap: balance;
}
.clip__desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ==========================================================================
   About (dark block)
   ========================================================================== */
.about {
  background: var(--black);
  color: var(--night-text);
  padding: clamp(24px, 4vw, 64px) 0;
}
.about__card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  padding: clamp(32px, 6vw, 88px);
  border-radius: var(--radius-lg);
  background: var(--night);
}
.about__title {
  margin-top: 0;
  font-size: clamp(2.5rem, 5.4vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.about__lead {
  margin-top: 36px;
  max-width: 34ch;
  font-size: clamp(19px, 1.7vw, 23px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.about__body {
  margin-top: 20px;
  max-width: 44ch;
  color: var(--night-muted);
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}
.tools li {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--night-line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--night-text);
}

/* Timeline illustration */
.timeline {
  position: relative;
  border-radius: var(--radius);
  background: var(--night-2);
  border: 1px solid var(--night-line);
  padding: 16px 18px 22px;
  overflow: hidden;
}
.timeline__bar {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--night-muted);
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--night-line);
}
.timeline__bar [data-tc] { color: var(--night-text); font-variant-numeric: tabular-nums; }
.timeline__ruler {
  display: flex;
  justify-content: space-between;
  margin-left: 92px;
  font-size: 10px;
  color: var(--night-muted);
  margin-bottom: 10px;
}
.timeline__tracks { display: grid; gap: 10px; }
.track {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
}
.track__label {
  font-size: 10px;
  color: var(--night-muted);
  white-space: nowrap;
}
.track__lane {
  display: flex;
  gap: 2px;
  height: 40px;
}
.track__lane i {
  flex: 0 1 var(--w);
  min-width: 0;
  border-radius: 4px;
  background: #5c5c61;
  transition: background-color 0.15s;
}
.track__lane i:nth-child(even) { background: #48484c; }
.track__lane i.is-on { background: var(--blue); }

.timeline__head {
  --x: 0;
  position: absolute;
  top: 92px; bottom: 14px;
  left: calc(18px + 92px + (100% - 36px - 92px) * var(--x));
  width: 2px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}
.timeline__head::before {
  content: "";
  position: absolute;
  top: -8px; left: -5px;
  width: 12px; height: 10px;
  background: var(--white);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { padding: clamp(96px, 12vw, 168px) 0; }
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(48px, 6vw, 96px);
  align-items: end;
}
.contact__title {
  margin-top: 0;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.contact__lead {
  margin-top: 28px;
  max-width: 36ch;
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--ink-2);
}

.channels { display: grid; gap: 12px; }
.channel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label action" "value action";
  align-items: center;
  column-gap: 16px;
  row-gap: 6px;
  padding: 20px 20px 20px 24px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}
.channel__label { grid-area: label; color: var(--ink-3); }
.channel__value {
  grid-area: value;
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.num { font-variant-numeric: tabular-nums; }
a.channel__value:hover { color: var(--blue); }
.channel > .copy { grid-area: action; }

.channel--primary {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "label" "value" "actions";
  padding: clamp(24px, 3vw, 36px);
  background: var(--blue);
  border-color: var(--blue);
  color: var(--blue-ink);
}
.channel--primary .channel__label { color: rgba(255, 255, 255, 0.88); }
.channel--primary .channel__value {
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.channel--primary a.channel__value:hover { color: var(--blue-soft); }
.channel__actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.channel--primary :focus-visible { outline-color: var(--white); }
.channels { padding-top: 34px; }
.channel--primary .select__frame { inset: -8px; }
.channel--primary .select__tab {
  left: -8px;
  bottom: calc(100% + 8px + 6px);
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.copy:hover { border-color: var(--ink); }
.copy.is-done { border-color: var(--blue); color: var(--blue); }
.copy--onblue {
  min-height: 52px;
  padding: 0 22px;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}
.copy--onblue:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
.copy--onblue.is-done { border-color: var(--white); color: var(--white); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { border-top: 1px solid var(--line); }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px;
  color: var(--ink-3);
}
.footer nav { display: flex; gap: 24px; }
.footer a:hover { color: var(--ink); }

/* ==========================================================================
   Motion: hero selection draw-in
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js .hero .select__frame {
    animation: frame-in 1s 0.15s var(--ease-out) both;
  }
  .js .hero .h { animation: handle-in 0.5s var(--ease-out) both; }
  .js .hero .h--tl { animation-delay: 0.55s; }
  .js .hero .h--tc { animation-delay: 0.6s; }
  .js .hero .h--tr { animation-delay: 0.65s; }
  .js .hero .h--br { animation-delay: 0.7s; }
  .js .hero .h--bc { animation-delay: 0.75s; }
  .js .hero .h--bl { animation-delay: 0.8s; }
  .js .hero .select__tab { animation: tab-in 0.6s 0.85s var(--ease-out) both; }
  .js .hero__monitor { animation: float-in 1.1s 0.35s var(--ease-out) both; }
  .js .hero__strip { animation: float-in 1.1s 0.5s var(--ease-out) both; }
  .js .tile { animation: float-in 1s var(--ease-out) both, bob 7s ease-in-out infinite alternate; }
  .js .tile--cut       { animation-delay: 0.6s, 1.6s; }
  .js .tile--captions  { animation-delay: 0.9s, 0.4s; }
  .js .tile--waveform  { animation-delay: 1.2s, 2.4s; }
  .js .tile--capcut    { animation-delay: 1.4s, 1.1s; }
  .js .tile--premiere  { animation-delay: 0.8s, 3s; }
  .js .tile--ai        { animation-delay: 1.1s, 0.8s; }
  .js .tile--color     { animation-delay: 1.5s, 2s; }
  .js .tile--keyframes { animation-delay: 1.7s, 1.3s; }
}
@keyframes frame-in {
  from { clip-path: inset(0 100% 100% 0); }
  to { clip-path: inset(-20px -20px -20px -20px); }
}
@keyframes handle-in {
  from { transform: scale(0); }
  to { transform: scale(1); }
}
@keyframes bob {
  from { translate: 0 0; rotate: -2deg; }
  to { translate: 0 -10px; rotate: 2deg; }
}
@keyframes tab-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes float-in {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion-toggle { display: none !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin-inline: auto; }
  .about__card { grid-template-columns: 1fr; }
  .timeline { max-width: 640px; }
}

@media (max-width: 960px) {
  :root { --header-h: 108px; }
  .header { height: auto; }
  .header__inner {
    grid-template-columns: 1fr auto;
    row-gap: 4px;
    padding-block: 12px 4px;
  }
  .header__logo { grid-row: 1; grid-column: 1; }
  .header__actions { grid-row: 1; grid-column: 2; }
  .header__nav { grid-row: 2; grid-column: 1 / -1; gap: 4px; margin-inline: -10px; }
  .header__nav a { padding: 12px 10px; font-size: 14px; }

  /* Mobile hero: the monitor sits in the middle column, tool tiles float on both sides of it */
  .hero {
    display: grid;
    grid-template-columns: 1fr min(48vw, 260px) 1fr;
    grid-template-rows: auto repeat(3, auto) auto;
    column-gap: 10px;
    align-items: center;
    min-height: 0;
    padding-top: calc(var(--header-h) + 72px);
    padding-bottom: 64px;
  }
  .hero__stage { grid-column: 1 / -1; grid-row: 1; margin-bottom: 48px; }
  .hero__stage .select { font-size: clamp(3rem, 15vw, 7rem); }
  .hero__monitor {
    position: relative;
    top: auto; right: auto;
    grid-column: 2;
    grid-row: 2 / span 3;
    width: 100%;
    margin: 0;
  }
  .hero__tc { justify-content: center; }
  .hero__strip, .hero__scroll { display: none; }
  .motion-toggle { grid-column: 1 / -1; grid-row: 5; position: relative; right: auto; bottom: auto; display: flex; justify-self: center; margin-top: 24px; }

  .floats { display: contents; }
  .tile {
    position: relative;
    left: auto; right: auto; top: auto;
    z-index: 3;
  }
  .tile--scene { --s: clamp(68px, 20vw, 104px); border-radius: 14px; }
  .tile--logo { width: clamp(48px, 13vw, 64px); height: clamp(48px, 13vw, 64px); }
  /* left column, overlapping the monitor edge a little */
  .tile--cut      { grid-column: 1; grid-row: 2; justify-self: end; margin-right: -18px; top: -14px; }
  .tile--captions { grid-column: 1; grid-row: 3; justify-self: end; margin-right: -6px; }
  .tile--capcut   { grid-column: 1; grid-row: 4; justify-self: end; margin-right: -14px; top: 10px; }
  /* right column */
  .tile--premiere { grid-column: 3; grid-row: 2; justify-self: start; margin-left: -12px; top: -20px; }
  .tile--ai       { grid-column: 3; grid-row: 3; justify-self: start; margin-left: -18px; }
  .tile--waveform { grid-column: 3; grid-row: 4; justify-self: start; margin-left: -8px; top: 14px; }
  .tile--color, .tile--keyframes { display: none; }

  .cursor--traffic, .cursor--agency { display: none; }
  .cursor span { font-size: 11px; padding: 2px 7px; }

  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .hero { padding-top: calc(var(--header-h) + 64px); }
  .hero__sub { margin-top: 40px; }
  .hero__ctas { flex-direction: column; align-items: stretch; width: 100%; max-width: 360px; }
  .hero__ctas .pill { width: 100%; }

  .statement { text-align: left; }
  .statement__sub { margin-left: 0; }

  /* Clips become a swipeable rail */
  .rail-wrap { padding-inline: 0; }
  .rail {
    display: flex;
    gap: 16px;
    max-width: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    padding: 12px var(--gutter) 16px;
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .clip { flex: 0 0 72vw; max-width: 300px; scroll-snap-align: start; }
  .railbar { margin: 0 var(--gutter) 12px; }
  .railbar__pos { display: inline; }
  .scrub {
    display: block;
    position: relative;
    height: 2px;
    margin: 8px var(--gutter) 0;
    background: var(--line);
  }
  .scrub span {
    position: absolute;
    top: -1px; left: 0;
    width: 12.5%;
    height: 4px;
    background: var(--blue);
    transform: translateX(calc(var(--p, 0) * 700%));
  }

  .about { padding: 0; background: var(--night); }
  .about .wrap { padding-inline: 0; }
  .about__card { border-radius: 0; padding: 72px var(--gutter); }
  .track { grid-template-columns: 64px 1fr; gap: 8px; }
  .timeline__ruler { margin-left: 72px; }
  .timeline__head { left: calc(18px + 72px + (100% - 36px - 72px) * var(--x)); }
  .track__lane { height: 32px; }

  .channel:not(.channel--primary) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "value" "action"; }
  .channel > .copy { justify-self: start; margin-top: 10px; }
  .channel__actions .pill, .channel__actions .copy { flex: 1 1 auto; }

  .footer__inner { flex-direction: column; }
}

@media (max-width: 380px) {
  .header__logo { font-size: 16px; }
  .header__actions .pill { padding: 0 14px; font-size: 14px; }
}
