@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Palette shares ATHINA AD's navy and gold so the two brands read as one family.
   All text/background pairs meet WCAG 2.2 AA (most exceed AAA). */
:root {
  color-scheme: light;
  --navy: #0A1E4D;
  --gold: #F5A623;
  --bg: #FFFFFF;
  --bg-alt: #F2F4F9;
  --surface: #FFFFFF;
  --ink: #0A1E4D;
  --muted: #33415F;
  --line: #9AA6C0;
  --link: #0A1E4D;
  --focus-outline: #0A1E4D;
  --mark-bg: #0A1E4D;
  --mark-ring: #FFFFFF;
  --radius: 10px;
  --max: 1180px;
  font-size: 18px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060B18;
  --bg-alt: #0E1830;
  --surface: #0E1830;
  --ink: #FFFFFF;
  --muted: #D5DCEA;
  --line: #5C6B8C;
  --link: #F5A623;
  --focus-outline: #FFFFFF;
  --mark-bg: #F5A623;
  --mark-ring: #0A1E4D;
}

:root[data-font-level="-2"] { font-size: 15px; }
:root[data-font-level="-1"] { font-size: 16.5px; }
:root[data-font-level="1"] { font-size: 20px; }
:root[data-font-level="2"] { font-size: 22px; }
:root[data-font-level="3"] { font-size: 25px; }
:root[data-font-level="4"] { font-size: 28px; }

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

html { scroll-behavior: smooth; }

[id] { scroll-margin-top: 7rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", Verdana, Arial, sans-serif;
  line-height: 1.6;
}

button, input { font: inherit; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 22ch; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 70ch; }

a {
  color: var(--link);
  text-decoration-thickness: 0.1em;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 0.2em; }

a:focus-visible,
button:focus-visible,
main:focus-visible {
  outline: 3px solid var(--focus-outline);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--gold);
}
main:focus { outline: none; }
main:focus-visible { box-shadow: none; }

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

.skip-link {
  position: absolute; top: -10rem; left: 1rem; z-index: 200;
  background: var(--gold); color: var(--navy);
  font-weight: 700; padding: 0.7rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 2px solid var(--line);
}
/* At large text sizes a sticky header would cover too much of the screen, so it scrolls away. */
:root[data-font-level="2"] .site-header,
:root[data-font-level="3"] .site-header,
:root[data-font-level="4"] .site-header { position: static; }
:root[data-font-level="2"] [id],
:root[data-font-level="3"] [id],
:root[data-font-level="4"] [id] { scroll-margin-top: 1rem; }

.header-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0.6rem clamp(1rem, 3vw, 2rem);
  display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  color: var(--ink); text-decoration: none;
  min-height: 44px;
}
.brand-mark { width: 2.6rem; height: 2.6rem; flex: none; }
.mark-bg { fill: var(--mark-bg); }
.mark-ring { fill: none; stroke: var(--mark-ring); stroke-width: 5; }
.mark-plus { stroke: var(--gold); stroke-width: 5; stroke-linecap: round; }
:root[data-theme="dark"] .mark-plus { stroke: var(--navy); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.04em; }
.brand-sub { font-size: 0.8rem; color: var(--muted); }

.site-nav { display: flex; gap: 0.25rem; margin-left: auto; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0.3rem 0.7rem; border-radius: var(--radius);
  color: var(--ink); font-weight: 700; text-decoration: none;
  border: 2px solid transparent;
}
.site-nav a:hover { border-color: var(--line); }

.site-controls { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.text-controls { display: flex; gap: 0.25rem; }

.control, .menu-button {
  min-height: 44px; min-width: 44px;
  padding: 0.3rem 0.7rem;
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--radius);
  font-weight: 700; cursor: pointer;
}
.control:hover:not(:disabled), .menu-button:hover { background: var(--bg-alt); }
.control:disabled { opacity: 0.45; cursor: not-allowed; }
.control[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.no-js .site-controls, .no-js .menu-button { display: none; }

.menu-button { display: none; margin-left: auto; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.7rem 1.3rem;
  border-radius: var(--radius); border: 2px solid var(--navy);
  font-weight: 700; text-decoration: none;
}
.button-primary { background: var(--gold); color: var(--navy); }
.button-primary:hover { background: #FFBC4D; }
.button-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.button-secondary:hover { background: var(--bg-alt); }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.eyebrow {
  display: inline-block; margin: 0 0 0.9rem;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 3px solid var(--gold); padding-bottom: 0.15rem;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

/* Sections */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }

.grid { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card, .panel {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
}
.section-alt .card, .section-alt .panel { background: var(--bg); }
:root[data-theme="dark"] .section-alt .card { background: var(--bg); }
.card p, .panel p:last-child { margin-bottom: 0; }
.card-feature { border-top: 6px solid var(--gold); }
.card-feature p { font-size: 1.1rem; }
.values .card h3::before {
  content: ""; display: block; width: 2rem; height: 4px;
  background: var(--gold); margin-bottom: 0.8rem; border-radius: 2px;
}

.product-grid { margin-bottom: 0.5rem; }
.spaced { margin-top: 1.6rem; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 0.9rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3rem; min-height: 2.2rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: var(--navy);
  border: 2px solid var(--navy); font-weight: 700;
}

.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.checks li { position: relative; padding-left: 1.8rem; }
.checks li::before {
  content: "\2713"; position: absolute; left: 0; font-weight: 700; color: var(--ink);
}

.partner { border-left: 6px solid var(--gold); max-width: 52rem; margin-top: 1.5rem; }
.partner-meta { color: var(--muted); font-weight: 700; }

.contact-list { display: grid; gap: 0.6rem; margin: 1.2rem 0 0; font-size: 1.15rem; }
.contact-list > div { display: flex; flex-wrap: wrap; gap: 0 0.5rem; }
.contact-list dt { font-weight: 700; }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.contact-list a { font-weight: 700; display: inline-block; padding: 0.35rem 0; }

/* Footer: fixed navy in both themes, white text and gold links (both AAA on navy) */
.site-footer { background: var(--navy); color: #FFFFFF; padding: 3rem 0 1.5rem; }
:root[data-theme="dark"] .site-footer { background: #030712; border-top: 2px solid var(--line); }
.site-footer a { color: var(--gold); }
.site-footer a:focus-visible { outline-color: #FFFFFF; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.3fr 1fr 1fr; gap: 2rem; }
.footer-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.4rem; }
.footer-heading { font-size: 1rem; margin: 0 0 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-heading:not(:first-child) { margin-top: 1.4rem; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; overflow-wrap: anywhere; }
.footer-list a { display: inline-block; padding: 0.35rem 0; }
.footer-bottom { border-top: 1px solid var(--gold); margin-top: 2rem; padding-top: 1.2rem; }
.footer-bottom p { margin: 0; }

/* Plain content pages (accessibility statement, 404) */
.page { padding: clamp(3rem, 7vw, 5rem) 0; overflow-wrap: anywhere; }
.page h2 { font-size: 1.5rem; margin-top: 2rem; }
.page ul { padding-left: 1.3rem; }
.page li { margin-bottom: 0.4rem; max-width: 70ch; }

/* Athina AD legal documents (built by scripts/build-athina-legal.mjs) */
.legal-doc p, .legal-doc blockquote { max-width: 70ch; }
.legal-doc h3 { font-size: 1.2rem; margin-top: 1.5rem; }
.legal-doc ol { padding-left: 1.3rem; }
.legal-doc blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 4px solid var(--gold); }
.legal-doc table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1rem 0; }
.legal-doc th, .legal-doc td { border: 1px solid currentColor; padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; overflow-wrap: normal; min-width: 8rem; }

/* Responsive */
@media (max-width: 1180px) {
  .menu-button { display: inline-flex; align-items: center; }
  .site-nav {
    display: none; order: 3; width: 100%; margin: 0;
    flex-direction: column; gap: 0;
    border-top: 1px solid var(--line); padding-top: 0.4rem;
  }
  .site-nav[data-open] { display: flex; }
  .site-nav a { padding: 0.6rem 0.4rem; }
  .site-controls { order: 2; }
  .no-js .site-nav { display: flex; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 960px) {
  .split, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .site-controls { width: 100%; order: 4; }
  .actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (forced-colors: active) {
  .button, .control, .card, .panel { border: 2px solid CanvasText; }
}
