/* FATALITY website: shared styles (all pages) */

@font-face { font-family: "Barlow"; src: url("fonts/barlow-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* the app's own fonts for the previews: Segoe UI and Bahnschrift when the visitor has them (Windows),
   otherwise Selawik (Microsoft's open Segoe UI stand-in) and Barlow (close to Bahnschrift) */
@font-face { font-family: "FT UI"; src: local("Segoe UI"), local("SegoeUI"), url("fonts/selawik-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; ascent-override: 107.91%; descent-override: 25.1%; line-gap-override: 0%; }
@font-face { font-family: "FT UI"; src: local("Segoe UI Semibold"), local("SegoeUI-Semibold"), url("fonts/selawik-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; ascent-override: 107.91%; descent-override: 25.1%; line-gap-override: 0%; }
@font-face { font-family: "FT Display"; src: local("Bahnschrift"), url("fonts/barlow-medium.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  /* the app's Dark theme */
  --ink: #06070b;
  --panel: #0d0f17;
  --text: #eef1f8;
  --muted: rgba(238, 241, 248, .66);
  --faint: rgba(238, 241, 248, .42);
  --line: rgba(255, 255, 255, .09);
  --a1: #b8d4ff;
  --a2: #758cff;
  --green: #45ed8f;
  --amber: #ffcc38;
  --red: #ff5466;
  --font: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1160px;
  --gutter: 24px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* smooth scrolling (Lenis) */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@supports (overflow-x: clip) { body { overflow-x: clip; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--a1); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--a1); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(184, 212, 255, .3); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ambient light behind every page (same idea as the app's glow effect) */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
/* soft gradients only (no blur filter), moved on the GPU: cheap to scroll over */
.aurora::before, .aurora::after {
  content: ""; position: absolute; width: 80vmax; height: 80vmax; border-radius: 50%;
  opacity: .2; will-change: transform; transform: translateZ(0);
}
.aurora::before { left: -26vmax; top: -34vmax; background: radial-gradient(closest-side, var(--a1), rgba(184, 212, 255, .35) 35%, transparent); animation: drift-a 38s ease-in-out infinite alternate; }
.aurora::after { right: -30vmax; bottom: -40vmax; background: radial-gradient(closest-side, var(--a2), rgba(117, 140, 255, .35) 35%, transparent); animation: drift-b 46s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(14vmax, 10vmax, 0); } }
@keyframes drift-b { to { transform: translate3d(-12vmax, -8vmax, 0); } }

/* the line field (assets/lines.js) */
.field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* content glides in once as it scrolls into view */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0);
  transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform 1.1s cubic-bezier(.16, 1, .3, 1); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 7, 11, .62);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand img { width: 30px; height: 30px; filter: drop-shadow(0 0 10px rgba(184, 212, 255, .35)); }
.wordmark {
  font-weight: 600; font-size: 16px; letter-spacing: .32em;
  background: linear-gradient(90deg, var(--a1), var(--a2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #070a12; }
@media (max-width: 640px) {
  .nav .wrap { gap: 14px; }
  .nav-links { gap: 16px; }
  .nav-links .hide-sm { display: none; }
}
@media (max-width: 460px) {
  .nav-links a:not(.btn) { display: none; }   /* Terms and Privacy stay in the footer */
  .wordmark { letter-spacing: .24em; }
}

/* ---- buttons (the app's primary and ghost buttons) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: 11px;
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: #070a12; border: 1px solid rgba(255, 255, 255, .35);
  background: linear-gradient(90deg, var(--a1), var(--a2));
  box-shadow: 0 0 0 1px rgba(184, 212, 255, .08), 0 8px 28px -6px rgba(117, 140, 255, .55);
}
.btn-primary:hover { color: #070a12; box-shadow: 0 0 0 1px rgba(184, 212, 255, .15), 0 10px 36px -4px rgba(117, 140, 255, .75); }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .26); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 15px; border-radius: 10px; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---- glass panel (cards on the site) ---- */
.glass {
  position: relative; border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .012) 55%, rgba(255, 255, 255, .025)),
    rgba(11, 13, 20, .82);   /* solid enough that the line field doesn't run through the text */
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .36), rgba(255, 255, 255, .06) 38%, rgba(255, 255, 255, .05) 70%, rgba(184, 212, 255, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ---- footer ---- */
.footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 36px 0 44px; color: var(--faint); font-size: 14px; }
.footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; align-items: start; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer p { margin: 6px 0 0; }
@media (max-width: 640px) {
  .footer .wrap { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

/* ---- legal pages ---- */
.legal { padding: 64px 0 0; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.08; font-weight: 600; letter-spacing: -.01em; margin: 0 0 10px; }
.legal .updated { color: var(--faint); font-size: 15px; margin: 0 0 28px; }
.legal .lede { font-size: 19px; color: var(--muted); margin: 0 0 12px; max-width: 64ch; }
.legal .toc { margin: 28px 0 8px; padding: 20px 24px; }
.legal .toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.legal .toc li { margin: 0; padding: 3px 0; break-inside: avoid; }
.legal .toc a { color: var(--muted); text-decoration: none; }
.legal .toc a:hover { color: var(--text); }
@media (max-width: 640px) { .legal .toc ol { columns: 1; } }
.legal section { margin-top: 44px; scroll-margin-top: 84px; }
.legal h2 { font-size: 24px; line-height: 1.25; font-weight: 600; margin: 0 0 12px; }
.legal h2 .n { color: var(--a1); margin-right: 10px; font-variant-numeric: tabular-nums; }
.legal h3 { font-size: 18px; font-weight: 600; margin: 22px 0 6px; }
.legal p, .legal li { color: var(--muted); max-width: 70ch; }
.legal p strong, .legal li strong { color: var(--text); font-weight: 600; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin: 6px 0; }
.callout { padding: 18px 22px; margin: 16px 0; max-width: 70ch; }
.callout p { margin: 0; }
.callout.warn { box-shadow: inset 3px 0 0 var(--amber), 0 18px 40px -18px rgba(0, 0, 0, .6); }
.callout.info { box-shadow: inset 3px 0 0 var(--a1), 0 18px 40px -18px rgba(0, 0, 0, .6); }
.datatable { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.datatable th, .datatable td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.datatable th { color: var(--text); font-weight: 600; font-size: 14px; }
.datatable td { color: var(--muted); }
.datatable td:first-child { color: var(--text); font-weight: 500; white-space: nowrap; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) { .datatable td:first-child { white-space: normal; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .aurora::before, .aurora::after { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
