/* dobbeldorp.nl before the launch: "Er brandt nog licht bij de molen".
   Erfstuk tokens from the games repo style guide (docs/stijl/stijlgids.md). */
@font-face {
  font-family: "Bree Serif";
  src: url("/fonts/BreeSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --wood: #D2AB7A;
  --wood-dark: #76533A;
  --parchment: #F6EFE1;
  --gold: #E8B04E;
  --ink: #2E2622;
  --night: #0B1020;
  --night-line: #1F2640;
  --night-edge: #2A2F45;
  --text-soft: #D9D2C3;
  --text-dim: #ABA392;
  --font-title: "Bree Serif", Georgia, serif;
  --font-text: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 40px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--night); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--parchment);
  font: 18px/1.55 var(--font-text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1 { font-family: var(--font-title); font-weight: 400; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--gold); color: var(--ink); padding: 12px 16px; border-radius: 6px;
  font-family: var(--font-title); text-decoration: none;
}
.skip:focus { top: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 400 19px/1 var(--font-title); text-decoration: none; color: var(--ink);
  min-height: 52px; padding: 0 24px; border: 2px solid var(--ink); border-radius: 6px;
  background: var(--parchment); cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(46, 38, 34, 0.18), 0 3px 6px rgba(46, 38, 34, 0.18);
  transition: transform 160ms cubic-bezier(.2, .9, .3, 1.2), box-shadow 160ms ease-out;
}
.btn:hover { transform: translateY(-2px); box-shadow: inset 0 -3px 0 rgba(46, 38, 34, 0.18), 0 6px 10px rgba(46, 38, 34, 0.22); }
.btn:active { transform: translateY(1px); }
.btn.gold { background: var(--gold); min-height: 60px; font-size: 21px; padding: 0 30px; }
.btn.small { min-height: 44px; font-size: 17px; padding: 0 16px; }
.btn svg { width: 22px; height: 22px; flex: none; }

.logo { display: inline-flex; align-items: center; gap: 10px; font: 400 22px/1 var(--font-title); text-decoration: none; white-space: nowrap; color: var(--parchment); }
.logo svg { width: 32px; height: 32px; flex: none; }

/* Header */
.pre-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px var(--gutter) 0; max-width: 1440px; margin: 0 auto; }
.pre-top small { font-size: 15px; color: #B9B3A6; }

/* Hero: copy on the left, the night scene running to the right edge */
.pre-hero {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); align-items: center; gap: 24px;
  padding: 30px 0 30px max(var(--gutter), calc((100vw - 1360px) / 2));
}
.pre-copy { display: grid; gap: 22px; justify-items: start; max-width: 470px; position: relative; z-index: 1; }
.pre-hat { width: 92px; height: 92px; color: #05070F; filter: drop-shadow(0 0 18px rgba(232, 176, 78, 0.5)); }
.pre-hat .bell { transform-origin: 84px 14px; }
.pre-copy:hover .pre-hat .bell { animation: ring 900ms ease-out; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(16deg); } 45% { transform: rotate(-12deg); } 70% { transform: rotate(6deg); } }
h1 { font-size: 58px; line-height: 1.05; color: var(--parchment); }
.pre-copy p { font-size: 21px; color: var(--text-soft); max-width: 34ch; }
.pre-copy .hint { font-size: 16px; color: var(--text-dim); margin-top: -10px; }

.pre-scene { position: relative; overflow: hidden; border-radius: 6px 0 0 6px; }
.pre-scene img { width: 100%; }
/* The lit work window glows softly; off for reduced motion (below). */
.pre-scene .glow {
  position: absolute; left: 55%; top: 71%; width: 26%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255, 196, 96, 0.55), rgba(232, 176, 78, 0.12) 45%, rgba(232, 176, 78, 0) 70%);
  animation: lamp 4.2s ease-in-out infinite;
}
@keyframes lamp { 0%, 100% { opacity: .75; } 30% { opacity: 1; } 34% { opacity: .62; } 38% { opacity: .95; } 70% { opacity: .82; } }

/* Sneak peek and the small still */
.pre-peek {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start;
  padding: 40px var(--gutter) 56px; max-width: 1440px; margin: 0 auto;
}
/* While the sneak peek is hidden, the still stands alone at a modest size. */
.pre-peek:has(> .peek-fig[hidden]) { grid-template-columns: minmax(0, 520px); justify-content: start; }
.peek { position: relative; border-radius: 6px; overflow: hidden; background: #000; border: 2px solid var(--night-edge); aspect-ratio: 16 / 9; }
.peek img { width: 100%; opacity: .92; }
.peek video { display: block; width: 100%; height: 100%; background: #000; }
.peek .btn { position: absolute; left: 24px; bottom: 24px; }
.peek-cap, .still-cap { font-size: 16px; color: var(--text-dim); margin-top: 10px; }
.still { border-radius: 6px; overflow: hidden; border: 2px solid var(--night-edge); }

.pre-foot {
  border-top: 1px solid var(--night-line); padding: 22px var(--gutter) 30px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-size: 15px; color: var(--text-dim); max-width: 1440px; margin: 0 auto;
}
.pre-foot a { color: var(--text-soft); text-underline-offset: 3px; }

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .pre-top { padding-top: 18px; }
  .pre-top small { display: none; }
  .pre-hero { grid-template-columns: 1fr; padding: 18px 0 8px; gap: 0; }
  .pre-scene { order: -1; border-radius: 0; margin-bottom: -40px; }
  .pre-scene::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, var(--night)); }
  .pre-copy { padding: 0 var(--gutter); gap: 18px; }
  .pre-hat { width: 64px; height: 64px; }
  h1 { font-size: 38px; }
  .pre-copy p { font-size: 19px; }
  .pre-peek, .pre-peek:has(> .peek-fig[hidden]) { grid-template-columns: 1fr; padding: 32px var(--gutter) 40px; gap: 22px; }
  .peek .btn { left: 14px; bottom: 14px; }
  .pre-foot { padding: 20px var(--gutter); flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .pre-scene .glow { animation: none; opacity: .85; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
