@layer theme, base, components, utilities;

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/app/fonts/sora-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/app/fonts/source-sans-3-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --al-frost: #f3f7fc;
  --al-white: #ffffff;
  --al-blueprint: #d8e6f8;
  --al-cobalt: #2458d3;
  --al-ink: #172c4b;
  --al-slate: #52647b;
  --al-cobalt-dark: #1c43a1;
  --al-line: #cbd8eb;
  --al-warning: #f2b04c;
  --al-warning-ink: #7a4b00;
  --al-display: "Sora", sans-serif;
  --al-body: "Source Sans 3", sans-serif;
}

@layer base {
  * { box-sizing: border-box; }
  html { scroll-padding-top: 24px; }
  body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--al-ink);
    font-family: var(--al-body);
    font-size: 16px;
    line-height: 1.5;
    background: linear-gradient(180deg, #eaf1fc 0, var(--al-frost) 440px);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
  }
  a { color: inherit; text-decoration: none; }
  button, input, select, textarea { font: inherit; }
  button, summary { cursor: pointer; }
  button:disabled { cursor: not-allowed; }
  img, svg { max-width: 100%; }
  h1, h2, h3 { font-family: var(--al-display); text-wrap: balance; }
  h1, h2, h3, p { margin: 0; }
  h1 { letter-spacing: -0.045em; line-height: 1.12; }
  h2 { letter-spacing: -0.035em; line-height: 1.25; }
  h3 { letter-spacing: -0.02em; }
  :focus-visible { outline: 3px solid var(--al-cobalt); outline-offset: 4px; }
  [hidden] { display: none !important; }
  ::selection { background: var(--al-blueprint); color: var(--al-ink); }
}

@layer components {
  .site-container { width: min(1280px, calc(100% - 64px)); margin-inline: auto; }
  .brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--al-display); font-size: 21px; font-weight: 600; letter-spacing: -1px; flex-shrink: 0; }
  .brand img { width: 38px; height: 38px; }
  .site-header { padding-block: 22px; border-bottom: 1px solid var(--al-line); background: var(--al-white); }
  .site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  .site-nav { display: flex; align-items: center; gap: 6px; }
  .site-nav a { padding: 10px 14px; border-radius: 8px; color: var(--al-slate); font-weight: 600; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--al-frost); color: var(--al-cobalt); }
  .site-footer { margin-top: 48px; padding-block: 32px; border-top: 1px solid var(--al-line); }
  .site-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
  .site-footer p { font-size: 14px; color: var(--al-slate); max-width: 58ch; }
  .site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; color: var(--al-slate); }
  .site-footer nav a:hover { color: var(--al-cobalt); text-decoration: underline; }
  .action-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 20px; border: 1px solid transparent; border-radius: 8px; font-size: 16px; font-weight: 600; line-height: 1.35; text-align: center; transition: background-color 150ms, border-color 150ms; }
  .action-primary { background: var(--al-cobalt); color: white; }
  .action-primary:hover { background: var(--al-cobalt-dark); }
  .action-secondary { background: white; color: var(--al-ink); border-color: var(--al-line); }
  .action-secondary:hover { border-color: var(--al-cobalt); color: var(--al-cobalt); }
  .action-danger { background: #b91c1c; color: white; }
  .action-danger:hover { background: #991b1b; }
  .action-button:disabled { opacity: 0.5; }
  .eyebrow-label { display: inline-flex; align-items: center; gap: 8px; color: var(--al-slate); font-size: 14px; }
  .eyebrow-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--al-cobalt); }
  .market-notice { padding: 16px 20px; border-left: 3px solid var(--al-warning); background: #fff8eb; color: var(--al-warning-ink); font-size: 14px; line-height: 1.5; }
  .market-notice strong { font-weight: 600; }
  .page-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
  .page-heading h1 { font-size: clamp(30px, 3.8vw, 44px); font-weight: 600; }
  .page-heading p { max-width: 65ch; margin-top: 12px; color: var(--al-slate); font-size: 17px; }
  .surface { border: 1px solid var(--al-line); border-radius: 16px; background: white; padding: 24px; }
  .skip-link { position: fixed; top: 16px; left: 16px; z-index: 100; padding: 12px 20px; border-radius: 8px; background: var(--al-cobalt); color: white; transform: translateY(calc(-100% - 32px)); }
  .skip-link:focus { transform: translateY(0); }
  .error-page { display: grid; min-height: 70vh; align-content: center; gap: 24px; max-width: 640px; padding-block: 64px; }
  .error-page h1 { font-size: clamp(36px, 7vw, 64px); }
  .error-page p { color: var(--al-slate); font-size: 18px; max-width: 54ch; }
  .error-page nav { display: flex; flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 1023px) {
  .site-container { width: calc(100% - 48px); }
  .site-header-inner { gap: 16px; }
}
@media (max-width: 639px) {
  .site-container { width: calc(100% - 32px); }
  .site-header { padding-block: 16px; }
  .brand { font-size: 19px; }
  .brand img { width: 32px; height: 32px; }
  .surface { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
