/* ==========================================================================
   TLD Support – shared stylesheet
   ========================================================================== */

/* Fonts (self-hosted, SIL OFL 1.1 – see /fonts/*-OFL.txt). "TLDS Serif" is a
   subset of Lora, renamed as the OFL requires; built by font-source/build-fonts.py */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin-wght.woff2") format("woff2");
}
@font-face {
  font-family: "TLDS Serif";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/tlds-serif-latin-wght.woff2") format("woff2");
}

/* Tokens ------------------------------------------------------------------ */
:root {
  color-scheme: light dark;

  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "TLDS Serif", Georgia, "Times New Roman", serif;

  /* Brand surfaces stay navy in both themes */
  --brand: #0E2440;
  --on-brand: #FBFCFD;
  --on-brand-muted: rgba(251, 252, 253, .72);
  --on-brand-line: rgba(251, 252, 253, .22);

  /* Theme-dependent */
  --navy: #0E2440;
  --ink: #1B2430;
  --muted: #5B6673;
  --line: #D7DFE8;
  --tint: #EDF3F9;
  --portrait-in: #F2F4F7;
  --portrait-out: #D6DCE4;
  --bg: #FBFCFD;
  --accent: #866634;
  /* Brass accent on navy surfaces (bands, contact, footer) in both themes */
  --accent-on-brand: #D2AF78;
  --btn-bg: var(--brand);
  --btn-fg: var(--on-brand);
  --btn-hover: #1F3D66;
  --orb-rim: rgba(31, 95, 166, .35);
  --orb-glow: rgba(134, 181, 232, .55);
  --orb-haze: rgba(134, 181, 232, .22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #E3ECF6;
    --ink: #E6ECF3;
    --muted: #A3AFBE;
    --line: #263241;
    --tint: #141E2C;
    --portrait-in: #33527A;
    --portrait-out: #1A3354;
    --bg: #0C131D;
    --accent: #D2AF78;
    --btn-bg: #D2AF78;
    --btn-fg: #0E2440;
    --btn-hover: #E2C596;
    --orb-rim: rgba(185, 214, 245, .85);
    --orb-glow: rgba(134, 181, 232, .55);
    --orb-haze: rgba(134, 181, 232, .16);
  }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --navy: #E3ECF6;
  --ink: #E6ECF3;
  --muted: #A3AFBE;
  --line: #263241;
  --tint: #141E2C;
  --portrait-in: #33527A;
  --portrait-out: #1A3354;
  --bg: #0C131D;
  --accent: #D2AF78;
  --btn-bg: #D2AF78;
  --btn-fg: #0E2440;
  --btn-hover: #E2C596;
  --orb-rim: rgba(185, 214, 245, .85);
  --orb-glow: rgba(134, 181, 232, .55);
  --orb-haze: rgba(134, 181, 232, .16);
}

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

/* Keep anchor targets and focused elements clear of the sticky header */
html { scroll-padding-top: 88px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  /* Keep the footer at the bottom on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -.012em;
  color: var(--navy);
}
h1 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1.05; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; }
h3 { font-size: 20px; line-height: 1.3; }

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.band :focus-visible,
.contact :focus-visible,
footer :focus-visible { outline-color: currentColor; }

/* Layout ------------------------------------------------------------------ */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
section { padding: 88px 0; }

.skip-link {
  position: absolute;
  left: 20px;
  top: -100px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 15px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }
/* main receives focus from the skip link; no ring around the whole page */
main:focus { outline: none; }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
}
.site-header .wrap { display: flex; align-items: center; height: 72px; }

.brand { font-family: var(--font-serif); font-size: 22px; color: var(--navy); }
.brand b { font-weight: 600; }

/* Shared components ------------------------------------------------------- */
.kicker {
  margin: 0 0 26px;
  font-family: var(--font-sans);
  line-height: 1.6;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-weight: 600;
}
.btn:hover { background: var(--btn-hover); }
@media (prefers-reduced-motion: no-preference) {
  a { transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
}

/* Hero -------------------------------------------------------------------- */
/* Hero and phase row share one stage; it clips the orb below the phases */
.stage { position: relative; overflow: hidden; }
/* Fades the orb out at the bottom of the stage instead of a hard cut */
.stage::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.hero { position: relative; padding: 96px 0 176px; }

/* The orb: a planet horizon at the bottom of the hero. Its body has the page
   colour and sits behind the content, so the phases appear to stand on it. */
.orb {
  position: absolute;
  top: calc(100% - 112px);
  left: 50%;
  width: max(1600px, 320vw);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  box-shadow:
    0 0 0 1.5px var(--orb-rim),
    0 -6px 36px 2px var(--orb-glow),
    0 -24px 120px 24px var(--orb-haze),
    inset 0 28px 64px -24px var(--orb-glow);
  pointer-events: none;
  z-index: -1;
}
@media (prefers-reduced-motion: no-preference) {
  .orb { animation: orb-pulse 6s ease-in-out infinite; }
}
@keyframes orb-pulse {
  50% { opacity: .7; }
}
.hero .lead {
  max-width: 640px;
  margin: 28px 0 36px;
  font-size: 21px;
  line-height: 1.5;
  color: var(--muted);
}

/* Engagement cycle -------------------------------------------------------- */
.cycle {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
.cycle li { padding: 22px 0 22px 18px; border-left: 1px solid var(--line); }
.cycle li:first-child { padding-left: 0; border-left: 0; }
.cycle small {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.cycle strong { font-family: var(--font-serif); font-size: 22px; font-weight: 500; color: var(--navy); }
.cycle span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }

/* Two-column split (intro + numbered list) -------------------------------- */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.split .intro p { margin-top: 14px; color: var(--muted); }

.list { margin: 0; padding: 0; list-style: none; }
.item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.item:first-child { padding-top: 0; border-top: 0; }
.item .n { font-family: var(--font-serif); font-size: 26px; line-height: 1; color: var(--accent); }
/* Unordered lists: a brass dot (the dot in .support) instead of a number */
.item .mark { display: block; width: 9px; height: 9px; margin-top: 9px; border-radius: 50%; background: currentColor; }
.item p { margin-top: 6px; font-size: 16px; color: var(--muted); }
.item .meta { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--accent); }
/* Single-sentence items without a heading */
.item .lede { margin-top: 0; font-family: var(--font-serif); font-size: 19px; line-height: 1.4; color: var(--navy); }

/* Navy band --------------------------------------------------------------- */
.band { padding: 72px 0; background: var(--brand); color: var(--on-brand); }
.band h2,
.band h3,
.band .item .n { color: var(--on-brand); }
.band .item .mark { color: var(--accent-on-brand); }
.band .intro p,
.band .item p { color: var(--on-brand-muted); }
.band .item { border-color: var(--on-brand-line); }
.band .item p a { color: var(--on-brand); border-bottom: 1px solid var(--accent-on-brand); }
.band .item p a:hover { color: var(--accent-on-brand); }

/* Track record ------------------------------------------------------------ */
.record {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.record li { padding: 20px 0; border-top: 1px solid var(--line); }
.record li:nth-child(-n+2) { padding-top: 0; border-top: 0; }
.record .tag {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.record h3 { font-size: 20px; }
.record p { margin-top: 4px; font-size: 15px; color: var(--muted); }

/* Tinted section (subtle contrast between two light sections) */
.tinted { background: var(--tint); }

/* Team -------------------------------------------------------------------- */
.team {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.team li { display: grid; grid-template-columns: 80px 1fr; gap: 16px; align-items: start; }
.team img { width: 80px; height: 80px; object-fit: cover; object-position: 50% 30%; border-radius: 50%; filter: saturate(.85); background: radial-gradient(circle at 50% 35%, var(--portrait-in), var(--portrait-out) 75%); }
.team h3 { font-size: 19px; }
.team .role {
  display: block;
  margin: 6px 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.team p { font-size: 15px; color: var(--muted); }
.team .focus { color: var(--ink); }
.team .bio { margin-top: 6px; font-size: 14px; }
.team .li {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}
.team .li:hover { color: var(--navy); }

/* Contact ----------------------------------------------------------------- */
/* Navy in both themes; together with the footer it closes the page */
.contact { padding: 96px 0 72px; background: var(--brand); color: var(--on-brand); }
.contact .kicker { color: var(--accent-on-brand); }
.contact .big {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4.6vw, 48px);
  line-height: 1.1;
  color: var(--on-brand);
}
.contact .big a { border-bottom: 2px solid var(--accent-on-brand); }
.contact .big a:hover { color: var(--accent-on-brand); }
.contact p { max-width: 560px; margin-top: 18px; color: var(--on-brand-muted); }
.contact .note { margin-top: 10px; font-size: 15px; }

/* Legal pages ------------------------------------------------------------- */
.prose { padding-top: 72px; padding-bottom: 112px; }
.prose > * { max-width: 720px; }
.prose h1 { font-size: clamp(32px, 4.6vw, 48px); }
.prose h2 { margin-top: 48px; font-size: 24px; line-height: 1.25; }
.prose h3 { margin-top: 28px; font-size: 18px; }
.prose p,
.prose ul,
.prose address { margin: 14px 0 0; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose address { font-style: normal; }
.prose a { color: var(--accent); border-bottom: 1px solid currentColor; }
.prose a:hover { color: var(--navy); }
.prose .updated { margin-top: 12px; font-size: 15px; color: var(--muted); }

/* 404 --------------------------------------------------------------------- */
.not-found { padding: 120px 0 140px; }
.not-found .lead { max-width: 560px; margin: 24px 0 36px; font-size: 19px; color: var(--muted); }
.not-found .lead a { color: var(--accent); border-bottom: 1px solid currentColor; }
.not-found .lead a:hover { color: var(--navy); }

/* Footer ------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--on-brand-line); padding: 56px 0 48px; background: var(--brand); color: var(--on-brand-muted); font-size: 15px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr auto; gap: 40px; }
.site-footer .brand { display: block; margin-bottom: 10px; color: var(--on-brand); }
/* Label for the footer nav; deliberately not a heading, so it stays out of the outline */
.site-footer .label {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(251, 252, 253, .55);
}
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 8px; }
.theme-switch {
  display: inline-flex;
  justify-self: start;
  align-self: start;
  padding: 3px;
  border: 1px solid var(--on-brand-line);
  border-radius: 999px;
}
.theme-switch button {
  display: inline-flex;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--on-brand-muted);
  cursor: pointer;
}
.theme-switch button:hover { color: var(--on-brand); }
.theme-switch button[aria-pressed="true"] { background: rgba(251, 252, 253, .14); color: var(--on-brand); }
.site-footer a:hover,
.site-footer a[aria-current="page"] { color: var(--on-brand); }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 860px) {
  /* Dot lists: no wide number column once the layout is single-column */
  .dots .item { grid-template-columns: 9px 1fr; gap: 16px; }
  .hero h1 { text-wrap: balance; }
  .hero h1 br { display: none; }
  .split { grid-template-columns: 1fr; gap: 20px; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .cycle { grid-template-columns: repeat(2, 1fr); }
  .cycle li { border-top: 1px solid var(--line); }
  .cycle li:nth-child(-n+2) { border-top: 0; }
  .cycle li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 700px) {
  .site-footer .cols { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 520px) {
  .btn { display: block; text-align: center; }
  .record { grid-template-columns: 1fr; }
  .record li:nth-child(2) { padding-top: 20px; border-top: 1px solid var(--line); }
  section { padding: 64px 0; }
  .team { grid-template-columns: 1fr; }
}
