/* =========================================================
   Portfolio — dark set, one lamp, amber falloff.
   Palette strategy: Committed. Pure-neutral black surface so
   the films' own black dissolves into the page; amber carries
   the identity, magenta is the signal color pulled from the
   rim lighting in the work itself.
   ========================================================= */

:root {
  --bg:       oklch(0.045 0 0);
  --surface:  oklch(0.125 0 0);
  --line:     oklch(0.235 0 0);
  --line-dim: oklch(0.165 0 0);
  --ink:      oklch(0.97 0 0);
  --muted:    oklch(0.705 0 0);
  --primary:  oklch(0.78 0.155 75);
  --accent:   oklch(0.62 0.215 350);

  --font: "Archivo", ui-sans-serif, system-ui, sans-serif;

  --step--1: clamp(0.78rem, 0.75rem + 0.15vw, 0.86rem);
  --step-0:  clamp(0.98rem, 0.94rem + 0.2vw, 1.09rem);
  --step-1:  clamp(1.22rem, 1.13rem + 0.45vw, 1.5rem);
  --step-2:  clamp(1.53rem, 1.35rem + 0.9vw, 2.1rem);
  --step-3:  clamp(1.91rem, 1.6rem + 1.55vw, 2.9rem);
  --step-4:  clamp(2.39rem, 1.85rem + 2.7vw, 4.05rem);
  --step-5:  clamp(2.9rem, 2rem + 4.5vw, 5.4rem);

  --gut: clamp(1.25rem, 4vw, 4rem);
  --measure: 62ch;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* semantic z-index scale */
  --z-base: 0;
  --z-raised: 10;
  --z-sticky: 20;
  --z-header: 30;
  --z-panel: 60;
}

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

/* the hero's lamp glow bleeds past the hero box by design; clip it at the
   viewport rather than letting it create a horizontal scrollbar on mobile */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  font-variation-settings: "wdth" 100, "wght" 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }

a { color: inherit; }

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

::selection { background: var(--primary); color: oklch(0.12 0 0); }

/* ---------- shared type ---------- */

.display {
  font-variation-settings: "wdth" 118, "wght" 700;
  letter-spacing: -0.025em;
  line-height: 0.98;
  text-wrap: balance;
  margin: 0;
}

.label {
  font-size: var(--step--1);
  font-variation-settings: "wdth" 100, "wght" 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.tc {
  font-variation-settings: "wdth" 88, "wght" 600;
  letter-spacing: 0.04em;
  font-size: var(--step--1);
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.prose { max-width: var(--measure); color: var(--muted); text-wrap: pretty; }
.prose strong { color: var(--ink); font-variation-settings: "wdth" 100, "wght" 600; }

.shell { padding-inline: var(--gut); margin-inline: auto; max-width: 96rem; }

/* ---------- header ---------- */

.site-header {
  position: relative;
  z-index: var(--z-header);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: clamp(1.25rem, 3vw, 2.25rem);
  flex-wrap: wrap;
}

.mark {
  font-size: var(--step-1);
  font-variation-settings: "wdth" 118, "wght" 700;
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 0;
}

.mark-sub {
  margin: 0.45rem 0 0;
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.02em;
}

.avail {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.02em;
}

.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--primary) 60%, transparent);
  animation: pulse 2.8s var(--ease) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklch, var(--primary) 55%, transparent); }
  70%  { box-shadow: 0 0 0 9px color-mix(in oklch, var(--primary) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--primary) 0%, transparent); }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(0.5rem, 2vw, 2rem) clamp(2.5rem, 5vw, 4.5rem);
}

/* the one lamp still on */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 90vh;
  background:
    radial-gradient(58% 46% at 32% 34%,
      color-mix(in oklch, var(--primary) 15%, transparent) 0%,
      transparent 72%);
  pointer-events: none;
  z-index: var(--z-base);
}

.hero-grid {
  position: relative;
  z-index: var(--z-raised);
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}

/* Small screens read the claim first, then the film. On desktop the film
   takes the left column and leads the eye in. */
.hero-film { order: 2; }
.hero-copy { order: 1; }

.hero-film .frame {
  max-width: min(100%, 38vh);
  margin-inline: auto;
}

@media (min-width: 62rem) {
  .hero-grid { grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); }
  .hero-film { order: 1; }
  .hero-copy { order: 2; }
  .hero-film .frame { max-width: 100%; }
}

.hero h1 {
  font-size: var(--step-5);
  max-width: 15ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.hero-lede {
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  font-size: var(--step-1);
  max-width: 46ch;
  color: var(--muted);
  line-height: 1.5;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.5rem;
  align-items: center;
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  background: var(--primary);
  color: oklch(0.16 0 0);
  text-decoration: none;
  font-variation-settings: "wdth" 100, "wght" 650;
  font-size: var(--step-0);
  letter-spacing: 0.005em;
  border-radius: 3px;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}

.btn:hover { transform: translateY(-2px); background: oklch(0.85 0.15 78); }
.btn:active { transform: translateY(0); }

.btn-ghost {
  color: var(--ink);
  text-decoration: none;
  font-size: var(--step-0);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease);
}

.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- film frame ---------- */

.frame {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #000;
  overflow: hidden;
  border-radius: 4px;
}

.frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-dim);
  border-radius: 4px;
  pointer-events: none;
}

.hero .frame {
  box-shadow: 0 0 90px -20px color-mix(in oklch, var(--primary) 42%, transparent);
}

/* ---------- beat strip ---------- */

.beats {
  list-style: none;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-dim);
}

.beats li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0 1.25rem;
  align-items: baseline;
  padding-block: 0.95rem;
  border-bottom: 1px solid var(--line-dim);
}

.beats b {
  display: block;
  font-variation-settings: "wdth" 108, "wght" 650;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  font-size: var(--step--1);
  color: var(--ink);
}

/* Narrow: timecode + label on one line, the description indented beneath.
   Wide: all three in a single row. */
.beats span:last-child {
  grid-column: 2;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: var(--step-0);
  line-height: 1.45;
}

@media (min-width: 46rem) {
  .beats li { grid-template-columns: 4.5rem 11rem minmax(0, 1fr); }
  .beats span:last-child { grid-column: 3; margin-top: 0; }
}

/* ---------- section framing ---------- */

/* Rhythm: work breathes, concepts run tight as an index,
   process is compact, contact gets air before the close. */
section { padding-block: clamp(3.25rem, 6vw, 5.5rem); }
#concepts { padding-block: clamp(3rem, 5vw, 4.5rem); }
#process { padding-block: clamp(2.5rem, 4.5vw, 4rem); }
.contact { padding-block: clamp(4.5rem, 9vw, 8rem) clamp(3.5rem, 6vw, 5.5rem); }

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.sec-head h2 {
  font-size: var(--step-3);
  font-variation-settings: "wdth" 116, "wght" 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1;
}

.sec-head p { margin: 0; color: var(--muted); font-size: var(--step-0); max-width: 44ch; }

/* ---------- work grid ---------- */

/* Nine films: 22rem min lands on a clean 3 x 3 on desktop, 2-up on tablet,
   1-up on phones, without a breakpoint. */
.work-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.film-title {
  margin: 1.35rem 0 0;
  font-size: var(--step-1);
  font-variation-settings: "wdth" 112, "wght" 650;
  letter-spacing: -0.012em;
  line-height: 1.15;
}

.film-meta {
  margin: 0.4rem 0 0;
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.03em;
}

.film-beats {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.film-beats li {
  display: grid;
  grid-template-columns: 3.3rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: baseline;
  font-size: var(--step--1);
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- concepts ---------- */

.concepts { border-top: 1px solid var(--line-dim); }

.concept {
  position: relative;
  display: grid;
  gap: 0.35rem 2.5rem;
  padding: clamp(1.05rem, 2vw, 1.4rem) 0 clamp(1.05rem, 2vw, 1.4rem) 1rem;
  border-bottom: 1px solid var(--line-dim);
  align-items: baseline;
}

/* left tick: the only thing that moves, and it moves on hover */
.concept::before {
  content: "";
  position: absolute;
  left: 0;
  top: clamp(1.3rem, 2.3vw, 1.7rem);
  width: 2px;
  height: 0;
  background: var(--primary);
  transition: height 0.55s var(--ease);
}

.concept:hover::before { height: 1.1em; }

@media (min-width: 54rem) {
  .concept { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); }
}

.concept h3 {
  margin: 0;
  font-size: var(--step-1);
  font-variation-settings: "wdth" 112, "wght" 650;
  letter-spacing: -0.012em;
  line-height: 1.12;
}

.concept-tag {
  grid-column: 1;
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.concept-beats {
  margin: 0;
  color: var(--muted);
  font-size: var(--step-0);
  line-height: 1.55;
  max-width: 68ch;
}

@media (min-width: 54rem) {
  .concept-beats { grid-column: 2; grid-row: 1 / span 2; }
}

.concept-beats i {
  font-style: normal;
  color: var(--primary);
  padding-inline: 0.4em;
  font-variation-settings: "wght" 700;
}

/* ---------- process ---------- */

.process {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  counter-reset: step;
}

.step { border-top: 2px solid var(--primary); padding-top: 1.25rem; }
.step:nth-child(2) { border-color: color-mix(in oklch, var(--primary) 60%, var(--line)); }
.step:nth-child(3) { border-color: var(--line); }

.step h3 {
  margin: 0.65rem 0 0.6rem;
  font-size: var(--step-1);
  font-variation-settings: "wdth" 110, "wght" 650;
  letter-spacing: -0.012em;
}

.step p { margin: 0; color: var(--muted); font-size: var(--step-0); line-height: 1.55; }

.step-n {
  font-size: var(--step--1);
  font-variation-settings: "wdth" 88, "wght" 700;
  letter-spacing: 0.14em;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* ---------- contact ---------- */

.contact { border-top: 1px solid var(--line); }

.contact h2 {
  font-size: var(--step-4);
  font-variation-settings: "wdth" 118, "wght" 700;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 0 0 1.5rem;
  max-width: 18ch;
  text-wrap: balance;
}

.contact-lede { margin: 0 0 clamp(1.75rem, 3vw, 2.5rem); }

.mailto {
  display: inline-block;
  font-size: var(--step-2);
  font-variation-settings: "wdth" 106, "wght" 600;
  letter-spacing: -0.01em;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 2px solid color-mix(in oklch, var(--primary) 35%, transparent);
  padding-bottom: 0.15em;
  transition: border-color 0.4s var(--ease);
}

.mailto:hover { border-bottom-color: var(--primary); }

.site-footer {
  padding-block: 2.5rem 3.5rem;
  border-top: 1px solid var(--line-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  font-size: var(--step--1);
  color: var(--muted);
}

/* ---------- entrance ---------- */
/* Final state is the default. Keyframes animate FROM an offset, so if the
   animation never runs the content is already correct and visible. */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
}

.rise { animation: rise 0.9s var(--ease) backwards; }
.rise-1 { animation-delay: 0.06s; }
.rise-2 { animation-delay: 0.14s; }
.rise-3 { animation-delay: 0.22s; }
.rise-4 { animation-delay: 0.3s; }

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