/* The site of firecal. Colours are the generated tokens in tokens.css; the pastels are those colours mixed with
   paper, as the hand-drawn style asks (45 to 80 % paper). */
:root {
  --paper: var(--bg);
  --ink: var(--text-strong);
  --secondary: var(--text-secondary);
  --land: color-mix(in srgb, var(--healthy) 40%, var(--bg));
  --beam: color-mix(in srgb, var(--uncertainty) 20%, var(--bg));
  --panel: color-mix(in srgb, var(--uncertainty) 45%, var(--bg));
  --sea: color-mix(in srgb, var(--uncertainty) 18%, var(--bg));
  --fire: color-mix(in srgb, var(--activity) 55%, var(--bg));
  --bar-height: 64px;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* The bar: the logo lands in its slot, then the name and links appear. */
.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: var(--bar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: var(--bg);
  border-bottom: var(--hairline) solid transparent;
  transition: border-color var(--motion-duration) ease;
}
body.arrived .bar { border-bottom-color: var(--line); }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark-slot { width: 26px; height: 34px; }
.brand-name, .bar nav {
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--motion-duration) ease, transform var(--motion-duration) var(--motion-ease);
}
.brand-name { font-size: 20px; letter-spacing: -0.3px; color: var(--ink); }
body.arrived .brand-name, body.arrived .bar nav, body.intro-done .bar nav { opacity: 1; transform: none; }
.bar nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.bar nav a { text-decoration: none; color: var(--text); }
.bar nav a:not(.button):hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-row);
  background: var(--ink);
  color: var(--bg) !important;
  font-weight: 600;
  text-decoration: none;
}
.button.quiet { background: var(--surface); color: var(--ink) !important; }
.button:focus-visible, .bar a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

/* The flying logo: placed every frame by main.js between the hero's slot and the bar's. */
.mark-sitting { display: block; width: 100%; height: 100%; overflow: visible; }

.mark {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 11;
  overflow: visible;
  pointer-events: none;
  transform-origin: 0 0;
}

svg .stroke { fill: none; stroke-linecap: round; stroke-linejoin: round; }
svg .w2 { stroke-width: 2.5px; }
svg .w3 { stroke-width: 3.5px; }
svg .w4 { stroke-width: 4.5px; }
svg .w5 { stroke-width: 6px; }
svg .w6 { stroke-width: 7px; }
svg .wlogo { stroke-width: 14px; }
svg .label { font-family: var(--font-ui); }
svg .number { font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
svg .h3 { font-size: 24px; font-weight: 600; }
svg .small { font-size: 17px; font-weight: 500; }
svg .tiny { font-size: 14px; font-weight: 500; }
svg .strong { font-weight: 700; }
svg .mid { text-anchor: middle; }
svg .end { text-anchor: end; }

/* The hero: the logo's slot beside the name. */
.hero { height: 170vh; }
.pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.hero .pin { display: grid; place-items: center; padding: var(--bar-height) var(--gutter) 0; }
.hero-grid { display: flex; align-items: center; gap: clamp(24px, 5vw, 72px); max-width: 1180px; }
.hero-slot { flex: none; width: clamp(150px, 22vw, 300px); aspect-ratio: 480 / 620; }
.hero-copy h1 {
  margin: 0;
  font-size: clamp(64px, 11vw, 148px);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.lede { margin: 18px 0 0; max-width: 30ch; font-size: clamp(19px, 2.1vw, 26px); line-height: 1.35; }
.lede.strong { margin-top: 8px; font-weight: 600; color: var(--ink); }
.meta { margin: 26px 0 0; font-size: 14px; color: var(--secondary); }
.hero-copy > * { opacity: 0; transform: translateY(14px); transition: opacity 0.4s ease, transform 0.4s var(--motion-ease); }
body.intro-done .hero-copy > * { opacity: 1; transform: none; }
body.intro-done .hero-copy > :nth-child(2) { transition-delay: 0.08s; }
body.intro-done .hero-copy > :nth-child(3) { transition-delay: 0.16s; }
body.intro-done .hero-copy > :nth-child(4) { transition-delay: 0.24s; }
.cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  opacity: 0;
  transition: opacity 0.6s ease 0.6s;
}
body.intro-done .cue { opacity: 1; }
body.arrived .cue { opacity: 0; transition-delay: 0s; }

/* A story: pinned while its drawing runs, the words beside it changing at its steps. */
.story { height: 340vh; }
.story .pin {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: var(--gutter);
  padding: var(--bar-height) var(--gutter) 0;
  max-width: 1440px;
  margin: 0 auto;
}
.copy { position: relative; min-height: 15em; }
.step {
  position: absolute;
  inset: 0 0 auto;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s var(--motion-ease);
  pointer-events: none;
}
.step.on { opacity: 1; transform: none; pointer-events: auto; }
.step h2, .film h2, .closing h2 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--ink);
}
.step p, .closing-copy p { margin: 18px 0 0; max-width: 34ch; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; }
.stage { width: 100%; height: auto; max-height: calc(100svh - var(--bar-height) - 24px); overflow: visible; }

/* The film, framed by a line that draws itself as it comes into view. */
.film { padding: 18vh var(--gutter) 10vh; max-width: 1180px; margin: 0 auto; }
.film h2 { margin-bottom: 40px; }
.film-frame { position: relative; margin-bottom: 70px; }
.film-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-panel); background: var(--surface); }
.frame-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }

.closing { position: relative; height: 100vh; height: 100svh; min-height: 620px; padding: calc(var(--bar-height) + 10vh) var(--gutter) 0; text-align: center; overflow: hidden; }
.closing-copy { position: relative; z-index: 1; }
.closing-copy p { margin-left: auto; margin-right: auto; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.closing .stage { position: absolute; left: 50%; bottom: 0; width: max(100%, 1000px); transform: translateX(-50%); max-height: none; }

footer { position: absolute; inset: auto 0 0; z-index: 1; padding: 0 var(--gutter) 28px; font-size: 14px; color: var(--text); text-align: center; }
footer p { margin: 0 auto 6px; max-width: 70ch; }

/* Cards and people: each outline draws itself, one after another, as the section comes in. */
.reveal { max-width: 1180px; margin: 0 auto; padding: 14vh var(--gutter) 4vh; }
.reveal h2 { margin: 0 0 40px; font-size: clamp(30px, 3.6vw, 50px); line-height: 1.08; letter-spacing: -0.02em; font-weight: 600; color: var(--ink); }
.cards, .people { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cards li { position: relative; padding: 24px 24px 26px; }
.cards strong, .people strong { display: block; font-size: 20px; font-weight: 600; color: var(--ink); }
.cards span, .people span { display: block; margin-top: 8px; font-size: 16px; line-height: 1.5; }
.card-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.card-art path { vector-effect: non-scaling-stroke; }
.people { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); text-align: center; }
.people span { color: var(--text-secondary); font-size: 15px; }
.person-art { width: 108px; height: 108px; margin: 0 auto 10px; display: block; overflow: visible; }
svg .initial { font-size: 44px; font-weight: 600; }
.reveal li > strong, .reveal li > span { opacity: 0; transform: translateY(14px); transition: opacity 0.4s ease, transform 0.4s var(--motion-ease); }
.reveal.in li > strong, .reveal.in li > span { opacity: 1; transform: none; }
.reveal.in li:nth-child(2) > * { transition-delay: 0.08s; }
.reveal.in li:nth-child(3) > * { transition-delay: 0.16s; }
.reveal.in li:nth-child(4) > * { transition-delay: 0.24s; }
.reveal.in li:nth-child(5) > * { transition-delay: 0.32s; }
.reveal.in li:nth-child(6) > * { transition-delay: 0.4s; }

/* A phone: the drawing above, the words under it. */
@media (max-width: 760px) {
  .bar nav a:not(.button) { display: none; }
  .hero-grid { flex-direction: column; text-align: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .story .pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; gap: 8px; padding-top: calc(var(--bar-height) + 8px); }
  .story .stage { order: -1; max-height: 52svh; }
  .copy { min-height: 13em; }
  .closing .stage { width: 1500px; }
  footer { font-size: 12px; padding-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .step, .hero-copy > *, .brand-name, .bar nav, .reveal li > * { transition: none; }
}
