/* CelebClash — felles stil for celebclash.com.
   Fargene er appens egne tokens (tamagui.config.ts i app-repoet): dyp lilla
   bunn, fiolett aksent, neon og messing-gull. Font = Space Grotesk som i appen.
   Knappene er «volumetriske» som i appen (flate + 3 px leppe under). */

:root {
  --bg: #0F0820;
  --surface: #1A1030;
  --surface-hi: #2A1F45;
  --outline: #6D4FC2;
  --accent: #8B5CF6;
  --accent-hi: #A78BFA;
  --neon: #FF3DA6;
  --neon-hi: #FF7AD9;
  --gold: #E0A22E;
  --gold-hi: #FFE08A;
  --gold-lip: #9A6410;
  --on-gold: #4A2E06;
  --lip: #120A2A;
  --success: #43A047;
  --danger: #EF4444;
  --ink: #FFFFFF;
  --muted: #B0A8C8;
  --line: rgba(176, 168, 200, 0.16);
  --font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-card: 18px;
  --r-btn: 12px;
  --gutter: 16px;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Fast lilla glød bak alt — samme stemning som Home i appen. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(139, 92, 246, 0.28), transparent 60%),
    radial-gradient(700px 500px at 110% 20%, rgba(255, 61, 166, 0.14), transparent 60%),
    var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--accent-hi); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 4px; }

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

/* ---------- Topp ---------- */
.site-header { position: relative; z-index: 5; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo img { height: 52px; width: auto; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav a:hover, .nav a[aria-current='page'] { color: var(--ink); background: rgba(139, 92, 246, 0.18); }

/* ---------- Knapper (3D som i appen) ---------- */
.btn {
  --top: var(--accent-hi);
  --bottom: #7C3AED;
  --lip-c: var(--lip);
  --txt: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--r-btn);
  background: linear-gradient(180deg, var(--top), var(--bottom));
  box-shadow: 0 3px 0 var(--lip-c), 0 10px 24px rgba(0, 0, 0, 0.35);
  color: var(--txt);
  font: 700 1.02rem/1 var(--font);
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.08); color: var(--txt); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lip-c), 0 4px 12px rgba(0, 0, 0, 0.35); }
.btn-gold { --top: var(--gold-hi); --bottom: var(--gold); --lip-c: var(--gold-lip); --txt: var(--on-gold); text-shadow: none; }
.btn-ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--outline);
  color: var(--accent-hi);
  text-shadow: none;
}
.btn-ghost:active { transform: translateY(1px); box-shadow: inset 0 0 0 1.5px var(--outline); }
.btn-block { width: 100%; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(26, 16, 48, 0.8);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 10px var(--neon);
  animation: pulse 2s ease-in-out infinite;
}
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--neon);
  color: #fff;
}
.badge-gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--on-gold); }

/* ---------- Kort ---------- */
.card {
  background: linear-gradient(180deg, var(--surface-hi), var(--surface));
  border: 1.5px solid rgba(109, 79, 194, 0.55);
  border-radius: var(--r-card);
  box-shadow: 0 3px 0 var(--lip), 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* ---------- Dokumentsider (privacy/terms/support/delete) ---------- */
.page-hero {
  position: relative;
  padding: 40px 0 72px;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--room, none) center 30% / cover no-repeat;
  opacity: 0.35;
  filter: saturate(0.9);
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 20%, transparent 100%);
}
/* Etikett over overskrifter — vinner over seksjonenes avsnittsfarge. */
.eyebrow {
  color: var(--gold-hi) !important;
  margin: 0 0 8px !important;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.page-hero h1 {
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.page-hero .lede { color: var(--muted); margin-top: 10px; font-size: 1.05rem; max-width: 620px; }

.doc { margin-top: -40px; padding: 32px clamp(18px, 5vw, 44px) 36px; position: relative; }
.doc h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 34px 0 10px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { color: var(--muted); margin-bottom: 10px; }
.doc p strong, .doc li strong { color: var(--ink); }
.doc ul { padding-left: 22px; margin-bottom: 12px; }
.doc li::marker { color: var(--accent); }
.doc em { color: var(--ink); font-style: normal; font-weight: 500; }
.doc .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; }
.doc .links { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }

.callout {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 22px;
}
.callout p:last-child { margin-bottom: 0; }
.callout .btn { margin-top: 6px; }

/* Tabeller: stables som merkelapp/verdi under 560 px. */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 8, 32, 0.45);
}
table { border-collapse: collapse; width: 100%; min-width: 540px; font-size: 0.93rem; }
th, td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
th { color: var(--ink); font-weight: 700; font-size: 0.88rem; background: rgba(139, 92, 246, 0.1); }
tbody tr:last-child td { border-bottom: none; }
@media (max-width: 560px) {
  table { min-width: 0; display: block; }
  thead { display: none; }
  tbody, tr, td { display: block; }
  tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: none; }
  td { padding: 0; border: none; margin-bottom: 8px; }
  tr td:last-child { margin-bottom: 0; }
  td::before {
    content: attr(data-label);
    display: block;
    color: var(--ink);
    font-weight: 700;
    font-size: 0.78rem;
    margin-bottom: 1px;
  }
}

/* ---------- Bunn ---------- */
.site-footer {
  margin-top: auto;
  padding: 48px 0 36px;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.site-footer img { height: 40px; width: auto; opacity: 0.9; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .legal { width: 100%; font-size: 0.82rem; opacity: 0.8; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (max-width: 640px) {
  .logo img { height: 42px; }
  .nav .wide-only { display: none; }
  .nav a { padding: 6px 9px; font-size: 0.88rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
