/* ============================================================
   Liam Summers — liamsummers.com
   Design system: muted analog-film palette, one cyan accent.
   Everything muted, one thing not.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --dark:   #1C1A18;   /* backgrounds, high-contrast text   */
  --shadow: #6A6660;   /* secondary text, dividers          */
  --stone:  #C2BEB8;   /* body text on dark                 */
  --light:  #E2DED8;   /* primary text on dark              */
  --accent: #00E5FF;   /* ONCE per page. Never twice.       */

  --serif:  'Vollkorn', Georgia, serif;
  --sans:   'Libre Franklin', -apple-system, sans-serif;
  --accent-face: 'Inter', -apple-system, sans-serif;

  --measure: 34rem;    /* readable line length              */
  --gutter:  clamp(1.5rem, 5vw, 4rem);
  --rule:    1px solid rgba(106, 102, 96, 0.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--stone);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p + p { margin-top: 1.2em; }

a { color: var(--light); text-decoration: none; border-bottom: 1px solid var(--shadow); transition: border-color .2s ease, color .2s ease; }
a:hover { color: #fff; border-bottom-color: var(--light); }

/* ---------- Layout ---------- */
.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

main { padding-block: clamp(3rem, 8vw, 6rem); }

.prose { max-width: var(--measure); }

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: var(--rule);
  padding-block: 1.75rem;
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--light);
  border-bottom: 0;
  white-space: nowrap;
}
.wordmark:hover { color: #fff; }

.nav ul {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.nav a {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--shadow);
  border-bottom: 0;
  padding-bottom: 2px;
}
.nav a:hover { color: var(--light); }

/* current page: quietly marked, no colour */
.nav a[aria-current="page"] {
  color: var(--light);
  border-bottom: 1px solid var(--shadow);
}

/* ---------- Headings ---------- */
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem);
  line-height: 1.1;
  color: var(--light);
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);
  line-height: 1.25;
  color: var(--light);
}

/* small all-caps label — the workhorse of the system */
.label {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--shadow);
  display: block;
  margin-bottom: 0.75rem;
}

.page-title { margin-bottom: clamp(2rem, 5vw, 3.5rem); }

/* ---------- THE ACCENT — once per page, never more ---------- */
.accent {
  font-family: var(--accent-face);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;   /* always caps. always cyan. */
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0;
  padding: 0.7rem 1.4rem;
  display: inline-block;
  line-height: 1;
  transition: background .18s ease, color .18s ease;
}
.accent:hover {
  background: var(--accent);
  color: var(--dark);
  border-color: var(--accent);
}

/* ---------- Hero (home) ---------- */
.hero {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  border-bottom: var(--rule);
}
.hero img {
  width: 100%;
  aspect-ratio: 1407 / 646;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.02);
}

/* ---------- Showreel ---------- */
.reel {
  position: relative;
  background: #000;
  aspect-ratio: 1920 / 1038;
}

.reel video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.reel.is-playing video { cursor: pointer; }

/* A soft radial scrim: darkest where the play control and label sit, clearing
   toward the edges so the frame still reads as a frame. */
.reel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(28,26,24,.45) 0%, rgba(28,26,24,.12) 55%, transparent 80%),
    linear-gradient(to bottom, rgba(28,26,24,.15), transparent 30%);
  pointer-events: none;
  transition: opacity .4s ease;
}
.reel.is-playing::after { opacity: 0; }

/* The whole frame is the click target. Play control and label sit centred —
   the poster is now a clean frame with nothing burnt into it. */
.reel-play {
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--light);
  transition: opacity .3s ease;
  z-index: 2;
}
.reel.is-playing .reel-play {
  opacity: 0;
  pointer-events: none;
}

/* THE ACCENT on this page: the play control. Nothing else is cyan above the fold. */
.reel-play-icon {
  width: clamp(3.25rem, 6vw, 4.5rem);
  aspect-ratio: 1;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background .2s ease, transform .2s ease;
}
.reel-play-icon::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.5em 0 0.5em 0.85em;
  border-color: transparent transparent transparent var(--accent);
  margin-left: 0.22em;
  transition: border-color .2s ease;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
}
.reel-play:hover .reel-play-icon,
.reel-play:focus-visible .reel-play-icon {
  background: var(--accent);
  transform: scale(1.06);
}
.reel-play:hover .reel-play-icon::before,
.reel-play:focus-visible .reel-play-icon::before {
  border-left-color: var(--dark);
}

/* The label is muted — the cyan play control is this page's one accent. */
.reel-play-label {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.7rem, 0.9vw, 0.8rem);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--light);
  text-shadow: 0 1px 16px rgba(0, 0, 0, .55);
  transition: color .2s ease;
}
.reel-play:hover .reel-play-label { color: #fff; }

.reel-play:focus-visible { outline: none; }
.reel-play:focus-visible .reel-play-icon {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ---------- Showreel controls: play/pause + mute. Nothing else. ----------
   Native controls are never enabled, so no scrubber, timestamp, fullscreen
   or download menu can appear. */
.reel-controls {
  position: absolute;
  left: clamp(1rem, 2.5vw, 1.75rem);
  bottom: clamp(1rem, 2.5vw, 1.75rem);
  display: flex;
  gap: 0.5rem;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

/* Visible once playing — and on hover/focus, or whenever paused. */
.reel.is-playing .reel-controls {
  pointer-events: auto;
}
.reel.is-playing:hover .reel-controls,
.reel.is-playing:focus-within .reel-controls,
.reel.is-playing.is-paused .reel-controls {
  opacity: 1;
}

.reel-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(226, 222, 216, 0.25);
  border-radius: 50%;
  background: rgba(28, 26, 24, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--light);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.reel-btn:hover,
.reel-btn:focus-visible {
  background: rgba(226, 222, 216, 0.92);
  border-color: transparent;
  color: var(--dark);
  outline: none;
}

/* Icon state swapping — play vs pause */
.reel-btn .icon-play  { display: none; }
.reel.is-paused .reel-btn .icon-play  { display: block; }
.reel.is-paused .reel-btn .icon-pause { display: none; }

/* Icon state swapping — sound vs muted */
.reel-btn .icon-muted { display: none; }
.reel.is-muted .reel-btn .icon-muted { display: block; }
.reel.is-muted .reel-btn .icon-sound { display: none; }

/* Belt and braces: even if a browser force-shows native controls, hide the
   parts we don't want. */
.reel video::-webkit-media-controls-timeline,
.reel video::-webkit-media-controls-current-time-display,
.reel video::-webkit-media-controls-time-remaining-display,
.reel video::-webkit-media-controls-fullscreen-button,
.reel video::-webkit-media-controls-enclosure { display: none !important; }

/* bio: text + portrait */
.bio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 18rem);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
.bio .portrait img {
  width: 100%;
  aspect-ratio: 347 / 469;
  object-fit: cover;
  filter: saturate(0.85);
}

/* ---------- Film grid (portfolio) ----------
   Wide frames from the films themselves, not posters — reads as a
   director's contact sheet rather than a poster wall. */
.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr));
  gap: clamp(2rem, 4vw, 3.25rem);
}

.film-card { border-bottom: 0; display: block; }
.film-card:hover { border-bottom: 0; }

.film-card .poster {
  overflow: hidden;
  background: #000;
}
.film-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.8) brightness(0.9);
  transition: filter .35s ease, transform .5s ease;
}
.film-card:hover img {
  filter: saturate(1) brightness(1);
  transform: scale(1.03);
}

.film-card h2 {
  margin-top: 1rem;
  font-size: 1.15rem;
  transition: color .2s ease;
}
.film-card:hover h2 { color: #fff; }

.film-card .meta {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--shadow);
  margin-top: 0.35rem;
}

/* ---------- Film page ---------- */
.stills {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.stills.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.stills img { width: 100%; object-fit: cover; filter: saturate(0.85); }

/* posters side by side (mushroom) */
.stills.posters img { aspect-ratio: 2 / 3; }

.film-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: var(--rule);
}

/* quiet secondary link, sits next to the accent */
.link-quiet {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--shadow);
  border-bottom: 0;
}
.link-quiet:hover { color: var(--light); }

/* ---------- The Turtle ---------- */
.turtle-stills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.turtle-stills img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.85);
}

.support {
  border-top: var(--rule);
  border-bottom: var(--rule);
  padding-block: clamp(2rem, 5vw, 3rem);
  margin-block: clamp(2rem, 5vw, 3rem);
}

.support h2 { margin-bottom: 1rem; }

.support dl { margin: 0; }
.support dt {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--light);
  margin-top: 1.5rem;
}
.support dd { margin: 0.35rem 0 0; }

.perks li { padding-left: 1.5rem; position: relative; margin-top: 0.75rem; }
.perks li::before {
  content: "★";
  position: absolute;
  left: 0;
  color: var(--shadow);
  font-size: 0.8em;
}

.timeline dt { margin-top: 1rem; }
.timeline dd { color: var(--stone); }

/* ---------- Contact ---------- */
.contact-lines p { margin-top: 0.4rem; }

/* CV download — quiet. The email above it is the page's accent. */
.cv {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-top: 2rem;
  border-top: var(--rule);
}

.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--light);
  border: 1px solid var(--shadow);
  padding: 0.8rem 1.3rem;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.cv-link:hover,
.cv-link:focus-visible {
  background: var(--light);
  border-color: var(--light);
  color: var(--dark);
}

.cv-meta {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--shadow);
  padding-left: 0.6rem;
  margin-left: 0.2rem;
  border-left: 1px solid rgba(106, 102, 96, 0.5);
  transition: color .2s ease, border-color .2s ease;
}
.cv-link:hover .cv-meta,
.cv-link:focus-visible .cv-meta {
  color: var(--dark);
  border-left-color: rgba(28, 26, 24, 0.3);
}

.socials {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2rem);
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: var(--rule);
}
.socials a {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--shadow);
  border-bottom: 0;
}
.socials a:hover { color: var(--light); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: var(--rule);
  padding-block: 2.5rem 3.5rem;
  margin-top: clamp(3rem, 8vw, 6rem);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
}

.site-footer a,
.site-footer .footer-mail {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--shadow);
  border-bottom: 0;
}
.site-footer a:hover { color: var(--light); }

.footer-social { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-social a { text-transform: uppercase; letter-spacing: 0.16em; }

/* ---------- Responsive ---------- */
@media (max-width: 46rem) {
  .bio { grid-template-columns: 1fr; }
  .bio .portrait { max-width: 15rem; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .nav ul { gap: 1.5rem; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* ---------- Accessibility & motion ---------- */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
