/* ==========================================================================
   Evan Palmejar — portfolio stylesheet
   One stylesheet for every page. Design tokens live at the top: change a
   token here and it changes everywhere.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --bg-primary: #F3F2EF;
  --bg-raised: #FAFAF8;
  --text-primary: #191919;
  --text-secondary: #555550;
  --text-tertiary: #8A8A84;
  --border: #D8D7D3;
  --accent: #191919;
  --accent-text: #F3F2EF;
  --tag-bg: rgba(0, 0, 0, 0.05);
  --tag-text: #555550;
  --link-color: #191919;

  /* Frosted-glass surfaces. Used on cards, the nav, and the footer. */
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-bg-hover: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-border-hover: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.04);
  --glass-shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.06);
  --glass-blur: 16px;
  --glass-strong-bg: rgba(255, 255, 255, 0.55);
  --glass-strong-border: rgba(255, 255, 255, 0.6);
  --nav-glass-bg: rgba(243, 242, 239, 0.72);
  --nav-glass-border: rgba(255, 255, 255, 0.4);
  --footer-glass-bg: rgba(255, 255, 255, 0.4);
  --footer-glass-border: rgba(255, 255, 255, 0.5);

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;

  --heading-weight: 600;
  --heading-letter: -0.01em;
  --heading-line-height: 1.2;
  --hero-letter: -0.015em;
  --hero-weight: 500;
  --hero-size: clamp(40px, 7vw, 80px);
  --hero-line-height: 1.12;
  --hero-gap: 8px;
  --section-heading-size: clamp(30px, 4.2vw, 48px);

  --label-letter: 0.06em;
  --label-weight: 500;
  --body-weight: 400;

  --radius: 14px;
  --max-w: 1080px;
  --nav-h: 64px;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  height: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: var(--body-weight);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

a { color: var(--link-color); }

/* Focus is always visible, and never signalled by colour alone. */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--text-primary);
  color: var(--accent-text);
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  font-size: 14px;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Navigation
   -------------------------------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  background: var(--nav-glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--nav-glass-border);
  padding-top: env(safe-area-inset-top, 0px);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.logo-link { display: flex; align-items: center; text-decoration: none; }

/* ep-logo.png is a near-white mark drawn for the old dark site, so on this
   cream ground it would be invisible. Inverting it turns the white ink to
   near-black and leaves the transparent areas alone, so one logo file still
   serves both themes. If the source file is ever replaced with a dark mark,
   delete the filter. */
.logo-img {
  height: 28px;
  width: auto;
  display: block;
  filter: invert(1);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text-primary); }

/* Mobile menu button. Hidden on desktop, shown under 640px. */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-primary);
}
.nav-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* --------------------------------------------------------------------------
   4. Shared section furniture
   -------------------------------------------------------------------------- */
.section-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--label-weight);
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: var(--section-heading-size);
  font-weight: var(--heading-weight);
  line-height: var(--heading-line-height);
  letter-spacing: var(--heading-letter);
  margin-bottom: 20px;
  color: var(--text-primary);
}

.section-sub {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 540px;
}

/* --------------------------------------------------------------------------
   5. Hero, scroll highlight (home)
   The section is tall; the stage sticks while the list of disciplines
   highlights one at a time as you scroll through it.
   -------------------------------------------------------------------------- */
.hero-scroll-section { min-height: 420vh; position: relative; }

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-kicker {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--label-weight);
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 40px;
  text-align: center;
}

.hero-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--hero-gap);
  text-align: center;
}

.hero-list li {
  font-family: var(--font-heading);
  font-size: var(--hero-size);
  font-weight: var(--hero-weight);
  line-height: var(--hero-line-height);
  letter-spacing: var(--hero-letter);
  color: var(--text-primary);
  opacity: 0.08;
  transition: opacity 0.5s ease;
}
.hero-list li.active { opacity: 1; }

.hero-cue {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-cue svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* --------------------------------------------------------------------------
   6. Projects (home accordion)
   -------------------------------------------------------------------------- */
.projects { padding: 88px 0 100px; border-top: 1px solid var(--border); }
.projects-header { margin-bottom: 56px; }
.project-list { display: flex; flex-direction: column; gap: 14px; }

.project-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-shadow);
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.project-card:hover,
.project-card.open {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow-hover);
}

/* The whole summary row is the button, so it works by keyboard for free. */
.project-summary {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 30px 32px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 20px;
  align-items: center;
}

.project-meta { display: flex; flex-direction: column; gap: 6px; }

.project-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 3px 9px;
  border-radius: 5px;
  width: fit-content;
  letter-spacing: 0.02em;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: var(--heading-weight);
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: var(--heading-letter);
}

.project-year {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.project-toggle {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  transition: transform 0.4s ease, background 0.25s;
}
.project-toggle svg { width: 15px; height: 15px; stroke: var(--text-tertiary); fill: none; stroke-width: 2; }
.project-card.open .project-toggle { transform: rotate(45deg); background: rgba(0, 0, 0, 0.04); }

/* Collapsed by default. The open state uses a generous max-height so longer
   copy is never clipped; the transition still reads as a smooth reveal. */
.project-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}
.project-card.open .project-detail { max-height: 1400px; }

.project-detail-inner {
  padding: 28px 32px 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.detail-col p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.detail-col p:last-child { margin-bottom: 0; }

.detail-label {
  font-size: 11px;
  font-weight: var(--label-weight);
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.detail-quote {
  font-family: var(--font-heading);
  font-size: 16px;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.detail-attribution { font-size: 13px; color: var(--text-tertiary); }

.detail-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.detail-facts li {
  font-size: 11px;
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 4px 10px;
  border-radius: 5px;
}

.detail-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--link-color);
  text-decoration: none;
  transition: opacity 0.2s;
}
.detail-cta:hover { opacity: 0.65; }
.detail-cta svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* --------------------------------------------------------------------------
   7. Ideas
   -------------------------------------------------------------------------- */
.ideas { padding: 88px 0 100px; border-top: 1px solid var(--border); }

.ideas-card {
  background: var(--glass-strong-bg);
  border: 1px solid var(--glass-strong-border);
  border-radius: var(--radius);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-shadow);
}
.ideas-card .section-heading { margin-bottom: 0; }

.ideas-text { font-size: 16px; line-height: 1.7; color: var(--text-secondary); max-width: 520px; }

.ideas-actions { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 4px; }

.ideas-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--link-color);
  text-decoration: none;
  transition: opacity 0.2s;
}
.ideas-link:hover { opacity: 0.7; }
.ideas-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* --------------------------------------------------------------------------
   8. About, word reveal
   -------------------------------------------------------------------------- */
.about-reveal-section {
  min-height: 260vh;
  position: relative;
  overflow-x: clip;
  border-top: 1px solid var(--border);
}

.about-reveal-stage {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 64px 0;
}

.about-reveal-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 2px minmax(0, 1fr);
  align-items: start;
  gap: 40px;
}

.about-reveal-progress {
  position: relative;
  width: 2px;
  height: 100px;
  overflow: hidden;
  background: var(--border);
  border-radius: 1px;
  margin-top: 8px;
}
.about-reveal-progress span {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--text-primary);
  transform-origin: top;
  transform: scaleY(0);
}

.about-reveal-content { max-width: 780px; }

.about-reveal-kicker {
  margin: 0 0 32px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: var(--label-weight);
  letter-spacing: var(--label-letter);
  line-height: 1;
  text-transform: uppercase;
}

.about-reveal-heading {
  font-family: var(--font-heading);
  font-size: clamp(26px, 4vw, 44px);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-letter);
  line-height: 1.22;
  color: var(--text-primary);
  text-wrap: balance;
  margin-bottom: 48px;
}
.about-reveal-heading span { opacity: 0.1; transition: opacity 0.15s ease; }

.about-body { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }

.about-body-col p {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.about-body-col p:last-child { margin-bottom: 0; }
.about-body-col p.dimmed { opacity: 0.1; transition: opacity 0.6s ease; }
.about-body-col p.revealed { opacity: 1; transition: opacity 0.6s ease; }

/* Downloads sit under the about copy. */
.about-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px 16px;
  transition: background 0.2s, border-color 0.2s;
}
.btn-download:hover { background: var(--glass-bg-hover); border-color: var(--glass-border-hover); }
.btn-download svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--footer-glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--footer-glass-border);
  padding: 56px 0 44px;
}

/* Two columns: the mark on the left, one link list on the right. */
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
}
.footer-brand .logo-link { display: inline-flex; }
.footer-brand .logo-img { height: 24px; }

.footer-col h2 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 11px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-primary); }

/* --------------------------------------------------------------------------
   9b. Scroll reveal
   Elements start slightly low and transparent, then settle as they enter
   the viewport. site.js adds .visible; without JS they stay visible.
   -------------------------------------------------------------------------- */
.js .fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .fade-in.visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   10. Interior pages: shared header
   -------------------------------------------------------------------------- */
.page-top { padding-top: calc(var(--nav-h) + 56px); }

.page-header { padding: 0 0 48px; }
.page-header h1 {
  font-family: var(--font-heading);
  font-size: var(--section-heading-size);
  font-weight: var(--heading-weight);
  line-height: var(--heading-line-height);
  letter-spacing: var(--heading-letter);
  margin-bottom: 16px;
}
.page-header p { font-size: 16px; color: var(--text-secondary); max-width: 560px; }

/* --------------------------------------------------------------------------
   11. Project case study pages
   -------------------------------------------------------------------------- */
.project-hero {
  margin-top: var(--nav-h);
  width: 100%;
  height: clamp(240px, 42vw, 460px);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.project-hero img { width: 100%; height: 100%; object-fit: cover; }

.case-header { padding: 56px 0 48px; }
.case-header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}

.case-category {
  font-size: 12px;
  font-weight: var(--label-weight);
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}

.case-title {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: var(--heading-weight);
  line-height: 1.15;
  letter-spacing: var(--heading-letter);
  text-wrap: balance;
}

.meta-pills { display: flex; flex-direction: column; gap: 10px; }
.meta-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px 14px;
  white-space: nowrap;
}
.meta-pill strong { color: var(--text-primary); font-weight: 600; }
.meta-pill svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; flex-shrink: 0; }

/* Context: image beside the challenge and client blocks */
.case-context { padding: 24px 0 72px; }
.case-context-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.context-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-raised);
}
.context-block { margin-bottom: 40px; }
.context-block:last-child { margin-bottom: 0; }
.context-label {
  font-size: 11px;
  font-weight: var(--label-weight);
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}
.context-block h2 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: var(--heading-weight);
  line-height: 1.3;
  letter-spacing: var(--heading-letter);
  margin-bottom: 14px;
}
.context-block p { font-size: 15px; line-height: 1.75; color: var(--text-secondary); margin-bottom: 14px; }
.context-block p:last-child { margin-bottom: 0; }

/* Approach and outcome */
.case-body { padding: 0 0 72px; }
.approach-outcome {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--border);
}
.body-col h2 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: var(--heading-weight);
  line-height: 1.3;
  letter-spacing: var(--heading-letter);
  margin-bottom: 14px;
}
.body-label {
  font-size: 11px;
  font-weight: var(--label-weight);
  letter-spacing: var(--label-letter);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}
.body-col p { font-size: 15px; line-height: 1.75; color: var(--text-secondary); margin-bottom: 14px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag {
  font-size: 11px;
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 4px 10px;
  border-radius: 5px;
}

/* Quote block on a case study */
.case-quote {
  margin: 0 0 72px;
  padding: 40px 44px;
  background: var(--glass-strong-bg);
  border: 1px solid var(--glass-strong-border);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-shadow);
}
.case-quote blockquote {
  font-family: var(--font-heading);
  font-size: clamp(19px, 2.2vw, 25px);
  font-style: italic;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-wrap: balance;
}
.case-quote figcaption { font-size: 14px; color: var(--text-tertiary); }
.case-quote figcaption strong { color: var(--text-secondary); font-weight: 600; display: block; }

/* Gallery */
.case-gallery { padding: 0 0 80px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.gallery-grid figure {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-raised);
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-grid figure:hover img { transform: scale(1.03); }
.gallery-grid.tall img { aspect-ratio: 9 / 16; object-fit: contain; padding: 10px; }

/* Back navigation */
.back-nav { padding: 0 0 80px; }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 11px 18px;
  transition: background 0.2s, border-color 0.2s;
}
.btn-back:hover { background: var(--glass-bg-hover); border-color: var(--glass-border-hover); }
.btn-back svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .case-context-inner { grid-template-columns: 1fr; gap: 36px; }
  .approach-outcome { grid-template-columns: 1fr; gap: 36px; }
  .case-header-inner { grid-template-columns: 1fr; align-items: start; gap: 24px; }
  .meta-pills { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 768px) {
  .container, .nav-inner { padding: 0 24px; }
  .nav-links { gap: 24px; }
  .project-summary { grid-template-columns: 1fr auto; gap: 16px; }
  .project-year { display: none; }
  .project-detail-inner { grid-template-columns: 1fr; gap: 24px; }
  .about-reveal-layout { grid-template-columns: 1fr; gap: 0; padding: 0 24px; }
  .about-reveal-progress { display: none; }
  .about-body { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { gap: 32px; }
  .ideas-card { padding: 40px 28px; }
  .case-quote { padding: 32px 28px; }
}

@media (max-width: 640px) {
  /* Nav collapses to a toggle. The list drops below the bar when open. */
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    background: var(--nav-glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--nav-glass-border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 0; font-size: 16px; }
}

@media (max-width: 480px) {
  .container, .nav-inner { padding: 0 20px; }
  .project-summary { padding: 24px 20px; }
  .project-detail-inner { padding: 24px 20px 28px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .about-reveal-layout { padding: 0 20px; }
  .about-reveal-stage { padding: 48px 0; }
  .hero-kicker { margin-bottom: 28px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* --------------------------------------------------------------------------
   14. Reduced motion
   Everything that moves or fades on scroll settles into its finished state.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .hero-list li { opacity: 1 !important; }
  .about-reveal-heading span { opacity: 1 !important; }
  .about-body-col p.dimmed { opacity: 1 !important; }
  .gallery-grid figure:hover img { transform: none; }
  .js .fade-in { opacity: 1 !important; transform: none !important; }
}
