/* Dyrhald website - one stylesheet for every page. */
:root {
  --abyss: #03101a;
  --deep: #061c28;
  --shelf: #0a2a38;
  --line: #16404f;
  --glow: #5ce6f2;
  --bio: #8dffcf;
  --ember: #ffb36b;
  --bone: #e9e3d3;
  --text: #cfdde2;
  --muted: #8fa9b3;
  --radius: 14px;
  --wrap: 1120px;
  --display: "Cinzel", "Times New Roman", serif;
  --label: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--abyss);
  background-image:
    radial-gradient(1200px 600px at 50% -200px, rgba(92, 230, 242, 0.10), transparent 70%),
    linear-gradient(180deg, #072533 0, var(--abyss) 900px);
  background-repeat: no-repeat;
  color: var(--text);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--glow); text-underline-offset: 3px; }
a:hover { color: var(--bone); }
h1, h2, h3 { font-family: var(--display); color: var(--bone); font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: 0.04em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); letter-spacing: 0.03em; }
h3 { font-size: 1.2rem; letter-spacing: 0.02em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.eyebrow {
  font-family: var(--label); text-transform: uppercase; letter-spacing: 0.32em;
  font-size: 0.85rem; color: var(--glow); margin: 0 0 0.6em;
}
.lead { font-size: 1.2rem; color: var(--bone); max-width: 42em; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--bone); color: var(--abyss); padding: 8px 12px; }

/* Header and nav */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(3, 16, 26, 0.86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(92, 230, 242, 0.12);
}
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bone); }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand span { font-family: var(--display); font-weight: 600; letter-spacing: 0.22em; font-size: 1.15rem; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--label); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.95rem;
  color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 8px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--glow); }
.nav a.btn { margin-left: 8px; color: var(--abyss); }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--bone);
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch;
    background: var(--abyss); border-bottom: 1px solid var(--line); padding: 8px 20px 18px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; font-size: 1.05rem; }
  .nav a.btn { margin: 8px 0 0; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--label); font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; font-size: 1rem;
  text-decoration: none; cursor: pointer;
  background: var(--glow); color: var(--abyss);
  box-shadow: 0 0 24px rgba(92, 230, 242, 0.35);
}
.btn:hover { background: var(--bone); color: var(--abyss); }
.btn.ghost { background: transparent; color: var(--bone); border-color: rgba(233, 227, 211, 0.4); box-shadow: none; }
.btn.ghost:hover { border-color: var(--glow); color: var(--glow); }
.btn.disabled { background: var(--shelf); color: var(--muted); box-shadow: none; cursor: default; border-color: var(--line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Hero */
.hero {
  position: relative; min-height: min(88vh, 760px); display: flex; align-items: flex-end;
  overflow: hidden; border-bottom: 1px solid var(--line);
}
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(3, 16, 26, 0.15) 0%, rgba(3, 16, 26, 0.35) 45%, var(--abyss) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding-bottom: 64px; padding-top: 120px; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 5.6rem); letter-spacing: 0.22em; margin-bottom: 0.15em; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6); }
.hero .tag {
  font-family: var(--label); text-transform: uppercase; letter-spacing: 0.5em; color: var(--glow);
  font-size: clamp(0.85rem, 2.2vw, 1.1rem); margin-bottom: 18px;
}
.hero .lead { text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7); }
.page-hero { padding: 72px 0 36px; }
.page-hero .lead { color: var(--text); }

/* Alpha badge */
.badge {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--label); text-transform: uppercase;
  letter-spacing: 0.18em; font-size: 0.85rem; color: var(--ember);
  border: 1px solid rgba(255, 179, 107, 0.5); border-radius: 999px; padding: 4px 12px; margin-bottom: 18px;
  background: rgba(3, 16, 26, 0.6);
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); }

/* Sections and grids */
section { padding: 64px 0; }
section + section { border-top: 1px solid rgba(22, 64, 79, 0.6); }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card {
  background: linear-gradient(180deg, rgba(10, 42, 56, 0.85), rgba(6, 28, 40, 0.85));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.card .body { padding: 18px 20px 20px; }
.card h3 { margin-bottom: 0.35em; }
.card p { margin: 0; color: var(--text); font-size: 0.98rem; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
.card.crit img { aspect-ratio: 4 / 3; }
.card .placeholder {
  aspect-ratio: 16 / 9; display: grid; place-items: center; border-bottom: 1px solid var(--line); padding: 20px; text-align: center;
  background: radial-gradient(circle at 50% 60%, rgba(92, 230, 242, 0.18), transparent 60%), var(--deep);
  font-family: var(--label); text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted);
}
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 24px; } .split.flip > :first-child { order: 0; } }
.frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
.glowline { height: 1px; background: linear-gradient(90deg, transparent, var(--glow), transparent); opacity: 0.5; margin: 0; border: 0; }

/* Depth bands */
.depths { display: grid; gap: 10px; counter-reset: band; }
.band {
  display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: baseline;
  padding: 16px 20px; border-radius: 12px; border: 1px solid var(--line);
}
.band b { font-family: var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--glow); font-weight: 500; }
.band small { display: block; color: var(--muted); font-family: var(--label); letter-spacing: 0.1em; }
.band:nth-child(1) { background: rgba(28, 110, 128, 0.35); }
.band:nth-child(2) { background: rgba(16, 72, 92, 0.4); }
.band:nth-child(3) { background: rgba(9, 44, 62, 0.5); }
.band:nth-child(4) { background: rgba(5, 26, 40, 0.6); }
.band:nth-child(5) { background: rgba(3, 14, 24, 0.8); }
.band:nth-child(6) { background: #01070c; border-style: dashed; }
.band .here { color: var(--ember); font-family: var(--label); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.85rem; margin-left: 6px; }
@media (max-width: 560px) { .band { grid-template-columns: 1fr; gap: 4px; } }

/* Species compare table */
.compare { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare th { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.14em; color: var(--glow); font-weight: 500; }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(6, 28, 40, 0.6); }

/* Media gallery */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gallery a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.4s ease; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 8px; font-size: 0.9rem; color: var(--bone);
  background: linear-gradient(180deg, transparent, rgba(3, 16, 26, 0.9));
}
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(1, 6, 10, 0.94); display: none;
  align-items: center; justify-content: center; padding: 20px; flex-direction: column; gap: 12px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 82vh; border-radius: 10px; }
.lightbox p { color: var(--bone); margin: 0; text-align: center; }
.lightbox button {
  position: absolute; top: 14px; right: 14px; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--deep); color: var(--bone); font-size: 1.4rem; cursor: pointer;
}

/* News */
.release { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(6, 28, 40, 0.7); padding: 26px 28px; margin-bottom: 24px; }
.release header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 8px; }
.release h2 { margin: 0; }
.release time { font-family: var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.release h3 { font-family: var(--label); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.95rem; color: var(--glow); margin: 18px 0 8px; }
.release h3.changed { color: var(--bio); }
.release h3.fixed { color: var(--ember); }
.release ul { margin: 0; padding-left: 1.2em; }
.release li { margin: 0 0 6px; }
.release li::marker { color: var(--glow); }
@media (max-width: 560px) { .release { padding: 20px 18px; } }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 12px; background: rgba(6, 28, 40, 0.7); margin-bottom: 12px; }
.faq summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--bone); list-style: none;
  display: flex; justify-content: space-between; gap: 16px; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--glow); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 20px 16px; }

/* Steps on the join page */
.steps { counter-reset: step; display: grid; gap: 14px; padding: 0; list-style: none; }
.steps li {
  counter-increment: step; position: relative; padding: 18px 20px 18px 70px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(6, 28, 40, 0.7);
}
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 16px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); color: var(--abyss); background: var(--glow);
  box-shadow: 0 0 16px rgba(92, 230, 242, 0.5);
}
.note {
  border: 1px solid rgba(255, 179, 107, 0.45); background: rgba(255, 179, 107, 0.07); border-radius: 12px;
  padding: 16px 20px; color: var(--bone);
}

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0 56px; margin-top: 40px; color: var(--muted); font-size: 0.95rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--text); text-decoration: none; }
.site-foot a:hover { color: var(--glow); }

/* Drifting motes, subtle; off for people who ask for less motion */
.motes { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.motes i {
  position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%;
  background: var(--bio); box-shadow: 0 0 8px var(--bio); opacity: 0; animation: rise linear infinite;
}
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 0.6; } 90% { opacity: 0.4; } 100% { transform: translateY(-105vh); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .motes { display: none; } html { scroll-behavior: auto; } .gallery img { transition: none; } }
main, .site-foot { position: relative; z-index: 1; }
