/* Brønd — a night sky over Yggdrasil, gold and well-water. No external requests. */

@font-face {
  font-family: "Cinzel";
  src: url("fonts/Cinzel.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Runic";
  src: url("fonts/NotoSansRunic.ttf") format("truetype");
  font-display: swap;
}

:root {
  --night: #090d1c;
  --night-2: #0f1830;
  --panel: rgba(20, 30, 54, 0.72);
  --line: rgba(232, 200, 122, 0.22);
  --gold: #e8c87a;
  --gold-deep: #b8913f;
  --water: #6fd3d0;
  --text: #e8e1cf;
  --muted: #a9a490;
  --heading: "Cinzel", "Trajan Pro", "Palatino Linotype", Palatino, Georgia, serif;
  --body: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  background-image:
    radial-gradient(ellipse 80% 50% at 70% 0%, rgba(111, 211, 208, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 30%, rgba(90, 80, 160, 0.10), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 60%, var(--night) 100%);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* One language at a time. */
html[data-lang="da"] [lang="en"],
html[data-lang="en"] [lang="da"] { display: none !important; }

a { color: var(--water); text-decoration-color: rgba(111, 211, 208, 0.4); text-underline-offset: 3px; }
a:hover { color: #9ce6e3; }
h1, h2, h3 { font-family: var(--heading); font-weight: 700; color: var(--gold); letter-spacing: 0.02em; line-height: 1.2; }
h2 { font-size: clamp(28px, 4vw, 40px); text-align: center; margin: 0 0 32px; }
h3 { font-size: 20px; margin: 8px 0 8px; }
.runes { font-family: "Noto Sans Runic", serif; letter-spacing: 0.25em; color: var(--water); }
.small { font-size: 15px; color: var(--muted); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(9, 13, 28, 0.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 8px; }
.brand-name { font-family: var(--heading); font-weight: 700; font-size: 22px; color: var(--gold); }
.brand .runes { font-size: 13px; opacity: 0.8; }
nav { display: flex; align-items: center; gap: clamp(10px, 2.5vw, 26px); }
nav a { color: var(--text); text-decoration: none; font-size: 16px; }
nav a:hover { color: var(--gold); }
.lang {
  font: 600 13px/1 var(--heading); letter-spacing: 0.08em;
  color: var(--gold); background: transparent; border: 1px solid var(--line);
  border-radius: 6px; padding: 7px 10px; cursor: pointer;
}
.lang:hover { border-color: var(--gold); }

main > section { padding: clamp(56px, 8vw, 96px) clamp(16px, 5vw, 48px); max-width: 1180px; margin: 0 auto; }

/* Hero */
.hero {
  position: relative;
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 24px;
  min-height: min(88vh, 760px);
}
.hero > * { min-width: 0; }
.hero h1 { overflow-wrap: break-word; }
.sky {
  position: absolute; inset: -40px 0 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 70%, #cfe 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 15%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 75% 40%, #eef 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 80%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 42% 45%, #ffe7a3 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 88%, #cfe 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 10%, #fff 50%, transparent 51%);
  background-size: 340px 300px;
  opacity: 0.55;
}
.kicker { font-size: 15px; margin: 0 0 8px; opacity: 0.85; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); margin: 0 0 20px; text-shadow: 0 0 40px rgba(232, 200, 122, 0.25); }
.lead { font-size: clamp(18px, 2vw, 21px); max-width: 34em; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.tree { margin: 0; }
.tree svg { width: 100%; height: auto; max-height: 560px; filter: drop-shadow(0 0 24px rgba(111, 211, 208, 0.15)); }
.tree .leaves circle { animation: twinkle 4s ease-in-out infinite; }
.tree .leaves circle:nth-child(3n) { animation-delay: 1.3s; }
.tree .leaves circle:nth-child(3n+1) { animation-delay: 2.6s; }
.tree .ripple { transform-origin: 200px 398px; animation: ripple 5s ease-out infinite; }
@keyframes twinkle { 50% { opacity: 0.35; } }
@keyframes ripple { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tree * { animation: none !important; } html { scroll-behavior: auto; } }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px/1 var(--heading); letter-spacing: 0.06em;
  padding: 14px 22px; border-radius: 8px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--gold); transition: background .15s, color .15s, box-shadow .15s;
}
.button.gold { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); color: #1a1408; box-shadow: 0 0 24px rgba(232, 200, 122, 0.18); }
.button.gold:hover { color: #000; box-shadow: 0 0 32px rgba(232, 200, 122, 0.35); }
.button.ghost { background: transparent; color: var(--gold); }
.button.ghost:hover { background: rgba(232, 200, 122, 0.1); color: var(--gold); }
.button.disabled { border-color: var(--line); color: var(--muted); cursor: default; }

/* The saga */
.saga { text-align: center; }
.saga p {
  max-width: 46em; margin: 0 auto; font-size: clamp(19px, 2.1vw, 23px); font-style: italic; color: #d9d1bb;
  padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.saga em { font-style: normal; color: var(--gold); }

/* Runestones */
.stones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stone {
  position: relative; padding: 28px 24px 22px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 46% 46% 14px 14px / 18% 18% 14px 14px;
}
.stone .glyph {
  display: block; font-family: "Noto Sans Runic", serif; font-size: 34px; line-height: 1;
  color: var(--water); text-shadow: 0 0 18px rgba(111, 211, 208, 0.5);
}
.stone p { margin: 0; color: #d6cfbd; font-size: 17px; }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
.shots figure:first-child { grid-column: 1 / -1; max-width: 980px; justify-self: center; }
.shots figure { margin: 0; }
.shots img {
  width: 100%; height: auto; display: block; border-radius: 10px;
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.shots figcaption { text-align: center; color: var(--muted); font-size: 16px; margin-top: 10px; }

/* Privacy */
.privacy ul { max-width: 40em; margin: 0 auto; padding: 0; list-style: none; }
.privacy li { position: relative; padding: 10px 0 10px 40px; border-bottom: 1px solid rgba(232, 200, 122, 0.1); }
.privacy li::before { content: "ᛉ"; font-family: "Noto Sans Runic", serif; position: absolute; left: 6px; top: 8px; color: var(--water); font-size: 22px; }

/* Downloads */
.version { text-align: center; color: var(--muted); margin: -18px 0 28px; }
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.platform {
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  padding: 26px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.platform h3 { font-size: 24px; margin: 0; }
.platform .req { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.platform .size { margin: -4px 0 4px; text-align: center; color: var(--muted); font-size: 14px; min-height: 1em; }
.platform.soon { opacity: 0.75; }
.platform details { font-size: 15px; color: #d6cfbd; }
.platform summary { cursor: pointer; color: var(--water); }
.platform ol { padding-left: 20px; }
.platform pre {
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; overflow-x: auto; font-size: 13px; color: var(--text);
}
.checksums { text-align: center; font-size: 14px; margin-top: 18px; }

/* Credits and contact */
.credits p, .contact p { max-width: 46em; margin: 0 auto 16px; text-align: center; }
.disclaimer { color: var(--muted); font-size: 15px; }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

footer { text-align: center; padding: 40px 16px 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .runes { font-size: 14px; opacity: 0.7; }

/* Narrow screens */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .tree { max-width: 380px; margin: 0 auto; order: -1; }
  .stones, .shots, .platforms { grid-template-columns: 1fr; }
  .shots figure:first-child { grid-column: auto; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .brand .runes { display: none; }
  nav a:not(:last-of-type) { display: none; }
  nav { gap: 10px; }
}
