@font-face {
  font-family: Jost;
  src: url("./fonts/jost-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #0b1220;
  --blue: #2563eb;
  --blue-deep: #1748b8;
  --pale: #eff6ff;
  --paper: #f8fafc;
  --white: #ffffff;
  --muted: #34445b;
  --page: 1360px;
  --gutter: 32px;
  --font: Jost, "Avenir Next", Avenir, sans-serif;
}

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

html { scroll-behavior: smooth; background: var(--paper); }

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

a {
  color: var(--blue-deep);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--ink); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
h1, h2, p { margin: 0; }
p { text-wrap: pretty; }

.wrap {
  width: min(var(--page), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 20;
  top: 12px;
  left: 12px;
  transform: translateY(-180%);
  padding: 12px 16px;
  color: var(--white);
  background: var(--ink);
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.site-header { position: relative; z-index: 5; background: var(--paper); }
.header-inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 28px;
}
.brand, .footer-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}
.brand img { display: block; width: 180px; height: auto; }
.desktop-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(17px, 2.2vw, 34px);
}
.desktop-nav a, .mobile-links a {
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}
.desktop-nav a:hover, .mobile-links a:hover { text-decoration: underline; }
.header-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: var(--white);
  background: var(--blue);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}
.header-action:hover { color: var(--white); background: var(--blue-deep); transform: translateY(-2px); }
.mobile-menu { display: none; }

.legal-page { padding-block: clamp(76px, 9vw, 128px) clamp(96px, 12vw, 160px); }
.legal-heading { max-width: 900px; }
.legal-heading h1 {
  max-width: 12ch;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 560;
  letter-spacing: -0.052em;
  line-height: 0.96;
  text-wrap: balance;
}
.legal-dates {
  margin-top: 24px;
  color: var(--blue-deep);
  font-weight: 550;
}
.legal-intro {
  max-width: 72ch;
  margin-top: 20px;
  font-size: clamp(20px, 1.5vw, 22px);
}
.legal-sections {
  display: grid;
  max-width: 980px;
  gap: 48px;
  margin-top: 68px;
}
.legal-sections details {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.3fr);
  align-items: start;
  gap: 32px;
}
.legal-sections summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}
.legal-sections summary::-webkit-details-marker { display: none; }
.legal-sections summary::after {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  margin-top: 10px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  content: "";
  transform: rotate(45deg);
  transition: transform 160ms ease;
}
.legal-sections details[open] summary::after { transform: rotate(225deg); }
.legal-sections h2 {
  max-width: 13ch;
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 540;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-wrap: balance;
}
.legal-copy { display: grid; gap: 16px; }
.legal-copy p { max-width: 68ch; color: var(--muted); }

.site-footer { padding-block: 30px 34px; background: var(--paper); }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.footer-brand { justify-self: center; }
.footer-brand img { display: block; width: 148px; height: auto; }
.footer-nav, .footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.footer-legal { justify-content: flex-end; }
.footer-social-icons { display: inline-flex; align-items: center; gap: 10px; }
.footer-social-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--muted);
  text-decoration: none;
}
.footer-social-icon svg { display: block; width: 20px; height: 20px; fill: currentColor; }
.footer-social-icon:hover { color: var(--ink); text-decoration: none; }
.footer-nav a, .footer-legal a, .footer-year {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.footer-nav a:hover, .footer-legal a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 980px) {
  :root { --gutter: 26px; }
  .desktop-nav { gap: 16px; }
  .desktop-nav a { font-size: 15px; }
  .header-action { min-height: 44px; padding-inline: 14px; font-size: 15px; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .header-inner { min-height: 72px; justify-content: space-between; gap: 16px; }
  .brand img { width: 154px; }
  .desktop-nav, .header-action { display: none; }
  .mobile-menu { position: relative; display: block; }
  .mobile-menu summary {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 0 4px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu summary::after {
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: translateY(-3px) rotate(45deg);
  }
  .mobile-menu[open] summary::after { transform: translateY(3px) rotate(225deg); }
  .mobile-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 10;
    display: grid;
    min-width: min(280px, calc(100vw - 40px));
    padding: 12px 18px 16px;
    background: var(--white);
  }
  .mobile-links a { display: flex; min-height: 48px; align-items: center; }
  .legal-page { padding-block: 60px 92px; }
  .legal-sections { gap: 40px; margin-top: 52px; }
  .legal-sections details { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 390px) {
  :root { --gutter: 16px; }
  .brand img { width: 142px; }
  .footer-inner { gap: 14px; }
  .footer-nav, .footer-legal { justify-content: flex-start; gap: 8px 18px; }
}

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