/* Zworbels Winterwald: one stylesheet for all pages. Night blue, brass and lantern light. */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

:root {
  --night: #0a1124;
  --night-deep: #060a17;
  --night-soft: #121c38;
  --ink: #f1e7d0;
  --ink-soft: #d6c8a8;
  --brass: #e3b26a;
  --brass-soft: #b98c4e;
  --ember: #ffcf86;
  --wood: #2b1c12;
  --line: rgba(227, 178, 106, 0.38);
  --display: 'Cormorant Garamond', 'Cormorant', 'EB Garamond', Garamond, 'Palatino Linotype', Palatino, Georgia, serif;
  --text: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', 'URW Palladio L', Georgia, 'Times New Roman', serif;
  --measure: 38rem;
  --gutter: clamp(1.1rem, 4vw, 3rem);
}

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

html {
  background: var(--night-deep);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(40, 58, 110, 0.35), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--night-deep) 100%);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  line-height: 1.65;
  overflow-x: hidden;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}

main { flex: 1; overflow-x: clip; }

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--ember);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: #ffe2b0; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--night);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; color: var(--night); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

[hidden] { display: none !important; }

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.005em;
  color: #f7eedb;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 1.5rem + 4.2vw, 5rem); hyphens: auto; overflow-wrap: break-word; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); }
h3 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem); }

p { margin: 0 0 1em; }

.eyebrow {
  display: block;
  margin: 0 0 0.9rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  letter-spacing: 0.02em;
  color: var(--brass);
}

.lead {
  font-size: clamp(1.15rem, 1.02rem + 0.55vw, 1.4rem);
  line-height: 1.6;
  color: var(--ink);
  max-width: var(--measure);
  text-wrap: pretty;
}

.prose { max-width: var(--measure); text-wrap: pretty; }
.prose p, .prose li { color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 600; }

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: clamp(3rem, 7vw, 5.5rem) auto;
  max-width: 22rem;
  border: 0;
  height: auto;
}
.ornament::before, .ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}
.ornament::after { transform: scaleX(-1); }
.ornament span {
  width: 9px; height: 9px;
  transform: rotate(45deg);
  border: 1px solid var(--brass);
  box-shadow: 0 0 12px rgba(255, 207, 134, 0.55);
}

/* ---------- Header and navigation ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  padding: clamp(1rem, 2.4vw, 1.8rem) var(--gutter);
}

.brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem);
  color: #f7eedb;
  text-decoration: none;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}
.brand:hover { color: var(--ember); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ember); border-bottom-color: var(--line); }
.site-nav a[aria-current='page'] { color: var(--ember); border-bottom-color: var(--brass); }

@media (max-width: 760px) {
  .site-header { justify-content: center; text-align: center; }
  .site-nav ul { justify-content: center; gap: 0 1.1rem; }
  .site-nav a { font-size: 1.05rem; }
}

/* ---------- Home: the forest entrance ---------- */

.entrance {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(7.5rem, 13vw, 10rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  text-align: center;
}
.entrance-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  object-position: 50% 40%;
  filter: blur(5px) brightness(0.42) saturate(0.85);
}
.entrance::before {
  /* night above, lantern warmth around the stage, dark floor to the page below */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(48% 34% at 50% 68%, rgba(255, 190, 110, 0.22), transparent 70%),
    radial-gradient(28% 30% at 12% 70%, rgba(255, 196, 120, 0.12), transparent 70%),
    radial-gradient(28% 30% at 88% 70%, rgba(255, 196, 120, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(6, 10, 23, 0.75) 0%, rgba(6, 10, 23, 0.1) 30%, rgba(6, 10, 23, 0.25) 70%, var(--night) 100%);
}
.entrance h1 { margin-bottom: 0.35em; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6); }
.entrance .lead { margin: 0 auto; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.8); }

/* The stage: a still of the resting forest, replaced by the live renderer when it is ready */
.stage {
  position: relative;
  margin: clamp(2.2rem, 5vw, 3.5rem) auto 0;
  max-width: 1180px;
}
.stage-window {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #05060a;
  border: 1px solid rgba(227, 178, 106, 0.55);
  box-shadow:
    0 0 0 6px rgba(20, 13, 8, 0.85),
    0 0 0 7px rgba(227, 178, 106, 0.28),
    0 40px 90px -20px rgba(0, 0, 0, 0.85),
    0 0 140px rgba(255, 190, 110, 0.16);
}
.stage-window img, .stage-window iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.stage-window iframe {
  opacity: 0;
  transition: opacity 1.6s ease;
}
.stage.is-live .stage-window iframe { opacity: 1; }
.stage figcaption {
  margin-top: 1.4rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--ink-soft);
}

/* ---------- Paths from the entrance into the forest ---------- */

.paths { padding: 0 var(--gutter); }

.path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5.5rem);
  max-width: 1120px;
  margin: 0 auto;
}
.path:nth-of-type(even) .path-art { order: 2; }
.path-art { position: relative; }
.path-text { max-width: 31rem; }
.path-text p { color: var(--ink-soft); }

.more {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ember);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15rem;
}
.more::after { content: '→'; font-family: var(--text); font-size: 0.95em; transition: transform 0.3s ease; }
.more:hover { border-bottom-color: var(--ember); }
.more:hover::after { transform: translateX(4px); }

.path-quiet { text-align: center; max-width: 34rem; margin: 0 auto; }
.path-quiet p { color: var(--ink-soft); }

/* Zworbel standing in his own pool of lantern light */
.tree-art {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
}
.tree-art::before {
  content: '';
  position: absolute;
  inset: 8% -12% 0;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 55%, rgba(255, 196, 120, 0.26), transparent 72%);
}
.tree-art::after {
  /* snowy ground the tree stands on */
  content: '';
  position: absolute;
  left: 2%; right: 2%; bottom: -2%;
  height: 10%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(225, 232, 245, 0.18), transparent 75%);
}
.tree-art img { filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.55)); }

/* ---------- Showcase: a set behind the carved frame ---------- */

.showcase {
  position: relative;
  aspect-ratio: 1344 / 768;
  margin: 0;
}
.showcase::before {
  /* warm light falling out of the stage */
  content: '';
  position: absolute;
  inset: 20% 14% -8%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 190, 110, 0.2), transparent 70%);
}
.showcase-set {
  position: absolute;
  left: 25.98%;
  top: 31.92%;
  width: 47.96%;
  height: 48.4%;
  overflow: hidden;
  background: #0b0b10;
}
.showcase-set > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.showcase-set::after {
  /* stage lighting: footlights below, shade at the edges */
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 70% at 50% 100%, rgba(255, 200, 130, 0.16), transparent 70%),
    radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}
.showcase-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.55));
}
.showcase-figure {
  position: absolute;
  bottom: 6%;
  height: 74%;
  width: auto !important;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.45));
}

/* ---------- Sub pages ---------- */

.page-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(22rem, 52vh, 34rem);
  display: flex;
  align-items: flex-end;
  padding: 9rem var(--gutter) clamp(2.4rem, 5vw, 4rem);
}
.page-head > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 45%);
  filter: brightness(0.62) saturate(0.95);
}
.page-head::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 10, 23, 0.82) 0%, rgba(6, 10, 23, 0.15) 38%, rgba(10, 17, 36, 0.55) 72%, var(--night) 100%);
}
.page-head-inner { width: 100%; max-width: 1120px; margin: 0 auto; }
.page-head h1 { margin-bottom: 0.2em; text-shadow: 0 2px 22px rgba(0, 0, 0, 0.7); }
.page-head .lead { margin: 0; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.9); }

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 0;
}
.section > h2 { margin-bottom: 0.7em; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.split.reverse > :first-child { order: 2; }
.split.wide-art { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.wide-art.reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.path.path-wide { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

blockquote.voice {
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  max-width: 40rem;
  padding: 0;
  text-align: center;
}
blockquote.voice p {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.4rem);
  line-height: 1.3;
  color: #f7eedb;
  margin: 0;
  text-wrap: balance;
}
blockquote.voice footer {
  margin-top: 1rem;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--brass);
}

/* Fairy tale page */
.tale-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.6rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--brass);
}

/* the figures stand on a wooden shelf */
.shelf {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1.2rem clamp(1rem, 3vw, 2.6rem);
  margin: 1.5rem 0 0;
  padding: 0 1rem;
  list-style: none;
}
.shelf li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: clamp(5.6rem, 13vw, 9rem);
  padding-bottom: 0.2rem;
  --figure-h: clamp(9rem, 20vw, 14rem);
}
.shelf li img {
  height: var(--figure-h);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.5));
}
.shelf li::before {
  /* board under each figure; together they read as one shelf */
  content: '';
  position: absolute;
  left: -0.8rem; right: -0.8rem;
  /* right under the feet, whatever the length of the name below */
  top: calc(var(--figure-h) - 0.35rem);
  height: 0.7rem;
  z-index: -1;
  border-radius: 2px;
  background: linear-gradient(180deg, #6b4a2c 0%, #3d2817 60%, #24170d 100%);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.5);
}
.shelf li span {
  margin-top: 0.9rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
}

.scenes {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: scene;
}
.scene {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(1.4rem, 4vw, 3.5rem);
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.scene:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.scene:nth-child(even) > :first-child { order: 2; }
.scene img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid rgba(227, 178, 106, 0.35);
  box-shadow: 0 0 0 5px rgba(20, 13, 8, 0.8), 0 26px 50px -16px rgba(0, 0, 0, 0.8);
}
.scene h3 { margin-bottom: 0.3em; }
.scene h3::before {
  counter-increment: scene;
  content: 'Bühnenbild ' counter(scene);
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--brass);
}
.scene p { color: var(--ink-soft); margin: 0; }

.page-head-small { min-height: clamp(15rem, 34vh, 20rem); }
.page-head-small > img { filter: blur(3px) brightness(0.45); }

.prose-center .prose { margin: 0 auto; }

/* Live page */
.soon-still { max-width: 760px; margin: 2.4rem auto 0; }
.live-intro { margin: 0 auto 2rem; text-align: center; }
.live-link { max-width: var(--measure); margin: 1.6rem auto 0; text-align: center; font-size: 1rem; color: var(--ink-soft); }
.consent {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
}
.consent-box {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 4vw, 3rem);
  text-align: center;
  background: radial-gradient(70% 70% at 50% 50%, rgba(6, 10, 23, 0.7), rgba(6, 10, 23, 0.88));
}
.consent-box p { max-width: 34rem; margin: 0; font-size: 1rem; color: var(--ink); }
.consent .stage-window img { filter: blur(2px) brightness(0.8); }
.consent iframe { opacity: 1; }

.button {
  appearance: none;
  display: inline-block;
  padding: 0.75rem 1.6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: #1d130a;
  background: linear-gradient(180deg, #ffd99c 0%, var(--brass) 100%);
  border: 1px solid #f6d09a;
  border-radius: 999px;
  box-shadow: 0 0 30px rgba(255, 196, 120, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  cursor: pointer;
}
.button:hover { background: linear-gradient(180deg, #ffe4b5 0%, #f0c07b 100%); }

.soon {
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.3rem);
  line-height: 1.3;
  color: #f7eedb;
  max-width: 36rem;
  margin: 0 auto;
  text-wrap: balance;
}

/* About page */
.keepsakes {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin: 0;
}
.keepsakes img {
  width: clamp(6.5rem, 16vw, 10.5rem);
  filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.5));
}

/* Legal pages */
.legal {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 0;
}
.legal h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin-top: 2.2em; }
.legal h3 { font-size: 1.4rem; margin-top: 1.6em; }
.legal p, .legal li, .legal address { color: var(--ink-soft); }
.legal address { font-style: normal; margin-bottom: 1em; }
.legal ul { padding-left: 1.2rem; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1.2rem; margin: 0 0 1em; }
.legal dt { color: var(--ink); }
.legal dd { margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .legal dl { grid-template-columns: 1fr; }
  .legal dd { margin-bottom: 0.5rem; }
}
.todo {
  background: rgba(255, 207, 134, 0.16);
  color: var(--ember);
  border: 1px dashed var(--brass);
  border-radius: 3px;
  padding: 0 0.3rem;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: clamp(4rem, 9vw, 7rem);
  padding: 2.4rem var(--gutter) 2.6rem;
  background:
    linear-gradient(180deg, rgba(43, 28, 18, 0) 0%, rgba(43, 28, 18, 0.55) 100%);
  border-top: 1px solid rgba(227, 178, 106, 0.22);
  text-align: center;
  font-size: 0.98rem;
  color: var(--ink-soft);
}
.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 1.8rem;
  margin: 0 0 0.8rem;
  padding: 0;
  list-style: none;
}
.site-footer a { color: var(--ink); }
.site-footer p { margin: 0; }

/* ---------- Narrow screens ---------- */

@media (max-width: 860px) {
  .path, .path.path-wide, .split, .split.wide-art, .split.wide-art.reverse, .scene, .scene:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .path:nth-of-type(even) .path-art, .split.reverse > :first-child, .scene:nth-child(even) > :first-child { order: 0; }
  .path-text { max-width: none; }
  .tree-art { max-width: 300px; }
  .paths .tree-art { max-width: 230px; }
  .entrance { padding-top: 9.5rem; }
  .stage-window { box-shadow: 0 0 0 4px rgba(20, 13, 8, 0.85), 0 0 0 5px rgba(227, 178, 106, 0.28), 0 30px 60px -20px rgba(0, 0, 0, 0.85), 0 0 80px rgba(255, 190, 110, 0.14); }
}

@media (max-width: 700px) {
  /* the notice does not fit over a small picture: it moves below it */
  .consent .stage-window { overflow: visible; aspect-ratio: auto; background: none; border: 0; box-shadow: none; }
  .consent .stage-window img { position: static; aspect-ratio: 16 / 9; border-radius: 6px; }
  .consent-box { position: static; background: none; padding: 1.2rem 0 0; }
  .consent iframe { position: static; aspect-ratio: 16 / 9; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
