:root {
  --night: #14161f;
  --night-2: #1d2030;
  --moon: #f1e6cf;
  --paper: #faf6ee;
  --soft: #f0e9dc;
  --ink: #1f1d1a;
  --muted: #6b645a;
  --line: #e2d8c6;
  --amber: #9c5520;
  --amber-light: #e0a165;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--amber); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 60;
  background: var(--moon); color: var(--night); padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: rgba(20, 22, 31, .92);
  backdrop-filter: blur(8px);
  color: var(--moon);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--moon); text-decoration: none;
  font: 600 20px/1 var(--serif);
}
.brand .dim { opacity: .55; }
.moon {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 35%, #fff8e6, var(--moon) 55%, #d9c9a6);
  box-shadow: 0 0 14px rgba(241, 230, 207, .55);
}
.moon-live { background: none; display: inline-flex; }
.moon-live svg { display: block; border-radius: 50%; }
.fullmoon-note {
  display: inline-block; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px;
  background: rgba(241, 230, 207, .14); color: var(--moon); font-size: 15px;
  box-shadow: 0 0 24px rgba(241, 230, 207, .25);
}
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--moon); text-decoration: none; white-space: nowrap;
  font-size: 15px; padding: 8px 12px; border-radius: 999px; opacity: .85;
}
.nav a:hover, .nav a:focus-visible { background: rgba(241, 230, 207, .12); opacity: 1; }
.lang {
  color: var(--moon); text-decoration: none; flex: none;
  border: 1px solid rgba(241, 230, 207, .35); border-radius: 999px;
  padding: 5px 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em;
}
.lang:hover, .lang:focus-visible { background: rgba(241, 230, 207, .12); }
@media (max-width: 600px) {
  html { scroll-padding-top: 100px; }
  .topbar { flex-wrap: wrap; gap: 6px; padding-bottom: 6px; }
  .nav { order: 2; justify-content: space-between; margin: 0 -12px; width: calc(100% + 24px); }
  .nav a { padding: 6px 12px; }
}

/* Hero */
.hero {
  position: relative; min-height: min(88vh, 760px);
  display: flex; align-items: flex-end;
  background: var(--night); color: var(--moon); overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%;
  filter: contrast(1.05);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,22,31,.15) 30%, rgba(20,22,31,.88) 100%);
}
.hero-text {
  position: relative; z-index: 1;
  width: 100%; max-width: 1120px; margin: 0 auto;
  padding: 0 var(--gutter) clamp(32px, 7vw, 72px);
}
.hero h1 { font-size: clamp(48px, 11vw, 112px); letter-spacing: -.01em; }
.hero .amp { color: var(--amber-light); font-style: italic; }
.lede { max-width: 32em; font-size: clamp(17px, 2.2vw, 20px); margin: 12px 0 0; opacity: .9; }
.onthisday {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 22px;
  padding: 8px 16px 8px 8px; border-radius: 14px; cursor: pointer; text-align: left;
  font: inherit; color: var(--moon);
  background: rgba(20, 22, 31, .55); border: 1px solid rgba(241, 230, 207, .25);
  backdrop-filter: blur(6px);
}
.onthisday:hover, .onthisday:focus-visible { background: rgba(20, 22, 31, .8); border-color: var(--amber-light); }
.onthisday img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.onthisday strong { display: block; font-size: 15px; }
.onthisday small { display: block; font-size: 13px; opacity: .75; }
.eyebrow {
  margin: 0 0 6px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber); font-weight: 600;
}
.hero .eyebrow, .section-dark .eyebrow { color: var(--amber-light); }

/* Sections */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-dark { background: var(--night); color: var(--moon); }
.section-soft { background: var(--soft); }
.section-title { font-size: clamp(32px, 5vw, 46px); margin-bottom: 10px; }
.section-sub { color: var(--muted); margin: 0 0 28px; }
.section-dark .section-sub { color: rgba(241, 230, 207, .7); }

/* Dogs */
.dogs { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-top: 28px; }
.dog {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.dog img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.dog-body { padding: 22px 24px 26px; }
.dog h3 { font-size: 32px; margin-bottom: 14px; }
.facts { margin: 0; display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd { margin: 0; }

/* Shows */
.feature {
  margin: 0 0 40px; display: grid; gap: 0;
  background: var(--night-2); border-radius: var(--radius); overflow: hidden;
}
.feature img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.feature figcaption { padding: 24px; }
.feature h3 { font-size: 30px; margin-bottom: 8px; }
.feature p { margin: 0; }
@media (min-width: 820px) {
  .feature { grid-template-columns: 1.3fr 1fr; align-items: center; }
  .feature img { height: 100%; aspect-ratio: auto; }
  .feature figcaption { padding: 36px; }
}

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: rgba(241, 230, 207, .18);
}
.timeline li { position: relative; padding: 0 0 26px 34px; display: grid; gap: 2px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--night); border: 2px solid var(--amber-light);
}
.timeline time { font-size: 14px; color: var(--amber-light); font-weight: 600; letter-spacing: .02em; }
.timeline h4 { font-size: 22px; }
.timeline p { margin: 0; }
.timeline .kind { font-size: 15px; color: rgba(241, 230, 207, .65); }
@media (min-width: 820px) {
  .timeline li { grid-template-columns: 11em 1fr; gap: 24px; }
  .timeline time { padding-top: 3px; }
}

/* Show map */
.showmap { margin: 28px 0 8px; background: var(--night-2); border-radius: var(--radius); padding: 22px; }
.showmap-head h3 { font-size: 26px; }
.showmap-head p { margin: 4px 0 16px; color: rgba(241, 230, 207, .65); font-size: 15px; }
.showmap-body { display: grid; gap: 20px; }
@media (min-width: 820px) { .showmap-body { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.map { width: 100%; height: auto; display: block; border-radius: 10px; background: #0d0f15; }
.land { fill: #363d57; stroke: #535d82; stroke-width: 1; }
.land-denmark { fill: #4a4150; stroke: #7d6a5c; }
.pin { cursor: pointer; outline: none; }
.pin-dot { fill: var(--night); stroke: var(--amber-light); stroke-width: 2.5; transition: fill .2s; }
.paw { fill: var(--amber-light); transition: fill .2s; }
.pin-badge { fill: var(--moon); }
.pin text { font: 700 13px/1 var(--sans); fill: var(--night); text-anchor: middle; }
.pin:hover .pin-dot, .pin:focus-visible .pin-dot, .pin[aria-pressed="true"] .pin-dot { fill: var(--amber-light); }
.pin:hover .paw, .pin:focus-visible .paw, .pin[aria-pressed="true"] .paw { fill: var(--night); }
.pin:focus-visible .pin-dot { stroke: var(--moon); stroke-width: 3.5; }
.map-card h4 { font-size: 22px; margin-bottom: 10px; }
.map-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.map-card li { font-size: 15px; color: rgba(241, 230, 207, .75); border-top: 1px solid rgba(241, 230, 207, .14); padding-top: 10px; }
.map-card time { color: var(--amber-light); font-weight: 600; }
.map-card strong { color: var(--moon); font-weight: 600; }

.glossary { margin-top: 12px; border-top: 1px solid rgba(241, 230, 207, .18); padding-top: 18px; }
.glossary summary { cursor: pointer; color: var(--amber-light); }
.glossary dl { margin: 14px 0 0; display: grid; gap: 8px; font-size: 15px; }
.glossary dl div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 0; opacity: .8; }

/* Film */
.section-film { padding-bottom: 0; }
.film { width: 100%; height: auto; display: block; border-radius: var(--radius); background: var(--night); aspect-ratio: 16 / 9; }

.alive { display: grid; gap: 20px; margin-top: 24px; }
@media (min-width: 820px) { .alive { grid-template-columns: 1fr 1fr; } }
.alive figure { margin: 0; }
.alive-media { width: 100%; aspect-ratio: 16 / 9; height: auto; display: block; border-radius: var(--radius); background: var(--night); object-fit: cover; }
.model-slot { background-color: #2a2d3a; background-position: center; background-size: contain; background-repeat: no-repeat; }
.model-slot model-viewer { width: 100%; height: 100%; --poster-color: transparent; }
.alive figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; }
.alive figcaption strong { color: var(--ink); font-weight: 600; margin-right: 4px; }

/* Photos */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  font: inherit; font-size: 15px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 7px 14px; border-radius: 999px;
}
.chip .n { color: var(--muted); font-size: 13px; margin-left: 4px; }
.chip[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: var(--moon); }
.chip[aria-pressed="true"] .n { color: rgba(241, 230, 207, .6); }

.grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 180px), 1fr)); }
.grid button {
  padding: 0; border: 0; background: var(--soft); cursor: zoom-in;
  border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3;
}
.grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.grid button:hover img, .grid button:focus-visible img { transform: scale(1.04); }
.grid-head { grid-column: 1 / -1; font: 600 22px/1.2 var(--serif); margin: 18px 0 4px; }
.grid-head:first-child { margin-top: 0; }

/* Guestbook */
.section-guestbook { padding-top: 0; }
.gb-form { display: grid; gap: 14px; }
.gb-form label { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.gb-form input, .gb-form textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.gb-form input:focus, .gb-form textarea:focus { outline: 2px solid var(--amber-light); outline-offset: 1px; }
.gb-form .button { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.gb-form .button:disabled { opacity: .6; cursor: wait; }
.gb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gb-status { margin: 0; font-size: 15px; min-height: 1.6em; }
.gb-status.ok { color: #3f7d4e; }
.gb-status.err { color: #a8402c; }
.gb-list { display: grid; gap: 16px; align-content: start; }
.gb-entry { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.gb-entry blockquote { margin: 0 0 10px; font: italic 18px/1.5 var(--serif); white-space: pre-line; }
.gb-entry figcaption { font-size: 14px; color: var(--muted); }
.gb-empty { color: var(--muted); font-style: italic; }

/* Contact & links */
.two-col { display: grid; gap: 40px; }
@media (min-width: 820px) { .two-col { grid-template-columns: 1fr 1fr; } }
.button {
  display: inline-block; text-decoration: none; font-weight: 600;
  background: var(--night); color: var(--moon);
  padding: 12px 22px; border-radius: 999px;
}
.button:hover { background: var(--amber); }
.links { list-style: none; padding: 0; margin: 0; }
.links li { border-top: 1px solid var(--line); }
.links a { display: block; padding: 12px 0; text-decoration: none; color: var(--ink); }
.links a::after { content: " ↗"; color: var(--amber); }
.links a:hover { color: var(--amber); }

.footer {
  background: var(--night); color: rgba(241, 230, 207, .7);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 28px var(--gutter); font-size: 14px; text-align: center;
}
.footer p { margin: 0; }
.footer a { color: var(--amber-light); }
.dog picture, .feature picture { display: block; }
@media (min-width: 820px) { .feature picture { height: 100%; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 11, 16, .96);
  display: grid; grid-template-columns: 56px 1fr 56px; align-items: center;
  touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.lb-stage img { max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); width: auto; object-fit: contain; border-radius: 4px; }
.lb-stage figcaption { color: rgba(241, 230, 207, .75); font-size: 14px; }
.lb-btn {
  font: 32px/1 var(--sans); color: var(--moon); background: rgba(241, 230, 207, .08);
  border: 0; border-radius: 50%; width: 46px; height: 46px; cursor: pointer; justify-self: center;
}
.lb-btn:hover { background: rgba(241, 230, 207, .2); }
.lb-close { position: absolute; top: 12px; right: 12px; font-size: 20px; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
@media (max-width: 600px) {
  .lightbox { grid-template-columns: 1fr; }
  .lb-stage { grid-column: 1; }
  .lb-prev, .lb-next { position: absolute; bottom: 16px; }
  .lb-prev { left: 16px; }
  .lb-next { right: 16px; }
  .lb-stage img { max-height: calc(100dvh - 160px); }
}

:focus-visible { outline: 2px solid var(--amber-light); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grid img { transition: none; }
}
