/* ==========================================================================
   Defeat the Forest King
   Dark-first design system. Palette descends from the original Webnode build
   (accent #141b1e, highlight green #639f63) but is rebalanced for contrast:
   the old green sat at ~4.3:1 on #222, below AA for body text.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Surfaces, darkest to lightest */
  --bg:          #0e1315;
  --surface:     #151d20;
  --surface-2:   #1c262a;
  --surface-3:   #243035;

  --border:      rgba(255, 255, 255, .10);
  --border-lit:  rgba(255, 255, 255, .20);

  --text:        #e9eff0;
  --text-dim:    #a3b4b8;
  --text-faint:  #7a8b8f;

  --accent:      #7fc47f;   /* brightened from #639f63 for AA on dark */
  --accent-lit:  #a3d8a3;
  --accent-dim:  rgba(127, 196, 127, .14);

  --radius:      14px;
  --radius-lg:   20px;
  --radius-pill: 999px;

  /* Fluid type — scales between 360px and 1400px viewports */
  --step--1: clamp(0.86rem, 0.83rem + 0.14vw, 0.94rem);
  --step-0:  clamp(1.02rem, 0.98rem + 0.20vw, 1.14rem);
  --step-1:  clamp(1.20rem, 1.12rem + 0.36vw, 1.44rem);
  --step-2:  clamp(1.45rem, 1.30rem + 0.68vw, 1.95rem);
  --step-3:  clamp(1.80rem, 1.50rem + 1.30vw, 2.75rem);
  --step-4:  clamp(2.30rem, 1.70rem + 2.60vw, 4.20rem);

  --gap:      clamp(1rem, 0.6rem + 1.6vw, 2rem);
  --section:  clamp(3.5rem, 2rem + 6vw, 7rem);
  --shell:    78rem;
  --measure:  62ch;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Raleway, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* 400, not the original 300 — thin weights on dark ground read poorly */
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* height:auto is load-bearing: the markup carries intrinsic width/height
   attributes, which would otherwise fix the rendered height. */
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-lit); }

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

::selection { background: var(--accent-dim); color: var(--text); }

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
.measure { max-width: var(--measure); }
.highlight { color: var(--accent); }

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 200;
  padding: .7rem 1.1rem;
  background: var(--accent);
  color: #0b0f10;
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 1rem; color: #0b0f10; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}

/* Solid only once scrolled, so the hero reads full-bleed at rest */
.site-header.is-stuck {
  background: rgba(14, 19, 21, .82);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: .8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-right: auto;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: .01em;
  line-height: 1.2;
}
.brand img { width: 2.4rem; height: 2.4rem; object-fit: contain; flex: none; }
.brand:hover { color: var(--text); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  background: transparent;
  border: 1px solid var(--border-lit);
  border-radius: var(--radius-pill);
  color: var(--text);
  font: inherit;
  font-size: var(--step--1);
  padding: .45rem .9rem;
  cursor: pointer;
}

.nav-links { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }

.nav-links a {
  display: block;
  padding: .45rem .85rem;
  border-radius: var(--radius-pill);
  color: var(--text-dim);
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-links a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .09); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--step-0);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #0b0f10; }
.btn-primary:hover { background: var(--accent-lit); color: #0b0f10; }

.btn-ghost { border-color: var(--border-lit); color: var(--text); background: rgba(255, 255, 255, .04); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); background: rgba(255, 255, 255, .08); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(82vh, 42rem);
  display: grid;
  align-items: end;
  margin-top: -4.2rem;   /* slide under the transparent header */
  padding-top: 4.2rem;
  isolation: isolate;
  overflow: hidden;
}

.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }

/* Scrim: without it the title sits on noisy artwork and fails contrast.
   Weighted to the lower-left where the copy sits, so the clearing and the
   fireflies on the right stay visible instead of being flattened to black. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    /* vertical: just enough to seat the header and melt into the next section */
    linear-gradient(to top,
      var(--bg) 0%,
      rgba(14, 19, 21, .55) 12%,
      rgba(14, 19, 21, .18) 38%,
      rgba(14, 19, 21, .06) 70%,
      rgba(14, 19, 21, .40) 100%),
    /* horizontal: carries the contrast behind the copy, leaving the lit
       clearing on the right readable as artwork */
    linear-gradient(to right,
      rgba(14, 19, 21, .86) 0%,
      rgba(14, 19, 21, .62) 32%,
      rgba(14, 19, 21, .20) 58%,
      transparent 76%);
}

.hero-content { padding-block: clamp(2.5rem, 6vw, 5rem); }

.hero h1 { max-width: 16ch; }

.hero-lede {
  margin-top: 1.2rem;
  max-width: 46ch;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--text-dim);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding-block: var(--section); }
.section-tint { background: var(--surface); }

.section-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head p { margin-top: .9rem; color: var(--text-dim); max-width: var(--measure); }

.kicker {
  display: block;
  margin-bottom: .7rem;
  color: var(--accent);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Pull quote — the film's thesis line */
.statement {
  margin: 0;
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3.5rem);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(100deg, var(--accent-dim), transparent 65%);
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  max-width: 24ch;
  text-wrap: balance;
}

.still {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Discussion questions
   -------------------------------------------------------------------------- */

/* 28rem floor keeps this at two columns on desktop — at three the stills get
   too small to read the characters' expressions, which is the whole point. */
.q-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
  gap: var(--gap);
}

.q-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease;
}
.q-card:hover { transform: translateY(-4px); border-color: var(--border-lit); }
@media (prefers-reduced-motion: reduce) { .q-card:hover { transform: none; } }

.q-card figure { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-3); }
.q-card figure img { width: 100%; height: 100%; object-fit: cover; }

.q-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  flex: 1;
}

.q-quote {
  margin: 0;
  padding-left: .95rem;
  border-left: 2px solid var(--accent-dim);
  color: var(--text-faint);
  font-size: var(--step--1);
  font-style: italic;
  line-height: 1.6;
}

.q-ask { display: flex; gap: .9rem; align-items: flex-start; margin-top: auto; }

.q-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent-lit);
  font-size: var(--step--1);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.q-ask p { margin: 0; font-weight: 500; line-height: 1.5; }

/* --------------------------------------------------------------------------
   Resources
   -------------------------------------------------------------------------- */

.res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: var(--gap);
}

.res-card {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding: clamp(1.35rem, 2.5vw, 1.9rem);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color .22s ease, transform .22s ease;
}
.res-card:hover { border-color: var(--accent); transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .res-card:hover { transform: none; } }

.res-card h3 a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--text);
  text-decoration: none;
}
.res-card h3 a::after {
  content: "↗";
  font-size: .7em;
  color: var(--accent);
  transition: transform .18s ease;
}
.res-card:hover h3 a { color: var(--accent-lit); }
.res-card:hover h3 a::after { transform: translate(2px, -2px); }

.res-card p { color: var(--text-dim); font-size: var(--step--1); line-height: 1.65; margin: 0; }

/* Make the whole card clickable without nesting interactive elements */
.res-card h3 a::before { content: ""; position: absolute; inset: 0; }
.res-card { position: relative; }

/* --------------------------------------------------------------------------
   Artwork gallery
   -------------------------------------------------------------------------- */

.art-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}
@media (min-width: 52em) {
  .art-grid { grid-template-columns: 1.15fr .85fr; align-items: start; }
  .art-stack { display: grid; gap: var(--gap); }
}

.art-grid figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-block: clamp(2rem, 4vw, 3rem);
}

.footer-brand { font-weight: 600; font-size: var(--step-1); letter-spacing: -0.01em; }
.footer-brand span { display: block; margin-top: .3rem; font-size: var(--step--1); font-weight: 400; color: var(--text-faint); letter-spacing: 0; }

.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; font-size: var(--step--1); }
.footer-links a { color: var(--text-dim); text-decoration: none; }
.footer-links a:hover { color: var(--accent-lit); }

/* The campaign hashtag, as a closing note. Deliberately plain text — given a
   pill or a border it reads as a button and invites a click that goes nowhere. */
.footer-tag {
  border-top: 1px solid var(--border);
  padding-block: clamp(1.6rem, 3.5vw, 2.5rem);
  text-align: center;
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */

/* Scoped to .js, which an inline script in <head> sets. Content is therefore
   visible by default: if the stylesheet loads but the script does not, the
   page still reads normally instead of rendering blank. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 46em) {
  .nav-toggle { display: inline-flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    padding: .6rem 1.25rem 1.1rem;
    background: rgba(14, 19, 21, .96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: .7rem .85rem; font-size: var(--step-0); }

  .hero { min-height: 34rem; align-items: end; }
  .hero-actions .btn { flex: 1 1 12rem; }
}
