/* Shared brand + legal page styles (no app JS). */
@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@500;600;700;800&family=Nunito+Sans:wght@400;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #070b14;
  --bg-mid: #0b1020;
  --panel: rgba(20, 28, 51, 0.55);
  --text: #eaf1ff;
  --muted: #9fb0d3;
  --accent: #4fa3ff;
  --accent-soft: rgba(79, 163, 255, 0.16);
  --line: rgba(159, 176, 211, 0.18);
  --glow: rgba(79, 163, 255, 0.35);
  --font-display: "Lexend", "Segoe UI", sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

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

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

img {
  display: block;
  max-width: 100%;
}

/* ——— Landing ——— */

body.home {
  background:
    radial-gradient(ellipse 90% 70% at 50% -5%, rgba(79, 163, 255, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 30%, rgba(73, 209, 125, 0.08), transparent 50%),
    radial-gradient(ellipse 40% 35% at 10% 70%, rgba(79, 163, 255, 0.07), transparent 45%),
    linear-gradient(180deg, #0d1528 0%, var(--bg-mid) 42%, var(--bg) 100%);
  overflow-x: hidden;
}

.home-shell {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 0 0;
  animation: rise 0.7s ease both;
}

.home-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.home-nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.home-nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.home-nav-links a:hover {
  color: var(--text);
}

.home-nav-links .nav-cta {
  color: var(--text);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(79, 163, 255, 0.28);
}

.home-nav-links .nav-cta:hover {
  background: rgba(79, 163, 255, 0.28);
  color: #fff;
}

.hero {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 2.75rem 0 2.5rem;
  gap: 1.35rem;
}

.hero-logo {
  width: clamp(96px, 18vw, 128px);
  height: clamp(96px, 18vw, 128px);
  border-radius: 26%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 48px var(--glow),
    0 18px 40px rgba(0, 0, 0, 0.4);
  animation: float-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-copy {
  display: grid;
  gap: 0.7rem;
  max-width: 36rem;
  animation: rise 0.8s ease 0.1s both;
}

.hero-brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 6.5vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.hero-blurb {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2.2vw, 1.15rem);
  font-weight: 400;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.15rem;
  animation: rise 0.8s ease 0.18s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #061018;
  background: linear-gradient(135deg, #9ad0ff 0%, #4fa3ff 48%, #2f7fd9 100%);
  box-shadow: 0 14px 40px rgba(79, 163, 255, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 18px 48px rgba(79, 163, 255, 0.45);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  cursor: pointer;
  font: inherit;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  width: min(920px, 100%);
  margin-top: 0.85rem;
  animation: rise 0.85s ease 0.26s both;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.3rem;
  min-height: 5.5rem;
  padding: 1.15rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(10px);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.feature:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 163, 255, 0.45);
  background: rgba(29, 39, 66, 0.72);
}

.feature strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.home-note {
  margin: 0.85rem 0 0;
  max-width: 34rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  animation: rise 0.85s ease 0.32s both;
}

.home-note a {
  text-decoration: none;
  font-weight: 700;
}

.home-about {
  width: min(40rem, 100%);
  margin: 0.5rem auto 2.75rem;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--line);
  text-align: left;
  animation: rise 0.85s ease 0.36s both;
}

.home-about h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.home-about p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.home-about p:last-child {
  margin-bottom: 0;
}

.home-about strong {
  color: var(--text);
  font-weight: 700;
}

.home-about a {
  text-decoration: none;
  font-weight: 700;
}

.auth-welcome {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  animation: rise 0.7s ease 0.08s both;
}

.auth-welcome[hidden] {
  display: none !important;
}

.home-nav-links .nav-cta,
.home-nav-links button.nav-cta {
  cursor: pointer;
  font: inherit;
  color: var(--text);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(79, 163, 255, 0.28);
}

.home-nav-links button.nav-cta:hover {
  background: rgba(79, 163, 255, 0.28);
  color: #fff;
}

.auth-dialog {
  width: min(420px, calc(100vw - 2rem));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: #10182c;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.auth-dialog::backdrop {
  background: rgba(4, 8, 18, 0.72);
  backdrop-filter: blur(6px);
}

.auth-dialog-inner {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem 1.25rem 1.35rem;
}

.auth-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-dialog-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.auth-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

.auth-close:hover {
  color: var(--text);
}

.auth-dialog .field {
  display: grid;
  gap: 0.35rem;
}

.auth-dialog label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.auth-dialog input {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.auth-dialog input:focus {
  outline: 2px solid rgba(79, 163, 255, 0.45);
  outline-offset: 1px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.auth-actions .btn {
  flex: 1 1 8rem;
  cursor: pointer;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.65rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

#auth-turnstile {
  display: flex;
  justify-content: center;
  min-height: 65px;
}

#auth-turnstile[hidden] {
  display: none !important;
}

#auth-status {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

#auth-status[data-tone="error"] {
  color: #ff9b9b;
}

#auth-status[data-tone="ok"] {
  color: #7dffb3;
}

.home-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
}

.home-footer p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.home-footer-links {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.home-footer-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.home-footer-links a:hover {
  color: var(--text);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(18px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 860px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .home-shell {
    width: calc(100% - 1.5rem);
  }

  .hero {
    padding: 2rem 0 2rem;
    gap: 1.1rem;
  }

  .feature-grid {
    gap: 0.7rem;
  }

  .feature {
    min-height: 5rem;
    padding: 1rem 1.05rem;
  }

  .home-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ——— Legal docs ——— */

body.legal {
  background:
    radial-gradient(1000px 500px at 15% -10%, rgba(79, 163, 255, 0.16), transparent 55%),
    linear-gradient(180deg, #10182c, var(--bg-mid) 40%, var(--bg));
}

.wrap {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.15rem;
}

.brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  font-size: 0.95rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--text);
}

.legal-doc h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}

.legal-doc .meta {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.legal-doc section {
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.legal-doc section:last-of-type {
  border-bottom: 0;
}

.legal-doc h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.legal-doc p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.legal-doc ul {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
  color: var(--muted);
}

.footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.footer p {
  margin: 0 0 0.65rem;
  max-width: 48rem;
}
