/* Layout: Swiss-poster typography. Tall condensed display lines carry the values; quiet body text beside them. */
:root {
  --bg: #EEF0EA;          /* lichen */
  --surface: #E2E6DC;
  --fg: #17261E;          /* canopy */
  --muted: #545A4E;       /* bark */
  --moss: #3F6B52;
  --banana: #E3B23C;
  --on-banana: #17261E;
  --band-bg: #17261E;
  --band-fg: #EEF0EA;
  --line: color-mix(in srgb, var(--fg) 18%, transparent);
  --focus: #3F6B52;

  --display: "Big Shoulders Display", "Oswald", "Arial Narrow", sans-serif;
  --body: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  --step-3: clamp(2.4rem, 1.6rem + 3.6vw, 4.25rem);
  --step-4: clamp(3.4rem, 2rem + 7vw, 8rem);
  --wrap: 72rem;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121C17; --surface: #1A2721; --fg: #E9EDE5; --muted: #A4AA9C;
    --moss: #8DB79C; --banana: #E8BC4A; --on-banana: #121C17;
    --band-bg: #E8BC4A; --band-fg: #121C17; --focus: #E8BC4A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121C17; --surface: #1A2721; --fg: #E9EDE5; --muted: #A4AA9C;
  --moss: #8DB79C; --banana: #E8BC4A; --on-banana: #121C17;
  --band-bg: #E8BC4A; --band-fg: #121C17; --focus: #E8BC4A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 16px; background: var(--banana); color: var(--on-banana); padding: .5rem 1rem; z-index: 20; }

/* Header */
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem 2rem; padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--display); font-weight: 800; font-size: 1.75rem; line-height: 1;
  letter-spacing: .01em; text-decoration: none; display: inline-flex; align-items: center; gap: .6rem;
}
.wordmark img { height: 40px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.nav a { text-decoration: none; padding-block: .25rem; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem/1 var(--body); padding: 1rem 1.5rem; border-radius: 999px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--banana); color: var(--on-banana); }
.btn-primary:hover { text-decoration: none; filter: brightness(1.05); }
.btn-quiet { border-color: currentColor; background: transparent; color: inherit; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Hero */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem) clamp(2.5rem, 6vw, 5rem); }
.hero h1 {
  font-family: var(--display); font-weight: 800; font-size: var(--step-4);
  line-height: .92; letter-spacing: -.005em; margin: 0 0 1.75rem; max-width: 14ch;
  text-wrap: balance;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: end; }
.hero p.lede { font-size: var(--step-1); max-width: 38ch; margin: 0; color: var(--fg); }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .hero .actions { justify-content: flex-end; }
}

/* Values: the signature element */
.values { padding-block: clamp(2rem, 6vw, 4.5rem); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; margin-bottom: 1.5rem; }
.section-head h2 { font-family: var(--display); font-weight: 700; font-size: var(--step-2); margin: 0; line-height: 1.05; }
.section-head p { margin: 0; color: var(--muted); max-width: 40ch; }
.value-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.value {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem 2.5rem;
  padding-block: 1.5rem 1.75rem; border-bottom: 1px solid var(--line);
}
.value h3 {
  font-family: var(--display); font-weight: 800; font-size: var(--step-3);
  line-height: .95; margin: 0; text-wrap: balance;
}
.value p { margin: 0; color: var(--muted); max-width: 44ch; align-self: end; }
@media (min-width: 52rem) {
  .value { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: end; }
}

/* Closing band */
.band { background: var(--band-bg); color: var(--band-fg); }
.band .wrap { padding-block: clamp(3rem, 7vw, 5.5rem); display: grid; gap: 1.5rem; }
.band h2 { font-family: var(--display); font-weight: 800; font-size: var(--step-3); line-height: .95; margin: 0; max-width: 16ch; text-wrap: balance; }
.band p { margin: 0; max-width: 46ch; }
.band .actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.band .btn-primary { background: var(--band-fg); color: var(--band-bg); }
.band .email { font-weight: 600; font-size: var(--step-1); user-select: all; }

/* Forms & inner pages */
.page { padding-block: clamp(2.5rem, 7vw, 5rem); }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
@media (min-width: 52rem) { .page-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 4rem; } }
.page h1 { font-family: var(--display); font-weight: 800; font-size: var(--step-3); line-height: .95; margin: 0 0 1.25rem; text-wrap: balance; }
.page .intro p { margin: 0 0 1rem; max-width: 44ch; }
.page .intro .aside { color: var(--muted); font-size: .95rem; }

form.card { background: var(--surface); padding: clamp(1.25rem, 4vw, 2rem); border-radius: 6px; display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field .req { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], textarea {
  font: inherit; color: var(--fg); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 4px; padding: .8rem .9rem; width: 100%;
}
input:focus, textarea:focus { border-color: var(--moss); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--moss) 30%, transparent); }
textarea { min-height: 9rem; resize: vertical; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--moss); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { margin: 0; font-size: .95rem; min-height: 1.5em; }
.status[data-state="ok"] { color: var(--moss); font-weight: 600; }
.status[data-state="error"] { color: var(--fg); font-weight: 600; }

/* Prose (privacy) */
.prose { max-width: 68ch; }
.prose h2 { font-family: var(--display); font-weight: 700; font-size: var(--step-2); line-height: 1.1; margin: 2.5rem 0 .75rem; }
.prose p, .prose li { color: var(--fg); }
.prose ul { padding-left: 1.2rem; }
.prose .updated { color: var(--muted); }

/* Footer */
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem;
  padding-block: 2rem 2.5rem; font-size: .9rem; color: var(--muted);
  border-top: 1px solid var(--line);
}
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; }
.site-footer p { margin: 0; }

/* 404 */
.notfound { padding-block: clamp(4rem, 12vw, 9rem); }
.notfound h1 { font-family: var(--display); font-weight: 800; font-size: var(--step-4); line-height: .9; margin: 0 0 1rem; }

/* One orchestrated moment: the hero headline settles in on load */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: settle .7s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes settle { from { transform: translateY(.18em); letter-spacing: .02em; } to { transform: none; letter-spacing: -.005em; } }
}

/* Brand mark: winged monkey, tinted by the surrounding text colour */
.mark, .band-mark {
  display: inline-block; flex: none; background: currentColor;
  -webkit-mask: url("mark.svg") center / contain no-repeat;
          mask: url("mark.svg") center / contain no-repeat;
}
.mark { width: 2.1rem; height: 2.5rem; }
.band-mark { width: 3.5rem; height: 4.2rem; }

/* Hero photo: the workbench, cropped wide on desktop */
.hero-photo { margin: clamp(2.5rem, 6vw, 4rem) 0 0; }
.hero-photo img {
  width: 100%; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 62% 55%;
  border-radius: 4px; background: var(--surface);
}
@media (min-width: 52rem) { .hero-photo img { aspect-ratio: 21 / 9; } }
