/* ==========================================================================
   Evrgreen — shared design system (index, privacy, terms, thanks, 404)
   ========================================================================== */

/* Glacial Indifference (SIL OFL, see fonts/OFL.txt) is not on Google Fonts,
   so it is self-hosted from /fonts. */
@font-face {
  font-family: 'Glacial Indifference';
  src: url('fonts/GlacialIndifference-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Glacial Indifference';
  src: url('fonts/GlacialIndifference-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Glacial Indifference';
  src: url('fonts/GlacialIndifference-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Brand kit */
  --ink: #0D1F33;          /* dark navy — page base */
  --teal: #00A67E;         /* primary accent */
  --green: #40CE5A;        /* secondary accent, small details */
  --orange: #FF6700;       /* CTA only */
  --gray: #D1D2DA;         /* divider source */

  /* Derived surfaces for the dark theme */
  --bg: var(--ink);
  --bg-deep: #0A1929;
  --surface: #12283F;
  --surface-2: #17314C;
  --text: #EEF3F7;
  --text-soft: #A9B8C7;
  --text-faint: #7F90A2;
  --line: rgba(209, 210, 218, 0.14);
  --line-strong: rgba(209, 210, 218, 0.26);
  --teal-soft: rgba(0, 166, 126, 0.14);

  --display: 'Glacial Indifference', 'Century Gothic', 'Futura', 'Avenir Next', 'Montserrat', sans-serif;
  --sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --radius-sm: 8px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #6BDD80; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  background: var(--text);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; color: var(--text); }

.display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.04;
}

h2.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 20ch;
  text-wrap: balance;
}

h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.35;
}

p { margin: 0; }

.lede {
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  line-height: 1.7;
  max-width: 60ch;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: 700 0.98rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: #FF7F26; color: var(--ink); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost { color: var(--text); border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--teal); color: var(--text); background: var(--teal-soft); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 31, 51, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 20px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 32px);
  margin: 0; padding: 0;
  list-style: none;
}
.nav-links a {
  color: var(--text-soft);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav .btn { min-height: 42px; padding: 0 18px; font-size: 0.92rem; white-space: nowrap; }
@media (max-width: 400px) {
  .nav .btn { padding: 0 14px; font-size: 0.85rem; }
  .brand img { height: 17px; }
}

@media (max-width: 1020px) {
  .nav-links { display: none; }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  padding: 56px 0 40px;
  color: var(--text-faint);
  font-size: 0.9rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}
.footer-brand img { height: 18px; width: auto; margin-bottom: 14px; }
.footer-brand p { max-width: 38ch; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0; padding: 0;
  list-style: none;
}
.footer-links a { color: var(--text-soft); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--text); }
.footer-base {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- Legal / simple pages ---------- */

.doc {
  padding: clamp(56px, 8vw, 96px) 0 96px;
}
.doc .wrap { max-width: 780px; }
.doc h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.3rem, 5vw, 3.2rem);
  line-height: 1.05;
  margin-bottom: 12px;
}
.doc .updated { color: var(--text-faint); font-size: 0.92rem; margin-bottom: 40px; }
.doc .intro { color: var(--text-soft); font-size: 1.1rem; margin-bottom: 8px; }
.doc h2 {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 44px 0 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.doc p, .doc li { color: var(--text-soft); max-width: 68ch; }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 20px; margin: 12px 0; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--teal); }
.doc strong { color: var(--text); font-weight: 600; }
.doc .callout {
  margin: 20px 0;
  padding: 18px 20px;
  border-left: 2px solid var(--green);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.doc .toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
}
.doc .toc a { color: var(--text-soft); }

[hidden] { display: none !important; }
