/* ==========================================================================
   Red Radar design system
   --------------------------------------------------------------------------
   Shared by every page. Pages carry structure and content only; anything
   visual lives here.

   The look: warm paper ground, near-black ink, one rust accent, and a
   high-contrast serif display over a quiet grotesque. Luxury comes from
   restraint — generous space, hairline rules, wide-tracked micro-labels —
   rather than from ornament.
   ========================================================================== */

:root {
  /* Ground */
  --paper: #faf7f2;
  --surface: #f1ece4;
  --card: #fffdfa;
  --ink: #23211e;
  --ink-soft: #3b3833;
  --muted: #6d675e;
  --line: rgba(35, 33, 30, 0.13);
  --hairline: rgba(35, 33, 30, 0.09);

  /* Accent */
  --accent: #a83b35;
  --accent-soft: rgba(168, 59, 53, 0.08);

  /* Quiet tints for alternating section grounds */
  --tint-sage: #e3e9e2;
  --tint-mist: #e0e7ec;

  /* Type */
  --display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  /* Measure */
  --max: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --section: clamp(72px, 9vw, 132px);
  --header-h: 88px;
}

/* --- reset ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { background: none; border: 0; cursor: pointer; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- layout --------------------------------------------------------------- */

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

.section { padding: var(--section) 0; }
.section--tight { padding: clamp(48px, 6vw, 84px) 0; }
.section--surface { background: var(--surface); }
.section--sage { background: var(--tint-sage); }
.section--mist { background: var(--tint-mist); }
.section--ink { background: var(--ink); color: var(--paper); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Editorial split: label/heading left, body right. */
.split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
}

.split--even { grid-template-columns: 1fr 1fr; }
.split--narrow { grid-template-columns: 4fr 8fr; }

.stack > * + * { margin-top: 20px; }
.stack--tight > * + * { margin-top: 12px; }
.stack--loose > * + * { margin-top: 32px; }

/* --- type ----------------------------------------------------------------- */

.eyebrow {
  font-size: 0.6875rem;
  line-height: 1.2;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.section--ink .eyebrow { color: rgba(250, 247, 242, 0.55); }

.display {
  font-family: var(--display);
  font-size: clamp(2.5rem, 6.2vw, 5.75rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
  font-weight: 300;
}

.h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-weight: 300;
}

.h3 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 400;
}

.h4 {
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.accent { color: var(--accent); font-style: italic; }

.lead {
  font-size: clamp(1.0625rem, 1.35vw, 1.3125rem);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 46ch;
}

.body { color: var(--muted); max-width: 62ch; }
.body--wide { max-width: 78ch; }
.small { font-size: 0.875rem; line-height: 1.6; color: var(--muted); }

.section--ink .body,
.section--ink .lead,
.section--ink .small { color: rgba(250, 247, 242, 0.72); }

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 30px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

.section--ink .btn--solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.section--ink .btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.section--ink .btn--ghost { color: var(--paper); border-color: rgba(250, 247, 242, 0.3); }
.section--ink .btn--ghost:hover { border-color: var(--paper); }

.actions { display: flex; flex-wrap: wrap; gap: 14px; }

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.textlink:hover { color: var(--accent); border-color: var(--accent); }

/* Inline link inside running text — the uppercase .textlink treatment reads
   badly mid-sentence. */
.link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.link:hover { text-decoration-thickness: 2px; }

/* --- header --------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { height: 58px; width: auto; }

.brand__text {
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 21ch;
  line-height: 1.45;
}

.nav { display: flex; align-items: center; gap: 34px; }
.nav__links { display: flex; align-items: center; gap: 30px; }

.nav__links a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--accent); }

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 17px;
  height: 1px;
  background: var(--ink);
}

/* --- mobile panel --------------------------------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(35, 33, 30, 0.34);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.is-open { opacity: 1; visibility: visible; }

.panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 120;
  width: min(88vw, 380px);
  height: 100%;
  padding: 28px var(--gutter) 40px;
  background: var(--paper);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 36px;
  overflow-y: auto;
}

.panel.is-open { transform: translateX(0); }

.panel__top { display: flex; align-items: center; justify-content: space-between; }
.panel__top img { height: 52px; width: auto; }

.panel__close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink);
}

.panel__links { display: flex; flex-direction: column; gap: 4px; }

.panel__links a {
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 1.5;
  letter-spacing: -0.015em;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 8px;
}

.panel__links a:hover { color: var(--accent); }

/* --- index list (numbered capabilities) ----------------------------------- */

.index { border-top: 1px solid var(--line); }

.index__row {
  display: grid;
  grid-template-columns: 88px 1fr minmax(0, 44%);
  gap: clamp(16px, 3vw, 48px);
  align-items: baseline;
  padding: clamp(24px, 3vw, 38px) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease;
}

.index__row:hover { background: var(--accent-soft); }

.index__num {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
  font-weight: 400;
}

.index__body { color: var(--muted); font-size: 0.9375rem; line-height: 1.7; }

/* --- cards ---------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(18px, 2.2vw, 28px);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(26px, 3vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card--plain { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 28px 0 0; }

.card__label {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

/* --- stats ---------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 48px);
}

.stat { border-top: 1px solid rgba(250, 247, 242, 0.22); padding-top: 22px; }

.stat__figure {
  font-family: var(--display);
  font-size: clamp(2.75rem, 5vw, 4.25rem);
  line-height: 1;
  font-weight: 300;
  margin-bottom: 12px;
}

.stat__label {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(250, 247, 242, 0.66);
  max-width: 24ch;
}

/* --- quotes --------------------------------------------------------------- */

.quote {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(30px, 4vw, 56px);
}

.quote__body {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  line-height: 1.34;
  letter-spacing: -0.012em;
  font-weight: 300;
  color: var(--ink);
}

.quote__attr {
  margin-top: 26px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

/* --- footer --------------------------------------------------------------- */

.footer { background: var(--ink); color: var(--paper); padding: clamp(56px, 7vw, 96px) 0 40px; }

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(250, 247, 242, 0.16);
}

.footer__nav { display: flex; flex-wrap: wrap; gap: 28px; }

.footer__nav a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.72);
  transition: color 0.2s ease;
}

.footer__nav a:hover { color: var(--paper); }

.footer__base {
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.75rem;
  color: rgba(250, 247, 242, 0.5);
}

/* --- responsive ----------------------------------------------------------- */

@media (max-width: 1199px) {
  .brand__text { display: none; }
}

@media (max-width: 991px) {
  :root { --header-h: 76px; }

  .nav { display: none; }
  .menu-toggle { display: inline-flex; }

  .brand img { height: 48px; }

  .split,
  .split--even,
  .split--narrow,
  .grid--2,
  .grid--3,
  .footer__top { grid-template-columns: 1fr; }

  .footer__top { align-items: start; }

  .index__row { grid-template-columns: 52px 1fr; row-gap: 10px; }
  .index__body { grid-column: 2; }

  .stats { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .actions .btn { width: 100%; }
}

/* --- enquiry form --------------------------------------------------------- */

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(28px, 3.4vw, 46px);
}

.field { display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; }

.field__label {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.field__optional { text-transform: none; letter-spacing: 0.04em; }

.form-card input,
.form-card textarea {
  width: 100%;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-card textarea { min-height: 158px; resize: vertical; }

.form-card input:focus,
.form-card textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
}

.form-card input[aria-invalid="true"],
.form-card textarea[aria-invalid="true"] { border-color: var(--accent); }

/* Off-screen rather than display:none — more bots fill it in. */
.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-turnstile { margin-bottom: 22px; min-height: 65px; }

.form-note { margin-top: 20px; font-size: 0.8125rem; line-height: 1.6; color: var(--muted); }

.form-note a,
.form-error a { color: var(--accent); text-decoration: underline; }

.form-error {
  margin-bottom: 22px;
  padding: 15px 17px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  color: var(--accent);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.form-card button[disabled] { opacity: 0.5; cursor: default; transform: none; }

.form-success__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.5rem;
  line-height: 1;
}
