:root {
  --bg: #0a0a0b;
  --fg: #f2efe8;
  --muted: #8a8681;
  --line: rgba(242, 239, 232, 0.12);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  /* Intro timeline zero, counted from the moment JS flips .gp-ready (all
     frames preloaded + minimum splash hold). One knob retimes the build. */
  --t0: 250ms;
}

@font-face {
  font-family: 'Sequel Sans';
  src: url('fonts/SequelSans-DisplayBook.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Sequel Sans';
  src: url('fonts/SequelSans-DisplayMedium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Sequel Sans';
  src: url('fonts/SequelSans-SemiBoldDisp.otf') format('opentype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Supply Sans';
  src: url('fonts/PPSupplySans-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* One screen, no scroll — the stage owns the viewport. */
body {
  font-family: 'Sequel Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  overflow: hidden;
}

p { font-weight: 600; text-wrap: balance; margin: 0; }
a { color: inherit; }
::selection { background: var(--fg); color: var(--bg); }

/* ----- Header ----- */
.gp-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  width: calc(100% - 3rem);
  margin-inline: auto;
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  mix-blend-mode: difference;
  animation: gp-in 900ms var(--ease) backwards;
  animation-delay: var(--t0);
}
.gp-logo, .gp-ticker {
  font-family: 'Supply Sans', ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: #fff;
  font-weight: 400;
  margin: 0;
}
.gp-logo { text-decoration: none; transition: opacity 200ms ease; }
.gp-logo:hover { opacity: 0.7; }
.gp-ticker-tz, .gp-ticker-day { margin-left: 0.5rem; }
.gp-tabular { font-variant-numeric: tabular-nums; }
.gp-period { margin-left: 0.35rem; }
.gp-blink-colon { animation: gp-blink 1s steps(2, end) infinite; }
@keyframes gp-blink { 50% { opacity: 0; } }

/* ----- Splash (GP mark, then the site reveals beneath it) ----- */
/* Mark timeline: strokes (plus chroma ghosts) draw 120–1020ms; ghosts
   converge and die 860–1320ms while the gradient fill takes over 920–1380ms.
   The splash then HOLDS — it doubles as the preloader — until JS flips
   .gp-ready (all frames loaded + minimum hold), which fades it out as the
   page builds underneath. */
.gp-splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  pointer-events: none;
  transition: opacity 600ms ease, visibility 0s 600ms;
}
.gp-ready .gp-splash { opacity: 0; visibility: hidden; }

.gp-mark { width: 64px; height: 64px; overflow: visible; }
/* Clean single-line draw — the chroma lives on the fill, not the stroke. */
.gp-mark-stroke {
  fill: none;
  stroke: rgba(242, 239, 232, 0.95);
  stroke-width: 0.5;
  stroke-linecap: round;
  stroke-dasharray: 1;       /* pathLength="1" normalizes both paths */
  stroke-dashoffset: 1;
  animation:
    gp-mark-draw 900ms cubic-bezier(0.6, 0, 0.25, 1) forwards 120ms,
    gp-mark-stroke-out 380ms ease forwards 1000ms;
}
/* Chromatic ghosts of the FILL — red/cyan plates flash in misregistered
   (screen-blended, offsets in viewBox units), then converge into the
   gradient fill as it lands. */
.gp-mark-ghost {
  fill-rule: evenodd;
  mix-blend-mode: screen;
  opacity: 0;
  animation: gp-ghost-settle 620ms ease forwards 880ms;
}
.gp-mark-ghost--r { fill: #ff3b30; transform: translate(-0.6px, 0.35px); }
.gp-mark-ghost--c { fill: #00d2ff; transform: translate(0.6px, -0.35px); }
.gp-mark-fill {
  opacity: 0;
  animation: gp-mark-fill-in 460ms ease forwards 920ms;
}
@keyframes gp-mark-draw { to { stroke-dashoffset: 0; } }
@keyframes gp-mark-stroke-out { to { stroke-opacity: 0; } }
@keyframes gp-ghost-settle {
  0%   { opacity: 0; }
  30%  { opacity: 0.85; }
  100% { opacity: 0; transform: translate(0, 0); }
}
@keyframes gp-mark-fill-in { to { opacity: 1; } }

/* Shared entrances. `backwards` fill holds the from-state through the delay
   and releases the element to its natural styles afterwards — so post-intro
   behaviors (hint fade on interaction, live caption swaps) stay untouched. */
@keyframes gp-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes gp-in-flat { from { opacity: 0; } }

/* ----- Stage (the site is the showreel) ----- */
.gp-stage {
  position: fixed;
  inset: 0;
  height: 100dvh;
  cursor: default;      /* scrub cursor only once the images are revealed */
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;   /* nothing scrolls — every gesture scrubs */
}
.gp-ready .gp-stage { cursor: ew-resize; }

/* isolate: frames' internal z-index (the wipe puts the incoming on top)
   stays contained, so frames can never paint above the scrims — otherwise
   the wiping frame comes in undimmed and "flicks" darker when it lands. */
.gp-frames {
  position: absolute;
  inset: 0;
  isolation: isolate;
  contain: strict;     /* frame churn can never invalidate outside the stack */
  animation: gp-in-flat 1000ms ease backwards;
  animation-delay: calc(var(--t0) - 300ms);   /* emerges as the splash fades */
}
.gp-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  pointer-events: none;
  /* No transition by default — instant swap is what makes the scrub feel 1:1.
     The autoplay path adds an opacity transition inline, then clears it. */
}
.gp-frame.is-active { opacity: 1; }

/* The clients chapter — full-screen logo field, no cards: 6 columns spaced
   evenly across the viewport, padded clear of the intro and bottom meta. */
.gp-frame--clients {
  display: grid;
  place-items: center;
  background: var(--bg);
  /* Small side gutter only — the wall runs edge to edge. Vertical pad clears
     the hero (top) and meta (bottom); align-content keeps rows centered. */
  padding: 6rem 1.5rem;
}
.gp-clients-wall {
  --scale: 0.6;               /* logo sizing knob */
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-content: center;      /* cluster the rows toward the vertical middle */
  justify-items: center;
  align-items: center;
  row-gap: 3.5rem;
}
.gp-clients-wall img {
  height: calc(var(--h, 32) * var(--scale) * 1px);
  width: auto;
  max-width: 84%;
  opacity: 0.95;
}
@media (max-width: 639px) {
  .gp-frame--clients { padding: 6rem 1rem; }
  .gp-clients-wall { --scale: 0.52; grid-template-columns: repeat(4, 1fr); row-gap: 2.5rem; }
}

/* Readability over arbitrary screenshots: flat dim + top/bottom gradients. */
.gp-scrim { position: absolute; inset: 0; pointer-events: none; }
.gp-scrim--dim { background: rgba(8, 9, 12, 0.18); }
.gp-scrim--top {
  background: linear-gradient(to bottom, rgba(8, 9, 12, 0.78) 0%, rgba(8, 9, 12, 0.28) 32%, transparent 58%);
}
.gp-scrim--bottom {
  background: linear-gradient(to top, rgba(8, 9, 12, 0.82) 0%, rgba(8, 9, 12, 0.3) 30%, transparent 56%);
}
/* Vignette — corners ease darker so edge-of-frame UI stays readable. */
.gp-scrim--vignette {
  background: radial-gradient(ellipse 110% 110% at center, transparent 58%, rgba(8, 9, 12, 0.38) 100%);
}
/* Static film grain — breaks up upscaling softness on large displays.
   opacity is the strength knob; background-size the grain coarseness. */
.gp-scrim--noise {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  opacity: 0.09;
}

/* ----- Intro (overlaid hero) ----- */
.gp-intro {
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  top: 5.5rem;
  z-index: 2;
  pointer-events: none;
}
.gp-hero {
  font-family: 'Sequel Sans', system-ui, sans-serif;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: clamp(24px, 2.2vw, 32px);
  margin: 0;
  overflow: hidden;
}
.gp-hero-line {
  display: block;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0.3em);
  filter: blur(10px);
  animation: gp-hero-in 1100ms var(--ease) forwards;
  animation-delay: calc(var(--t0) + 120ms + var(--i, 0) * 180ms);
  will-change: opacity, transform, filter;
}
.gp-hero-line--secondary { color: rgba(255, 255, 255, 0.55); }
@keyframes gp-hero-in { to { opacity: 1; transform: none; filter: blur(0); } }

.gp-studio-body {
  max-width: 70ch;   /* wraps the studio line onto exactly two rows */
  margin-top: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(10px);
  animation: gp-fade-in 1000ms var(--ease) forwards;
  animation-delay: calc(var(--t0) + 450ms);
  will-change: opacity, transform;
}
@keyframes gp-fade-in { to { opacity: 1; transform: none; } }

/* ----- Bottom meta (caption / booking / legal | hint / counter) ----- */
.gp-meta {
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 2rem;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  pointer-events: none;
}
.gp-meta a { pointer-events: auto; }

.gp-caption {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: flex-end;
  text-align: right;
  animation: gp-in 900ms var(--ease) backwards;
  animation-delay: calc(var(--t0) + 550ms);
}
.gp-caption-tag {
  font-family: 'Supply Sans', ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
}
.gp-caption-name {
  font-size: 13px;     /* matches the Let's talk line — hierarchy via color */
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #fff;
  overflow: hidden;    /* clips the caption roll on autoplay cuts */
}
.gp-caption-name .gp-ch { display: inline-block; white-space: pre; }

.gp-contact { font-style: normal; }
.gp-contact-line {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  animation: gp-in 900ms var(--ease) backwards;
  animation-delay: calc(var(--t0) + 600ms);
}
.gp-contact-line a {
  color: #fff;
  text-decoration: none;
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3));
  background-size: 0% 1px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 4px;
  transition: background-size 450ms cubic-bezier(0.32, 0.72, 0, 1);
}
.gp-contact-line a:hover { background-size: 100% 1px, 100% 1px; }

.gp-legal {
  margin-top: 0.75rem;
  display: flex;
  gap: 1.1rem;
  animation: gp-in 900ms var(--ease) backwards;
  animation-delay: calc(var(--t0) + 750ms);
  font-family: 'Supply Sans', ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.45);
}
.gp-legal a { text-decoration: none; transition: color 200ms ease; }
.gp-legal a:hover { color: #fff; }

.gp-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}
/* Top-right, optically on the h1's first row. */
.gp-hint {
  position: absolute;
  top: 0.6rem;
  right: 0;
  font-family: 'Supply Sans', ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.8);
  display: inline-flex;
  gap: 0.4rem;
  transition: opacity 350ms ease;
  animation: gp-in 900ms var(--ease) backwards;
  animation-delay: calc(var(--t0) + 1000ms);
}
.gp-hint span { animation: gp-nudge 1.6s ease-in-out infinite; }
@keyframes gp-nudge { 50% { transform: translateX(4px); } }
.gp-stage.is-live .gp-hint { opacity: 0; }
.gp-count {
  font-family: 'Supply Sans', ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
  animation: gp-in 900ms var(--ease) backwards;
  animation-delay: calc(var(--t0) + 650ms);
}

/* ----- Progress bar (bottom edge, with chapter ticks) ----- */
.gp-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  z-index: 3;
  background: rgba(242, 239, 232, 0.14);
  animation: gp-in-flat 900ms ease backwards;
  animation-delay: calc(var(--t0) + 900ms);
}
.gp-bar-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: #fff;
  /* Ease-out so the fill glides and decelerates into each position. */
  transition: transform 700ms var(--ease);
}
.gp-bar-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 6px;
  background: rgba(242, 239, 232, 0.4);
}

/* ----- Privacy panel (half-screen drawer over a blurred reel) ----- */
.gp-privacy {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(640px, 50vw);
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 0.5px solid rgba(242, 239, 232, 0.08);
  /* Frosted panel: the reel stays readable behind it, blurred only where
     the panel itself sits. */
  background: rgba(16, 16, 19, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--fg);
}
.gp-privacy[open] { animation: gp-panel-in 600ms var(--ease); }
@keyframes gp-panel-in { from { transform: translateX(48px); opacity: 0; } }
.gp-privacy::backdrop { background: rgba(8, 9, 12, 0.2); }

.gp-privacy-frame {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.gp-privacy-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding: 2.25rem 3rem 1.5rem;
  border-bottom: 0.5px solid rgba(242, 239, 232, 0.08);
}
.gp-privacy-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.gp-privacy-updated {
  margin-top: 0.4rem;
  font-family: 'Supply Sans', ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.gp-privacy-close {
  font-family: 'Supply Sans', ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0.25rem 0;
  cursor: pointer;
  transition: color 200ms ease;
}
.gp-privacy-close:hover { color: var(--fg); }

.gp-privacy-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2.5rem 3rem 4rem;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(242, 239, 232, 0.72);
}
.gp-privacy-body p { font-weight: 400; text-wrap: pretty; }
.gp-privacy-body p + p, .gp-privacy-body ul { margin-top: 0.9rem; }
.gp-privacy-body h3 {
  margin: 2.25rem 0 0.75rem;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.gp-privacy-body h4 {
  margin: 1.5rem 0 0.6rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
}
.gp-privacy-body strong { font-weight: 500; color: rgba(242, 239, 232, 0.9); }
.gp-privacy-body ul { padding-left: 1.1rem; }
.gp-privacy-body li + li { margin-top: 0.4rem; }
.gp-privacy-body a { color: var(--fg); text-underline-offset: 3px; }
.gp-privacy-loading {
  font-family: 'Supply Sans', ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ----- Mobile ----- */
@media (max-width: 639px) {
  .gp-intro { top: 4.5rem; }
  .gp-hero { font-size: 20px; }
  .gp-hero-line { white-space: normal; }
  .gp-studio-body { font-size: 12px; }
  .gp-hint { display: none; }

  /* Stack the bottom meta: caption + count share the top row, then the
     contact line and legal get the full width below. */
  .gp-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
  }
  .gp-meta-right {
    order: -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
  .gp-caption { align-items: flex-start; text-align: left; }

  /* Half a phone screen is no place to read legal text. */
  .gp-privacy { width: 100%; border-left: 0; }
  .gp-privacy-head { padding: 1.75rem 1.5rem 1.25rem; }
  .gp-privacy-body { padding: 1.75rem 1.5rem 3.5rem; }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .gp-splash { display: none; }
  .gp-hero-line, .gp-studio-body { opacity: 1; transform: none; animation: none; }
  .gp-header, .gp-frames, .gp-caption, .gp-count, .gp-contact-line, .gp-legal, .gp-hint, .gp-bar { animation: none; }
  .gp-blink-colon { animation: none; }
}

/* ----- Reduced data ----- */
@media (prefers-reduced-data: reduce) {
  body { font-family: system-ui, -apple-system, sans-serif; }
  .gp-logo, .gp-ticker { font-family: ui-monospace, monospace; }
}

/* ----- Preloader gate (must stay LAST) -----
   Every entrance starts paused, holding its from-state through its delay,
   and runs once JS flips .gp-ready. This lives at the end of the file
   because `animation:` shorthands reset play-state to running — these
   rules must come after every one of them in the cascade. */
.gp-frames, .gp-header, .gp-hero-line, .gp-studio-body,
.gp-caption, .gp-count, .gp-contact-line, .gp-legal, .gp-hint, .gp-bar {
  animation-play-state: paused;
}
.gp-ready .gp-frames, .gp-ready .gp-header, .gp-ready .gp-hero-line,
.gp-ready .gp-studio-body, .gp-ready .gp-caption,
.gp-ready .gp-count, .gp-ready .gp-contact-line, .gp-ready .gp-legal,
.gp-ready .gp-hint, .gp-ready .gp-bar {
  animation-play-state: running;
}
