/* ============================================================
   APEX CLIPS — cinematic adventure-media design system
   ============================================================ */

:root {
  /* Accent — overridden by Tweaks. Default electric blue. */
  --accent: #1d6cff;
  --accent-ink: #ffffff;        /* text colour that sits on the accent */
  --accent-soft: color-mix(in oklch, var(--accent) 16%, transparent);
  --accent-glow: color-mix(in oklch, var(--accent) 50%, transparent);

  /* Ink / surfaces — warm-neutral near-blacks */
  --bg:        #08080a;
  --bg-2:      #0d0e11;
  --panel:     #121317;
  --panel-2:   #16181d;
  --line:      color-mix(in oklch, #ffffff 9%, transparent);
  --line-soft: color-mix(in oklch, #ffffff 5%, transparent);

  --ink:       #f7f8fa;
  --ink-2:     #b9bcc6;
  --ink-3:     #7c8090;
  --ink-4:     #565a68;

  /* Rights status palette */
  --ok:   #35d07f;   /* cleared */
  --warn: #ffb23e;   /* editorial only / pending */
  --excl: #b06bff;   /* exclusive */
  --ko:   #ff5a6a;

  --display: "Saira Condensed", "Arial Narrow", sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1280px;
  --radius: 14px;
  --radius-sm: 9px;

  --motion: 1; /* scales animation durations; lowered by reduced-motion tweak */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
input, select, textarea { font-family: inherit; }

/* ---------- Type ---------- */
.display {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.01em;
  margin: 0;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
}
.mono { font-family: var(--mono); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; position: relative; }
.section--tight { padding: 64px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 9px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 13px 22px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: transform .18s ease, background .2s ease, border-color .2s ease, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--accent {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 30px -10px var(--accent-glow);
}
.btn--accent:hover { box-shadow: 0 12px 36px -8px var(--accent-glow); }
.btn--ghost {
  background: color-mix(in oklch, #fff 6%, transparent);
  color: var(--ink);
  border-color: var(--line);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: color-mix(in oklch, #fff 11%, transparent); border-color: color-mix(in oklch,#fff 22%,transparent); }
.btn--line {
  background: transparent; color: var(--ink); border-color: var(--line);
}
.btn--line:hover { border-color: var(--accent); color: var(--ink); }
.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn--sm { padding: 9px 15px; font-size: 13px; }
.btn--block { width: 100%; }

/* ---------- Badges / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px; border-radius: 100px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: color-mix(in oklch, #fff 3%, transparent);
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--ok   { color: var(--ok);   border-color: color-mix(in oklch,var(--ok) 40%,transparent); }
.pill--warn { color: var(--warn); border-color: color-mix(in oklch,var(--warn) 40%,transparent); }
.pill--excl { color: var(--excl); border-color: color-mix(in oklch,var(--excl) 40%,transparent); }
.pill--accent { color: var(--accent); border-color: color-mix(in oklch,var(--accent) 45%,transparent); background: var(--accent-soft); }
.pill--solid { background: rgba(0,0,0,.6); color: var(--ink); border-color: transparent; backdrop-filter: blur(6px); }

/* ---------- Thumbnail (procedural cinematic clip) ---------- */
.thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #000;
  isolation: isolate;
}
.thumb__media {
  position: absolute; inset: 0;
  background-size: 200% 200%;
  animation: thumbpan calc(22s / var(--motion)) ease-in-out infinite alternate;
}
.thumb__media::after {
  /* moving sheen, like light raking across footage */
  content: "";
  position: absolute; inset: -40%;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.10) 48%, transparent 58%);
  transform: translateX(-30%);
  animation: sheen calc(7s / var(--motion)) linear infinite;
  mix-blend-mode: screen;
}
.thumb__grain {
  position: absolute; inset: 0; opacity: .12; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body[data-grain="off"] .thumb__grain, body[data-grain="off"] .thumb__scan { opacity: 0; }
.thumb__scan {
  position: absolute; inset: 0; pointer-events: none; opacity: .25;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0,0,0,.25) 3px 4px);
  mix-blend-mode: multiply;
}
.thumb__vig { position: absolute; inset: 0; background: radial-gradient(120% 100% at 50% 0%, transparent 45%, rgba(0,0,0,.55) 100%); }
.thumb__play {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; transition: opacity .25s ease;
}
.thumb__play span {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.5);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
}
.thumb__play span::after {
  content: ""; width: 0; height: 0; margin-left: 3px;
  border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent;
}
.thumb:hover .thumb__play { opacity: 1; }
.thumb:hover .thumb__media { animation-duration: calc(9s / var(--motion)); }

/* Real photo underneath, with the procedural colour gradient as a low-opacity wash */
.thumb__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb--photo .thumb__media { opacity: 0.38; }
.cat-thumb .thumb__play { display: none; }

@keyframes thumbpan { from { background-position: 0% 30%; } to { background-position: 100% 70%; } }
@keyframes sheen { 0% { transform: translateX(-30%);} 100% { transform: translateX(60%);} }

/* ---------- Cards ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s ease, transform .25s ease, background .25s;
}
.card:hover { border-color: color-mix(in oklch, #fff 16%, transparent); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .01em; }
.field .req { color: var(--accent); }
.input, .select, .textarea {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  transition: border-color .18s ease, background .18s;
  width: 100%;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--panel);
}
.textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237c8090' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; }

.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 100px; padding: 3px; gap: 2px; }
.seg button { background: transparent; border: 0; color: var(--ink-3); padding: 7px 15px; border-radius: 100px; font-size: 13px; font-weight: 600; transition: .18s; }
.seg button[data-on="true"] { background: var(--accent); color: var(--accent-ink); }

/* checkbox */
.chk { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.chk input { appearance: none; width: 20px; height: 20px; min-width: 20px; margin-top: 1px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); position: relative; transition: .15s; cursor: pointer; }
.chk input:checked { background: var(--accent); border-color: var(--accent); }
.chk input:checked::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.grid { display: grid; gap: 18px; }
.kicker-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 38px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* link with arrow */
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--ink); transition: gap .2s, color .2s; }
.arrow-link:hover { gap: 13px; color: var(--accent); }

.noise-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .035; z-index: 0;
  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='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

@media (max-width: 860px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .wrap { padding: 0 20px; }
}
