/* ---------- fonts ---------- */
@font-face {
  font-family: "Baloo Bhaina 2";
  src: url("../Assets/BalooBhaina2-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Baloo Bhaina 2";
  src: url("../Assets/BalooBhaina2-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Baloo Bhaina 2";
  src: url("../Assets/BalooBhaina2-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Baloo Bhaina 2";
  src: url("../Assets/BalooBhaina2-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Baloo Bhaina 2";
  src: url("../Assets/BalooBhaina2-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Body face, served from Assets rather than the Google Fonts CDN so it renders
   offline and never falls back to a system serif. */
@font-face {
  font-family: "Geologica";
  src: url("../Assets/Geologica-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geologica";
  src: url("../Assets/Geologica-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geologica";
  src: url("../Assets/Geologica-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geologica";
  src: url("../Assets/Geologica-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --cream: #121110;
  --cream-2: #17150f;
  --paper: #1c1a13;
  --dark: #1e1a12;
  --dark-2: #0b0a08;
  --dark-3: #2c3320;
  --orange: #dd6531;
  --orange-dark: #b8501f;
  --sage: #a9c08d;
  --peach: #f0d3c2;
  --gold: #e7a93b;
  --gold-light: #f5d77a;
  --olive: #46551f;
  --night: #0d0c0a;
  --cream-text: #f1e9d8;
  --heading: #f4ecdb;
  --ink: #cfc4ac;
  --ink-soft: #9c9081;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.45);
  /* Height of the sticky header, subtracted so the hero fills exactly the rest
     of the viewport rather than overflowing it. */
  --header-h: 75px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Containers made focusable only as link targets shouldn't draw a focus ring
   around the whole section when they receive focus programmatically. */
section[tabindex="-1"]:focus { outline: none; }

/* Available to screen readers, invisible on screen. Not display:none, which
   would take it out of the a11y tree and silence the live region. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Geologica", sans-serif;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
main {
  flex: 1;
}
main > section:not(.hero):not(.about) {
  display: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Baloo Bhaina 2", sans-serif;
  color: var(--heading);
  margin: 0;
  font-weight: 700;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-light);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--olive);
  color: var(--cream-text);
}
.btn-primary:hover { background: var(--dark-2); box-shadow: var(--shadow-card); }
.btn-outline {
  background: transparent;
  border-color: var(--heading);
  color: var(--heading);
}
.btn-outline:hover { background: var(--heading); color: var(--dark); }
.btn-light {
  background: var(--cream-text);
  color: var(--dark);
}
.btn-light:hover { background: #fff; box-shadow: var(--shadow-card); }
.btn-accent {
  background: var(--orange);
  color: var(--cream-text);
}
.btn-accent:hover { background: var(--orange-dark); }
.btn-arrow { transition: transform 0.15s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

.link-arrow {
  color: var(--orange);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.link-arrow:hover { text-decoration: underline; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 17, 16, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(241, 233, 216, 0.08);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  /* Logo on the left; nav and the motion switch grouped together on the right. */
  justify-content: flex-start;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 28px;
}
/* Pushes the nav — and everything after it — over to the right edge. */
.site-header .main-nav { margin-left: auto; }
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img { height: 38px; width: auto; }

.main-nav ul {
  display: flex;
  gap: 30px;
  font-weight: 600;
  font-size: 0.98rem;
}
.main-nav a { color: var(--heading); opacity: 0.85; }
.main-nav a:hover { opacity: 1; }

.header-actions { display: flex; align-items: center; gap: 14px; }

/* Labelled switch: "reduce motion [ o]". The button's aria-pressed carries the
   state, so the visual and the accessible state can never drift apart. */
.motion-toggle {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--heading);
  opacity: 0.7;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.motion-toggle:hover { opacity: 1; }
.motion-toggle:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
  border-radius: 6px;
}
.motion-toggle-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.motion-toggle-track {
  position: relative;
  width: 38px;
  height: 20px;
  flex: none;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
/* The knob slides via `left` rather than `transform`: a transform transition
   here got stuck holding the on-state offset after aria-pressed flipped back. */
.motion-toggle-knob {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
  transition: left 0.2s ease, background-color 0.2s ease;
}
/* On: knob slides right and the track fills with the brand orange. */
.motion-toggle.is-on {
  opacity: 1;
  color: var(--orange);
}
.motion-toggle.is-on .motion-toggle-track {
  background: var(--orange);
}
.motion-toggle.is-on .motion-toggle-knob {
  background: var(--cream);
  left: 21px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--heading);
  margin: 5px 0;
  border-radius: 2px;
}

/* ---------- hero ---------- */
.hero {
  overflow: hidden;
  position: relative;
  /* Fills the viewport below the sticky header, with the content centred and
     the scroll cue pinned to the bottom edge. */
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
}
/* Sits above the drifting spore canvas. */
.hero .wrap { width: 100%; position: relative; z-index: 1; }

/* Spore dust drifting behind the hero content. Decorative and non-interactive;
   the canvas is emptied entirely when reduced motion is on. */
.spore-dust {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Downward chevron parked at the foot of the hero; jumps to #about. */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--heading);
  opacity: 0.55;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  animation: ls-cue-bob 2.4s ease-in-out infinite;
}
.scroll-cue:hover,
.scroll-cue:focus-visible {
  opacity: 1;
  background: rgba(241, 233, 216, 0.08);
}
.scroll-cue svg { width: 24px; height: 24px; }
@keyframes ls-cue-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}
/* The cue is decorative motion, so it stops with the reduce-motion switch.
   The OS preference applies only until the visitor opts into full motion. */
:root[data-motion="reduced"] .scroll-cue { animation: none; }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .scroll-cue { animation: none; }
}

/* ---------- about + contact ---------- */
.about {
  padding: 96px 0;
  border-top: 1px solid rgba(241, 233, 216, 0.08);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  /* Card sits centred against the copy column rather than top-aligned. */
  align-items: center;
}
.about-img {
  width: 140px;
  height: auto;
  margin-bottom: 20px;
}
/* Spec sheet for the current project — label/value rows in a quiet card. */
.spec-card {
  background: rgba(241, 233, 216, 0.04);
  border: 1px solid rgba(241, 233, 216, 0.12);
  border-radius: var(--radius-md);
  padding: 28px 30px;
}
/* The heading's text is the accessible name; the logo is painted behind it and
   the text itself is pushed out of view. Keeping the heading a single text node
   (no <img>, no nested span) is what stops screen readers repeating the level
   between each word. 190x19 preserves the source logo's 10:1 ratio. */
.spec-title {
  margin: 0 0 32px;
  width: 190px;
  height: 19px;
  background: url("../Assets/KindredLogo.png") left center / 190px auto no-repeat;
  text-indent: 100%;
  white-space: nowrap;
  overflow: hidden;
}
.spec-list { margin: 0; }
.spec-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(241, 233, 216, 0.08);
}
.spec-row:first-child { border-top: none; padding-top: 0; }
.spec-row dt {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  padding-top: 3px;
}
.spec-row dd {
  margin: 0;
  color: var(--cream-text);
  font-weight: 600;
}
/* "Growing" marker. box-shadow would only halo the image's bounding box, so the
   glow comes from drop-shadow filters, which follow the sprout's alpha edges. */
.status-sprout {
  display: inline-block;
  width: 18px;
  height: auto;
  margin-right: 9px;
  vertical-align: -4px;
  filter:
    drop-shadow(0 0 4px rgba(169, 192, 141, 0.9))
    drop-shadow(0 0 10px rgba(169, 192, 141, 0.55));
}

@media (max-width: 520px) {
  .spec-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Out-specifies `.about-copy p` on its own, so no !important needed. */
.about-copy .about-lead {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--cream-text);
}

.about-email {
  color: var(--cream-text);
  border-bottom: 1px solid rgba(241, 233, 216, 0.25);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.about-email:hover {
  color: var(--orange);
  border-color: var(--orange);
}
.about-copy p {
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 14px;
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 64px;
}
.hero h1 {
  font-size: 3.4rem;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.hero h1 .accent { color: var(--orange); }
.hero p {
  margin-top: 22px;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 42ch;
}
.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Copy is tied to the lamp: hidden while JS controls the scene and the light is
   off, then fades in when the lamp is lit. Falls back to always-visible if JS
   never runs (no .hero--interactive). */
/* The copy stays rendered in the off state and is simply unlit — dimmed to a
   faint wash just above the page black, so it reads as text sitting in the dark
   rather than text that isn't there. Lighting the lamp brings the colour up. */
.hero--interactive .hero-copy h1,
.hero--interactive .hero-copy h1 .accent {
  color: rgba(244, 236, 219, 0.16);
  transition: color 800ms ease-out;
}
.hero--interactive .hero-copy p {
  color: rgba(244, 236, 219, 0.11);
  transition: color 800ms ease-out;
}
.hero--interactive.hero--lit .hero-copy h1 { color: var(--heading); }
.hero--interactive.hero--lit .hero-copy p { color: var(--ink-soft); }
.hero--interactive.hero--lit .hero-copy h1 .accent { color: var(--orange); }
/* Vignette: a thick dark feathered border. Its stroke thins as the lamp lights
   (150 -> 50), opening the scene up; it thickens back when the light goes out.
   Stroke colour matches the page black, so at 150 it's invisible over the dark
   off state. Overrides the SVG's stroke-width="50" presentation attribute. */
.ls-vignette path {
  stroke-width: 150px;
  transition: stroke-width 1300ms ease-out;
}
.hero--lit .ls-vignette path {
  stroke-width: 50px;
}
.hero-stage.is-static-lit .ls-vignette path {
  stroke-width: 50px;
}


.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}

/* Only surfaces once the SVG is live, so it never sits over the static fallback. */
.hero-hint {
  display: none;
  position: absolute;
  left: 50%;
  /* The cap sits ~35% down the stage at any size, so the hint is placed as a
     proportion too. A fixed pixel offset was tuned for the desktop stage and
     landed on top of the mushroom once the artwork scaled down on phones. */
  top: 17%;
  transform: translateX(-50%);
  white-space: nowrap;
  /* Two lines now ("click me" / "or press [enter]"), so centre them on each other. */
  text-align: center;
  line-height: 1.7;
  font-family: "Baloo Bhaina 2", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  user-select: none;
}
.hero-stage.is-ready ~ .hero-hint {
  display: block;
  opacity: 0.7;
}
/* Needs to out-specify the `.is-ready ~` rule above, hence the same prefix. */
.hero-stage.is-ready ~ .hero-hint.is-hidden { display: none; }

/* Keycap for the "press enter" affordance. */
.hero-hint .key {
  display: inline-block;
  font-family: inherit;
  font-size: 0.82em;
  letter-spacing: 0.1em;
  line-height: 1;
  padding: 5px 9px 6px;
  margin-left: 2px;
  border: 1px solid currentColor;
  border-bottom-width: 3px;
  border-radius: 6px;
  vertical-align: 2px;
}

.hero-stage {
  display: block;
  width: 100%;
  max-width: 440px;
  padding: 0;
  border: none;
  background: none;
  border-radius: 999px 999px 18px 18px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hero-stage:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 6px;
}
.hero-stage img,
.hero-stage svg {
  width: 100%;
  height: auto;
  display: block;
}
.hero-stage--static { cursor: default; }

/* Every animated layer pivots on the lamp, so the settle reads as one camera
   pull-back rather than each layer shrinking toward its own centre. */
.ls-layer,
.ls-stars,
.ls-glow,
.ls-lamp-off,
.ls-lamp-on {
  transform-box: view-box;
  transform-origin: 165px 220px;
}

/* --- resting state (before the reveal runs) --- */
.hero-stage.is-ready .ls-layer {
  opacity: 0;
  transform: scale(var(--s, 1.1));
}
.hero-stage.is-ready .ls-stars { opacity: 0; }
.hero-stage.is-ready .ls-glow { opacity: 0; transform: scale(0.28); }
.hero-stage.is-ready .ls-lamp-on { opacity: 0; }
.hero-stage.is-ready .ls-lamp-off { opacity: 1; }
/* Off state = mushroom only; the dark grotto backdrop stays hidden until clicked. */
.hero-stage.is-ready .ls-bg { opacity: 0; }

.ls-glow {
  transform-origin: 165px 231px;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Foliage pivots at its own base, so it bends like it's rooted rather than
   rotating about the shared scene origin the numbered layers use. */
.ls-sway {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  will-change: transform;
}
.hero-stage.is-playing .ls-sway {
  animation: ls-sway var(--sdur, 10s) ease-in-out var(--sdelay, 1.6s) infinite;
}
/* A full cycle that begins and ends at rest, so there's no jump into the first
   frame and no seam on loop. `alternate` between two extremes would snap from
   upright straight to full deflection the moment the delay elapsed. */
@keyframes ls-sway {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(var(--sa, 1deg)); }
  50%  { transform: rotate(0deg); }
  75%  { transform: rotate(calc(var(--sa, 1deg) * -1)); }
  100% { transform: rotate(0deg); }
}

/* --- the reveal --- */
.hero-stage.is-playing .ls-bg {
  animation: ls-bg-in var(--bgdur, 840ms) ease-out both;
}
/* will-change is held for the whole lit session, not just the animation. The
   browser promotes a layer to its own texture while its transform animates and
   drops it the moment the animation ends — that demote/repaint lands right as
   the reveal finishes and reads as a flicker on the big back-tree layers. */
.hero-stage.is-playing .ls-layer {
  animation: ls-layer-in var(--dur, 1030ms) cubic-bezier(0.22, 0.68, 0.24, 1) var(--d, 0ms) both;
  will-change: transform, opacity;
}
.hero-stage.is-playing .ls-stars {
  animation: ls-stars-in 1220ms ease-out var(--d, 0ms) both;
}
.hero-stage.is-playing .ls-glow {
  animation: ls-glow-bloom 1220ms cubic-bezier(0.16, 0.84, 0.3, 1) 190ms both;
}
.hero-stage.is-playing .ls-lamp-off {
  animation: ls-lamp-settle 900ms cubic-bezier(0.22, 0.68, 0.24, 1) both,
             ls-lamp-fade 350ms ease-out 120ms both;
}
.hero-stage.is-playing .ls-lamp-on {
  animation: ls-lamp-settle 900ms cubic-bezier(0.22, 0.68, 0.24, 1) both,
             ls-bulb-flash 840ms ease-out 120ms both;
}

@keyframes ls-bg-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes ls-layer-in {
  from { opacity: 0; transform: scale(var(--s, 1.1)); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes ls-stars-in {
  0%   { opacity: 0; }
  100% { opacity: 0.47; }
}
@keyframes ls-glow-bloom {
  0%   { opacity: 0;   transform: scale(0.3); }
  100% { opacity: 0.5; transform: scale(0.72); }
}
/* Recedes ~5% with the zoom-out while keeping the soft button squash: a quick
   ~3% vertical press early, a tiny rebound, then settles back to rest as the
   rest of the scene pulls back. */
@keyframes ls-lamp-settle {
  0%   { transform: scaleX(1.05)  scaleY(1.05); }
  16%  { transform: scaleX(1.045) scaleY(0.99); }
  32%  { transform: scaleX(1.01)  scaleY(1.02); }
  100% { transform: scaleX(1)     scaleY(1); }
}
@keyframes ls-lamp-fade {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes ls-bulb-flash {
  0%   { opacity: 0; filter: brightness(1); }
  30%  { opacity: 1; filter: brightness(1.85); }
  100% { opacity: 1; filter: brightness(1); }
}

/* Reduced motion: show the lit scene, no movement. */
.hero-stage.is-static-lit .ls-lamp-off { opacity: 0; }
.hero-stage.is-static-lit .ls-lamp-on,
.hero-stage.is-static-lit .ls-bg,
.hero-stage.is-static-lit .ls-glow { opacity: 1; }
.hero-stage.is-static-lit .ls-layer { opacity: 1; }
.hero-stage.is-static-lit .ls-stars { opacity: 0.47; }
/* Reduced motion is a still frame: nothing animates and nothing is clickable. */
.hero-stage.is-static-lit {
  pointer-events: none;
  cursor: default;
}
.hero-stage.is-static-lit *,
.hero-stage.is-static-lit {
  animation: none !important;
  transition: none !important;
}

/* ---------- section headings ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 20px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 2rem; }

section { padding: 64px 0; }
.section-alt { background: var(--cream-2); }

/* ---------- project cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.card-grid--single { grid-template-columns: 1fr; }
.card-grid--single .project-card.featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: stretch;
}
.featured-thumb { height: 100%; min-height: 280px; }
.featured .card-body {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured .card-title { font-size: 1.6rem; gap: 12px; }
.featured .card-title .icon { font-size: 1.5rem; }
.featured .card-body p { font-size: 1.05rem; }
.project-card {
  background: var(--paper);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0,0,0,0.5); }
.card-thumb {
  position: relative;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-body { padding: 18px 20px 22px; }
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Baloo Bhaina 2", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--heading);
  margin-bottom: 8px;
}
.card-title .icon { font-size: 1.1rem; }
.card-body p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* thumb scenes */
.scene-night {
  background: radial-gradient(circle at 30% 20%, #294a3d, var(--night) 70%);
}
.scene-peach { background: linear-gradient(160deg, #f6ddca, var(--peach)); }
.scene-gold { background: linear-gradient(160deg, #eebb5c, var(--gold)); }
.scene-olive { background: linear-gradient(160deg, #a7b485, var(--olive)); }
.scene-cream { background: linear-gradient(160deg, #e9dabb, #cdb98c); }
.scene-dusk { background: linear-gradient(160deg, #16302a, #0f2019); }
.scene-hills { background: linear-gradient(180deg, #55622f, #2b3319); }
.scene-blush { background: linear-gradient(160deg, #f4c9b0, #eeb497); }

.scene-hillshape {
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 120%;
  height: 70%;
  background: rgba(10,9,7,0.5);
  border-radius: 50%;
}
.scene-hillshape.light { background: rgba(255,255,255,0.35); }

.spore-icon { width: 64px; height: 64px; position: relative; z-index: 2; }
.spore-icon.sm { width: 44px; height: 44px; }
.spore-icon.lg { width: 96px; height: 96px; }

.thumb-star {
  position: absolute;
  background: var(--gold-light);
  border-radius: 50%;
}

/* ---------- coming soon banner ---------- */
.banner {
  background: var(--olive);
  border-radius: var(--radius-lg);
  color: var(--cream-text);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 24px;
  overflow: hidden;
  position: relative;
}
.banner h2 {
  color: #fff;
  font-size: 2rem;
  margin: 10px 0 14px;
}
.banner p { color: rgba(241, 233, 216, 0.85); max-width: 42ch; margin: 0 0 22px; }
.banner p strong { color: var(--gold-light); font-weight: 700; }
.banner-art {
  position: relative;
  height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.banner-sun {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(231,169,59,0.55), rgba(231,169,59,0) 70%);
  border-radius: 50%;
  z-index: 0;
}
.banner-mound {
  position: relative;
  z-index: 1;
  width: 210px;
  height: 140px;
  border-radius: 50% 50% 6px 6px / 60% 60% 6px 6px;
  border: 2px dashed rgba(241,233,216,0.45);
  background: rgba(241,233,216,0.05);
  margin-bottom: 0;
}
.banner-spore {
  position: relative;
  z-index: 2;
  width: 68px;
  margin: 0 0 -2px -46px;
}

/* ---------- journal ---------- */
.journal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.journal-card { }
.journal-thumb {
  position: relative;
  height: 190px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}
.journal-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.journal-meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.journal-meta .tag { color: var(--orange); font-weight: 700; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--dark-2);
  color: var(--cream-text);
  padding: 64px 0 28px;
  position: relative;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.footer-brand .brand img { height: 42px; }
.footer-brand p {
  margin: 14px 0 0;
  color: rgba(241,233,216,0.7);
  /* Tagline reads as one line; the old 26ch cap split it across two. */
  white-space: nowrap;
}
.footer-contact { min-width: 260px; }
.footer-contact h4 {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: rgba(241, 233, 216, 0.55);
  margin: 0 0 12px;
  font-weight: 700;
}
.footer-email {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cream-text);
  border-bottom: 1px solid rgba(241, 233, 216, 0.25);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-email:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.newsletter { min-width: 320px; }
.newsletter h4 {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: rgba(241,233,216,0.55);
  margin: 0 0 12px;
  font-weight: 700;
}
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  background: rgba(241,233,216,0.1);
  color: #fff;
  font-family: inherit;
}
.newsletter-form input::placeholder { color: rgba(241,233,216,0.5); }
.newsletter-form button {
  border: none;
  border-radius: 999px;
  padding: 0 20px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
}
.newsletter-form button:hover { background: var(--orange-dark); }
.newsletter-note { font-size: 0.8rem; color: rgba(241,233,216,0.7); margin-top: 10px; }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(241,233,216,0.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(241,233,216,0.55);
  position: relative;
  z-index: 2;
}
.footer-bottom a { color: rgba(241,233,216,0.55); }
.footer-bottom a:hover { color: #fff; }

.footer-hill {
  position: absolute;
  right: -6%;
  bottom: -30%;
  width: 320px;
  height: 320px;
  background: #201c12;
  border-radius: 50%;
  z-index: 1;
}
.footer-mushroom {
  position: absolute;
  right: 4%;
  bottom: 6%;
  width: 90px;
  z-index: 2;
  opacity: 0.95;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .card-grid, .journal-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid--single { grid-template-columns: 1fr; }
  .card-grid--single .project-card.featured { grid-template-columns: 1fr; }
  .featured-thumb { min-height: 220px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 320px; }
  .hero h1 { font-size: 2.6rem; }
  .banner { grid-template-columns: 1fr; }
  .banner-art { order: -1; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .newsletter { min-width: 0; }
  .main-nav { display: none; }
  .main-nav.nav-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid rgba(241,233,216,0.1);
    padding: 20px 32px 28px;
  }
  .main-nav.nav-open ul { flex-direction: column; gap: 18px; }
  .nav-toggle { display: block; }
}

@media (max-width: 620px) {
  .card-grid, .journal-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .wrap { padding: 0 20px; }
  .hero h1 { font-size: 2.1rem; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .header-actions .btn span.label { display: none; }

  /* The header ran past the viewport and forced the whole page to scroll
     sideways. Everything here buys back horizontal room. */
  :root { --header-h: 64px; }
  /* Budget at 375px: 40 padding + 123 logo + 44 nav + 134 switch + 24 gaps
     = 365, leaving a little slack. The logo is the biggest lever. */
  .site-header .wrap { gap: 12px; }
  .brand img { height: 24px; }
  /* One nav link fits on its own, so the hamburger and its dropdown are more
     machinery than the content needs. */
  .main-nav { display: block; }
  .main-nav ul { gap: 16px; font-size: 0.9rem; }
  .nav-toggle { display: none; }
  .motion-toggle { padding: 4px; gap: 8px; }
  .motion-toggle-label { font-size: 0.68rem; letter-spacing: 0.01em; }

  /* Nowrap here was pushing the footer wider than the screen. */
  .footer-brand p { white-space: normal; }

  /* Smaller stage, so the hint needs less vertical room above the cap. */
  .hero-hint { font-size: 0.92rem; letter-spacing: 0.12em; }
}

/* Narrow phones can't fit the words "reduce motion" next to the logo and nav.
   The text goes screen-reader-only rather than display:none, so the switch
   keeps its accessible name while only the control itself shows. */
@media (max-width: 400px) {
  .motion-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}
