:root {
  /* ---- palette ---- */
  --bg: #F7F9FB;
  --surface: #FFFFFF;
  --surface-sunk: #EEF3F7;
  --text: #11212E;
  --muted: #4C5D6B;
  --accent: #0B5C8A;
  --accent-ink: #084karat;
  --accent-deep: #084566;
  --accent-wash: #E4EEF5;
  --accent-contrast: #FFFFFF;
  --border: #D8E2EA;
  --border-strong: #C2D1DD;

  --footer-bg: #0E1C27;
  --footer-text: #E7EEF3;
  --footer-muted: #9FB2C0;
  --footer-link: #8FC8EC;

  /* ---- type ---- */
  --font-head: "Trebuchet MS", "Segoe UI", Tahoma, Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step-h1: clamp(2.05rem, 1.45rem + 2.7vw, 3.15rem);
  --step-h2: clamp(1.55rem, 1.25rem + 1.4vw, 2.2rem);
  --step-h3: clamp(1.12rem, 1.05rem + 0.35vw, 1.3rem);
  --step-lead: clamp(1.08rem, 1.01rem + 0.4vw, 1.28rem);

  /* ---- rhythm ---- */
  --gap: 1.25rem;
  --section-y: clamp(3rem, 6.5vw, 5.5rem);
  --radius: 12px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(17, 33, 46, 0.06), 0 2px 10px rgba(17, 33, 46, 0.05);
  --shadow-md: 0 10px 30px rgba(17, 33, 46, 0.1);
}

/* fix: keep token list clean */
:root { --accent-ink: #084566; }

/* ============ base ============ */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); letter-spacing: -0.005em; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

main > section > .container > p,
main > section > .container > ul:not(.card-grid),
main > section > .container > ol {
  max-width: 68ch;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

strong { font-weight: 700; }

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

ul, ol { padding-left: 1.15rem; }
li { margin-bottom: 0.4rem; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

/* ============ layout ============ */

.container {
  width: min(100% - 2.25rem, 69rem);
  margin-inline: auto;
}

.section {
  padding: var(--section-y) 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* image placed beside the prose inside a section */
.section .container:has(> img) {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

.section .container > img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (min-width: 820px) {
  .section .container:has(> img) {
    grid-template-columns: 1fr minmax(260px, 37%);
  }
  .section .container > img {
    grid-column: 2;
    grid-row: 1 / span 40;
    position: sticky;
    top: 6rem;
    aspect-ratio: 3 / 4;
  }
  .section .container:has(> img) > *:not(img) {
    grid-column: 1;
    max-width: 62ch;
  }
}

/* ============ header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(17, 33, 46, 0.03);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.7rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  padding: 0.2rem 0;
}

.brand::before {
  content: "";
  width: 30px;
  height: 16px;
  flex: none;
  background: var(--accent);
  clip-path: polygon(0 100%, 24% 28%, 44% 62%, 72% 0, 100% 100%);
}

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
}

.site-nav a {
  display: inline-block;
  position: relative;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--accent-wash);
  color: var(--accent-deep);
}

.site-nav a.is-current {
  color: var(--accent-deep);
}

.site-nav a.is-current::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.18rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

@media (max-width: 560px) {
  .header-inner {
    justify-content: center;
    text-align: center;
  }
  .site-nav { width: 100%; justify-content: center; }
  .site-nav a { padding: 0.45rem 0.6rem; }
}

/* ============ hero ============ */

.hero {
  position: relative;
  padding: clamp(2.5rem, 5.5vw, 4.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  background:
    linear-gradient(180deg, var(--accent-wash) 0%, rgba(228, 238, 245, 0) 78%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero .container {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}

.hero h1 {
  margin-bottom: 0.55rem;
}

.hero h1 + p,
.hero > .container > p:first-of-type {
  font-size: var(--step-lead);
  color: var(--muted);
  max-width: 54ch;
}

.hero img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

@media (min-width: 860px) {
  .hero .container:has(img) {
    grid-template-columns: 1.02fr 0.98fr;
  }
  .hero img { aspect-ratio: 4 / 3; }
}

/* ============ buttons ============ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.4rem 0.5rem 0 0;
  padding: 0.78rem 1.4rem;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.005em;
  text-decoration: none;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, transform 0.18s ease;
}

.button:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--accent-contrast);
  transform: translateY(-1px);
}

.button:active { transform: none; }

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.button-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--accent-deep);
}

.button-secondary:hover {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* ============ cards ============ */

.card-grid {
  --card-pad: 1.5rem;
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.card {
  margin: 0;
  padding: var(--card-pad);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card h3::before {
  content: "";
  display: block;
  width: 2.2rem;
  height: 3px;
  margin-bottom: 0.7rem;
  background: var(--accent);
  border-radius: 2px;
}

.card p {
  color: var(--muted);
  font-size: 0.98rem;
}

.card img {
  width: calc(100% + var(--card-pad) * 2);
  margin: calc(var(--card-pad) * -1) calc(var(--card-pad) * -1) 1.15rem;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.card img + h3::before { display: none; }

.card svg {
  display: block;
  width: 34px;
  height: 34px;
  margin-bottom: 0.85rem;
  color: var(--accent);
}

/* ============ facts ============ */

.facts {
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.fact {
  padding: 1.05rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

.fact dt {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.fact dd {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}

/* ============ quote ============ */

.quote {
  position: relative;
  margin: 2rem 0 0;
  padding: 1.6rem 1.6rem 1.4rem 2.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  max-width: 46rem;
}

.quote::before {
  content: "\201C";
  position: absolute;
  left: 0.75rem;
  top: 0.45rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.8rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.45;
}

.quote p {
  font-size: 1.1rem;
  line-height: 1.6;
}

.quote cite {
  display: block;
  margin-top: 0.9rem;
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.quote cite::before { content: "— "; }

/* ============ cta ============ */

.cta {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: var(--accent);
  color: var(--accent-contrast);
  background-image:
    linear-gradient(115deg, rgba(255, 255, 255, 0.08) 0 38%, rgba(0, 0, 0, 0) 38%),
    linear-gradient(0deg, var(--accent), var(--accent));
}

.cta h2,
.cta h3 { color: var(--accent-contrast); }

.cta p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 56ch;
  font-size: var(--step-lead);
}

.cta a:not(.button) {
  color: var(--accent-contrast);
  text-decoration-thickness: 2px;
}

.cta .button,
.cta .button-primary {
  background: var(--accent-contrast);
  border-color: var(--accent-contrast);
  color: var(--accent-deep);
}

.cta .button:hover,
.cta .button-primary:hover {
  background: #EAF3F9;
  border-color: #EAF3F9;
  color: var(--accent-deep);
}

.cta .button-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.65);
  color: var(--accent-contrast);
}

.cta .button-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--accent-contrast);
  color: var(--accent-contrast);
}

/* ============ form ============ */

.form {
  margin-top: 2rem;
  max-width: 38rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.68rem 0.8rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.field input:hover,
.field textarea:hover { border-color: var(--muted); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.field small,
.field .hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.form .button {
  margin-top: 0.6rem;
  width: 100%;
}

@media (min-width: 540px) {
  .form .button { width: auto; }
}

.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============ footer ============ */

.site-footer {
  margin-top: 0;
  padding: clamp(2.25rem, 4vw, 3.25rem) 0 1.75rem;
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 0.95rem;
}

.site-footer h2,
.site-footer h3 {
  color: var(--footer-text);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.site-footer p { color: var(--footer-muted); }

.site-footer a {
  color: var(--footer-link);
  text-decoration: none;
}

.site-footer a:hover {
  color: #BFE0F5;
  text-decoration: underline;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.site-footer .container > :last-child { margin-bottom: 0; }

.site-footer small {
  display: block;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  color: var(--footer-muted);
}

.site-footer small a {
  color: var(--footer-muted);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

.site-footer small a:hover { color: var(--footer-link); }

/* ============ dark mode ============ */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C161E;
    --surface: #13242F;
    --surface-sunk: #0F1F29;
    --text: #E8EFF4;
    --muted: #A9BCC9;
    --accent: #6FBCE8;
    --accent-deep: #9AD3F5;
    --accent-ink: #9AD3F5;
    --accent-wash: #1B3443;
    --accent-contrast: #06212F;
    --border: #23394A;
    --border-strong: #335064;

    --footer-bg: #091219;
    --footer-text: #E8EFF4;
    --footer-muted: #9FB2C0;
    --footer-link: #8FC8EC;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  }

  .hero {
    background:
      linear-gradient(180deg, rgba(27, 52, 67, 0.75) 0%, rgba(12, 22, 30, 0) 80%),
      var(--bg);
  }

  .cta {
    background-image:
      linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0 38%, rgba(0, 0, 0, 0) 38%),
      linear-gradient(0deg, var(--accent), var(--accent));
    color: var(--accent-contrast);
  }

  .cta p { color: rgba(6, 33, 47, 0.88); }

  .cta a:not(.button) { color: var(--accent-contrast); }

  .cta .button,
  .cta .button-primary {
    background: #06212F;
    border-color: #06212F;
    color: #E8EFF4;
  }

  .cta .button:hover,
  .cta .button-primary:hover {
    background: #0C2F42;
    border-color: #0C2F42;
    color: #FFFFFF;
  }

  .cta .button-secondary {
    border-color: rgba(6, 33, 47, 0.55);
    color: #06212F;
  }

  .cta .button-secondary:hover {
    background: rgba(6, 33, 47, 0.12);
    border-color: #06212F;
    color: #06212F;
  }

  .button,
  .button-primary {
    color: var(--accent-contrast);
  }

  .button:hover,
  .button-primary:hover {
    background: var(--accent-deep);
    border-color: var(--accent-deep);
    color: var(--accent-contrast);
  }

  .button-secondary { color: var(--accent-deep); }

  .fact dd { color: var(--accent-deep); }
}

/* ============ motion ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover,
  .button:hover { transform: none; }
  .section .container > img { position: static; }
}