/* iBønn Kids – nettsiden (forside og personvern). Farger fra iBønn-pastellene i SPEC. */

@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Scheherazade New";
  src: url("fonts/ScheherazadeNew-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --mint: #E1F4EA; --mint-ink: #1E7A55;
  --gold: #F6EBD3; --gold-ink: #B07A1A;
  --blue: #E3EDF8; --blue-ink: #2C5C9A;
  --rose: #F7E4E8; --rose-ink: #B2455F;
  --lilac: #ECE6F7; --lilac-ink: #6A4FA3;
  --navy: #0E3A44;
  --bg: #FBFAF6;
  --card: #FFFFFF;
  --ink: #0E3A44;
  --body: #3D5A62;
  --muted: #6B8088;
  --line: #E6E9E4;
  --shadow: 0 10px 30px rgba(14, 58, 68, .08);
  --radius: 28px;
  --sans: "Fredoka", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --arabic: "Scheherazade New", "Geeza Pro", "Noto Naskh Arabic", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --mint: #163B2D; --mint-ink: #8ED9B4;
    --gold: #3A3020; --gold-ink: #E8C27A;
    --blue: #1A2C42; --blue-ink: #9CC0EC;
    --rose: #3B2129; --rose-ink: #F0A3B5;
    --lilac: #2A2340; --lilac-ink: #C6B5F0;
    --bg: #0B1E24;
    --card: #12292F;
    --ink: #EEF5F3;
    --body: #C2D3D0;
    --muted: #8FA6A6;
    --line: #1F3A40;
    --shadow: 0 10px 30px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--mint-ink); }
img { max-width: 100%; display: block; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; font-weight: 600; }
p { margin: 0; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- Topp ---------- */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand img { height: 34px; width: auto; }
.top nav { display: flex; gap: 20px; }
.top nav a { color: var(--body); text-decoration: none; font-weight: 500; font-size: 16px; }
.top nav a:hover { color: var(--mint-ink); }
@media (max-width: 720px) { .top nav { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; background: radial-gradient(1200px 500px at 85% -10%, var(--gold), transparent 60%), radial-gradient(900px 500px at -10% 110%, var(--blue), transparent 60%), var(--mint); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--card); color: var(--mint-ink); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 15px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(40px, 6vw, 68px); margin: 20px 0 16px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--mint-ink); }
.hero .lead { font-size: clamp(18px, 2.2vw, 22px); max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.badge { display: inline-flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; border-radius: 16px; padding: 10px 18px; text-decoration: none; min-height: 56px; }
.badge small { display: block; font-size: 12px; opacity: .8; line-height: 1.1; }
.badge strong { display: block; font-size: 18px; font-weight: 600; line-height: 1.2; }
.badge svg { flex: none; }
.soon { margin-top: 12px; font-size: 15px; color: var(--muted); }

/* Bokstavene står i ro (arabisk tekst animeres aldri). */
.letters { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.letter { aspect-ratio: 1; display: grid; place-items: center; background: var(--card); border-radius: 30px; box-shadow: var(--shadow); }
.letter span { font-family: var(--arabic); font-size: clamp(56px, 8vw, 92px); line-height: 1; color: var(--mint-ink); direction: rtl; }
.letter:nth-child(2) span { color: var(--gold-ink); }
.letter:nth-child(3) span { color: var(--blue-ink); }
.letter:nth-child(4) span { color: var(--rose-ink); }
.letter:nth-child(5) span { color: var(--lilac-ink); }
.letter.word { grid-column: span 3; aspect-ratio: auto; padding: 18px; gap: 4px; }
.letter.word span { font-size: clamp(40px, 5vw, 56px); color: var(--ink); }
.letter.word p { font-size: 15px; color: var(--muted); }
.stars-deco { position: absolute; inset: -24px; pointer-events: none; }

@media (max-width: 860px) {
  .hero { padding: 48px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .letters { max-width: 420px; }
}

/* ---------- Seksjoner ---------- */
section { padding: 88px 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 12px; }
.kicker { color: var(--mint-ink); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } section { padding: 64px 0; } }

.card { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: grid; gap: 10px; align-content: start; }
.card h3 { font-size: 23px; }
.card p { font-size: 17px; }
.icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 32px; margin-bottom: 6px; }
.icon.ar { font-family: var(--arabic); font-size: 40px; line-height: 1; padding-bottom: 6px; }
.t-mint { background: var(--mint); color: var(--mint-ink); }
.t-gold { background: var(--gold); color: var(--gold-ink); }
.t-blue { background: var(--blue); color: var(--blue-ink); }
.t-rose { background: var(--rose); color: var(--rose-ink); }
.t-lilac { background: var(--lilac); color: var(--lilac-ink); }
.honorific { font-family: var(--arabic); font-size: 1.15em; line-height: 1; }

/* Spillkort i «Hva barna lærer»: over hele bredden */
.card-game { grid-column: 1 / -1; grid-template-columns: auto 1fr; gap: 20px; align-items: center; background: linear-gradient(120deg, var(--card) 40%, var(--lilac)); }
.card-game .icon { margin: 0; }
.card-game h3 { margin-bottom: 6px; }
@media (max-width: 600px) { .card-game { grid-template-columns: 1fr; } }

/* Spillet */
.game { background: radial-gradient(900px 420px at 0% 0%, var(--rose), transparent 60%), radial-gradient(800px 420px at 100% 100%, var(--lilac), transparent 60%), var(--gold); }
.game h2 { font-size: clamp(30px, 4vw, 44px); }
.game h2 em { font-style: normal; color: var(--lilac-ink); }
.game-lead { margin-top: 14px; font-size: clamp(17px, 2vw, 20px); }
.game .kicker { color: var(--lilac-ink); }
.game-art { position: relative; border-radius: 36px; box-shadow: var(--shadow); background: #FBEFE0; margin-bottom: 64px; }
.game-heroes { position: absolute; left: 50%; bottom: -58px; transform: translateX(-50%); display: flex; gap: 18px; }
.game-heroes figure { margin: 0; text-align: center; }
.game-heroes img { width: 120px; height: 120px; border-radius: 50%; display: block; box-shadow: 0 10px 24px rgba(80, 50, 20, .22); }
.game-heroes figcaption { margin-top: -14px; position: relative; display: inline-block; background: #fff; color: var(--lilac-ink);
  font-weight: 700; padding: 3px 14px; border-radius: 999px; box-shadow: 0 4px 10px rgba(80, 50, 20, .15); }
@media (max-width: 520px) { .game-heroes img { width: 92px; height: 92px; } .game-heroes { bottom: -48px; } }
.game-art svg { display: block; width: 100%; height: auto; border-radius: 36px; }
.game-list li span { background-clip: padding-box; }
.chips { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 15px; font-weight: 500; box-shadow: var(--shadow); }
.chips li::before { content: "✓ "; color: var(--mint-ink); font-weight: 700; }
@media (max-width: 860px) { .game-art { max-width: 520px; } }
/* Bare Koran-gløden og stjernene beveger seg (ingen tekst), og ikke med «redusert bevegelse». */
.ga-glow { animation: ga-glow 4s ease-in-out infinite; transform-origin: 240px 328px; }
.ga-twinkle { animation: ga-twinkle 3s ease-in-out infinite; }
.ga-twinkle.t2 { animation-delay: 1s; }
.ga-twinkle.t3 { animation-delay: 2s; }
@keyframes ga-glow { 50% { opacity: .7; transform: scale(.94); } }
@keyframes ga-twinkle { 50% { opacity: .35; } }
@media (prefers-color-scheme: dark) { .game-art svg { filter: brightness(.92) saturate(.95); } }

/* Trygghet */
.safe { background: var(--navy); color: #D6E6E3; }
.safe h2, .safe h3 { color: #fff; }
.safe .kicker { color: #8ED9B4; }
.safe .card { background: rgba(255, 255, 255, .06); box-shadow: none; border: 1px solid rgba(255, 255, 255, .08); }
.safe .card p { color: #C2D3D0; }
.check { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(142, 217, 180, .15); color: #8ED9B4; font-size: 20px; font-weight: 700; }

/* Foreldre */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.list li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.list li span { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; }
.panel { background: linear-gradient(160deg, var(--gold), var(--rose)); border-radius: 36px; padding: 32px; display: grid; gap: 14px; }
.panel .row { background: var(--card); border-radius: 22px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); }
.panel .row .av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; flex: none; }
.panel .row strong { color: var(--ink); font-weight: 600; display: block; }
.panel .row small { color: var(--muted); font-size: 14px; }
.panel .row .st { margin-left: auto; color: var(--gold-ink); font-weight: 600; white-space: nowrap; }

/* Avslutning */
.final { text-align: center; }
.final .box { background: var(--mint); border-radius: 40px; padding: 56px 24px; display: grid; justify-items: center; gap: 16px; }
.final h2 { font-size: clamp(30px, 4vw, 44px); }
.final .cta { justify-content: center; }

/* ---------- Bunn ---------- */
footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { color: var(--body); }

/* ---------- Tekstsider (personvern) ---------- */
.doc { padding: 56px 0 88px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin: 8px 0 8px; }
.doc .updated { color: var(--muted); font-size: 15px; margin-bottom: 32px; }
.doc h2 { font-size: 26px; margin: 40px 0 12px; }
.doc p, .doc li { font-size: 17px; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; margin: 12px 0 0; display: grid; gap: 8px; }
.doc .summary { background: var(--mint); border-radius: 24px; padding: 22px 24px; margin-bottom: 8px; }
.doc .summary ul { margin-top: 8px; }
.doc table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 16px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--ink); font-weight: 600; }
@media (max-width: 600px) { .doc table, .doc thead, .doc tbody, .doc tr, .doc th, .doc td { display: block; } .doc thead { display: none; } .doc td { border: 0; padding: 4px 0; } .doc tr { border-bottom: 1px solid var(--line); padding: 10px 0; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 20; background: var(--card); padding: 8px 12px; border-radius: 10px; }
:focus-visible { outline: 3px solid var(--mint-ink); outline-offset: 3px; border-radius: 8px; }
