/* VICCOM – Frozen mist
   Palett: #FCF8D8 frost, #D9DADF is, #ADACA7 dimma, #7C7D75 mossa, #DD700B glöd
   Typsnitt: Unbounded (rubriker), Familjen Grotesk (brödtext). Båda självhostade, OFL. */

@font-face {
  font-family: "Unbounded";
  src: url("unbounded.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Familjen Grotesk";
  src: url("familjen-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Familjen Grotesk";
  src: url("familjen-grotesk-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --frost: #FCF8D8;
  --ice: #D9DADF;
  --fog: #ADACA7;
  --moss: #7C7D75;
  --ember: #DD700B;
  --ink: #2A2B27;

  --bg: var(--frost);
  --surface: #F3EFD0;
  --text: var(--ink);
  --muted: #5E5F58;
  --line: #CFCDB8;
  --accent: var(--ember);
  --on-accent: var(--ink);

  --display: "Unbounded", system-ui, sans-serif;
  --body: "Familjen Grotesk", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --step-4: clamp(3.25rem, 1rem + 11vw, 10.5rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #22231F;
    --surface: #2C2D28;
    --text: var(--frost);
    --muted: var(--fog);
    --line: #44453F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #22231F;
  --surface: #2C2D28;
  --text: var(--frost);
  --muted: var(--fog);
  --line: #44453F;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
  font-feature-settings: "kern", "liga";
}

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

a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--ink); color: var(--frost); padding: 10px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 20px; padding-bottom: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: 0.02em; }
.site-nav ul { display: flex; gap: clamp(14px, 3vw, 32px); list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-weight: 500; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
@media (max-width: 560px) {
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: space-between; }
}

/* Hero */
.hero { padding: clamp(24px, 6vw, 72px) 0 clamp(48px, 8vw, 96px); }
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-4);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 0 -0.04em;
}
.hero .lede {
  font-size: var(--step-1);
  max-width: 30ch;
  margin: clamp(16px, 2vw, 28px) 0 clamp(28px, 4vw, 48px);
  line-height: 1.35;
}

/* Frost window – the one memorable thing */
.window {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--ember);
  aspect-ratio: 16 / 6;
  min-height: 220px;
  isolation: isolate;
  touch-action: pan-y;
}
.window .reveal {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(20px, 4vw, 44px);
  color: var(--ink);
}
.window .reveal strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-3);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.window .reveal span { font-size: var(--step-0); margin-top: 10px; max-width: 46ch; }
.window canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  cursor: grab;
}
.window-hint { color: var(--muted); font-size: var(--step--1); margin: 12px 0 0; }
@media (max-width: 560px) { .window { aspect-ratio: 4 / 3; } }
.linklike {
  background: none; border: 0; padding: 0; font: inherit; color: var(--text); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em;
}
.linklike:hover { color: var(--accent); }

/* Sections */
.section { padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.section h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-2);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 24px;
}
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 64px); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 8px; } }
.prose { max-width: 62ch; }
.prose p { margin: 0 0 1em; }

/* Games */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.game {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 220px;
}
.game .status {
  align-self: flex-start;
  font-size: var(--step--1); font-weight: 600;
  background: var(--ice); color: var(--ink);
  padding: 4px 10px; border-radius: 999px;
}
.game h3 { font-family: var(--display); font-weight: 700; font-size: var(--step-1); margin: 6px 0 0; }
.game p { margin: 0; color: var(--muted); }
.game.slot { background: transparent; border: 2px dashed var(--line); justify-content: center; }

/* Contact */
.contact { list-style: none; margin: 0; padding: 0; }
.contact li {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.contact li:first-child { padding-top: 0; }
.contact a { font-weight: 600; font-size: var(--step-1); word-break: break-word; }
.contact span { color: var(--muted); }
@media (max-width: 560px) { .contact li { grid-template-columns: 1fr; gap: 2px; } }

/* Footer */
.site-footer { background: var(--ink); color: var(--frost); margin-top: clamp(48px, 7vw, 96px); }
:root[data-theme="dark"] .site-footer { background: #181915; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #181915; } }
.site-footer .wrap { padding-top: 48px; padding-bottom: 40px; display: grid; gap: 32px; grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .foot-brand { grid-column: 1 / -1; } }
.site-footer img { width: min(240px, 60vw); color: var(--frost); }
.site-footer h2 { font-family: var(--body); font-size: var(--step-0); font-weight: 700; margin: 0 0 10px; color: var(--fog); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ember); }
.site-footer small { display: block; margin-top: 16px; color: var(--fog); }
.foot-wordmark { color: var(--frost); width: min(260px, 70vw); height: auto; }

/* Long-form pages (policy, press) */
.page-head { padding: clamp(24px, 6vw, 64px) 0 clamp(24px, 4vw, 48px); }
.page-head h1 {
  font-family: var(--display); font-weight: 800;
  font-size: var(--step-3); letter-spacing: -0.025em; line-height: 1.05; margin: 0 0 12px;
}
.page-head p { color: var(--muted); margin: 0; max-width: 60ch; }

.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .doc { grid-template-columns: 1fr; } .toc { position: static !important; } }
.toc { position: sticky; top: 24px; font-size: var(--step--1); }
.toc h2 { font-size: var(--step--1); font-weight: 700; margin: 0 0 8px; color: var(--muted); font-family: var(--body); }
.toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.toc a { text-decoration: none; }
.doc-body { max-width: 66ch; }
.doc-body h2 {
  font-family: var(--display); font-weight: 700; font-size: var(--step-1);
  margin: 2.2em 0 0.6em; scroll-margin-top: 24px; line-height: 1.2;
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { font-size: var(--step-0); margin: 1.5em 0 0.4em; }
.doc-body ul { padding-left: 1.2em; }
.doc-body li { margin-bottom: 0.35em; }
.note {
  background: var(--surface); border-left: 4px solid var(--accent);
  padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 0 0 2em;
}
.note p { margin: 0; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 10px; } }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 1em 0; padding: 0; list-style: none; }
.swatches li { border-radius: 12px; overflow: hidden; background: var(--surface); }
.swatches i { display: block; height: 72px; }
.swatches span { display: block; padding: 8px 10px; font-size: var(--step--1); }
.swatches b { display: block; font-weight: 600; }

.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; list-style: none; padding: 0; margin: 1em 0; }
.assets li { background: var(--surface); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.assets .preview { border-radius: 10px; height: 120px; display: grid; place-items: center; padding: 20px; }
.assets .preview img { max-height: 80px; width: auto; }
.assets .on-frost { background: var(--frost); border: 1px solid var(--line); }
.assets .on-ink { background: var(--ink); }
.assets .on-ember { background: var(--ember); }
.assets a { font-weight: 600; }

blockquote.boiler { margin: 0 0 1.2em; padding: 0; font-size: var(--step-0); }
blockquote.boiler p { margin: 0 0 0.6em; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--on-accent);
  padding: 12px 18px; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 0; font: inherit; font-weight: 700; cursor: pointer;
}
.btn:hover { color: var(--ink); filter: brightness(1.06); }

.lost { min-height: 60vh; display: grid; align-content: center; }
.lost h1 { font-family: var(--display); font-weight: 800; font-size: var(--step-4); line-height: 0.9; margin: 0 0 16px; letter-spacing: -0.04em; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

.brand picture { display: block; }
.swatches i { box-shadow: inset 0 0 0 1px var(--line); }
