/* ─────────────────────────────────────────────────────────────
   Luke Veysie — site.css
   Editorial, restrained, paper + ultramarine + ink
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Donrich';
  src: url('assets/Donrich.otf') format('opentype');
  font-display: block;
}

:root {
  --ink:   #0a0908;
  --paper: #F7F7F7;
  --blue:  #0f33cc;
  --line:  rgba(10, 9, 8, 0.12);
  --muted: rgba(10, 9, 8, 0.55);
  --soft:  rgba(10, 9, 8, 0.72);

  --donrich: 'Donrich', Georgia, serif;
  --system:  'Helvetica Neue', 'Inter', system-ui, sans-serif;

  --cols: 3;
  --motion: 1;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--system);
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

/* ── Type ─────────────────────────────────────────────────── */
.sys {
  font-family: var(--system);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
}
.sys-sm { font-size: 9.5px; letter-spacing: 0.24em; }
.don { font-family: var(--donrich); font-weight: 400; letter-spacing: -0.01em; }

/* ── Nav ──────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 36px;
  background: linear-gradient(180deg, rgba(247,247,247,0.85) 0%, rgba(247,247,247,0) 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.nav.dark {
  background: linear-gradient(180deg, rgba(15,51,204,0.92) 0%, rgba(15,51,204,0) 100%);
  color: var(--paper);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-brand .badge {
  width: 32px; height: 32px;
}
.nav-brand .name {
  font-family: var(--donrich);
  font-size: 22px;
  line-height: 1;
}
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  font-family: var(--system);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  position: relative;
  opacity: 0.7;
  transition: opacity 0.25s ease;
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  background: var(--blue);
  border-radius: 50%;
}
.nav.dark .nav-links a.active::after { background: var(--paper); }

/* ── Footer ───────────────────────────────────────────────── */
.foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  padding: 60px 36px 36px;
  border-top: 1px solid var(--line);
  align-items: center;
  font-family: var(--system);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot .center { text-align: center; }
.foot .right { text-align: right; }
.foot a:hover { color: var(--ink); }

/* ── Page chrome ──────────────────────────────────────────── */
main { padding-top: 0; }

.page-pad {
  padding: 0 36px;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: end;
  padding: 64px 0 28px;
  border-bottom: 1px solid var(--line);
}
.section-head .eyebrow {
  font-family: var(--system);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-head .title {
  font-family: var(--donrich);
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  grid-column: 1;
  margin: 0;
}
.section-head .meta {
  font-family: var(--system);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  grid-row: 2;
  align-self: end;
  padding-bottom: 8px;
}

/* ── Reveal animation ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
[data-motion="0"] .reveal { opacity: 1; transform: none; transition: none; }

/* ── Tweaks panel ─────────────────────────────────────────── */
.tweaks {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  font-family: var(--system);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  overflow: hidden;
  min-width: 250px;
  max-width: 290px;
}
.tweaks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  font-weight: 700;
  letter-spacing: 0.24em;
  cursor: pointer;
  user-select: none;
}
.tweaks-head .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--blue);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: 1px;
}
.tweaks-body {
  padding: 8px 16px 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.tweaks.closed .tweaks-body { display: none; }
.tweak-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.tweak-row .label { opacity: 0.7; font-weight: 700; }
.tweak-seg {
  display: flex;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.tweak-seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--paper);
  padding: 6px 10px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.18em;
  cursor: pointer;
  opacity: 0.6;
  transition: background 0.2s, opacity 0.2s;
}
.tweak-seg button.on {
  background: var(--blue);
  opacity: 1;
}

/* ──────────────────────────────────────────────────────────
   Home — hero reel
   ────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: flex-end;
}
.hero-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* Keep the blob/grain layered above the video */
.hero-stage::before,
.hero-stage::after {
  z-index: 1;
}
/* When a video is present, lay a dark-blue noised gradient over it,
   fading from the bottom up. The feTurbulence noise is baked into the
   same layer so it feels embedded in the gradient itself. */
.hero-stage:has(.hero-video)::before {
  background:
    url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='nz'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23nz)'/></svg>"),
    linear-gradient(0deg,
      rgba(8,16,54,0.82) 0%,
      rgba(10,22,72,0.5) 26%,
      rgba(12,28,92,0.22) 50%,
      rgba(12,28,92,0.06) 72%,
      rgba(12,28,92,0) 100%);
  background-size: 200px 200px, cover;
  background-blend-mode: overlay, normal;
  /* Confine the noise to the gradient: fade it out bottom-up,
     matching the gradient so the bare video stays noise-free. */
  -webkit-mask-image: linear-gradient(0deg, #000 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0) 78%);
  mask-image: linear-gradient(0deg, #000 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0) 78%);
  filter: none;
  animation: none;
  width: 100%; height: 100%;
  left: 0; top: 0;
  mix-blend-mode: normal;
}
/* No grain layer over the video — keep the clip clean */
.hero-stage:has(.hero-video)::after {
  display: none;
}
/* Animated abstract "reel" — blue blob morphing on dark */
.hero-stage::before {
  content: '';
  position: absolute;
  width: 130%;
  height: 130%;
  left: -15%; top: -15%;
  background:
    radial-gradient(circle at 30% 40%, rgba(15,51,204,0.85) 0%, rgba(15,51,204,0) 45%),
    radial-gradient(circle at 70% 60%, rgba(60,90,220,0.5) 0%, rgba(15,51,204,0) 50%),
    radial-gradient(circle at 50% 80%, rgba(20,30,150,0.6) 0%, rgba(0,0,0,0) 55%);
  filter: blur(40px);
  animation: heroDrift 22s ease-in-out infinite alternate;
}
/* Grain overlay */
.hero-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.95  0 0 0 0 0.92  0 0 0 0.16 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.55;
  mix-blend-mode: overlay;
  pointer-events: none;
}
@keyframes heroDrift {
  0%   { transform: translate(0%, 0%) scale(1); }
  50%  { transform: translate(4%, -3%) scale(1.08); }
  100% { transform: translate(-3%, 5%) scale(1.04); }
}
[data-motion="0"] .hero-stage::before { animation: none; }

.hero-content {
  position: relative;
  z-index: 2;
  padding: 36px 36px 48px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
}
.hero-title {
  font-family: var(--donrich);
  font-size: clamp(64px, 11vw, 168px);
  line-height: 0.84;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 9ch;
}
.hero-title .accent { color: rgba(247,247,247,0.5); }
.hero-meta {
  text-align: right;
  font-family: var(--system);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.75;
  line-height: 1.9;
}

.hero-corner {
  position: absolute;
  z-index: 3;
  font-family: var(--system);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.7;
}
.hero-corner.tl { top: 88px; left: 36px; }
.hero-corner.tr { top: 88px; right: 36px; text-align: right; }
.hero-corner .live {
  display: inline-block;
  width: 6px; height: 6px;
  background: #ff4527;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: 1px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

.hero-scroll-cue {
  position: absolute;
  z-index: 3;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--system);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* ──────────────────────────────────────────────────────────
   Work grid
   ────────────────────────────────────────────────────────── */
.work {
  padding: 0 36px 80px;
}
.work-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 36px 28px;
}
@media (max-width: 900px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .work-grid { grid-template-columns: 1fr; }
}

.work-tile {
  cursor: pointer;
  display: block;
}
.work-tile .frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #e7e3da;
  overflow: hidden;
}
.work-tile.landscape .frame { aspect-ratio: 16 / 10; }
.work-grid.videos {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}
@media (max-width: 460px) {
  .work-grid.videos { grid-template-columns: 1fr; }
}
.work-grid.videos .frame { aspect-ratio: 16 / 9; background: #0a0908; }
.work-tile.feature .frame {
  aspect-ratio: 16 / 9;
  background: #0a0908;
}
.work-tile .frame image-slot {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}
.work-tile .frame iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
}
/* Facade poster + play button */
.video-poster {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background-color: #0a0908;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.4s ease;
}
.video-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,9,8,0) 40%, rgba(10,9,8,0.45) 100%);
  opacity: 0.6;
  transition: opacity 0.4s ease;
}
.video-poster:hover { filter: brightness(1.04); }
.video-poster:hover::after { opacity: 0.35; }
.play-btn {
  position: relative;
  z-index: 1;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  transition: transform 0.3s cubic-bezier(0.2,0.8,0.2,1), background 0.3s ease;
}
.video-poster:hover .play-btn {
  transform: scale(1.08);
  background: #fff;
}
.play-btn svg {
  width: 26px; height: 26px;
  fill: #0f33cc;
  margin-left: 3px;
}
.work-tile.is-empty .frame {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255,255,255,0.16);
}
.work-tile.is-empty .frame-hint {
  font: 500 12px/1 var(--system);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.work-tile .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,51,204,0) 40%, rgba(10,9,8,0.5) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.work-tile:hover .overlay { opacity: 1; }
.work-tile .play-pill {
  position: absolute;
  bottom: 14px; left: 14px;
  background: var(--paper);
  color: var(--ink);
  padding: 6px 10px;
  font-family: var(--system);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.work-tile:hover .play-pill {
  opacity: 1;
  transform: translateY(0);
}
.work-tile .frame { transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.work-tile:hover .frame {
  /* tiny zoom */
}
.work-tile .frame > .inner-zoom {
  position: absolute;
  inset: 0;
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.work-tile:hover .inner-zoom { transform: scale(1.03); }

.work-tile .caption {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.work-tile .ttl {
  font-family: var(--donrich);
  font-size: 12px;
  line-height: 1.1;
}
.work-tile .tag {
  font-family: var(--system);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* Marquee strip between hero & grid */
.marquee {
  display: flex;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.marquee-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 60px;
  padding-right: 60px;
  animation: scroll-x 50s linear infinite;
  font-family: var(--donrich);
  font-size: 32px;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 60px; }
.marquee-track .dot {
  width: 14px; height: 14px;
  background: var(--blue);
  border-radius: 50%;
}
@keyframes scroll-x {
  to { transform: translateX(-50%); }
}
[data-motion="0"] .marquee-track { animation-duration: 0s; animation: none; }

/* ──────────────────────────────────────────────────────────
   About page
   ────────────────────────────────────────────────────────── */
.about {
  padding: 120px 36px 100px;
  max-width: 1400px;
  margin: 0 auto;
}
.about-hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: start;
  padding-bottom: 80px;
}
@media (max-width: 900px) {
  .about-hero { grid-template-columns: 1fr; }
}
.about-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #e7e3da;
}
.about-portrait image-slot,
.about-portrait img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.about-portrait img {
  object-position: 60% 30%;
}
.about-portrait .tag {
  position: absolute;
  bottom: 12px; left: 12px;
  background: var(--paper);
  padding: 6px 10px;
  font-family: var(--system);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  z-index: 2;
}
.about-copy h1 {
  font-family: var(--donrich);
  font-size: clamp(56px, 7vw, 104px);
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin: 0 0 36px;
}
.about-copy h1 .blue { color: var(--blue); }
.about-copy .lead {
  font-family: var(--donrich);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.4;
  margin: 0 0 28px;
  color: var(--soft);
}
.about-copy p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--soft);
  margin: 0 0 18px;
  max-width: 56ch;
}

.about-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 24px;
}
@media (max-width: 720px) {
  .about-meta { grid-template-columns: repeat(2, 1fr); }
}
.about-meta > div {
  background: var(--paper);
  padding: 22px 18px;
}
.about-meta .label {
  font-family: var(--system);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.about-meta .value {
  font-family: var(--donrich);
  font-size: 22px;
  line-height: 1.1;
}

/* ──────────────────────────────────────────────────────────
   Contact page
   ────────────────────────────────────────────────────────── */
.contact {
  min-height: calc(100vh - 0px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 36px 80px;
  position: relative;
}
.contact-blob {
  position: absolute;
  top: 12%;
  right: -120px;
  width: 520px; height: 520px;
  background: var(--blue);
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  pointer-events: none;
}
.contact-inner {
  position: relative;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.contact .eyebrow {
  font-family: var(--system);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.contact h1 {
  font-family: var(--donrich);
  font-size: clamp(72px, 10vw, 168px);
  line-height: 0.84;
  letter-spacing: -0.025em;
  margin: 0 0 56px;
}
.contact h1 .blue { color: var(--blue); }

.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  border-top: 1px solid var(--line);
  padding-top: 36px;
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-block .label {
  font-family: var(--system);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.contact-block .big-link {
  font-family: var(--donrich);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.05;
  display: inline-block;
  position: relative;
  letter-spacing: -0.015em;
}
.contact-block .big-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0.06em;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transition: opacity 0.3s ease;
}
.contact-block .big-link:hover::after { opacity: 1; }

.contact-rail {
  display: flex; flex-direction: column; gap: 28px;
}
.contact-rail .row .label { margin-bottom: 6px; }
.contact-rail .row .value {
  font-family: var(--donrich);
  font-size: 26px;
  line-height: 1.2;
}
.contact-rail .row .value a:hover { color: var(--blue); }

.contact-bottom {
  margin-top: 80px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  gap: 20px;
}
.contact-bottom .available {
  font-family: var(--donrich);
  font-size: 26px;
  line-height: 1.3;
  max-width: 32ch;
}
.contact-bottom .right-meta {
  font-family: var(--system);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  line-height: 1.9;
}

/* ──────────────────────────────────────────────────────────
   Reduced motion respect
   ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; transform: none; opacity: 1; }
  .marquee-track { animation: none; }
  .hero-stage::before { animation: none; }
}
