/* Fonts are served from this site (not Google Fonts), so visitors' IPs aren't sent to Google.
   Same fonts as the app, cut down to Latin characters (incl. æøå) and converted to WOFF2. */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bebas Neue";
  src: url("/assets/fonts/BebasNeue-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Same role colors as the app (frontend/constants/colors.js). Follows the visitor's light/dark setting. */
:root {
  --canvas: #f2f2f4;
  --surface: #ffffff;
  --raised: #e7e7ea;
  --fg: #111111;
  --soft: #2b2b2b;
  --muted: #6d6d6d;
  --subtle: #9a9a9a;
  --line: #e2e2e5;
  --inverse: #111111;
  --on-inverse: #ffffff;
  --on-accent: #ffffff;

  --accent-red: #cf414b;
  --accent-purple: #852170;
  --gradient: linear-gradient(135deg, var(--accent-red), var(--accent-purple));

  --radius: 20px;
  --max: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #111111;
    --surface: #1a1a1a;
    --raised: #3d3d3d;
    --fg: #f6f6f6;
    --soft: #d1d1d1;
    --muted: #888888;
    --subtle: #6d6d6d;
    --line: #2c2c2c;
    --inverse: #f6f6f6;
    --on-inverse: #111111;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img { width: 30px; height: 30px; }

.wordmark {
  font-family: "Bebas Neue", "Inter", sans-serif;
  font-size: 28px;
  letter-spacing: 0.04em;
  line-height: 1;
  padding-top: 3px;
}

.nav { display: flex; gap: 22px; }

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

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  justify-content: space-between;
  align-items: center;
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--inverse); color: var(--on-inverse); }
.btn-accent { background: var(--gradient); color: var(--on-accent); }
.btn-ghost { background: var(--raised); color: var(--fg); }

.btn[aria-disabled="true"] { opacity: 0.55; cursor: default; pointer-events: none; }

.btn svg { width: 20px; height: 20px; flex: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Landing ---------- */

.hero {
  position: relative;
  padding: 88px 0 72px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-purple) 38%, transparent), transparent 65%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: "Bebas Neue", "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(64px, 11vw, 132px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  margin: 0 0 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 20px;
  color: var(--soft);
  max-width: 34ch;
  margin: 0 0 32px;
}

.store-note { margin-top: 14px; font-size: 14px; color: var(--muted); }

.hero-mark {
  justify-self: center;
  width: min(100%, 380px);
  aspect-ratio: 1;
  border-radius: 28%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--accent-purple) 55%, transparent);
}

.hero-mark img { width: 62%; }

.section { padding: 72px 0; }

.section-title {
  font-family: "Bebas Neue", "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  margin: 0 0 14px;
}

.section-lead { color: var(--muted); font-size: 18px; max-width: 52ch; margin: 0 0 40px; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.card h3 { margin: 18px 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

.icon-dot {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--gradient);
  display: grid;
  place-items: center;
  color: var(--on-accent);
}

.icon-dot svg { width: 22px; height: 22px; }

.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mode { padding: 36px; }

.mode .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--raised);
  color: var(--soft);
}

.mode h3 {
  font-family: "Bebas Neue", "Inter", sans-serif;
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  margin: 20px 0 12px;
}

.stat-row { display: flex; gap: 28px; margin-top: 24px; }

.stat .value {
  font-family: "Bebas Neue", "Inter", sans-serif;
  font-size: 40px;
  line-height: 1;
  color: var(--soft);
}

.stat .label { font-size: 13px; color: var(--muted); }

.cta {
  text-align: center;
  padding: 64px 28px;
  border-radius: 28px;
  background: var(--gradient);
  color: var(--on-accent);
}

.cta .section-title { color: var(--on-accent); }
.cta p { margin: 0 auto 28px; max-width: 44ch; opacity: 0.9; }
.cta .btn-row { justify-content: center; }
.cta .btn-primary { background: #111111; color: #ffffff; }

/* ---------- Legal / text pages ---------- */

.doc { padding: 56px 0 80px; }

.doc .wrap { max-width: 760px; }

.doc h1 {
  font-family: "Bebas Neue", "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(48px, 8vw, 72px);
  line-height: 1;
  margin: 0 0 8px;
}

.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 40px; }
.doc h2 { font-size: 21px; margin: 40px 0 10px; }
.doc p, .doc li { color: var(--soft); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--fg); text-decoration-color: var(--accent-red); text-underline-offset: 3px; }

/* ---------- Invite fallback (/u, /g) ---------- */

.invite {
  min-height: calc(100vh - 64px);
  min-height: calc(100dvh - 64px);
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.invite-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 28px;
}

.invite-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
  border-radius: 50%;
  padding: 3px;
  background: var(--gradient);
}

.invite-avatar span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1a1a1a;
  color: #f6f6f6;
  font-family: "Bebas Neue", "Inter", sans-serif;
  font-size: 38px;
  padding-top: 4px;
}

.invite-logo { width: 56%; }

.invite-card h1.not-found { font-size: 96px; line-height: 0.9; margin-bottom: 8px; }

.invite-card h1 { font-size: 26px; line-height: 1.25; margin: 0 0 10px; }
.invite-card p { color: var(--muted); margin: 0 0 28px; }
.invite-card .btn { width: 100%; }
.invite-card .btn + .btn { margin-top: 12px; }

.code {
  font-family: "Bebas Neue", "Inter", sans-serif;
  font-size: 34px;
  letter-spacing: 0.12em;
  background: var(--raised);
  border-radius: 14px;
  padding: 10px 18px 6px;
  display: inline-block;
  margin: 0 0 24px;
}

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .hero { padding: 56px 0 40px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-mark { width: min(70%, 260px); order: -1; justify-self: start; }
  .features { grid-template-columns: 1fr; }
  .modes { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .mode { padding: 28px; }
}

@media (max-width: 520px) {
  .nav { display: none; }
  .btn-row .btn { width: 100%; }
}
