/* Shared styles for index.html and contact/index.html (dark, from the 19 November 2026 brief).
   Every colour lives in :root below. */
:root {
  --bg: #0E1512;          /* ground */
  --band: #131D18;       /* raised band, field fill */
  --mid: #2A302D;        /* mid grey for fades */
  --text: #E7EBE8;       /* primary */
  --text-2: #A3ADA8;     /* secondary */
  --text-3: #8E9893;     /* tertiary, placeholders */
  --line: #26332D;       /* header and footer rules */
  --line-field: #3A4842; /* field borders */
  --green-label: #A9D3B8;/* labels, lead lines */
  --green-dot: #7DB896;  /* timeline line and dots */
  --link: #BEE6CB;       /* links and marks */
  --link-hover: #E9F6EE;
  --btn-bg: #BEE6CB;
  --btn-text: #0F3727;
  --btn-hover: #E9F6EE;
  --btn-active: #A9D3B8;
  --red: #DC2626;
  --max: 1200px;
  --gutter: clamp(16px, 3.6vw, 52px);
  --section-pad: clamp(52px, 5.8vw, 84px);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); background: var(--bg); }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-h);
  overflow-x: clip;
}

h1, h2, h3 { font-family: 'Instrument Sans', system-ui, sans-serif; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

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

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

/* ── BUTTON (every Book a call) ── */
.btn {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 6px 24px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
a.btn:hover, .btn:hover:not(:disabled) { background: var(--btn-hover); color: var(--btn-text); }
a.btn:active, .btn:active:not(:disabled) { background: var(--btn-active); }
.btn:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── HEADER (scoped to #nav: the footer has its own <nav>) ── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(14, 21, 18, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand svg { width: 26px; height: 28px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; font-size: 14px; font-weight: 500; }
.nav-links a:not(.btn), .footer-links a {
  color: var(--text-2);
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.nav-links a:not(.btn):hover, .nav-links a:not(.btn):focus-visible,
.footer-links a:hover, .footer-links a:focus-visible {
  color: var(--link);
  text-decoration: underline;
}
.nav-links a[aria-current="page"] { color: var(--link); }
.nav-links .btn { font-size: 15px; }

/* The deploy script injects the env banner before this button, so it stays in every page.
   There is no menu on phones any more (logo and Book a call only), so it is hidden at all widths. */
.nav-burger { display: none; }

.env-banner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 3px 10px;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
}

/* ── SECTIONS ── */
section { padding: var(--section-pad) 0; }
.section-head { display: flex; flex-direction: column; gap: 16px; }
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green-label);
}
.section-title {
  max-width: 27ch;
  font-weight: 600;
  font-size: clamp(28px, 3.5vw, 46px);
  line-height: 1.1;
  letter-spacing: -1px;
}
.card-title { font-size: 19px; font-weight: 700; letter-spacing: -0.2px; line-height: 1.3; }
.card-body { font-size: 16px; font-weight: 300; line-height: 1.8; color: var(--text-2); }

/* ── FOOTER ── */
footer { padding: 32px 0; font-size: 14px; color: var(--text-2); border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 32px; font-weight: 500; }

/* ── CONTACT FORM (contact page) ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; line-height: 1.4; }
.field input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line-field);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--band);
  outline: none;
}
.field input::placeholder { color: var(--text-3); opacity: 1; }
.field input:focus { box-shadow: 0 0 0 2px var(--link); }
.field.invalid input { border: 2px solid #F87171; }
/* an invalid field shows red only, in every state, never the green focus ring */
.field.invalid input:focus { box-shadow: none; }
.field.invalid input:-webkit-autofill,
.field.invalid input:-webkit-autofill:hover,
.field.invalid input:-webkit-autofill:focus,
.field.invalid input:autofill { box-shadow: inset 0 0 0 1000px var(--band); }
.err { font-size: 14px; font-weight: 500; line-height: 1.4; color: #FCA5A5; }

/* Autofill: repaint the white fill browsers and password managers apply */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: inset 0 0 0 1000px var(--band);
  transition: background-color 600000s 0s, color 600000s 0s;
}

.consent-row { display: flex; align-items: flex-start; gap: 12px; }
.consent-row input[type="checkbox"] {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--btn-bg);
  cursor: pointer;
}
.consent-statement { display: block; font-size: 14px; line-height: 1.5; color: var(--text-2); cursor: pointer; }
.consent-sub { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.nowrap { white-space: nowrap; }

/* Honeypot: off-screen rather than display:none, so naive bots still fill it */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.summary, .form-status.err {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid #DC2626;
  background: #FEE2E2;
  color: #991B1B;
  font-size: 14px;
  line-height: 1.5;
}
.summary[hidden], .form-status[hidden] { display: none; }
.summary svg, .form-status.err svg { flex: none; margin-top: 2px; }

/* Turnstile has a 300px minimum, so a narrower cell scales it down (fitTurnstile) */
.captcha-cell { min-width: 0; }
.captcha-cell .cf-turnstile { width: 100%; min-width: 300px; transform-origin: 0 0; }

/* ── CONFIRMATION DIALOG ── */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}
.modal-scrim[hidden] { display: none; }
.modal {
  width: 100%;
  max-width: 440px;
  background: var(--band);
  border: 1px solid var(--line-field);
  border-radius: 16px;
  padding: 32px 30px 26px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.modal-tick {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  border-radius: 100px;
  background: #1C3328;
  border: 1px solid var(--green-dot);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal h2 { font-size: 24px; line-height: 1.2; letter-spacing: -0.4px; font-weight: 700; margin: 0 0 10px; }
.modal p { margin: 0 auto; max-width: 360px; font-size: 17px; line-height: 1.6; font-weight: 300; color: var(--text-2); }
.modal-actions { display: flex; justify-content: center; margin-top: 26px; }
.btn-secondary {
  background: none;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  color: var(--link);
  cursor: pointer;
}
.btn-secondary:hover { color: var(--link-hover); }

@media (max-width: 640px) {
  .nav-links li:not(:last-child) { display: none; }
  /* keep the 16px gutter on both sides at 360px: tighter logo and button, only on phones */
  .nav-inner { gap: 12px; }
  .brand { font-size: 14px; gap: 6px; }
  .brand svg { width: 22px; height: 24px; }
  .nav-links .btn { padding: 6px 16px; }
  /* dev and UAT only: sit the banner under the header so it does not cover the logo */
  .env-banner { top: 100%; transform: translate(-50%, 6px); }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-links { flex-direction: column; flex-wrap: nowrap; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
