/* The site's static pages — the guides, terms and privacy — in the app's own
 * look: the dashboard's water, its white panels, Rajdhani labels, Russo One
 * headings and the same 3D buttons, with one header and footer that link
 * every page to every other (copied into each page by hand).
 *
 * Static on purpose, served straight from public/: these must render with the
 * bundle blocked or the socket dead, because "the terms would not load" is not
 * an answer about the document that governs someone's money. The faces load
 * from /fonts (the same files the splash uses), with system fallbacks.
 *
 * Tokens mirror packages/client/src/style.css :root — keep them in step.
 */

@font-face {
  font-family: "Russo One";
  src: url("/fonts/russo-one-v18-latin-400.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Rajdhani";
  src: url("/fonts/rajdhani-v17-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit-v15-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit-v15-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ground: #0e3448;
  --panel: #ffffff;
  --panel-2: #eef5f9;
  --border: #d7e6ee;
  --border-strong: #b9d2df;
  --text: #10242f;
  --muted: #4c6673;
  --muted-2: #5f7a87;
  --accent: #17739c;
  --accent-text: #115d7e;
  --accent-wash: rgba(37, 150, 190, 0.1);
  --on-ground: rgba(255, 255, 255, 0.86);
  --on-ground-muted: rgba(255, 255, 255, 0.6);
  --font-body: "Outfit", -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  --font-ui: "Rajdhani", var(--font-body);
  --font-display: "Russo One", "Arial Black", Impact, var(--font-body);
  --r-md: 6px;
  --r-lg: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ground);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-text);
}

/* ---- header ------------------------------------------------------------- */

.site-header {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* The home screen's wordmark, the same image, so every page wears one logo. */
.site-brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.site-brand img {
  width: auto;
  height: 46px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-left: auto;
}

.site-nav a {
  color: var(--on-ground);
  text-decoration: none;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ---- buttons: the app's, verbatim in spirit ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--r-md);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.12s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid #0f5473;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 4px 0 #0c4560, 0 6px 14px rgba(4, 22, 32, 0.28);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 1px 0 #0c4560;
}

.btn-outline {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: 0 3px 0 var(--border-strong);
}

.btn-outline:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--border-strong);
}

.btn svg {
  width: 0.9em;
  height: 0.9em;
  fill: currentColor;
}

/* ---- content ------------------------------------------------------------ */

.site-main {
  flex: 1;
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 0.5rem 1.25rem 3rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 10px 26px rgba(4, 22, 32, 0.5), 0 1px 2px rgba(4, 22, 32, 0.35);
}

.doc {
  padding: 2rem 2.25rem 2.25rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.doc h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.15;
  color: var(--text);
}

.doc h2 {
  margin: 2.1rem 0 0.5rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--text);
}

.doc p,
.doc li,
.doc dd {
  color: var(--muted);
}

.doc strong,
.doc dt {
  color: var(--text);
  font-weight: 600;
}

.doc li {
  margin-bottom: 0.4rem;
}

.doc dl {
  margin: 1rem 0;
}

.doc dt {
  margin-top: 1rem;
}

.doc dd {
  margin: 0.25rem 0 0;
}

.updated {
  margin: 0 0 1.75rem;
  font-size: 0.85rem;
  color: var(--muted-2);
}

.callout {
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  background: var(--accent-wash);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}

.callout p {
  margin: 0;
  color: var(--text);
}

/* The call to play, at the foot of every guide. */
.play-cta {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.play-cta p {
  margin: 0;
  color: var(--muted);
}

.play-cta strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  color: var(--text);
}

/* Every other page, as cards. */
.more-heading {
  margin: 2rem 0 0.75rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-ground-muted);
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.more-card {
  display: block;
  padding: 1rem 1.1rem;
  text-decoration: none;
  transition: transform 0.12s ease;
}

.more-card:hover {
  transform: translateY(-2px);
}

.more-card strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 1.1rem;
  color: var(--text);
}

.more-card span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---- footer ------------------------------------------------------------- */

.site-footer {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  color: var(--on-ground-muted);
  font-size: 0.88rem;
}

.site-footer a {
  color: var(--on-ground);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer .fine {
  margin-left: auto;
}

/* Reading progress on the long legal documents. */
.readbar {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 10;
}

.readbar span {
  display: block;
  width: 0;
  height: 100%;
  background: #5cc8f0;
}

/* ---- small screens ------------------------------------------------------ */

@media (max-width: 760px) {
  .site-brand img {
    height: 38px;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 0.9rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }
  .site-nav a {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
  }
  .site-header .btn {
    margin-left: auto;
  }
  .doc {
    padding: 1.5rem 1.25rem 1.75rem;
  }
  .site-footer .fine {
    margin-left: 0;
  }
}
