@import url("controls.css");
@import url("system.css");

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-Medium.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Serif";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/IBMPlexSerif-SemiBold.woff2") format("woff2");
}

:root {
  --bg: #060910;
  --bg-mid: #0a1220;
  --surface: rgba(12, 18, 30, 0.88);
  --text: #f5f8fc;
  --muted: #c5d1e2;
  --faint: #6d7d93;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(165, 185, 210, 0.22);
  --blue: #3b82f6;
  --blue-deep: #2563eb;
  --gold: #e0b36a;
  --header-h: 68px;
  --radius: 14px;
  --radius-lg: 20px;
  --font: "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "IBM Plex Serif", "Iowan Old Style", Palatino, Georgia, serif;
  --content: 1220px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 200;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--blue-deep);
  color: #fff;
  text-decoration: none;
  font-size: 0.86rem;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(var(--content), calc(100% - 64px));
  margin: 0 auto;
}

@media (max-width: 900px) {
  .wrap {
    width: min(var(--content), calc(100% - 48px));
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(var(--content), calc(100% - 32px));
  }
}

h1, h2, h3 {
  color: var(--text);
  letter-spacing: -0.028em;
  line-height: 1.16;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.4vw, 3.5rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 600;
}

h3 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
  font-weight: 400;
}

.kicker {
  margin-bottom: 12px;
  color: #9eb6d8;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(6, 10, 16, 0.86);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.mark,
img.mark {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 50%;
  background: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.desktop-nav a {
  color: #b4c0d2;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: #fff;
}

.desktop-nav a[aria-current="page"] {
  border-bottom-color: rgba(147, 197, 253, 0.55);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiet-link {
  color: var(--faint);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
}

.quiet-link:hover {
  color: var(--muted);
}

.menu-toggle {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-toggle-bars {
  width: 15px;
  height: 11px;
  position: relative;
}

.menu-toggle-bars span,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 15px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
}

.menu-toggle-bars span { top: 5px; }
.menu-toggle-bars::before { top: 0; }
.menu-toggle-bars::after { bottom: 0; }

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before {
  top: 5px;
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after {
  bottom: 5px;
  transform: rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 40;
  background: rgba(4, 7, 12, 0.72);
}

.mobile-nav-panel {
  display: grid;
  gap: 4px;
  padding: 16px 18px 24px;
  background: #0c1422;
  border-bottom: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
}

.mobile-nav .btn {
  width: 100%;
  margin-top: 8px;
}

.btn {
  color: var(--text);
}

.btn:focus-visible,
a:focus-visible,
.menu-toggle:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.page-hero {
  padding: 64px 0 36px;
  background:
    linear-gradient(180deg, rgba(18, 32, 56, 0.45) 0%, rgba(6, 9, 16, 0) 72%),
    var(--bg);
}

.page-hero.centered {
  text-align: center;
}

.page-hero.centered .lede {
  margin-left: auto;
  margin-right: auto;
}

.site-footer {
  padding: 48px 0 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: #05080e;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.35fr repeat(6, minmax(0, 1fr));
  gap: 28px 20px;
  margin-bottom: 28px;
}

.footer-brand p {
  margin-top: 12px;
  max-width: 32ch;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-col h3 {
  margin-bottom: 12px;
  color: var(--faint);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.footer-col a:hover {
  color: #fff;
}

.copyright {
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--faint);
  font-size: 0.78rem;
}

[hidden] {
  display: none !important;
}

.es-locale {
  position: relative;
}

.es-locale-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(10, 16, 26, 0.55);
  color: #d7e2f0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.es-locale-caret {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}

.es-locale-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 80;
  min-width: 168px;
  padding: 6px;
  margin: 0;
  list-style: none;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #0c1422;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.es-locale-menu button {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e8eef7;
  text-align: left;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.es-locale-menu button:hover,
.es-locale-menu button[aria-selected="true"] {
  background: rgba(37, 99, 235, 0.18);
}

.es-locale-label {
  display: none;
}

@media (max-width: 1080px) {
  .desktop-nav,
  .quiet-link {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-nav:not([hidden]),
  .mobile-nav.is-open {
    display: block;
  }

  .footer-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(var(--content), calc(100% - 32px));
  }

  .nav-actions .btn-secondary {
    display: none;
  }

  .header-cta {
    display: inline-flex;
    min-height: 44px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-col a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .nav-actions .header-cta,
  .brand span {
    display: none;
  }

  .nav-bar {
    gap: 10px;
  }

  .nav-actions {
    flex-shrink: 0;
    gap: 8px;
  }

  .es-locale-toggle {
    padding: 0 8px;
  }
}
