/* =============================================================
   style.css — layout & komponenter (MOBILE FIRST)
   Farver kommer fra theme.css. Rediger normalt ikke denne fil
   for at skifte brand — brug theme.css og js/config.js.
   ============================================================= */

/* ---------- DESIGN TOKENS ---------- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem;
  --radius-xl: 1rem; --radius-full: 9999px;

  --content-wide: 1200px;
  --content-narrow: 760px;

  --font-display: "Clash Display", "General Sans", system-ui, sans-serif;
  --font-body: "General Sans", system-ui, "Segoe UI", sans-serif;

  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.36);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: none; text-size-adjust: none;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  scroll-behavior: smooth; scroll-padding-top: 84px;
}
body {
  min-height: 100dvh; line-height: 1.6;
  font-family: var(--font-body); font-size: var(--text-base);
  color: var(--color-text); background: var(--color-bg);
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
ul[role="list"] { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; color: inherit; font: inherit; }
h1, h2, h3, h4 { line-height: 1.12; text-wrap: balance; font-family: var(--font-display); font-weight: 700; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; border-radius: var(--radius-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- LAYOUT HELPERS ---------- */
.container { width: 100%; max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--space-4); }
.container--narrow { max-width: var(--content-narrow); }
.accent { color: var(--brand-primary); }

.section { padding-block: clamp(var(--space-12), 8vw, var(--space-24)); }
.section--slots   { background: var(--slots-bg); }
.section--live    { background: var(--live-bg); }
.section--content { background: var(--content-bg); }

.section__head { text-align: center; margin-bottom: var(--space-8); }
.section__title { font-size: var(--text-xl); color: var(--slots-title); }
.section--live .section__title { color: var(--live-title); }
.section__sub { color: var(--color-text-muted); font-size: var(--text-sm); margin-top: var(--space-2); }
.section__more { display: flex; justify-content: center; margin-top: var(--space-8); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-weight: 600; font-size: var(--text-sm); line-height: 1;
  padding: 0.7em 1.3em; border-radius: var(--radius-full);
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn--lg { padding: 0.95em 1.7em; font-size: var(--text-base); }
.btn--primary { background: var(--brand-primary); color: var(--brand-primary-text); box-shadow: 0 6px 18px color-mix(in oklab, var(--brand-primary), transparent 60%); }
.btn--primary:hover { background: var(--brand-primary-hover); }
.btn--ghost { background: transparent; color: var(--header-text); border: 1px solid var(--color-border); }
.btn--ghost:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.btn--outline { background: transparent; color: var(--brand-primary); border: 1.5px solid var(--brand-primary); }
.btn--outline:hover { background: var(--brand-primary); color: var(--brand-primary-text); }
.btn--text { color: var(--brand-primary); padding: 0.6em 0; font-weight: 600; }

/* =============================================================
   HEADER
   ============================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.site-header .container { position: relative; }
.site-header.is-scrolled { box-shadow: var(--shadow-md); border-bottom-color: var(--header-border); }
/* Mobil-first: headeren er en simpel række der ALDRIG løber over.
   space-between + min-width:0 + box-sizing sørger for at logo, knap og
   burger altid holder sig inden for skærmen. */
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-2); min-height: 64px; width: 100%;
  max-width: var(--content-wide); margin-inline: auto;
  box-sizing: border-box;
}
.header__inner * { box-sizing: border-box; }
.header__logo { flex: 0 1 auto; min-width: 0; color: var(--header-text); }
.header__logo img { height: 32px; width: auto; max-width: 100%; display: block; }
.header__nav { display: none; }
.nav-links { display: flex; gap: var(--space-6); }
.nav-links a { font-size: var(--text-sm); font-weight: 500; color: var(--header-text); opacity: 0.85; transition: opacity var(--transition), color var(--transition); }
.nav-links a:hover { opacity: 1; color: var(--brand-primary); }
.header__actions { display: flex; align-items: center; gap: var(--space-2); flex: 0 0 auto; }

/* Log ind skjules på små skærme for at spare plads.
   "Opret konto" gøres kompakt så headeren ikke løber over på mobil. */
.header__actions .btn--ghost { display: none; }
.header__actions .btn--primary { padding: 0.5em 0.75em; font-size: var(--text-xs); white-space: nowrap; }

/* Hamburger */
.menu-toggle { display: inline-flex; flex-direction: column; gap: 5px; width: 38px; height: 38px; flex: 0 0 auto; align-items: center; justify-content: center; }
.menu-toggle span { width: 22px; height: 2px; background: var(--header-text); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobil dropdown menu */
@media (max-width: 900px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 99;
    flex-direction: column; gap: 0; padding: 0 var(--space-4) var(--space-4);
    background: var(--color-bg); box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--header-border);
    max-height: 0; overflow: hidden; opacity: 0; visibility: hidden;
    transition: max-height var(--transition), opacity var(--transition), visibility var(--transition);
  }
  .nav-links.is-open { max-height: 320px; opacity: 1; visibility: visible; }
  /* På mobil optager nav-wrapperen INGEN plads i rækken (dropdown'en er
     absolut placeret), så logo/knap/burger aldrig skubbes ud af headeren. */
  .header__nav { display: contents; }
  .nav-links a { display: block; padding: var(--space-3) 0; border-bottom: 1px solid var(--header-border); }
}

/* =============================================================
   HERO
   ============================================================= */
.hero { position: relative; background: var(--hero-bg); color: var(--hero-text); overflow: hidden; }
.hero__inner { position: relative; display: grid; gap: var(--space-8); padding-block: clamp(var(--space-12), 10vw, var(--space-24)); }

/* -------------------------------------------------------------
   BANNERBILLEDE
   Skift billedet i én linje i theme.css:  --hero-banner-img
   Juster hvor mørkt det bliver med:        --hero-overlay
   (højere værdi = mørkere = mere læsbar tekst)
   ------------------------------------------------------------- */
.hero__visual {
  position: absolute; inset: 0; z-index: 0;
  background-image: var(--hero-banner-img);
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
/* Mørkt overlay oven på banneret, så tekst og knapper altid er synlige. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg,
      color-mix(in oklab, #000, transparent calc(100% - var(--hero-overlay))) 0%,
      color-mix(in oklab, #000, transparent calc(100% - var(--hero-overlay) - 12%)) 100%);
}
.hero__inner { z-index: 2; }
.hero__inner > .hero__content { position: relative; z-index: 2; }
.hero__badge {
  display: inline-block; font-size: var(--text-xs); font-weight: 600;
  padding: 0.5em 1em; border-radius: var(--radius-full);
  background: color-mix(in oklab, var(--brand-primary), transparent 82%);
  color: var(--brand-primary); margin-bottom: var(--space-4);
}
.hero__title { font-size: var(--text-2xl); color: var(--hero-text); max-width: 16ch; }
.hero__text { font-size: var(--text-base); color: color-mix(in oklab, var(--hero-text), transparent 15%); margin-top: var(--space-4); max-width: 48ch; }

/* Værdipunkter under overskriften (social proof / risikoreduktion) */
.hero__usps { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.hero__usps li {
  font-size: var(--text-sm); font-weight: 500;
  color: color-mix(in oklab, var(--hero-text), transparent 8%);
}

.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
/* Primær CTA i hero er den eneste "lyse" knap = klart fokus (isolationseffekt). */
.hero__cta .btn--ghost { color: #fff; border-color: color-mix(in oklab, #fff, transparent 55%); }
.hero__cta .btn--ghost:hover { border-color: var(--brand-primary); color: var(--brand-primary); background: color-mix(in oklab, #fff, transparent 90%); }

/* Diskret hastværks-/tryghedstekst lige under knappen */
.hero__nudge {
  font-size: var(--text-sm); font-weight: 500; margin-top: var(--space-4);
  color: color-mix(in oklab, var(--brand-primary), #fff 20%);
}
.hero__terms { font-size: var(--text-xs); color: color-mix(in oklab, var(--hero-text), transparent 40%); margin-top: var(--space-3); }

/* Opmærksomheds-puls på den primære CTA (subtil, ikke anmassende). */
.btn--cta { position: relative; animation: cta-pulse 2.6s ease-in-out infinite; }
.btn--cta:hover { animation: none; }
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 6px 18px color-mix(in oklab, var(--brand-primary), transparent 55%); }
  50% { box-shadow: 0 6px 26px color-mix(in oklab, var(--brand-primary), transparent 25%); }
}
@media (prefers-reduced-motion: reduce) { .btn--cta { animation: none; } }

/* =============================================================
   GAME GRID (slots + live)
   ============================================================= */
.game-grid { display: grid; gap: var(--space-4); }
.game-grid--slots { grid-template-columns: repeat(2, 1fr); }
.game-grid--live  { grid-template-columns: repeat(1, 1fr); }
.game-cell.is-hidden { display: none; }

.game-card {
  background: var(--slots-card-bg); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--color-border); height: 100%;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.section--live .game-card { background: var(--live-card-bg); }
.game-card__link { display: flex; flex-direction: column; height: 100%; position: relative; }
.game-card__media { position: relative; overflow: hidden; aspect-ratio: 3 / 4; }
.game-card--live .game-card__media { aspect-ratio: 16 / 10; }
.game-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.game-card:hover .game-card__media img { transform: scale(1.06); }
.game-card__play {
  position: absolute; inset: 0; margin: auto; width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-primary); color: var(--brand-primary-text);
  border-radius: var(--radius-full); opacity: 0; transform: scale(0.8);
  transition: opacity var(--transition), transform var(--transition);
}
.game-card:hover .game-card__play { opacity: 1; transform: scale(1); }
.game-card__body { padding: var(--space-3) var(--space-4) var(--space-2); }
.game-card__title { font-size: var(--text-sm); font-weight: 600; color: var(--slots-title); }
.section--live .game-card__title { color: var(--live-title); }
.game-card__provider { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px; }
.game-card__cta {
  display: block; text-align: center; font-size: var(--text-xs); font-weight: 600;
  color: var(--brand-primary); padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border); margin-top: auto;
}

/* =============================================================
   SEO TEKST — typografi til casino-tekstsektionen
   Styler overskrifter, afsnit samt punkt- og nummererede lister,
   så redaktionelt indhold ser godt ud uden ekstra klasser.
   ============================================================= */
.seo-text { color: var(--content-text); font-size: var(--text-base); line-height: 1.75; }
.seo-text > *:first-child { margin-top: 0; }

/* Overskrifter */
.seo-text h2 {
  font-family: var(--font-display); font-weight: 700; line-height: 1.15;
  font-size: var(--text-xl); color: var(--content-heading);
  margin: 0 0 var(--space-5);
}
.seo-text h3 {
  font-family: var(--font-display); font-weight: 600; line-height: 1.2;
  font-size: var(--text-lg); color: var(--content-heading);
  margin: var(--space-8) 0 var(--space-3);
}
.seo-text h4 {
  font-weight: 700; line-height: 1.25;
  font-size: var(--text-base); color: var(--content-heading);
  margin: var(--space-6) 0 var(--space-2); text-transform: none;
}

/* Afsnit + inline */
.seo-text p { margin: 0 0 var(--space-4); max-width: 72ch; }
.seo-text a { color: var(--brand-secondary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.seo-text a:hover { color: var(--brand-primary-hover); }
.seo-text strong { color: var(--content-heading); font-weight: 700; }

/* Lister (punkt + nummereret) */
.seo-text ul, .seo-text ol {
  margin: 0 0 var(--space-5); padding-left: 0;
  max-width: 72ch; list-style: none;
  counter-reset: seo-counter;
}
.seo-text li {
  position: relative; padding-left: 2em; margin-bottom: var(--space-3);
}
.seo-text li::marker { content: none; }

/* Punktliste: brandet checkmark-prik */
.seo-text ul > li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 0.6em; height: 0.6em; border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand-primary), transparent 78%);
}

/* Nummereret liste: brandet talcirkel */
.seo-text ol > li { counter-increment: seo-counter; padding-left: 2.4em; }
.seo-text ol > li::before {
  content: counter(seo-counter); position: absolute; left: 0; top: 0.15em;
  width: 1.6em; height: 1.6em; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-primary); color: var(--brand-primary-text);
  font-size: 0.8em; font-weight: 700; line-height: 1;
}

/* Indlejrede lister */
.seo-text li > ul, .seo-text li > ol { margin: var(--space-3) 0 0; }

/* Tabeller — fx bonus-oversigt, betalingsmetoder, spil-info.
   Wrapper (.seo-table) gør tabellen scrollbar på mobil. */
.seo-table { width: 100%; overflow-x: auto; margin: 0 0 var(--space-6); -webkit-overflow-scrolling: touch; }
.seo-text table {
  width: 100%; border-collapse: collapse; font-size: var(--text-sm);
  background: var(--slots-card-bg); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-md); min-width: 480px;
}
.seo-text thead th {
  background: var(--brand-primary); color: var(--brand-primary-text);
  font-family: var(--font-display); font-weight: 600; text-align: left;
  padding: var(--space-3) var(--space-4); white-space: nowrap;
}
.seo-text tbody th { text-align: left; font-weight: 700; color: var(--content-heading); }
.seo-text td, .seo-text tbody th { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--color-border); }
.seo-text tbody tr:nth-child(even) { background: color-mix(in oklab, var(--brand-primary), transparent 94%); }
.seo-text tbody tr:hover { background: color-mix(in oklab, var(--brand-primary), transparent 88%); }
.seo-text caption { caption-side: bottom; font-size: var(--text-xs); color: var(--content-text); padding-top: var(--space-2); text-align: left; }

/* Skjult VISUELT men i DOM (Googlebot læser det). Ingen display:none. */
.seo-text__more {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 400ms ease, opacity 300ms ease;
}
.seo-text__more.is-open { max-height: 4000px; opacity: 1; }
#seoToggle { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
#seoToggle .seo-toggle__icon { transition: transform var(--transition); }
#seoToggle.is-open .seo-toggle__icon { transform: rotate(180deg); }

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding-block: var(--space-12) var(--space-8); }
.footer__heading, .footer__links h4 { color: var(--footer-heading); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-4); }

.footer__payments { text-align: center; margin-bottom: var(--space-12); }
.payments-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); max-width: 720px; margin-inline: auto; }
.payment-item { background: var(--payment-bg); border-radius: var(--radius-md); padding: var(--space-2); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); }
.payment-item img { width: 100%; max-width: 108px; height: auto; }

.footer__cols { display: grid; gap: var(--space-8); padding-block: var(--space-8); border-top: 1px solid var(--color-border); }
.footer__brand img { height: 40px; width: auto; margin-bottom: var(--space-3); }
.footer__brand p { font-size: var(--text-sm); max-width: 40ch; }
.footer__age {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 2px solid var(--brand-primary);
  color: var(--brand-primary); border-radius: var(--radius-full);
  font-weight: 700; font-size: var(--text-sm); margin-top: var(--space-4);
}
.footer__links ul { display: flex; flex-direction: column; gap: var(--space-2); }
.footer__links a { font-size: var(--text-sm); color: var(--footer-link); transition: color var(--transition); }
.footer__links a:hover { color: var(--footer-link-hover); }

.footer__bottom {
  display: flex; flex-direction: column; gap: var(--space-4); align-items: center; text-align: center;
  padding-top: var(--space-8); border-top: 1px solid var(--color-border); margin-top: var(--space-4);
}
.footer__rg-logos { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }
.rg-badge { font-size: var(--text-xs); font-weight: 600; padding: 0.4em 0.8em; border: 1px solid var(--color-border); border-radius: var(--radius-full); color: var(--footer-text); }
.footer__copy { font-size: var(--text-xs); color: var(--color-text-muted); }

/* =============================================================
   RESPONSIVE — TABLET & DESKTOP
   ============================================================= */
@media (min-width: 600px) {
  .game-grid--slots { grid-template-columns: repeat(3, 1fr); }
  .game-grid--live  { grid-template-columns: repeat(2, 1fr); }
  .payments-grid { grid-template-columns: repeat(4, 1fr); }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .header__nav { display: block; margin-inline: auto; }
  .menu-toggle { display: none; }
  .header__actions .btn--ghost { display: inline-flex; }
  .header__actions .btn--primary { padding: 0.7em 1.3em; font-size: var(--text-sm); }
  .header__logo img { height: 40px; }
  .nav-links { position: static; max-height: none; opacity: 1; visibility: visible; flex-direction: row; padding: 0; background: none; border: none; }
  .nav-links a { border: none; padding: 0; }

  .hero__inner { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
  /* Desktop: mørkere i venstre side (hvor teksten er), lysere mod højre
     så banneret stadig ses. Styres af --hero-overlay i theme.css. */
  .hero::after {
    background: linear-gradient(90deg,
      color-mix(in oklab, #000, transparent calc(100% - var(--hero-overlay) - 15%)) 0%,
      color-mix(in oklab, #000, transparent calc(100% - var(--hero-overlay))) 45%,
      color-mix(in oklab, #000, transparent calc(100% - var(--hero-overlay) + 25%)) 100%);
  }

  .game-grid--slots { grid-template-columns: repeat(5, 1fr); }
  .game-grid--live  { grid-template-columns: repeat(5, 1fr); }
  .payments-grid { grid-template-columns: repeat(5, 1fr); max-width: 900px; }
  .footer__cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 1100px) {
  .payments-grid { grid-template-columns: repeat(10, 1fr); max-width: none; }
}
