/* Alphaus — brand tokens */
:root {
  --navy: #1E2A44;
  --navy-dark: #141D30;
  --navy-light: #2B3A5C;
  --mustard: #D9A441;
  --mustard-dark: #B4842F;
  --terracotta: #B85A35;
  --cream: #F3EEE6;
  --forest: #2F4A3A;
  --forest-dark: #22372B;
  --sand: #E2DBCF;
  --stone: #C9C1B4;
  --wall-light: #DDD4C5;
  --wall-dark: #B8AD9C;
  --terracotta-dark: #95462A;
  --light: #F4CF7A;
  --trunk: #6B4A33;
  --trunk-dark: #553A28;
  --leaf-light: #3E6450;
  /* Blueprint model shades (How it works) */
  --plan-1: #3A4D75;
  --plan-2: #4C6190;
  --plan-3: #34466C;
  --plan-4: #56699A;
  --soft-on-navy: #C9CFDB;
  --muted-on-navy: #A9B3C7;
  --ink-soft: #3A352F;
  --muted: #5A544C;
  --white: #FFFFFF;

  --font-display: 'Jost', 'Futura', 'Trebuchet MS', sans-serif;
  --font-body: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-width: 1200px;
  --gutter: 24px;
  --radius: 6px;
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

img, svg { max-width: 100%; }

a { color: var(--navy); }
a:hover { color: var(--terracotta); }
a:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }

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

.section { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 40px; }
.section-head { display: flex; flex-direction: column; gap: 10px; }
.section-head h2, .about-text h2 { font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }

.eyebrow { font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); font-size: 14px; }
.bold { font-weight: 600; }
.light { font-weight: 300; }

.band-white { background: var(--white); }
.band-navy { background: var(--navy); color: var(--cream); }

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  padding: 15px 26px;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1.2;
  min-height: 44px;
}
.btn-small { padding: 12px 20px; }
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover { background: var(--navy-light); color: var(--cream); }
.btn-mustard { background: var(--mustard); color: var(--navy); font-weight: 600; font-size: 16px; }
.btn-mustard:hover { background: #E4B458; color: var(--navy); }
/* Secondary button for navy bands */
.btn-outline-light { color: var(--cream); border: 1.5px solid var(--cream); padding: 13.5px 24.5px; }
.btn-outline-light:hover { color: var(--mustard); border-color: var(--mustard); }
.btn-outline-light:focus-visible { outline: 2px solid var(--mustard); outline-offset: 3px; }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */
.site-header {
  padding-top: 22px;
  padding-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-word { display: flex; flex-direction: column; font-family: var(--font-display); line-height: 1; letter-spacing: 0.2em; font-size: 17px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.site-nav a { text-decoration: none; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  border-radius: 4px;
  cursor: pointer;
}
.nav-toggle svg { fill: currentColor; }
.nav-toggle:hover { color: var(--terracotta); border-color: var(--terracotta); }
.nav-toggle:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }
.nav-toggle[aria-expanded="true"] { background: var(--navy); color: var(--cream); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.site-nav .btn-primary { color: var(--cream); }

/* Hero */
.hero {
  padding-top: 64px;
  padding-bottom: 112px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
}
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-weight: 600; font-size: clamp(42px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.lead { max-width: 34em; color: var(--ink-soft); }

/* Home hero band: full-bleed navy with drifting shapes behind the header, headline and a floating-island haus (main.js) */
.hero-band { position: relative; background: var(--navy); color: var(--cream); overflow: hidden; }
.hero-drift { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-band .site-header, .hero-band .hero { position: relative; }
.hero-band a:focus-visible, .hero-band .nav-toggle:focus-visible { outline-color: var(--mustard); }
.hero-band .logo, .hero-band .site-nav a { color: var(--cream); }
.hero-band .site-nav a:hover { color: var(--mustard); }
.hero-band .site-nav .btn-mustard { color: var(--navy); }
.hero-band .nav-toggle { color: var(--cream); border-color: var(--cream); }
.hero-band .nav-toggle:hover { color: var(--mustard); border-color: var(--mustard); }
.hero-band .nav-toggle[aria-expanded="true"] { background: var(--cream); color: var(--navy); }
.hero-band .eyebrow { color: var(--muted-on-navy); }
.hero-band .lead { color: var(--soft-on-navy); }
.hero-haus { flex: 1 1 360px; min-width: 0; max-width: 100%; aspect-ratio: 1 / 1; max-height: 480px; display: flex; align-items: center; justify-content: center; }
.hero-haus svg { width: 66%; height: auto; overflow: visible; will-change: transform; }
/* Lights on: pointing at the haus (or tapping it on a phone) softly lights the window, then the door, then the grass */
.haus-light { opacity: 0; transition: opacity 0.9s ease; pointer-events: none; }
.light-door { transition-delay: 0.25s; }
.light-pool { transition-delay: 0.45s; }
#hausSvg.is-lit .haus-light { opacity: 1; }
#hausSvg.is-lit .light-pool { opacity: 0.7; }
/* Turning off, all lights fade together */
#hausSvg:not(.is-lit) .haus-light { transition-delay: 0s; }

/* Pillars */
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.pillar { background: var(--cream); border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pillar h3 { font-weight: 600; font-size: clamp(24px, 3vw, 30px); line-height: 1.15; text-wrap: balance; }
.pillar > p:not(.eyebrow) { color: var(--ink-soft); max-width: 36em; }
.pillar-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.pillar-list li { padding-left: 22px; position: relative; }
.pillar-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; background: var(--terracotta); }
/* Pillar icons come apart on hover */
.pillar .icon { overflow: visible; }
.pillar .icon .part { transition: transform 0.45s cubic-bezier(.34,1.56,.64,1); }
.pillar:hover .icon .lift-1 { transform: translateY(-10px); }
.pillar:hover .icon .lift-2 { transform: translateY(-5px); }
.pillar:hover .icon .slide-r { transform: translateX(8px); }
.pillar:hover .icon .slide-l { transform: translateX(-6px) translateY(-4px); }

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.work-item { text-decoration: none; display: flex; flex-direction: column; gap: 14px; }
.work-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.work-title { font-family: var(--font-display); font-weight: 600; font-size: 20px; }

.placeholder {
  background: var(--sand);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.placeholder.wide { aspect-ratio: 16 / 10; }

/* About: isometric home studio in place of a portrait */
.about-scene { flex: 1 1 300px; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.about-wire line { stroke: var(--mustard); stroke-width: 0.6; stroke-linecap: round; }
.about-leds .led { animation: led-blink 3.2s steps(1) infinite; }
.about-leds .led-2 { animation-duration: 2.3s; animation-delay: -0.7s; }
.about-leds .led-3 { animation-duration: 4.1s; animation-delay: -1.9s; }
.about-leds .led-4 { animation-duration: 1.7s; animation-delay: -0.4s; }
.about-leds .led-5 { animation-duration: 2.9s; animation-delay: -2.2s; }
@keyframes led-blink { 0%, 62% { opacity: 1; } 63%, 78% { opacity: 0.25; } 79%, 100% { opacity: 1; } }

/* How it works teaser (home) */
.teaser { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.teaser-text { display: flex; flex-direction: column; gap: 10px; flex: 1 1 360px; min-width: 0; }
.teaser-text h2 { font-weight: 400; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.teaser-text p:not(.eyebrow) { color: var(--ink-soft); max-width: 30em; }
.teaser-link { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; text-decoration: none; }
.steps-row { display: flex; align-items: flex-end; gap: 14px; }
.steps-row svg { transition: transform 0.45s cubic-bezier(.34,1.56,.64,1); }
.teaser-link:hover .steps-row svg { transform: translateY(-6px); }
.teaser-link:hover .steps-row svg:nth-child(2) { transition-delay: 0.06s; }
.teaser-link:hover .steps-row svg:nth-child(3) { transition-delay: 0.12s; }
.teaser-link:hover .steps-row svg:nth-child(4) { transition-delay: 0.18s; }
.teaser-cta { font-family: var(--font-display); font-weight: 600; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.teaser-cta svg { transition: transform 0.3s ease; }
.teaser-link:hover .teaser-cta svg { transform: translateX(5px); }

/* How it works page: a pinned drawing of a shop beside scrolling step panels (main.js builds it).
   Scroll picks the step; each step then plays to completion, so the house is never left half-built. */
.build { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  container-type: inline-size;
}
.stage svg { width: 100%; max-width: 680px; height: auto; overflow: visible; }

/* Hard stops: the page always comes to rest on a step, and a fast flick can't skip one */
html.step-snap { scroll-snap-type: y mandatory; }
.step-snap .site-header { scroll-snap-align: start; }
.step-snap .panel[data-step] { scroll-snap-align: center; scroll-snap-stop: always; }
.step-snap .site-footer { scroll-snap-align: end; }

/* Drawing + key, like an architect's sheet: numbered markers on the house, explained in one aligned row below */
.marker circle { fill: var(--navy); stroke: var(--cream); stroke-width: 1.5; }
.marker text { font-family: var(--font-mono); font-size: 9px; fill: var(--cream); text-anchor: middle; dominant-baseline: central; }
.key {
  list-style: none;
  margin: 0;
  padding: 14px 0 0;
  width: 100%;
  max-width: 680px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  border-top: 1px solid rgba(30, 42, 68, 0.18);
}
.key li { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 8px; row-gap: 2px; align-items: center; }
.key-num { grid-row: span 2; align-self: start; width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: var(--cream); font-family: var(--font-mono); font-size: 10px; display: grid; place-items: center; transition: background-color 0.4s ease, color 0.4s ease; }
.key-name { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); line-height: 1.3; }
.key-sub { font-size: 14px; color: var(--navy); line-height: 1.3; white-space: nowrap; transition: color 0.4s ease; }
/* Steps not built yet: a pale number and softer text, still readable (no fading the whole item) */
.key li:not(.done) .key-num { background: var(--stone); color: var(--navy); }
.key li:not(.done) .key-sub { color: var(--muted); }
/* Too narrow for four columns: an even 2 × 2 instead of wrapped, ragged entries */
@container (max-width: 560px) {
  .key { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
}
.panels { display: flex; flex-direction: column; }
.panel { min-height: 85vh; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.panel.intro { min-height: calc(100vh - 90px); }
/* Steps you're not on step back in a muted grey (still 4.9:1 against the cream, so it stays readable); their icons fade further */
.panel[data-step] h2, .panel[data-step] p { transition: color 0.4s ease; }
.panel[data-step] .step-num svg { transition: opacity 0.4s ease; }
.panel[data-step]:not(.active) h2, .panel[data-step]:not(.active) p { color: #6B655C; }
.panel[data-step]:not(.active) .step-num svg { opacity: 0.35; }
.panel.intro h1 { font-weight: 600; font-size: clamp(38px, 5vw, 64px); line-height: 1.04; letter-spacing: -0.02em; }
.panel h2 { font-weight: 600; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
.panel p:not(.eyebrow) { color: var(--ink-soft); max-width: 32em; }
.panel p.cue { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.cue svg { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.step-num { display: flex; align-items: center; gap: 12px; }

/* About */
.about-section { gap: 0; }
.about { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.about-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.about-text > p:not(.eyebrow) { color: var(--ink-soft); }

/* 3D work: a quiet text button under the bio unfolds the gallery beneath (main.js) */
.work-toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 6px 0;
  background: none;
  border: 0;
  border-bottom: 1.5px solid var(--mustard);
  color: var(--navy);
  font: 600 15px var(--font-body);
  cursor: pointer;
}
.work-toggle[hidden] { display: none; }
.work-toggle:hover { color: var(--terracotta); border-color: var(--terracotta); }
.work-toggle:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 4px; }
.work-toggle svg { transition: transform 0.35s ease; }
.work-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
/* Spacing as a margin on the first child (not padding), so the folded panel can shrink to zero height */
.work-inner { display: flex; flex-direction: column; gap: 24px; }
.work-inner > :first-child { margin-top: 56px; }
.work-intro { color: var(--ink-soft); max-width: 36em; }
/* Folded state only exists once main.js adds .is-foldable; the rows trick animates to the content's own height */
.work-panel.is-foldable { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 0.55s cubic-bezier(.2, .7, .2, 1), visibility 0s linear 0.55s; }
.work-panel.is-foldable > .work-inner { min-height: 0; overflow: hidden; }
.work-panel.is-foldable.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 0.55s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.work-panel.is-open .craft-item { animation: work-in 0.5s cubic-bezier(.2, .7, .2, 1) both; }
.work-panel.is-open .craft-item:nth-child(2) { animation-delay: 0.08s; }
.work-panel.is-open .craft-item:nth-child(3) { animation-delay: 0.16s; }
@keyframes work-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Always three equal columns (or one on phones) so the row never goes lopsided */
.craft-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.craft-item { text-decoration: none; color: var(--navy); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.craft-item:hover { color: var(--navy); }
.craft-frame { display: block; overflow: hidden; border-radius: 4px; background: var(--navy-dark); }
.craft-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2, .7, .2, 1);
}
/* Subtle zoom inside the frame, so the image never grows past its edges */
.craft-item:hover .craft-frame img, .craft-item:focus-visible .craft-frame img { transform: scale(1.04); }
.craft-item:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 6px; border-radius: 4px; }
.craft-bar { display: flex; align-items: center; gap: 10px; }
.craft-bar svg { flex: none; }
.craft-item:hover .work-title { color: var(--terracotta); }
.craft-tools { font-size: 14px; color: var(--muted); }
.craft-tools a { color: var(--navy); }
.craft-tools a:hover { color: var(--terracotta); }

/* Contact: heading on the left, form on the right (stacked on phones) */
.contact {
  padding-top: 96px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 48px;
}
.contact h2 { font-weight: 600; font-size: clamp(32px, 5vw, 56px); line-height: 1.05; margin-bottom: 12px; }
.contact p { color: var(--soft-on-navy); }
.contact-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
/* Small floating haus: bobs gently, door light breathes */
.contact-haus { width: 112px; margin-bottom: 28px; }
.contact-haus svg { display: block; width: 100%; height: auto; overflow: visible; animation: haus-bob 5s ease-in-out infinite; }
.contact-haus .door-glow { animation: door-glow 3.2s ease-in-out infinite; }
@keyframes haus-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes door-glow { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
/* reCAPTCHA box (rendered by Netlify on the live site); takes no space until it's there */
.form-captcha:empty { display: none; }
.form-captcha { max-width: 100%; overflow: hidden; }

/* What happens next: three numbered steps under the contact heading */
.contact-next { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(243, 238, 230, 0.18); }
.contact-next .eyebrow { color: var(--muted-on-navy); }
.contact-next ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: next; }
.contact-next li { counter-increment: next; display: flex; align-items: baseline; gap: 12px; color: var(--soft-on-navy); }
.contact-next li::before { content: counter(next); flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--mustard); color: var(--navy); font-family: var(--font-mono); font-size: 11px; transform: translateY(-1px); }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 14px; color: var(--cream); }
.field .optional { color: var(--muted-on-navy); }
.field input, .field textarea {
  font: inherit;
  font-size: 16px;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  color: var(--navy);
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: 4px;
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--mustard); }
.contact-form .btn { border: 0; cursor: pointer; font-family: inherit; }
.contact-form .btn:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.contact-form .btn[disabled] { opacity: 0.7; cursor: progress; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
/* Spam trap for bots; people never see it */
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 12px 16px; border-radius: 4px; font-size: 15px; }
.contact .form-status.is-success { background: var(--forest); color: var(--cream); border-left: 4px solid var(--mustard); }
.contact .form-status.is-error { background: var(--cream); color: var(--terracotta-dark); border-left: 4px solid var(--terracotta); }
.contact .contact-backup { font-size: 15px; }
/* Padding (cancelled by negative margin) gives a 44px-tall tap area without moving the line */
.contact-email { display: inline-block; padding: 12px 0; margin: -12px 0; font-family: var(--font-mono); color: var(--cream); text-decoration: underline; text-decoration-color: rgba(243, 238, 230, 0.4); text-underline-offset: 4px; }
.contact-email:hover { color: var(--mustard); text-decoration-color: var(--mustard); }
.contact-email:focus-visible { outline: 2px solid var(--mustard); outline-offset: 3px; border-radius: 2px; }
.contact .contact-privacy { font-size: 13px; color: var(--muted-on-navy); max-width: 40em; }
@media (max-width: 760px) {
  .contact { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 72px; padding-bottom: 72px; }
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .contact-form .btn { width: 100%; text-align: center; }
}

/* Footer */
.site-footer {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
/* Footer links: a full-width row above the copyright line, with the email standing out */
.footer-links { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid rgba(30, 42, 68, 0.12); font-size: 14px; }
.footer-links a { color: var(--navy); text-decoration: none; padding: 10px 0; }
.footer-links a:hover { color: var(--terracotta); }
.footer-links a:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; border-radius: 2px; }
.footer-links .footer-email { margin-left: auto; font-family: var(--font-mono); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(30, 42, 68, 0.35); }
@media (max-width: 640px) { .footer-links .footer-email { margin-left: 0; flex-basis: 100%; } }
.page-404 .footer-links { border-bottom-color: rgba(243, 238, 230, 0.16); }
.page-404 .footer-links a { color: var(--cream); }
.page-404 .footer-links a:hover { color: var(--mustard); }
.mono { font-family: var(--font-mono); }
.mono-accent { color: #9A6E1E; }

/* 404 page: one navy screen with the header, a short note, the haus (door lit) and the footer */
.page-404 { background: var(--navy); }
.page-404 .hero-band { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.page-404 .site-footer { color: var(--muted-on-navy); }
.page-404 .mono-accent { color: var(--mustard); }
.not-found { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 48px; padding-bottom: 64px; }
.not-found-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.not-found h1 { font-weight: 600; font-size: clamp(40px, 5.6vw, 68px); line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; }
.not-found-path { font-size: 15px; color: var(--cream); overflow-wrap: anywhere; }
.caret { display: inline-block; width: 0.55em; height: 1.1em; margin-left: 4px; vertical-align: -0.2em; background: var(--mustard); animation: caret-blink 1.1s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
.not-found-haus { flex: 0 1 300px; width: 300px; max-width: 100%; height: auto; margin: 0 auto; }
@media (max-width: 640px) {
  /* Top-anchored, not centred, so the text doesn't jump when the web fonts swap in */
  .not-found { align-content: flex-start; padding-top: 24px; padding-bottom: 40px; gap: 32px; }
  .not-found-haus { width: 180px; flex-basis: 180px; }
}
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

/* Scroll reveals (main.js adds .reveal-on only when it runs and motion is allowed) */
.reveal-on .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1); }
.reveal-on .reveal.is-in { opacity: 1; transform: none; }
@media print { .reveal-on .reveal { opacity: 1; transform: none; } }

/* Endless animations pause while off screen or in a hidden tab (main.js toggles these classes).
   !important because each animation's own `animation:` shorthand resets the play state with higher specificity. */
.anim-paused, .anim-paused *, .tab-hidden .contact-haus *, .tab-hidden .cue *, .tab-hidden .about-scene *, .tab-hidden .path-grid * { animation-play-state: paused !important; }

/* Phone tweaks */
@media (max-width: 640px) {
  /* Logo, Let's talk and a menu button share one row; the links drop down beneath */
  .site-header { position: relative; flex-wrap: nowrap; }
  .site-nav { flex-wrap: nowrap; gap: 10px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    z-index: 20;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    background: var(--white);
    border-top: 4px solid var(--mustard);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 12px 28px rgba(30, 42, 68, 0.14);
  }
  .site-nav.open .nav-links { display: flex; }
  .nav-links a { padding: 12px 20px; font-size: 16px; }
  .nav-links a:hover { background: var(--cream); }
  /* The dropdown panel stays white on the navy hero, so its links go back to navy */
  .hero-band .nav-links a { color: var(--navy); }
  .hero-band .nav-links a:hover { color: var(--terracotta); }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .hero { padding-top: 32px; padding-bottom: 56px; gap: 8px; }
  .hero-haus { flex-basis: 100%; max-height: 300px; }
  .hero-haus svg { width: auto; height: 86%; }
  .craft-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .build { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stage { height: 44vh; background: var(--cream); z-index: 1; gap: 10px; padding-bottom: 10px; }
  .panel, .panel.intro { min-height: 70vh; }
  /* The house is pinned over the top 44%, so each step stops centred in the space below it */
  html.step-snap { scroll-padding-top: 44vh; }
  .panel[data-step] { min-height: 56vh; }
  .key { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding-top: 10px; }
  .key li { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: 4px; }
  .key-num { grid-row: auto; }
  .key-name { font-size: 10px; letter-spacing: 0.06em; }
  .key-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pillar .icon .part, .steps-row svg, .teaser-cta svg, .craft-frame img { transition: none; }
  .about-leds .led { animation: none; }
  .work-panel.is-foldable, .work-panel.is-foldable.is-open, .work-toggle svg { transition: none; }
  .work-panel.is-open .craft-item { animation: none; }
  .pillar:hover .icon .part, .teaser-link:hover .steps-row svg, .teaser-link:hover .teaser-cta svg,
  .craft-item:hover .craft-frame img, .craft-item:focus-visible .craft-frame img { transform: none; }
  .panel[data-step] h2, .panel[data-step] p, .panel[data-step] .step-num svg { transition: none; }
  .key-num, .key-sub { transition: none; }
  .cue svg, .contact-haus svg, .contact-haus .door-glow { animation: none; }
}

/* Step-by-step path (How we help) */
.path-intro { color: var(--ink-soft); max-width: 36em; }
/* Always 4, then 2 × 2, then 1 column, so a step never ends up alone on a row */
.path-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1040px) { .path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .path-grid { grid-template-columns: minmax(0, 1fr); } }
.path-grid .pillar { padding: 28px; }

/* Path cards: a warm spotlight follows the pointer (main.js sets --mx/--my), and the edge nearest it lights up.
   Clicking a card lifts it with a loose wobble; it floats under a soft beam until clicked again. */
.path-grid .pillar { position: relative; isolation: isolate; cursor: pointer; transition: box-shadow 0.5s ease; -webkit-tap-highlight-color: transparent; }
.path-grid .pillar > * { position: relative; z-index: 1; }
.path-grid .pillar::before,
.path-grid .pillar::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.45s ease; }
.path-grid .pillar::before { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(217, 164, 65, 0.32), transparent 65%); }
.path-grid .pillar::after {
  padding: 1.5px;
  background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 0%), var(--mustard), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
@media (hover: hover) {
  .path-grid .pillar:hover::before, .path-grid .pillar:hover::after { opacity: 1; }
}
/* Lifted: the light becomes a beam from above that stays on */
.path-grid .pillar.is-lifted { box-shadow: 0 22px 40px -18px rgba(20, 29, 48, 0.45); animation: card-wobble 0.95s cubic-bezier(.3, .7, .3, 1) both, card-float 3.4s ease-in-out 0.95s infinite alternate; }
.path-grid .pillar.is-lifted::before { opacity: 1; background: radial-gradient(120% 70% at 50% -12%, rgba(244, 207, 122, 0.42), rgba(244, 207, 122, 0.1) 55%, transparent 80%); }
.path-grid .pillar.is-lifted::after { opacity: 1; background: linear-gradient(180deg, var(--mustard), rgba(217, 164, 65, 0) 75%); }
.path-grid .pillar.is-lifted .icon .lift-1 { transform: translateY(-10px); }
.path-grid .pillar.is-lifted .icon .lift-2 { transform: translateY(-5px); }
.path-grid .pillar.is-lifted .icon .slide-r { transform: translateX(8px); }
.path-grid .pillar.is-lifted .icon .slide-l { transform: translateX(-6px) translateY(-4px); }
.path-grid .pillar.is-settling { animation: card-settle 0.7s cubic-bezier(.3, .7, .3, 1) both; }
@keyframes card-wobble {
  0% { transform: translateY(0) rotate(0); }
  20% { transform: translateY(-11px) rotate(-1.3deg); }
  38% { transform: translateY(-7px) rotate(1deg); }
  56% { transform: translateY(-9px) rotate(-0.6deg); }
  74% { transform: translateY(-8px) rotate(0.3deg); }
  100% { transform: translateY(-8px) rotate(0); }
}
@keyframes card-float { from { transform: translateY(-8px); } to { transform: translateY(-11px); } }
@keyframes card-settle {
  0% { transform: translateY(-8px) rotate(0); }
  45% { transform: translateY(1px) rotate(0.5deg); }
  70% { transform: translateY(-1.5px) rotate(-0.25deg); }
  100% { transform: none; }
}
.path-grid .pillar.is-lifted { z-index: 2; }

/* Critters: a clipped slot sits on the card's top edge; the drawing waits below the edge (out of sight, "behind" the card)
   and springs up when the card is lifted, ducking back down when it settles */
.path-grid .pillar > .critter { position: absolute; z-index: 0; bottom: 100%; width: 54px; height: 37px; overflow: hidden; pointer-events: none; }
.critter .peek { width: 54px; height: 37px; }
/* Room above the first row for a critter to peek out without touching the intro text */
.path-grid { margin-top: 14px; }
/* main.js picks a fresh spot along the top edge every time a card lifts */
.path-grid .pillar > .critter { left: 18%; }
/* Ease out with no overshoot, so nothing ever rises past the edge and shows a gap underneath */
.critter .peek { display: block; transform: translateY(105%); transition: transform 0.22s ease-in; }
.pillar.is-lifted .critter .peek { transform: none; transition: transform 0.55s cubic-bezier(.22, 1, .36, 1) 0.28s; }
/* Little quirks once they're up */
.critter .blink, .critter .whiskers, .critter .nose, .critter .ear, .critter .pupil, .critter .doze, .critter .lid { transform-box: fill-box; transform-origin: center; }
.pillar.is-lifted .critter .blink { animation: critter-blink 3.6s 1.2s infinite; }
/* Mouse: quick double sniffle, whiskers riding along */
.pillar.is-lifted .critter-mouse .nose { animation: nose-sniffle 1.9s 0.9s infinite; }
.pillar.is-lifted .critter-mouse .whiskers { animation: whisker-sniffle 1.9s 0.9s infinite; }
@keyframes nose-sniffle { 0%, 40%, 100% { transform: none; } 48% { transform: translateY(-0.6px) scale(1.3); } 56% { transform: none; } 64% { transform: translateY(-0.6px) scale(1.25); } 72% { transform: none; } }
@keyframes whisker-sniffle { 0%, 40%, 100% { transform: none; } 48%, 64% { transform: translateY(-0.7px); } 56%, 72% { transform: none; } }
/* Cat: ears flick from their base, the left one first */
/* Cat: a paw reaches up over the edge and pats about, then the head peeks up beside it and the paw settles on the edge */
.path-grid .pillar > .critter-cat { width: 64px; }
.critter-cat .peek { position: absolute; left: 10px; bottom: 0; }
.critter-cat .cat-paw { position: absolute; left: 4px; bottom: 0; display: block; transform-origin: 50% 100%; transform: translateY(105%); transition: transform 0.2s ease-in; }
.pillar.is-lifted .critter-cat .cat-paw { transform: translateY(58%); animation: cat-paw-reach 1.1s cubic-bezier(.3, .7, .3, 1) 0.28s both; }
.pillar.is-lifted .critter-cat .peek { transition-delay: 0.95s; }
@keyframes cat-paw-reach {
  0% { transform: translateY(105%); }
  34% { transform: translateY(0); }
  48% { transform: translateY(8%) rotate(-7deg); }
  60% { transform: translateY(0) rotate(2deg); }
  72% { transform: translateY(0) rotate(0); }
  100% { transform: translateY(58%); }
}
.critter-cat .ear { transform-origin: 50% 100%; }
.pillar.is-lifted .critter-cat .ear-l { animation: ear-twitch-l 2.8s 1s infinite; }
.pillar.is-lifted .critter-cat .ear-r { animation: ear-twitch-r 2.8s 2.1s infinite; }
@keyframes ear-twitch-l { 0%, 70%, 100% { transform: none; } 75% { transform: rotate(-14deg); } 80% { transform: rotate(3deg); } 85% { transform: none; } }
@keyframes ear-twitch-r { 0%, 70%, 100% { transform: none; } 75% { transform: rotate(14deg); } 80% { transform: rotate(-3deg); } 85% { transform: none; } }
/* Fox: eyes wander left, then right, then back */
.pillar.is-lifted .critter-fox .pupil { animation: eyes-wander 5s ease-in-out 1s infinite; }
@keyframes eyes-wander { 0%, 14%, 92%, 100% { transform: none; } 24%, 42% { transform: translateX(-1.8px); } 54%, 76% { transform: translateX(1.8px); } }
/* Owl: lids droop, head nods down, eyes close... then it startles awake */
.critter-owl .lid { transform-origin: 50% 0; transform: scaleY(0); }
.critter-owl .doze { transform-origin: 50% 100%; }
.pillar.is-lifted .critter-owl .lid { animation: owl-lids 7s 1.2s infinite; }
.pillar.is-lifted .critter-owl .doze { animation: owl-nod 7s 1.2s infinite; }
.critter-owl .asleep { opacity: 0; }
.pillar.is-lifted .critter-owl .asleep { animation: owl-asleep 7s 1.2s infinite; }
@keyframes owl-asleep { 0%, 52% { opacity: 0; } 57%, 84% { opacity: 1; } 86%, 100% { opacity: 0; } }
@keyframes owl-lids {
  0%, 12% { transform: scaleY(0); }
  30% { transform: scaleY(0.45); }
  38% { transform: scaleY(0.3); }
  56%, 84% { transform: scaleY(1); }
  87%, 100% { transform: scaleY(0); }
}
@keyframes owl-nod {
  0%, 30% { transform: none; }
  56% { transform: translateY(1.5px) rotate(-5deg); }
  70% { transform: translateY(2.5px) rotate(-7deg); }
  84% { transform: translateY(2.5px) rotate(-7deg); }
  87% { transform: translateY(-1.5px) rotate(2deg); }
  92%, 100% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .path-grid .pillar.is-lifted, .path-grid .pillar.is-settling { animation: none; }
  .critter .peek, .pillar.is-lifted .critter .peek, .critter-cat .cat-paw { transition: none; }
  .pillar.is-lifted .critter * { animation: none !important; }
  .path-grid .pillar.is-lifted .icon .part { transform: none; }
}
.path-grid .pillar h3 { font-size: clamp(22px, 2.4vw, 26px); }
.path-notes { display: flex; flex-direction: column; gap: 6px; }
.path-note { color: var(--muted); font-size: 15px; }

/* Bigger plans: a compact navy callout closing How we help (text left, button right; stacked on phones) */
.bigger-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--cream);
}
.bigger-callout-text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bigger-callout h3 { font-weight: 600; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.2; }
.bigger-callout p { color: var(--soft-on-navy); font-size: 15px; max-width: 40em; }
.bigger-callout .btn:focus-visible { outline: 2px solid var(--mustard); outline-offset: 3px; }
@media (max-width: 600px) {
  .bigger-callout { padding: 24px; }
  .bigger-callout .btn { width: 100%; text-align: center; }
}

/* FAQ: native <details> accordions, so they work with keyboards, screen readers and no JavaScript */
.faq-list { max-width: 820px; border-top: 1px solid rgba(30, 42, 68, 0.18); }
.faq-item { border-bottom: 1px solid rgba(30, 42, 68, 0.18); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  padding: 20px 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.3;
}
.faq-item summary::-webkit-details-marker { display: none; }
/* Plus that turns into a minus: two bars, the vertical one folds away when open */
.faq-item summary::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(var(--terracotta), var(--terracotta)) center / 16px 2.5px no-repeat,
    linear-gradient(var(--terracotta), var(--terracotta)) center / 2.5px 16px no-repeat;
  transition: background-size 0.2s ease;
}
.faq-item[open] summary::after {
  background:
    linear-gradient(var(--terracotta), var(--terracotta)) center / 16px 2.5px no-repeat,
    linear-gradient(var(--terracotta), var(--terracotta)) center / 2.5px 0 no-repeat;
}
.faq-item summary:hover { color: var(--terracotta); }
.faq-item summary:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; border-radius: 2px; }
.faq-answer { padding: 0 44px 22px 4px; }
.faq-answer p { color: var(--ink-soft); max-width: 40em; }
.faq-more { color: var(--muted); font-size: 15px; }
@media (max-width: 640px) {
  .faq-answer { padding-right: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .faq-item summary::after { transition: none; }
}

/* What you can count on */
.promise-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.promise { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.promise h3 { font-weight: 600; font-size: 20px; }
.promise p { font-size: 15px; color: var(--ink-soft); }
