/* ==========================================================================
   ETHAN HINE — ethanhine.com
   Swiss grid, two-state colour system (light / dark only).

   TYPE SYSTEM
   Display  : Archivo 800  — titles, nav name, section labels, buttons
   Text     : Inter 300/400 — everything else
   One scale, five steps. No ad-hoc font sizes anywhere below.

   COLOUR
   Two tokens do all the work: --color-bg and --color-ink.
   Secondary text and hairlines are derived from --color-ink with
   color-mix(), so they stay correct in both states automatically.
   Nothing in this file hardcodes a grey.
   ========================================================================== */

:root {
  /* ---- colour (state 0: light. The cycle button swaps these two.) ---- */
  --color-bg:  #ffffff;
  --color-ink: #111111;

  /* derived — never set these directly */
  --ink-muted: color-mix(in srgb, currentColor 58%, transparent);
  --ink-line:  color-mix(in srgb, currentColor 18%, transparent);
  --ink-wash:  color-mix(in srgb, currentColor 5%, transparent);

  /* menu rows — set per colour state, not derived, so both read as in the
     reference: light grey on white, mid grey on black */
  --menu-row-bg:    #ececec;
  --menu-row-hover: #e0e0e0;

  /* ---- grid ---- */
  /* constant above ~1400px, so margins match across desktop sizes */
  --margin: clamp(1.25rem, 4vw, 3.5rem);
  --gutter: clamp(0.75rem, 1.5vw, 1.5rem);

  /* ---- type ---- */
  --font-display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --t-micro:   0.6875rem;  /* 11 — eyebrow labels, counters */
  --t-caption: 0.8125rem;  /* 13 — nav, captions, meta, filters */
  --t-small:   0.875rem;   /* 14 — footer, list items, secondary */
  --t-body:    0.9375rem;  /* 15 — running text */
  --t-lead:    1.125rem;   /* 18 — intro paragraphs */
  --t-title:   clamp(1.5rem, 2.6vw, 2.25rem);

  --lh-tight: 1.15;
  --lh-text:  1.6;

  --track-label: 0.04em;

  /* ---- rhythm ---- */
  --space-section: clamp(3.5rem, 7vw, 6.5rem);
  --header-h: 72px;
}

/* Dark state: swap the two tokens. Everything derived follows. */
html[data-color-state="1"] {
  --color-bg:  #111111;
  --color-ink: #ffffff;
  --menu-row-bg:    #767676;
  --menu-row-hover: #868686;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-text);
  font-weight: 300;
  font-size: var(--t-body);
  line-height: var(--lh-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  margin: 0;
}

p { margin: 0; }

/* ---- shared atoms ---- */
.label {
  font-family: var(--font-text);
  font-weight: 400;
  font-size: var(--t-caption);
  letter-spacing: var(--track-label);
  color: var(--ink-muted);
}

/*
  No max-width. The grid always spans the viewport and the only inset is
  --margin, so the left and right margins are identical on a laptop and on
  a 32" monitor. (Capping the grid and centring it was what pulled the name
  and the controls toward the middle of a wide screen.)
*/
.grid {
  width: 100%;
  padding: 0 var(--margin);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 var(--gutter);
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
}

.site-header .grid {
  align-items: center;
  min-height: var(--header-h);
}

.site-title {
  grid-column: 1 / 7;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.header-controls {
  grid-column: 8 / 13;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* circle + square: identical footprint, solid by default, hollow on hover */
.color-cycle-btn,
.hamburger-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  cursor: pointer;
  border: 1.5px solid var(--color-ink);
  background: var(--color-ink);
  transition: background-color 0.15s ease;
}

.color-cycle-btn { border-radius: 50%; }
.hamburger-btn   { border-radius: 6px; }

.color-cycle-btn:hover,
.hamburger-btn:hover { background: transparent; }

/* ==========================================================================
   MENU — a small drop-down panel anchored under the top-right controls.
   Rounded rows; the current page reads as a solid block, the others as
   muted rows. Both invert correctly in the dark state.
   ========================================================================== */

.menu-dropdown {
  --row-h: 42px;
  --row-gap: 5px;
  --row-step: calc(var(--row-h) + var(--row-gap));
  --ease: linear;
  --slide: 200ms;
  --stagger: 200ms;   /* == --slide, so the steps never overlap */

  position: fixed;
  top: calc(var(--header-h) - 10px);
  right: var(--margin);
  z-index: 140;
  width: min(228px, calc(100vw - 2 * var(--margin)));
  height: calc(3 * var(--row-h) + 2 * var(--row-gap));
  /* the panel clips its own top edge, so rows are simply hidden above it
     when closed — they slide in and out solid, never fading */
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear calc(var(--slide) + 2 * var(--stagger));
}

.menu-dropdown.is-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

/*
  Closed, each row is parked above the panel's top edge and clipped out of
  sight. Opening releases them in order (Portfolio, Resume, About); closing
  runs the same delays in reverse, so About retracts into Resume and Resume
  into Portfolio.
*/
.menu-row {
  --i: 0;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--i) * var(--row-step));
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: var(--row-h);
  padding: 0 0.95rem;
  border-radius: 11px;
  background: var(--menu-row-bg);
  color: var(--color-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8125rem;
  line-height: 1;
  letter-spacing: -0.005em;
  transform: translateY(calc(-1 * (var(--i) + 1) * var(--row-step)));
  transition:
    transform var(--slide) var(--ease),
    background-color 0.15s ease,
    color 0.15s ease;
  transition-delay: calc((2 - var(--i)) * var(--stagger)), 0s, 0s;
}

.menu-dropdown.is-open .menu-row {
  transform: translateY(0);
  transition-delay: calc(var(--i) * var(--stagger)), 0s, 0s;
}

/* reverse paint order: Portfolio sits above Resume, Resume above About,
   so each row appears from beneath its neighbour instead of over it */
.menu-row:nth-child(1) { --i: 0; z-index: 3; }
.menu-row:nth-child(2) { --i: 1; z-index: 2; }
.menu-row:nth-child(3) { --i: 2; z-index: 1; }

.menu-row:hover { background: var(--menu-row-hover); }

.menu-row.is-active {
  background: var(--color-ink);
  color: var(--color-bg);
}

.menu-row.is-active:hover { background: var(--color-ink); }

.menu-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .menu-dropdown { transition-delay: 0s; }
  .menu-row { transition-delay: 0s !important; }
}



/* ==========================================================================
   LAYOUT
   ========================================================================== */

main { padding-top: calc(var(--header-h) + 16px); }
body.is-home main { padding-top: 0; }

.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

/* ---- home hero ---- */
.home-hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.home-hero-img { flex: 1; overflow: hidden; position: relative; }

.home-hero-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.home-hero-img .hero-light { opacity: 1; }
.home-hero-img .hero-dark  { opacity: 0; }
html[data-hero="dark"]  .home-hero-img .hero-dark  { opacity: 1; }
html[data-hero="dark"]  .home-hero-img .hero-light { opacity: 0; }
html[data-hero="light"] .home-hero-img .hero-light { opacity: 1; }
html[data-hero="light"] .home-hero-img .hero-dark  { opacity: 0; }

/* On tall or narrow viewports a full-bleed cover crop would cut into the
   model, so switch to contain and let the white canvas fill the frame. */
/* The light hero is a model on white, so a hard crop would cut it; contain
   it on tall screens. The dark hero is full bleed at every size. */
@media (max-aspect-ratio: 1/1), (max-width: 700px) {
  .home-hero-img { background: var(--color-bg); }
  /* contain, so a tall phone screen shows the whole model instead of a
     heavily cropped middle. Phones get a tighter source crop via <picture>. */
  .home-hero-img .hero-light,
  .home-hero-img .hero-dark { object-fit: contain; }
  /* the dark photo's ground is pure black; match it so the letterboxing
     is invisible against the near-black page */
  html[data-hero="dark"] .home-hero-img { background: #000; }
}

/* <picture> must not break the absolute positioning of the img inside it */
.home-hero-img picture { display: contents; }

.home-hero-strip {
  height: clamp(32px, 4vh, 48px);
  background: var(--color-bg);
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}

/* ==========================================================================
   PROJECT PAGES — editorial, on the 12-column grid

   Two rules govern every image here:
   1. Nothing is cropped. Images keep their native aspect ratio, so a
      panorama stays a panorama and a portrait stays a portrait.
   2. Nothing is upscaled. Each figure carries --fw (the file's real pixel
      width) and is capped there, so a 512px export never stretches across
      1400px of layout. Column span is chosen to suit the source resolution.
   ========================================================================== */

:root { --fig-gap: clamp(1.75rem, 3.5vw, 3rem); }

/* a row of the project grid — guarantees figures sit side by side */
.prow {
  grid-column: 1 / 13;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 var(--gutter);
  align-items: start;
  margin-bottom: var(--fig-gap);
}

/* column spans */
.col-full { grid-column: 1 / 13; }
.col-wide { grid-column: 2 / 12; }
.col-mid  { grid-column: 3 / 11; }
.col-l8   { grid-column: 1 / 9; }
.col-r8   { grid-column: 5 / 13; }
.col-l7   { grid-column: 1 / 8; }
.col-l6   { grid-column: 1 / 7; }
.col-r6   { grid-column: 7 / 13; }
.col-l5   { grid-column: 1 / 6; }
.col-r5   { grid-column: 8 / 13; }
.col-t1   { grid-column: 1 / 5; }
.col-t2   { grid-column: 5 / 9; }
.col-t3   { grid-column: 9 / 13; }
.col-h1   { grid-column: 1 / 7; }
.col-h2   { grid-column: 7 / 13; }

/* figure: natural ratio, capped at the source file's own pixel width so a
   small export is never upscaled. A full-width figure is exempt — it is
   meant to run margin to margin. */
.pfig { margin: 0; max-width: var(--fw, none); }
.pfig.col-full { max-width: none; }
.pfig img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--ink-wash);
  box-shadow: 0 0 0 1px var(--ink-line);
}

.pcap {
  font-size: var(--t-caption);
  color: var(--ink-muted);
  margin-top: 0.6rem;
  max-width: 46ch;
}

/* hero = the project's cover photo, uncropped and centred */
.project-hero {
  grid-column: 1 / 13;
  display: flex;
  justify-content: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.project-hero img {
  width: auto;
  height: auto;
  max-width: min(100%, var(--fw, 100%));
  max-height: 82vh;
  display: block;
}

.project-head {
  grid-column: 1 / 13;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem var(--gutter);
  padding-bottom: clamp(1.75rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--ink-line);
  margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
}

.project-head h1 { grid-column: 1 / 8; font-size: var(--t-title); }
.project-head .project-meta { grid-column: 9 / 13; }

.project-meta dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1.25rem;
}

.project-meta dt { font-size: var(--t-caption); color: var(--ink-muted); margin: 0; }
.project-meta dd { font-size: var(--t-caption); margin: 0; }

.project-lead {
  grid-column: 1 / 8;
  font-size: var(--t-lead);
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.ptext p + p { margin-top: 1.15rem; }

.project-colophon {
  grid-column: 1 / 7;
  font-size: var(--t-caption);
  color: var(--ink-muted);
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink-line);
}

.project-next {
  grid-column: 1 / 13;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink-line);
  text-decoration: none;
}

.project-next .label { flex-shrink: 0; }

.project-next strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--t-title);
  letter-spacing: -0.015em;
  transition: opacity 0.15s ease;
}

.project-next:hover strong { opacity: 0.45; }

/* below 780 the grid collapses: every figure and text block goes full width,
   stacked in reading order */
@media (max-width: 780px) {
  .project-head h1,
  .project-head .project-meta,
  .project-lead,
  .project-colophon,
  .prow > * { grid-column: 1 / 13 !important; }
  .prow { gap: var(--fig-gap) var(--gutter); margin-bottom: var(--fig-gap); }
  .pfig { max-width: none; }
}

/* ==========================================================================
   ABOUT
   ========================================================================== */

.about-portrait { grid-column: 1 / 4; max-width: min(100%, 260px); }

.about-portrait .frame {
  aspect-ratio: 4 / 5;
  background: var(--ink-wash);
  overflow: hidden;
}

.about-portrait .frame img { width: 100%; height: 100%; object-fit: cover; }

.about-body { grid-column: 4 / 13; }
/*
  Runs to the right margin at laptop widths. The ch cap only engages on a
  very wide monitor, where an uncapped line would otherwise reach ~170
  characters and become hard to read.
*/
.about-body p { font-size: var(--t-lead); max-width: 92ch; }
.about-body p + p { margin-top: 1.3rem; }

.about-figure {
  grid-column: 1 / 13;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
}

.about-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.about-figure figcaption {
  font-size: var(--t-caption);
  color: var(--ink-muted);
  margin-top: 0.6rem;
  max-width: 46ch;
}

.about-subhead {
  grid-column: 1 / 13;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--t-caption);
  letter-spacing: var(--track-label);
  margin: clamp(2.25rem, 4vw, 3rem) 0 0;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--ink-line);
}

.fact-list {
  grid-column: 1 / 13;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.1rem var(--gutter);
  margin: 1.1rem 0 0;
  list-style: none;
  padding: 0;
}

.fact-list li { grid-column: span 3; }

@media (max-width: 780px) {
  .about-portrait, .about-body { grid-column: 1 / 13; }
  .about-portrait { max-width: 150px; }
  .about-body { margin-top: 1.75rem; }
  .fact-list li { grid-column: span 6; }
}

.fact-list dt {
  font-size: var(--t-caption);
  color: var(--ink-muted);
  margin-bottom: 0.2rem;
}

.fact-list dd { margin: 0; font-size: var(--t-small); }

/* ==========================================================================
   RESUME
   ========================================================================== */

.resume-topbar {
  grid-column: 1 / 13;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.resume-contact {
  grid-column: 1 / 13;
  max-width: 1500px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.75rem;
  font-size: var(--t-small);
  color: var(--ink-muted);
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.resume-contact a { text-decoration: none; }
.resume-contact a:hover { color: var(--color-ink); }

.resume-section {
  grid-column: 1 / 13;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 var(--gutter);
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  border-top: 1px solid var(--ink-line);
}

.resume-section-label {
  grid-column: 1 / 3;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--t-caption);
  letter-spacing: var(--track-label);
  line-height: 1.4;
  align-self: start;
}

/* capped so the right-aligned dates stay near their entry instead of
   stranding at the far edge of a wide monitor */
.resume-section-body { grid-column: 4 / 13; max-width: 1040px; }

@media (max-width: 780px) {
  .resume-section-label { grid-column: 1 / 13; margin-bottom: 0.9rem; }
  .resume-section-body  { grid-column: 1 / 13; }
}

.resume-entry + .resume-entry { margin-top: 1.5rem; }

.resume-entry .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.resume-entry h3 {
  font-size: var(--t-small);
  letter-spacing: -0.005em;
}

.resume-entry .org {
  font-size: var(--t-small);
  color: var(--ink-muted);
  margin-top: 0.1rem;
}

.resume-entry .dates {
  font-size: var(--t-caption);
  color: var(--ink-muted);
  white-space: nowrap;
}

.resume-entry ul { margin: 0.6rem 0 0; padding-left: 1.05rem; }
.resume-entry li { font-size: var(--t-small); margin-bottom: 0.3rem; }

.resume-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem var(--gutter);
}

@media (max-width: 780px) { .resume-cols { grid-template-columns: 1fr; } }

.resume-cols h4 {
  font-size: var(--t-caption);
  letter-spacing: var(--track-label);
  margin-bottom: 0.35rem;
}

.resume-cols p, .resume-cols li { font-size: var(--t-small); margin: 0; }
.resume-cols ul { margin: 0; padding-left: 1.05rem; }
.resume-cols li { margin-bottom: 0.3rem; }

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1.5px solid var(--color-ink);
  border-radius: 6px;
  background: var(--color-ink);
  color: var(--color-bg);
  padding: 0.8rem 1.3rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--t-caption);
  letter-spacing: var(--track-label);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.download-btn:hover { background: transparent; color: var(--color-ink); }

/* ==========================================================================
   PORTFOLIO — flipbook
   ========================================================================== */

.flipbook {
  grid-column: 1 / 13;
  /* capped and centred so the arrows stay beside the page instead of
     drifting to the edges of a wide monitor */
  max-width: 1500px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  height: calc(100vh - var(--header-h) - 150px);
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(58px, 7vw, 104px);
}

.flipbook canvas {
  /* JS sizes this to the content box; these are only a safety net, and
     width:auto keeps the ratio if one of them ever engages */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 0 0 1px var(--ink-line);
}

/* Swiss arrows: a hairline shaft and an open chevron, drawn not typeset */
.flip-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(44px, 5.5vw, 72px);
  height: clamp(44px, 5.5vw, 72px);
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--color-ink);
  opacity: 0.75;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.flip-nav svg { width: 100%; height: auto; display: block; }
.flip-nav:hover { opacity: 1; }

.flip-prev { left: clamp(2px, 0.8vw, 16px); }
.flip-next { right: clamp(2px, 0.8vw, 16px); }
.flip-prev:hover { transform: translateY(-50%) translateX(-4px); }
.flip-next:hover { transform: translateY(-50%) translateX(4px); }

.flip-fullscreen {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  background: transparent;
  color: var(--color-ink);
  padding: 0.6rem 0.95rem;
  cursor: pointer;
  font-family: var(--font-text);
  font-weight: 400;
  font-size: var(--t-caption);
  letter-spacing: var(--track-label);
  transition: border-color 0.15s ease;
}

.flip-fullscreen:hover { border-color: var(--color-ink); }
.flip-fullscreen svg { width: 13px; height: 13px; }

/* exit button: hidden until the viewer is actually in fullscreen */
.flip-exit {
  display: none;
  position: absolute;
  top: 22px;
  right: 26px;
  z-index: 5;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-ink);
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.flip-exit:hover { opacity: 1; }
.flip-exit svg { width: 100%; height: 100%; }

.flipbook:fullscreen .flip-exit,
.flipbook:-webkit-full-screen .flip-exit { display: block; }

/* native fullscreen: let the page breathe edge to edge */
.flipbook:fullscreen {
  max-width: none;
  height: 100vh;
  min-height: 0;
  background: var(--color-bg);
  padding: 0 clamp(58px, 7vw, 104px);
}

/* portfolio runs tight to the viewport so the spread fits without scrolling */
body.is-portfolio main { padding-top: var(--header-h); }

body.is-portfolio .section {
  padding-top: 1.1rem;
  padding-bottom: 1.4rem;
}

body.is-portfolio .resume-topbar { margin-bottom: 1rem; }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--ink-line);
  padding: clamp(2rem, 4vw, 3rem) 0;
}

.site-footer .grid { align-items: baseline; }

.footer-left {
  grid-column: 1 / 6;
  font-size: var(--t-small);
  color: var(--ink-muted);
}

.footer-right {
  grid-column: 6 / 13;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0.4rem 2rem;
}

.footer-right a,
.footer-right span {
  font-size: var(--t-small);
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.footer-right a:hover { color: var(--color-ink); }

@media (max-width: 780px) {
  .footer-left, .footer-right { grid-column: 1 / 13; }
  .footer-right { justify-content: flex-start; margin-top: 0.9rem; }
}

/* ==========================================================================
   REVEAL — content eases in on load and as it scrolls into view.
   Scoped to .has-reveal, which the script adds, so nothing is hidden if
   JavaScript never runs.
   ========================================================================== */

.has-reveal .reveal {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.has-reveal .reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* promote only while in flight; the script drops this on transitionend so
   idle elements aren't holding compositor layers */
.has-reveal .reveal.is-moving { will-change: opacity, transform; }

/* the full-bleed hero fades in place; travelling would shift it under the header */
.has-reveal .home-hero-img.reveal,
.has-reveal .home-hero-img.reveal.is-in { transform: none; }
.has-reveal .home-hero-img.reveal { transition: opacity 0.8s ease; }

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


/* ==========================================================================
   A11Y
   ========================================================================== */

a:focus-visible, button:focus-visible, select:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
