@font-face { font-family: Inter; src: url("/assets/fonts/Inter_400Regular.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url("/assets/fonts/Inter_600SemiBold.ttf") format("truetype"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url("/assets/fonts/Inter_700Bold.ttf") format("truetype"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: Inter; src: url("/assets/fonts/Inter_800ExtraBold.ttf") format("truetype"); font-style: normal; font-weight: 800; font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #f4f5f7;
  --muted: #aab1c4;
  --faint: #7e87a1;
  --bg: #040812;
  --paper: rgba(9, 22, 43, .82);
  --line: rgba(174, 200, 235, .16);
  --line-soft: rgba(255, 255, 255, .065);
  --violet: #7358d8;
  --violet-light: #a897f0;
  --run: #dd8168;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(30, 66, 128, .17), transparent 520px), var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--violet-light); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 750;
  transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); }

.site-header,
.site-footer {
  width: min(1060px, calc(100% - 48px));
  margin-inline: auto;
}
.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  text-decoration: none;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.045em;
}
.brand-mark { color: var(--violet-light); }
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 20px; }
.nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.nav a[aria-current="page"], .nav a:hover { color: var(--ink); }
.nav a { white-space: nowrap; }

.legal-page {
  width: min(840px, calc(100% - 48px));
  margin-inline: auto;
  padding: clamp(62px, 9vw, 104px) 0 96px;
}
.eyebrow {
  margin-bottom: 15px;
  color: var(--violet-light);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.legal-page h1 {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: clamp(44px, 8vw, 78px);
  line-height: .98;
  letter-spacing: -.055em;
}
.lede { max-width: 720px; margin-bottom: 0; color: var(--muted); font-size: clamp(18px, 2.5vw, 21px); }
.meta { margin: 24px 0 46px; color: var(--faint); font-size: 14px; }
.notice {
  margin: 30px 0 0;
  padding: 18px 20px;
  border-left: 3px solid var(--run);
  background: rgba(58, 28, 22, .36);
  color: #d9c6c3;
}

.panel {
  margin: 0;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}
.panel:last-of-type { border-bottom: 1px solid var(--line); }
.panel h2 { margin: 0 0 14px; font-size: clamp(23px, 3vw, 28px); line-height: 1.2; letter-spacing: -.025em; }
.panel h3 { margin: 24px 0 8px; font-size: 18px; }
.panel p, .panel li { color: var(--muted); }
.panel p { margin-bottom: 13px; }
.panel p:last-child { margin-bottom: 0; }
.panel ul { margin: 0; padding-left: 22px; }
.panel li + li { margin-top: 8px; }
.panel a { color: #c8c0f5; text-underline-offset: 4px; }
.button-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  margin-top: 36px;
  padding: 8px 16px;
  border: 1px solid rgba(189, 177, 250, .32);
  border-radius: 11px;
  background: rgba(115, 88, 216, .2);
  text-decoration: none;
  font-weight: 750;
}
.top-download { margin: 24px 0 0; }
.top-download .button-link { margin-top: 0; }

.download-page .lede { max-width: 700px; }
.download-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  gap: 28px;
  align-items: center;
  margin-top: 48px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(17, 42, 82, .66), var(--paper));
}
.download-card .eyebrow { margin-bottom: 12px; }
.download-card h2 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; }
.download-card p { max-width: 600px; margin: 0; color: var(--muted); }
.download-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.download-qr { width: 180px; height: 180px; display: block; border-radius: 12px; }
.app-store-link { display: inline-flex; border-radius: 9px; }
.app-store-link { min-height: 44px; align-items: center; }
.app-store-badge { width: 180px; height: auto; display: block; }
.qr-note { margin: 0; color: var(--faint); font-size: 12px; text-align: center; }
.download-note { margin-top: 24px; color: var(--faint); font-size: 14px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
}
.doc-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(17, 42, 82, .62), var(--paper));
  text-decoration: none;
}
.doc-card:hover { border-color: rgba(189, 177, 250, .38); }
.doc-card h2 { margin: 0 0 10px; font-size: 26px; letter-spacing: -.025em; }
.doc-card p { margin: 0; color: var(--muted); }
.doc-card strong { margin-top: 30px; color: var(--violet-light); font-size: 14px; }

.site-footer {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 13px;
}
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); text-underline-offset: 4px; }

@media (max-width: 640px) {
  .site-header, .site-footer { width: min(100% - 32px, 1060px); }
  .legal-page { width: min(100% - 32px, 840px); padding-top: 54px; }
  .site-header { align-items: center; gap: 12px; padding: 15px 0; }
  .nav { min-width: 0; flex: 1; flex-wrap: nowrap; justify-content: flex-end; gap: 0 14px; }
  .nav a:not([aria-current="page"]):not([href="/download"]) { display: none; }
  .nav a { font-size: 12px; }
  .card-grid { grid-template-columns: 1fr; }
  .doc-card { min-height: 205px; }
  .download-card { grid-template-columns: 1fr; gap: 22px; margin-top: 32px; padding: 24px; }
  .download-actions { grid-row: 1; align-items: flex-start; }
  .download-qr, .qr-note { display: none; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
