/* ---- Tokens: edit these per domain ---- */
:root {
  --bg: #fcfcfd;
  --surface: #ffffff;
  --text: #15171c;
  --muted: #6b7080;
  --faint: #a2a6b3;
  --accent: #4a6fa5;
  --accent-soft: rgba(74, 111, 165, 0.12);
  --accent-ink: #ffffff;
  --border: #e6e8ee;
  --danger: #b4443a;
  --radius: 14px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Inter Tight", var(--font);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --surface: #161920; --text: #eceef2; --muted: #9aa0ae; --faint: #5d6270;
    --accent: #8db0e3; --accent-soft: rgba(141, 176, 227, 0.14); --accent-ink: #0f1115;
    --border: #262a33; --danger: #e5857a;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --surface: #161920; --text: #eceef2; --muted: #9aa0ae; --faint: #5d6270;
  --accent: #8db0e3; --accent-soft: rgba(141, 176, 227, 0.14); --accent-ink: #0f1115;
  --border: #262a33; --danger: #e5857a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px); }

/* ---- Header ---- */
header.site { padding: 28px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 600; letter-spacing: -0.01em; font-size: 0.98rem; }
nav { display: flex; gap: 6px; }
nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 0.92rem; font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
nav a:hover, nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }

/* ---- Hero / placeholder ---- */
main { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; }
.hero { padding: clamp(40px, 10vh, 120px) 0; text-align: left; position: relative; }
.orb {
  position: absolute; z-index: -1; pointer-events: none;
  width: min(70vmin, 640px); height: min(70vmin, 640px);
  right: -12vmin; top: -18vmin;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 72%);
  filter: blur(18px);
}
.orb.two {
  width: min(45vmin, 420px); height: min(45vmin, 420px);
  left: -16vmin; right: auto; top: auto; bottom: -22vmin; opacity: 0.8;
}
.eyebrow {
  margin: 0 0 22px; color: var(--faint); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.75rem, 9vw, 6rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0 0 26px;
  max-width: 14ch;
  text-wrap: balance;
}
.hero .lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); margin: 0 0 38px;
  max-width: 38ch; line-height: 1.5; text-wrap: pretty;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  border: 1px solid var(--text);
  font: inherit; font-size: 0.98rem; font-weight: 500; cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn.quiet { background: transparent; color: var(--text); border-color: var(--border); }
.btn.quiet:hover { border-color: var(--text); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Gentle entrance */
.rise { opacity: 0; transform: translateY(10px); animation: rise 0.7s cubic-bezier(.2,.7,.2,1) forwards; }
.rise:nth-child(2) { animation-delay: 0.08s; }
.rise:nth-child(3) { animation-delay: 0.16s; }
.rise:nth-child(4) { animation-delay: 0.24s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; opacity: 1; transform: none; } }

/* ---- Contact ---- */
.contact-page { padding: clamp(24px, 6vh, 72px) 0; max-width: 560px; }
.contact-page h1 {
  font-family: var(--display); font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 600;
  letter-spacing: -0.04em; line-height: 1.02; margin: 0 0 14px;
}
.contact-page .intro { color: var(--muted); margin: 0 0 34px; font-size: 1.05rem; }

.gate { display: grid; gap: 18px; }
.gate p { margin: 0; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 0.95rem; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.chip:hover { border-color: var(--text); transform: translateY(-1px); }
.gate .fineprint { color: var(--faint); font-size: 0.88rem; margin-top: 6px; }

form.contact { display: grid; gap: 22px; }
.chosen { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.92rem; }
.chosen strong { color: var(--text); font-weight: 500; }
.chosen button { background: none; border: 0; color: var(--accent); font: inherit; font-size: 0.9rem; cursor: pointer; padding: 0; }
label { display: grid; gap: 8px; font-weight: 500; font-size: 0.92rem; }
label small { font-weight: 400; color: var(--faint); }
input, textarea {
  font: inherit; padding: 13px 15px; width: 100%;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { min-height: 170px; resize: vertical; line-height: 1.55; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* Honeypot: off-screen, still in the DOM for bots. Not display:none, since some bots skip those. */
.hp-field {
  position: absolute !important; left: -10000px !important; top: auto !important;
  width: 1px !important; height: 1px !important; overflow: hidden !important; opacity: 0;
}

.notice { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 0.95rem; }
.notice.error { border-color: var(--danger); color: var(--danger); }
.notice.ok { border-color: var(--accent); }
.hidden { display: none !important; }

/* ---- Footer ---- */
footer.site { padding: 28px 0 32px; color: var(--faint); font-size: 0.88rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
footer.site a:hover { color: var(--text); }

/* ---- Landing: a barely perceptible mark that is one big link ---- */
/* The mark's colour is baked into the PNG (see tools/make-mark.py --color), so it is fully opaque. */
body.landing { display: block; }
.mark-link {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 100dvh; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mark-link picture { display: contents; }
.mark-link img.mark {
  width: min(78vw, 880px); height: auto;
  opacity: 0;
  animation: mark-in 1.6s ease-out 0.2s forwards;
  transition: filter 0.6s ease, transform 0.6s ease;
}
@keyframes mark-in { to { opacity: 1; } }
.mark-link:hover img.mark,
.mark-link:focus-visible img.mark { filter: brightness(0.985); transform: scale(1.01); }
.mark-link:focus-visible { outline: none; }
@media (prefers-color-scheme: dark) { .mark-link:hover img.mark { filter: brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { .mark-link img.mark { animation: none; opacity: 1; } }

/* On click: two soft pulses while the mark fades to the exact background colour, then we navigate. */
@keyframes mark-out {
  0%   { transform: scale(1);     opacity: 1; }
  30%  { transform: scale(1.025); opacity: 0.92; }
  55%  { transform: scale(1);     opacity: 0.6; }
  80%  { transform: scale(1.02);  opacity: 0.25; }
  100% { transform: scale(1);     opacity: 0; }
}
.mark-link.leaving img.mark { animation: mark-out 2.4s cubic-bezier(.45,.05,.55,.95) forwards; filter: none; transition: none; }

/* ---- Quiet contact page: matches the landing, centred, no box ---- */
body.quiet { display: block; color: var(--muted); font-size: 13px; }
.quiet-center {
  min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 48px 20px; position: relative;
}
.quiet .gate, .quiet form.contact, .quiet .notice { width: min(100%, 400px); }
.quiet .gate { display: grid; gap: 22px; }
.quiet .q, .quiet label, .quiet .chip, .quiet .send, .quiet .chosen, .quiet .fineprint {
  font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
}
.quiet .q { margin: 0; color: var(--faint); }
.quiet .chips { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.quiet .chip {
  padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer;
  transition: color 0.2s; transform: none;
}
.quiet .chip:hover { color: var(--text); transform: none; }
.quiet .fineprint { color: var(--faint); opacity: 0.8; letter-spacing: 0.08em; text-transform: none; font-weight: 400; margin: 8px 0 0; line-height: 1.7; }

.quiet form.contact { display: grid; gap: 18px; }
.quiet .chosen { display: flex; gap: 14px; color: var(--faint); margin-bottom: 6px; }
.quiet .chosen button { background: none; border: 0; padding: 0; color: var(--faint); font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.quiet .row { display: grid; grid-template-columns: 86px 1fr; column-gap: 18px; align-items: baseline; }
.quiet label { color: var(--faint); padding-top: 2px; }
.quiet input, .quiet textarea {
  border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent;
  padding: 4px 0 6px; font-size: 13px; color: var(--text); box-shadow: none;
}
.quiet textarea { min-height: 0; resize: none; line-height: 1.6; }
.quiet input:focus, .quiet textarea:focus { outline: none; border-bottom-color: var(--muted); box-shadow: none; }
.quiet .send { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; justify-self: start; transition: color 0.2s; }
.quiet .send:hover { color: var(--text); }
.quiet .send[disabled] { opacity: 0.5; cursor: default; }
.quiet .cf-turnstile:empty { display: none; }
.quiet .notice { border: 0; background: none; padding: 0; font-size: 12px; letter-spacing: 0.04em; }
.quiet .notice.ok { color: var(--muted); }
.quiet .back {
  position: absolute; left: 24px; bottom: 22px; color: var(--faint); opacity: 0.6; font-size: 14px;
  transition: opacity 0.2s;
}
.quiet .back:hover { opacity: 1; }
