/* ------------------------------------------------------------
   Tokens
------------------------------------------------------------ */
:root {
  --paper: #f6f4ef;
  --paper-2: #efece4;
  --ink: #141414;
  --ink-2: #4a4843;
  --ink-3: #8b8880;
  --line: rgba(20, 20, 20, .14);
  --card: #fffdf8;

  --g1: #ff3d81;   /* hot pink   */
  --g2: #ff8a3d;   /* orange     */
  --g3: #ffe14d;   /* yellow     */
  --g4: #4dffb4;   /* mint       */
  --g5: #4d9bff;   /* blue       */
  --gradient: linear-gradient(90deg, var(--g1), var(--g2), var(--g3), var(--g4), var(--g5), var(--g1));

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121210;
    --paper-2: #1a1917;
    --ink: #f2efe8;
    --ink-2: #b9b5ac;
    --ink-3: #7d7a72;
    --line: rgba(242, 239, 232, .14);
    --card: #1c1b18;
  }
}

/* ------------------------------------------------------------
   Base
------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-inline: var(--gutter);
  padding-bottom: 72px; /* room for the glow bar */
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
::selection { background: var(--g3); color: #141414; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 6px;
}
.skip:focus { left: 8px; z-index: 100; }

main { max-width: var(--max); margin: 0 auto; }

/* ------------------------------------------------------------
   Nav
------------------------------------------------------------ */
.nav {
  max-width: var(--max);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 22px 10px;
  font-size: 14px;
}
.nav__mark { text-decoration: none; display: flex; flex-direction: column; line-height: 1.15; }
.nav__mono { font-family: var(--serif); font-size: 22px; letter-spacing: .02em; }
.nav__role { color: var(--ink-3); font-size: 12px; }
.nav__links { display: flex; gap: 22px; }
.nav__links a, .nav__cta { text-decoration: none; color: var(--ink-2); }
.nav__links a:hover, .nav__cta:hover { color: var(--ink); }
.nav__cta { border-bottom: 1px solid var(--line); padding-bottom: 2px; }
@media (max-width: 640px) { .nav__links { display: none; } }

/* ------------------------------------------------------------
   Hero
------------------------------------------------------------ */
.hero { padding-block: clamp(56px, 12vh, 140px) clamp(48px, 8vh, 96px); }
.hero__eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 22px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gradient); background-size: 400% 100%; animation: shift 6s linear infinite; }
.hero__title {
  font-family: var(--serif);
  font-size: clamp(52px, 10.5vw, 132px);
  line-height: .95;
  letter-spacing: -.015em;
  max-width: 12ch;
}
.cycle {
  font-style: italic;
  display: inline-block;
  min-width: 2.2ch;
  background: var(--gradient);
  background-size: 400% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: shift 8s linear infinite;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.cycle.is-swapping { opacity: 0; transform: translateY(.15em) rotate(-2deg); }
.hero__lede {
  max-width: 52ch; font-size: clamp(17px, 2vw, 21px); line-height: 1.5; color: var(--ink-2);
  margin: 28px 0 0;
}
.hero__lede strong { color: var(--ink); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-block; text-decoration: none; padding: 12px 18px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink);
  background: transparent; transition: transform .25s var(--ease), background .25s;
}
.btn:hover { transform: translateY(-2px); background: var(--paper-2); }
.btn--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--dark:hover { background: var(--ink); opacity: .9; }
.hero__stats {
  list-style: none; margin: 56px 0 0; padding: 22px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  border-top: 1px solid var(--line);
}
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats b { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 44px); line-height: 1; }
.hero__stats span { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
@media (max-width: 640px) { .hero__stats { grid-template-columns: repeat(2, 1fr); } }

/* ------------------------------------------------------------
   Sections
------------------------------------------------------------ */
.section { padding-block: clamp(48px, 8vh, 96px); border-top: 1px solid var(--line); }
.section__head { display: grid; grid-template-columns: 64px 1fr; gap: 8px 16px; align-items: baseline; margin-bottom: 40px; }
.section__num { font-family: var(--serif); color: var(--ink-3); font-size: 18px; }
.section__title { font-family: var(--serif); font-size: clamp(36px, 5vw, 60px); letter-spacing: -.01em; line-height: 1; }
.section__sub { grid-column: 2; margin: 6px 0 0; color: var(--ink-2); max-width: 60ch; }
@media (max-width: 640px) {
  .section__head { grid-template-columns: 1fr; }
  .section__sub { grid-column: 1; }
}

/* ------------------------------------------------------------
   Featured cards (the rotating ones)
------------------------------------------------------------ */
.cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 40px);
  perspective: 1400px;
}
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

.card {
  --rot: 0deg; --rx: 0deg; --ry: 0deg;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 16px 22px;
  transform: rotate(var(--rot)) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
  box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 18px 40px -28px rgba(0,0,0,.35);
  will-change: transform;
}
.card:hover, .card:focus-within {
  transform: rotate(0deg) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-6px);
  box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 40px 70px -30px rgba(0,0,0,.45);
}
.card:nth-child(even) { margin-top: clamp(0px, 4vw, 48px); }
@media (max-width: 860px) { .card:nth-child(even) { margin-top: 0; } }

.card__frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #0d0d0d;
}
.card__frame img, .card__frame video { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.card__frame img.is-fading { opacity: 0; }
.card__badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
  background: rgba(255,255,255,.9); color: #141414; padding: 5px 9px; border-radius: 999px;
}
.card__badge--reel { background: var(--gradient); background-size: 400% 100%; animation: shift 6s linear infinite; }
.card__label {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  font-size: 11px; color: #fff; background: rgba(0,0,0,.5); padding: 4px 8px; border-radius: 6px; backdrop-filter: blur(4px);
}

.card__shots { display: flex; gap: 8px; margin-top: 10px; }
.shot {
  flex: 1; max-width: calc((100% - 16px) / 3); aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; padding: 0; border: 2px solid transparent;
  background: #0d0d0d; cursor: pointer; transition: border-color .2s, transform .2s var(--ease);
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot:hover { transform: translateY(-2px); }
.shot[aria-pressed="true"] { border-color: var(--ink); }

.card__body { padding: 18px 6px 0; }
.card__kicker { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.card__title { font-family: var(--serif); font-size: clamp(30px, 3.4vw, 40px); line-height: 1.05; margin-top: 6px; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.card__meta b { font-weight: 600; color: var(--ink); }
.card__blurb { margin: 14px 0 0; color: var(--ink-2); }

.card__built { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line); }
.card__built h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.card__built ul { margin: 0; padding: 0; list-style: none; }
.card__built li { position: relative; padding-left: 18px; margin: 6px 0; font-size: 15px; }
.card__built li::before { content: "→"; position: absolute; left: 0; color: var(--ink-3); }

.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li, .chips li {
  font-size: 12px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2);
}
.card__cta { font-size: 14px; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 1px; }
.card__cta:hover { border-bottom-color: transparent; }

/* ------------------------------------------------------------
   Archive index
------------------------------------------------------------ */
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: idx; }
.row {
  display: grid; grid-template-columns: 40px 1.6fr 1fr 1fr 1.2fr auto; gap: 16px; align-items: baseline;
  padding: 16px 6px; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background .2s, padding-left .3s var(--ease);
}
.row:hover { background: var(--paper-2); padding-left: 14px; }
.row__n { font-family: var(--serif); color: var(--ink-3); }
.row__n::before { counter-increment: idx; content: counter(idx, decimal-leading-zero); }
.row__title { font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.row__type, .row__engine, .row__role { font-size: 13px; color: var(--ink-2); }
.row__arrow { color: var(--ink-3); font-size: 14px; }
a.row:hover .row__arrow { color: var(--ink); }
.row__note { grid-column: 2 / -1; font-size: 13px; color: var(--ink-3); margin-top: -8px; }
@media (max-width: 860px) {
  .row { grid-template-columns: 32px 1fr auto; }
  .row__engine, .row__role { display: none; }
  .row__note { grid-column: 2 / -1; }
}

.peek {
  position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none;
  width: 220px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden;
  background: #0d0d0d; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
  opacity: 0; transform: translate(-50%, -50%) scale(.9) rotate(-4deg);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.peek.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(2deg); }
.peek img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none) { .peek { display: none; } }

/* ------------------------------------------------------------
   About / Contact / Footer
------------------------------------------------------------ */
.section--split { display: grid; grid-template-columns: 1fr 2fr; gap: 24px 48px; }
.section--split .section__head { margin-bottom: 0; }
@media (max-width: 860px) { .section--split { grid-template-columns: 1fr; } }
.about p { color: var(--ink-2); max-width: 60ch; margin: 0 0 16px; }
.about__lead { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; color: var(--ink) !important; }
.about__h { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 28px 0 10px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.plain { margin: 0; padding-left: 18px; color: var(--ink-2); }
.plain li { margin: 6px 0; }
.plain li b { color: var(--ink); font-weight: 600; }

.contact__big { font-family: var(--serif); font-size: clamp(40px, 7vw, 96px); line-height: 1; margin: 0; letter-spacing: -.01em; }
.contact__big em {
  font-style: italic; background: var(--gradient); background-size: 400% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shift 8s linear infinite;
}
.contact__links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; font-size: 18px; }
.contact__links a { text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.contact__links a:hover { border-bottom-color: transparent; }

.foot {
  max-width: var(--max); margin: 0 auto; padding: 32px 0 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--ink-3);
}

/* ------------------------------------------------------------
   The glow: a tiny bottom gradient that refuses to go unnoticed
------------------------------------------------------------ */
.glow {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: 6px;
  background: var(--gradient);
  background-size: 400% 100%;
  animation: shift 5s linear infinite;
  transition: height .45s var(--ease), filter .45s;
  filter: saturate(1.15);
  pointer-events: auto;
}
.glow::after {
  /* soft bloom above the bar, scales with height */
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 40px;
  background: linear-gradient(to top, rgba(255, 61, 129, .18), transparent);
  opacity: 0; transition: opacity .45s;
}
.glow.is-peeking { height: 12px; }
.glow.is-peeking::after, .glow:hover::after { opacity: 1; }
.glow:hover { height: 22px; filter: saturate(1.5); }
.glow.is-loud { height: 34px; }
.glow.is-loud::after { opacity: 1; height: 120px; }

@keyframes shift {
  from { background-position: 0% 50%; }
  to   { background-position: 400% 50%; }
}

/* ------------------------------------------------------------
   Reveal on scroll
------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.card.reveal { transform: translateY(24px) rotate(var(--rot)); }
.card.reveal.is-in { transform: rotate(var(--rot)) rotateX(var(--rx)) rotateY(var(--ry)); }
.card.reveal.is-in:hover, .card.reveal.is-in:focus-within {
  transform: rotate(0deg) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-6px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card.reveal.is-in { transform: none !important; transition: box-shadow .3s; }
  .dot, .cycle, .glow, .card__badge--reel, .contact__big em { animation: none; }
  .glow { height: 6px !important; }
}
