/* ============================================================
   Bella Blazwick-Noble — Director / Filmmaker
   Minimalist · sleek, not shiny · a little analog
   ============================================================ */

:root {
  --paper:      #f3f1ea;   /* warm off-white */
  --paper-2:    #eceae1;   /* faint panel */
  --ink:        #17150f;   /* near-black, warm */
  --ink-80:     rgba(23, 21, 15, 0.80);
  --ink-55:     rgba(23, 21, 15, 0.55);
  --ink-35:     rgba(23, 21, 15, 0.35);
  --rule:       rgba(23, 21, 15, 0.18);
  --red:        #d5341f;   /* analog red — wordmark outline */

  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --maxw: 1100px;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 300;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.5;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 2.75rem; /* clearance for the fixed contact ticker */
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--ink-35); text-underline-offset: 3px; }

/* ---------- analog film grain ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Masthead
   ============================================================ */
.masthead {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 6rem) var(--pad) clamp(1.5rem, 4vh, 3rem);
  display: grid;
  gap: 0.75rem;
}

.wordmark {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 0.98;
  font-size: clamp(2.5rem, 9vw, 6.5rem);
  display: block;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--red);
  text-stroke: 1.5px var(--red);
  paint-order: stroke fill;
}
.wordmark span { display: block; }

/* fallback if text-stroke is unsupported: keep the name visible in red */
@supports not (-webkit-text-stroke: 1px red) {
  .wordmark { color: var(--red); }
}

.role {
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--ink-55);
}
.role .loc { text-align: right; }

.topnav {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--ink-80);
}

/* ============================================================
   Reels
   ============================================================ */
.reels {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 3vh, 2.5rem) var(--pad);
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}
@media (min-width: 800px) {
  .reels { grid-template-columns: 1fr 1fr; }
}

.reel {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.reel-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: var(--paper-2);
  color: var(--paper);
  font-family: var(--mono);
  display: grid;
  place-content: center;
}

.reel-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: saturate(0.96);
}

.reel-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15,13,9,0.15) 0%, rgba(15,13,9,0.45) 100%);
  transition: background 240ms ease;
}
.reel-play:hover .reel-scrim {
  background: linear-gradient(180deg, rgba(15,13,9,0.35) 0%, rgba(15,13,9,0.6) 100%);
}

.reel-meta {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.45);
}

.reel-label {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.62rem;
  opacity: 0.85;
}

.reel-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  letter-spacing: -0.01em;
  padding: 0 1rem;
}

.reel-tri {
  margin-top: 0.3rem;
  width: 0; height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent currentColor;
  opacity: 0.95;
  transition: transform 240ms ease;
}
.reel-play:hover .reel-tri { transform: scale(1.15); }

/* injected iframe */
.reel iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================================
   Work index
   ============================================================ */
.section-head {
  font-family: var(--mono);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--ink-55);
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.work, .info {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 5rem) var(--pad) 0;
}

.index-group { margin-bottom: clamp(1.75rem, 4vh, 2.75rem); }

.cat {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0;
  margin: 0 0 0.6rem;
}

.index { list-style: none; margin: 0; padding: 0; }
.index li { display: block; }

/* row carries the border + padding for every item (linked or not) */
.index .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

/* button rows (playable) reset native styling */
button.row {
  margin: 0;
  border-width: 0 0 1px 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.index .t { color: var(--ink); transition: color 160ms ease; }
.index .y {
  color: var(--ink-55);
  font-size: 0.78rem;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* expand caret on playable items */
.index li.vid .t::after {
  content: "";
  display: inline-block;
  margin-left: 0.6em;
  width: 0; height: 0;
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent var(--ink-35);
  transform: translateY(-1px);
  transition: transform 240ms ease, border-color 160ms ease;
}
.index li.vid:hover .t { color: var(--ink); opacity: 0.6; }

/* selected / open state → red */
.index li.vid.open .t { color: var(--red); opacity: 1; }
.index li.vid.open .t::after {
  transform: rotate(90deg) translateX(-1px);
  border-left-color: var(--red);
}

/* slide-open embed panel */
.embed {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 360ms ease;
}
.index li.vid.open .embed { grid-template-rows: 1fr; }
.embed-inner { overflow: hidden; }
.embed-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 760px;
  margin: 0.9rem auto 1.1rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================================
   Info
   ============================================================ */
.bio {
  width: 100%;
  margin: 0;
  color: var(--ink-80);
}

/* ============================================================
   Colophon
   ============================================================ */
.colophon {
  max-width: var(--maxw);
  margin: clamp(3rem, 9vh, 7rem) auto 0;
  padding: 1.25rem var(--pad) 2.5rem;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.66rem;
  color: var(--ink-55);
}

/* ============================================================
   Contact ticker (fixed, always-present)
   ============================================================ */
.ticker {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  overflow: hidden;
  background: var(--red);
  color: var(--paper);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 34s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track { animation-play-state: paused; }

.ticker-group { display: flex; flex: none; }

.ticker .unit {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.6rem 1.1rem 0.6rem 0;
  white-space: nowrap;
}

.ticker a { color: var(--paper); text-decoration: none; }
.ticker a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ticker .sep { opacity: 0.55; }

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .ticker-track { animation: none; justify-content: center; }
  .ticker .ticker-group:nth-child(2) { display: none; }
}
