/* ============================================
   Camp Teapunk — Elevated Design
   ============================================ */

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

:root {
  --bg: #0a0908;
  --bg-alt: #0f0d0b;
  --surface: #171412;
  --border: #231f1b;
  --text: #ede6de;
  --text-muted: #8a7e72;
  --accent: #c9a84c;
  --accent-hover: #dbbe62;
  --accent-rgb: 201, 168, 76;            /* Base RGB for rgba() washes. */
  --accent-bg-soft: rgba(var(--accent-rgb), 0.08);
  --on-accent: #0a0908;                  /* Text/icon color that sits on a gold surface. */

  /* Status colors (success/danger). Tokenised so light theme can override.
     `*-strong` is the saturated base (used in marketing form-status + as
     borders); plain `--success`/`--danger` are the softer text shades used on
     dark surfaces in the portal. `*-rgb` lets ad-hoc alphas stay flexible. */
  --success: #9fe0b2;
  --success-strong: #6ecf8e;
  --success-rgb: 110, 207, 142;
  --danger: #e29f9f;
  --danger-strong: #cf6e6e;
  --danger-rgb: 207, 110, 110;

  --font-body: 'Inter', -apple-system, system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  /* ---------- Type scale ----------
     Nine steps, and nothing between them. The portal had grown 36 distinct
     font-size values, ten of them packed between 0.72 and 0.95rem — gaps too
     small for a reader to perceive as hierarchy, so they only ever registered
     as inconsistency. Each step below is far enough from its neighbour to
     mean something.

     3xs/2xs are genuine micro-labels (the word under a stat number, table
     headers, the day-strip key) and are the only sizes allowed below 0.72rem.
     Anything that is prose starts at --text-base. */
  --text-3xs: 0.62rem;
  --text-2xs: 0.72rem;
  --text-xs: 0.8rem;
  --text-sm: 0.88rem;
  --text-base: 0.95rem;
  --text-md: 1.05rem;
  --text-lg: 1.15rem;
  --text-xl: 1.4rem;
  --text-2xl: 2rem;

  /* ---------- Radius ----------
     Was eleven values (1, 2, 3, 4, 5, 6, 8, 10, 12px, 50%, 999px). Five now.
     --radius-inner is for a child that sits flush inside a --radius-md box:
     it has to be the parent's radius minus the 1px border or the corner
     shows a hairline gap. */
  /* --radius-hairline exists for elements measured in single-figure pixels —
     the day-strip cells on /ops/people are 10px wide, where even --radius-xs
     is 30% of the width per corner and turns a crisp calendar grid into a row
     of lozenges. Don't reach for it on anything bigger. */
  --radius-hairline: 1px;
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-inner: 9px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --radius-circle: 50%;

  /* ---------- Elevation ----------
     There was no elevation system at all: styles.css used box-shadow zero
     times and portal.css ten times in 3,400 lines, so every surface sat on
     one plane and nothing could be brought forward.

     On a near-black ground (#0a0908) a black drop shadow is close to
     invisible — there is no room below the background to cast into. So on the
     dark theme elevation is carried mostly by *light*: --edge-top is a 1px
     inner highlight along the top of a surface and a matching dark line along
     the bottom, which together read as a panel lit from above. The drop
     shadow is still there to catch the gap between overlapping surfaces, but
     it is the junior partner. The light theme inverts the relationship — see
     the override below.

     -1 resting cards · -2 hover and raised panels · -3 things that float
     above the page (the mobile nav panel). */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.32);
  --shadow-2: 0 3px 8px rgba(0, 0, 0, 0.55), 0 12px 28px rgba(0, 0, 0, 0.4);
  --shadow-3: 0 18px 52px rgba(0, 0, 0, 0.62);
  --edge-top: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 -1px 0 rgba(0, 0, 0, 0.5);

  /* A surface that sits above --surface. Raising luminance is the other half
     of dark-theme elevation, and it is what makes a hover state legible when a
     shadow can't be. */
  --surface-raised: #1f1b18;

  /* ---------- Spacing ----------
     A 4px-based ramp. Every gap in the portal used to be typed by hand,
     which is the mechanical reason the rhythm drifted from page to page. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

  --container: 1320px;
  --container-narrow: 680px;
  --gutter: clamp(1.5rem, 4vw, 3rem);

  /* Portal nav height — used by the mobile burger panel to abut the nav. */
  --portal-nav-h: 56px;

  /* Sticky-nav background. Translucent on desktop with backdrop-filter for the
     blur effect; overridden to a solid value on mobile (portal.css) to stop
     page text ghosting through. */
  --nav-bg: rgba(10, 9, 8, 0.88);

  /* Day-strip ink on /ops/people. --day-line is the empty-day outline and has
     to clear 3:1 against the card surface on its own, because it is the only
     thing telling you a day cell is there at all (3.37:1 on #171412).
     --day-mark is the weekend rule below the cells; it is the only weekend
     encoding on the card, so it has to clear 3:1 too rather than whisper. */
  --day-line: #776755;
  --day-mark: #776755;

  /* ---------- Marketing page extras ----------
     The homepage renders light (index.html sets data-theme), but every token
     still needs a dark value so the portal can use them in either theme.
     --ink is for display headings, a shade deeper than --text. --sky is a
     secondary accent taken from the playa skies in the 2026 photos. --dust is
     a sand band for marquees and note tiles. --meter-track is a progress-bar
     track that stays visible on the page background. --field-border is a form
     field outline that clears 3:1 against its surroundings. */
  --ink: #ede6de;
  --sky: #7fb3c4;
  --sky-soft: rgba(127, 179, 196, 0.10);
  --dust: #15120f;
  --meter-track: var(--bg-alt);
  --field-border: #7a6b5d;
}

/* ---------- Light theme ----------
   Opt-in via cookie → server emits <html data-theme="light">. All tokens
   stay the same shape; only their values change. Contrast verified against
   #f5f0e8 (linen bg):
     --accent #7a5d18 = 5.43:1 AA pass
     --accent-hover #5f4810 = 7.65:1 AAA (darker on hover — light-mode
       convention is darker, not lighter)
     --text #2c2520 = 13.29:1 AAA
     --text-muted #5e5346 = 6.61:1 AA */
[data-theme="light"] {
  --bg: #f5f0e8;
  --bg-alt: #ece5d8;
  --surface: #ffffff;
  --border: #d8cdb9;
  --text: #2c2520;
  --text-muted: #5e5346;
  --accent: #7a5d18;
  --accent-hover: #5f4810;
  --accent-rgb: 122, 93, 24;           /* matches --accent #7a5d18 */
  --accent-bg-soft: rgba(var(--accent-rgb), 0.10);
  --on-accent: #ffffff;                /* white text on gold buttons */

  /* Status colors — saturate slightly and use darker text shades for
     contrast on cream surfaces. */
  --success: #1d7a3a;
  --success-strong: #1d7a3a;
  --success-rgb: 29, 122, 58;
  --danger: #a02828;
  --danger-strong: #a02828;
  --danger-rgb: 160, 40, 40;

  /* Translucent linen for the sticky nav. */
  --nav-bg: rgba(245, 240, 232, 0.88);

  /* Contrast on #f5f0e8: --ink 15.20:1, --sky 6.19:1 (white on --sky 7.02:1).
     --dust #e8dcc6 carries --text at 11.12:1 and --accent-hover at 6.40:1 —
     use --accent-hover, not --accent (4.55:1), for small gold text on it.
     --meter-track against an --accent fill: 3.92:1. --field-border: 4.18:1
     on white. */
  --ink: #1f1a16;
  --sky: #2c5f73;
  --sky-soft: #dfe9ec;
  --dust: #e8dcc6;
  --meter-track: #d8cdb9;
  --field-border: #8a7a5e;

  /* 3.37:1 on #ffffff. */
  --day-line: #998a70;
  --day-mark: #998a70;

  /* Elevation, warm rather than grey: a neutral-black shadow over linen reads
     as dirt, so these are tinted with the same brown as --text. Here the drop
     shadow does the work — on a pale ground there is plenty of room to cast
     into — and the lit-edge trick from the dark theme is useless, because
     white-on-white is invisible. So --edge-top carries nothing at all. */
  --shadow-1: 0 1px 2px rgba(44, 37, 32, 0.06), 0 2px 6px rgba(44, 37, 32, 0.06);
  --shadow-2: 0 3px 8px rgba(44, 37, 32, 0.09), 0 12px 28px rgba(44, 37, 32, 0.1);
  --shadow-3: 0 18px 52px rgba(44, 37, 32, 0.18);
  --edge-top: 0 0 0 0 transparent;

  /* --surface is already #ffffff here, so a "raised" surface can't get
     lighter — it has to warm instead. #fffdf8 was too close to white to see
     (ΔE2000 ≈ 1.7, below the threshold for a transient hover on a surface
     that is also moving); this is a visible warm lift while staying clearly
     lighter than --bg-alt. */
  --surface-raised: #fbf4e6;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The mobile burger panel sits at translateX(100%) when closed; without
   clipping that overflow on <html>, the page becomes horizontally scrollable
   and a rubber-band swipe on iOS exposes the panel. Scoped to mobile only:
   `overflow-x: hidden` on <html> establishes a scroll container, which would
   break `position: sticky` on descendants (the nav + admin table headers).
   On desktop there's no off-canvas element to clip, so we leave html alone
   and sticky positioning works as expected. `clip` would be cleaner here but
   the spec disallows it on <html>/<body> — Chromium silently falls back to
   `hidden`, so there's no benefit to declaring it. */
@media (max-width: 720px) {
  html { overflow-x: hidden; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: clamp(0.9rem, 1vw, 1rem);
  font-weight: 300;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   Homepage (public/index.html, body.home)
   ============================================
   "Morning at camp, kettle on." Soft and friendly rather than templated or
   tabloid: a rounded geometric display face (Gabarito) with Figtree for
   reading and a handwritten face (Shantell Sans) used a few times for notes.
   "Sunset dust" palette, chosen by the camp lead from four options: warm
   playa sand as the ground, plum ink, one burnt-orange accent. Warm sand is
   usually a template tell; here it is the colour of the photos. Round
   shapes, soft plum-tinted shadows, photos pinned up like prints.

   Everything is scoped to .home, tokens included: the portal shares this
   file and keeps its own look. The radius tokens are redefined here so the
   homepage stays on one (softer) radius system.

   --sky is the warm tint (pale sunset peach) used for the hero wash, the
   morning card and small panels; the name is kept so the portal's results
   pages, which also read --sky, need no change.

   Contrast (WCAG): --text on --bg 13.91:1, on --sky 12.08:1, on white
   15.05:1. --text-muted on --bg 6.30:1, on white 6.82:1, on --sky 5.47:1.
   --accent-ink (text-safe orange) on --bg 5.40:1, on white 5.84:1.
   --text on --accent 4.87:1 (buttons are ink-on-orange, never white).
   --bg on --text (the night card) 13.91:1. --field-border on white 4.34:1.
   --success-strong on --bg 4.83:1. */
.home {
  --bg: #fbf5ef;
  --surface: #ffffff;
  --sky: #f6e3d3;
  --text: #3a1d2e;
  --ink: #3a1d2e;
  --text-muted: #6a5560;
  --border: #eadfd6;
  --field-border: #8a737f;
  --accent: #ef6a3a;
  --accent-ink: #b0401a;
  --on-accent: #3a1d2e;
  --success-strong: #2f7a4f;
  --danger-strong: #b0401a;

  --font-body: 'Figtree', system-ui, sans-serif;
  --font-display: 'Gabarito', 'Figtree', system-ui, sans-serif;
  --font-hand: 'Shantell Sans', 'Comic Neue', cursive;

  --radius-sm: 10px;
  --radius-inner: 16px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --shadow-1: 0 1px 2px rgb(58 29 46 / 0.06), 0 8px 24px -10px rgb(58 29 46 / 0.18);
  --shadow-2: 0 2px 4px rgb(58 29 46 / 0.08), 0 18px 40px -12px rgb(58 29 46 / 0.26);
  --nav-h: 68px;

  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
}

.home ::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* :where() keeps these resets at element specificity, so a class can still
   set its own margin or size. */
:where(.home) figure {
  margin: 0;
}

:where(.home) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--space-5);
  text-wrap: balance;
}

.display em {
  font-style: normal;
  color: var(--accent-ink);
}

.hand {
  font-family: var(--font-hand);
  font-weight: 500;
  font-size: var(--text-md);
  line-height: 1.3;
  color: var(--accent-ink);
}

.link-wavy {
  font-weight: 600;
  color: var(--text);
  text-decoration: underline wavy var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.link-wavy:hover {
  color: var(--accent-ink);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-md);
  line-height: 1;
  padding: 1rem 1.6rem;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-1);
}

.btn-ink {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-1);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

/* .scrolled is set by script.js once the hero text leaves the viewport.
   Solid, not blurred: backdrop-filter would make the nav the containing
   block for the fixed mobile menu inside it. */
.nav.scrolled {
  background: var(--bg);
  box-shadow: var(--shadow-1);
}

.nav-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  text-underline-offset: 0.35em;
}

.nav-links a:hover {
  text-decoration: underline wavy var(--accent);
}

.nav-links .nav-cta {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
}

.nav-links .nav-cta:hover {
  text-decoration: none;
  box-shadow: var(--shadow-1);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-3);
  flex-direction: column;
  gap: 7px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  transition: transform 0.3s var(--ease-out);
}

.nav-toggle.active span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle.active span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ---- Hero: a postcard ---- */
.hero {
  padding: calc(var(--nav-h) + var(--space-6)) 0 var(--space-7);
  background: linear-gradient(180deg, var(--sky) 0%, var(--bg) 75%);
}

.hero-text {
  margin-bottom: var(--space-6);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 1.6rem + 6vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: var(--space-4);
}

.hero-tagline {
  font-size: var(--text-xl);
  line-height: 1.4;
  color: var(--text-muted);
  max-width: 34ch;
  margin-bottom: var(--space-5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
}

.hero-photo {
  position: relative;
  height: min(52vh, 560px);
  min-height: 300px;
}

.hero-photo img {
  border-radius: var(--radius-lg);
  object-position: 50% 62%;
}

.sticker {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.1rem;
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--text-sm);
  line-height: 1.2;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-2);
  rotate: -6deg;
}

.sticker strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-md);
}

.hero-sticker {
  position: absolute;
  top: calc(-1 * var(--space-5));
  left: var(--space-6);
  animation: stickerOn 0.6s 0.5s var(--ease-out) both;
}

.hero-note {
  position: absolute;
  top: calc(-1 * var(--space-7));
  right: var(--space-6);
  rotate: 3deg;
}

/* Load-in: CSS only, so the button never waits on JavaScript. */
.hero-title,
.hero-tagline,
.hero-actions {
  animation: heroIn 0.7s var(--ease-out) both;
}
.hero-tagline { animation-delay: 0.08s; }
.hero-actions { animation-delay: 0.16s; }
.hero-photo img { animation: heroIn 0.9s 0.1s var(--ease-out) both; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* The sticker gets slapped on: a small overshoot past its final tilt. */
@keyframes stickerOn {
  0% { opacity: 0; transform: scale(1.3); rotate: 0deg; }
  70% { opacity: 1; transform: scale(0.97); rotate: -8deg; }
  100% { opacity: 1; transform: none; rotate: -6deg; }
}

/* ---- About: text and pinned prints ---- */
.about {
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.about-text p {
  max-width: 60ch;
  font-size: var(--text-md);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.about-text .about-lead {
  font-size: var(--text-xl);
  line-height: 1.45;
  color: var(--text);
}

/* A print: white border, soft shadow, a slight tilt, a handwritten note. */
.print {
  background: var(--surface);
  padding: 6px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  transition: rotate 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.print img {
  height: auto;
  border-radius: var(--radius-inner);
}

.print figcaption {
  padding: var(--space-2) var(--space-2) var(--space-1);
}

.prints {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
}

.print-1 {
  grid-column: 1 / 6;
  grid-row: 1;
  rotate: -2deg;
  /* On top, so its note isn't hidden under the second print. */
  position: relative;
  z-index: 1;
}

.print-2 {
  grid-column: 3 / 7;
  grid-row: 1;
  margin-top: 48%;
  rotate: 1.5deg;
}

/* ---- Offerings: a day at Teapunk, morning to night ---- */
.offerings {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 9vw, 7rem);
}

.day {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: stretch;
}

.day-card {
  border-radius: var(--radius-md);
  padding: var(--space-6);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.day-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  line-height: 1.15;
  margin-bottom: var(--space-3);
}

.day-card p {
  font-size: var(--text-base);
  color: var(--text-muted);
}

.day-morning {
  background: var(--sky);
}

.day-games {
  background: var(--accent);
}

.day-games p {
  color: var(--text);
}

.day-meals {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.day-meals img {
  height: 11rem;
  flex: none;
}

.day-meals .day-card-body {
  padding: var(--space-5) var(--space-6) var(--space-6);
}

/* Night: ink card with a scatter of mirror-ball glints. CSS gradients, so
   nothing to load and nothing that moves. */
.day-night {
  background:
    radial-gradient(circle at 82% 18%, rgb(255 255 255 / 0.9) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 70% 34%, rgb(239 106 58 / 0.9) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 90% 44%, rgb(255 255 255 / 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 60% 12%, rgb(255 255 255 / 0.6) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 58%, rgb(246 227 211 / 0.8) 0 1.5px, transparent 2.5px),
    var(--ink);
}

.day-night h3,
.day-night p {
  color: var(--bg);
}

.also {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-6);
}

.also p {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 52ch;
}

.also strong {
  color: var(--text);
}

/* ---- Photo moment ---- */
.panorama {
  aspect-ratio: 21 / 9;
}

.panorama img {
  border-radius: var(--radius-lg);
  object-position: center 65%;
}

/* ---- Gallery: a wall of prints ---- */
.gallery {
  padding: clamp(4rem, 9vw, 7rem) 0;
}

/* Three explicit columns rather than CSS multi-column: Chrome and Safari
   fail to paint rotated, transitioning elements inside `columns` (prints
   showed as blank frames, and vanished on hover). */
.wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  align-items: start;
}

.wall-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.wall-col:nth-child(2) {
  margin-top: var(--space-6);
}

.wall .print:nth-child(odd) { rotate: -1deg; }
.wall .print:nth-child(even) { rotate: 1deg; }

/* Higher specificity than the reveal rules below, which would otherwise
   pin transform to none and swap out the transition. */
.wall .print:hover,
.js-reveal .wall .print.revealed:hover {
  rotate: 0deg;
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

/* ---- Join: the plane, a porthole, and the copy on a card ---- */
.join {
  padding: 0 0 clamp(4rem, 9vw, 7rem);
}

.join-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
}

.join-photo {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  aspect-ratio: 4 / 3;
}

.join-photo > img {
  border-radius: var(--radius-lg);
}

.porthole {
  position: absolute;
  right: 12%;
  bottom: calc(-1 * var(--space-6));
  width: 9rem;
  height: 9rem;
  border-radius: var(--radius-circle);
  border: 6px solid var(--surface);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.porthole img {
  object-position: 30% 40%;
}

.join-card {
  grid-column: 2;
  grid-row: 1;
  margin-left: calc(-1 * var(--space-7));
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.join-card .display {
  font-size: clamp(1.9rem, 1.2rem + 2vw, 2.8rem);
}

.join-card p {
  font-size: var(--text-base);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.bring {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.bring div {
  background: var(--sky);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
}

.bring dt {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.bring dd {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ---- Apply: a boarding pass ---- */
.apply {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(4rem, 9vw, 7rem);
}

.ticket {
  display: grid;
  grid-template-columns: 1fr auto;
  max-width: 820px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.ticket-main {
  padding: clamp(1.75rem, 4vw, 3rem);
}

.ticket-main > p {
  font-size: var(--text-md);
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-5);
}

.ticket-details {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  justify-content: start;
  gap: var(--space-3) var(--space-7);
  margin: 0;
}

.ticket-details dt {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
}

.ticket-details dd {
  margin: 0;
  font-weight: 600;
}

/* The stub, with the perforation: a dashed line and two notches cut by
   radial gradients the colour of the page. */
.ticket-stub {
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--space-6) clamp(1.5rem, 3vw, 2.5rem);
  background:
    radial-gradient(circle at 0 0, var(--bg) 14px, transparent 15px),
    radial-gradient(circle at 0 100%, var(--bg) 14px, transparent 15px),
    var(--accent);
  border-left: 2px dashed var(--surface);
}

/* ---- Contact: a letter ---- */
.contact {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 9vw, 7rem);
}

.contact-inner {
  max-width: calc(640px + 2 * var(--gutter));
}

.contact-desc {
  font-size: var(--text-md);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.contact-form {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  font: inherit;
  font-size: var(--text-base);
  padding: 0.8rem 0.9rem;
  background: var(--surface);
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-ink);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-footer {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.form-status {
  font-size: var(--text-sm);
}

.form-status.success { color: var(--success-strong); }
.form-status.error { color: var(--danger-strong); }

/* ---- Footer: dusk ---- */
.footer {
  background: linear-gradient(180deg, var(--bg) 0%, var(--sky) 100%);
  padding: var(--space-7) 0 var(--space-6);
}

.footer-signoff {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-6);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3) var(--space-6);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.footer-links a {
  font-size: var(--text-sm);
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline wavy var(--accent);
  text-underline-offset: 0.35em;
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ---- Scroll reveal ----
   Only when script.js has confirmed it can run the observer (html.js-reveal),
   so a script failure leaves everything visible rather than blank. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out),
    rotate 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.js-reveal [data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .day {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid,
  .join-grid {
    grid-template-columns: 1fr;
  }

  .join-photo,
  .join-card {
    grid-column: 1;
    grid-row: auto;
  }

  .join-card {
    margin: calc(-1 * var(--space-7)) var(--space-5) 0;
  }

  .porthole {
    bottom: auto;
    top: var(--space-5);
    right: var(--space-5);
  }

  .prints {
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 var(--gutter);
    gap: var(--space-5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-out), visibility 0.3s;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-2xl);
  }

  .nav-links .nav-cta {
    font-size: var(--text-xl);
    padding: var(--space-3) var(--space-5);
  }

  .hero-photo {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .hero-sticker {
    left: auto;
    right: var(--space-3);
    top: calc(-1 * var(--space-4));
    font-size: var(--text-xs);
    padding: 0.5rem 0.85rem;
  }

  .hero-sticker strong {
    font-size: var(--text-sm);
  }

  .hero-note {
    display: none;
  }

  /* Morning to night becomes a swipe. */
  .day {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    margin: 0 calc(-1 * var(--gutter));
    padding: var(--space-2) var(--gutter) var(--space-4);
  }

  .day-card {
    flex: 0 0 80%;
    scroll-snap-align: start;
  }

  .also {
    grid-template-columns: 1fr;
  }

  .panorama {
    aspect-ratio: 4 / 3;
  }

  .prints .print {
    rotate: 0deg;
  }

  /* Two columns on phones: the column wrappers step aside and the prints
     flow straight into the grid. */
  .wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }

  .wall-col {
    display: contents;
  }

  /* :nth-child(n) to outrank the odd/even tilt rules above. */
  .wall .print:nth-child(n) {
    rotate: 0deg;
  }

  .join-card {
    margin: calc(-1 * var(--space-6)) var(--space-2) 0;
  }

  .porthole {
    width: 6rem;
    height: 6rem;
  }

  .bring {
    grid-template-columns: 1fr;
  }

  .ticket {
    grid-template-columns: 1fr;
  }

  .ticket-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3) var(--space-4);
  }

  .ticket-stub {
    border-left: 0;
    border-top: 2px dashed var(--surface);
    background:
      radial-gradient(circle at 0 0, var(--bg) 14px, transparent 15px),
      radial-gradient(circle at 100% 0, var(--bg) 14px, transparent 15px),
      var(--accent);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .form-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Reduced motion (homepage) ----------
   The load-in, the sticker and the scroll reveals are decoration. Honour the
   OS setting: everything visible, nothing moving. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .js-reveal [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* One focus treatment on the homepage too. The form-field selectors are
   spelled out because `.form-group input:focus` above has higher
   specificity than a bare :focus-visible. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --accent-ink exists only under .home, so this half is scoped: a global
   rule using it would leave the portal with no focus ring at all. */
.home :focus-visible,
.home .form-group input:focus-visible,
.home .form-group textarea:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

/* On the orange stub, --accent-ink is 1.89:1; ink clears 3:1 (4.87:1). */
.home .ticket-stub :focus-visible {
  outline-color: var(--ink);
}
