@font-face {
  font-family: Latin Modern;
  src: url("assets/latin-modern-roman.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: Latin Modern;
  src: url("assets/latin-modern-italic.otf") format("opentype");
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #06261c;
  --cream: #fff2d2;
  --parchment: #eee0bf;
  --gold: #f2d286;
  --gold-bright: #ffe3a0;
  --line: #dcb36a55;
  --serif: "Latin Modern", Georgia, serif;
  --sans: system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--cream); font-family: var(--sans); }
p, h1, h2 { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 5px; }
img { display: block; max-width: 100%; }
[id] { scroll-margin-top: 18px; }

.visually-hidden,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 10;
  inset: 12px auto auto 12px;
  background: var(--cream);
  color: var(--night);
  padding: 12px;
}

.topbar, .footer { background: #05231a; }
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner, .footer-inner {
  width: min(1440px, 91%);
  min-height: 54px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  color: var(--cream);
  text-decoration: none;
  font: 26px/1 var(--serif);
  white-space: nowrap;
}

.wordmark span { color: var(--gold); }
.topbar nav, .footer-inner > div { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.topbar nav a, .footer-inner > div a {
  text-decoration: none;
  font: 1.05rem/1.2 var(--serif);
  color: var(--parchment);
}
.topbar nav a:hover, .footer-inner > div a:hover { text-decoration: underline; text-underline-offset: 4px; }
.topbar .nav-donate { color: var(--gold); }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(370px, 51svh, 520px);
  overflow: hidden;
  background: radial-gradient(ellipse at 53% 0%, #123b31aa, transparent 70%),
    url("assets/tannengruene-struktur.webp") center / 290px auto repeat, #072b22;
}

.hero-art {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: min(58%, 1000px);
  height: 100%;
  object-fit: cover;
  object-position: center top;
  mask-image: linear-gradient(to right, transparent 0%, #000 22%);
}

.hero-inner {
  width: min(1390px, 89%);
  margin-inline: auto;
  padding-block: clamp(36px, 6vw, 65px);
}

.hero-copy {
  max-width: 61%;
  text-shadow: 0 2px 12px #051a13dc;
}

.eyebrow {
  color: var(--gold);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.ornament {
  color: var(--gold);
  font: 30px/1 Georgia, serif;
  text-shadow: 0 0 18px #ffd46b55;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  margin: 16px 0 5px;
  font-size: clamp(3.15rem, 6.7vw, 7rem);
  line-height: .96;
  letter-spacing: -.065em;
}

h1 em { color: #f8c567; font-weight: inherit; }
.hero-date { color: var(--parchment); font: clamp(1.05rem, 2vw, 1.65rem)/1.15 var(--serif); }
.hero-subtitle { color: var(--cream); font: clamp(1.25rem, 2.6vw, 2.32rem)/1.17 var(--serif); }
.hero-description {
  margin-top: 18px;
  max-width: 31ch;
  color: var(--cream);
  font: clamp(1.15rem, 2vw, 1.75rem)/1.28 var(--serif);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 24px; }

.cta {
  display: inline-flex;
  min-height: 51px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 10px 21px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font: 1.08rem/1.15 var(--serif);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
  transition: background-color .18s ease, box-shadow .18s ease;
}
.cta-gold { background-color: #f0c56b; color: #10281e; }
.cta-gold:hover { background-color: #ffe4a1; box-shadow: 0 0 23px #f4cf7250; }
.cta-outline { border-color: #eac166; background-color: #09271ed9; color: var(--cream); }
.cta-outline:hover { background-color: #31453a; }
.cta-red { background-color: #701f2b; color: #fff4d6; }
.cta-red:hover { background-color: #8e2834; }
.cta-arrow {
  position: relative;
  width: 8px;
  height: 8px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
}
.cta-arrow::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 11px;
  height: 1px;
  background: currentColor;
  transform: rotate(-45deg);
  transform-origin: right center;
}
.calendar {
  border-top: 2px solid #c49c51;
  padding: 24px 0 66px;
  background: radial-gradient(ellipse at 50% 0%, #16504060, transparent 70%),
    url("assets/tannengruene-struktur.webp") center / 310px auto repeat, var(--night);
}
.section-inner { width: min(1350px, 89%); margin-inline: auto; }
.calendar-heading { text-align: center; margin: 0 auto 23px; }
.calendar-heading .ornament { margin-bottom: 7px; }
.calendar-heading h2, .grandfather h2, .charity h2 {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  line-height: 1;
  letter-spacing: -.045em;
}
.calendar-heading > p:last-child {
  margin-top: 6px;
  color: var(--parchment);
  font-size: .88rem;
  line-height: 1.4;
}

.doors {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 26px clamp(13px, 2.7vw, 43px);
  list-style: none;
  padding: 0;
  margin: 0;
}
.door {
  --door-art: url("assets/tuer-green.webp");
  display: block;
  min-height: 100%;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border-radius: 7px;
}

.door-red { --door-art: url("assets/tuer-red.webp"); }
.door-blue { --door-art: url("assets/tuer-blue.webp"); }
.door-gold { --door-art: url("assets/tuer-red.webp"); }

.door-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  aspect-ratio: 198 / 262;
  width: min(100%, 199px);
  margin-inline: auto;
  color: #ffebba;
  text-shadow: 1px 2px 3px #25110c, 0 0 12px #321f19ad;
  transition: transform .2s ease, filter .2s ease;
}

.door-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--door-art) center / 100% 100% no-repeat;
}

.door-gold .door-panel::before {
  filter: sepia(.77) saturate(1.5) drop-shadow(0 0 10px #eab5526b);
}
.door:hover .door-panel, .door:focus-visible .door-panel, .door.is-today .door-panel {
  filter: brightness(1.12) drop-shadow(0 0 9px #f4c46b76);
}
.door:hover .door-panel { transform: translateY(-4px); }
.door[href] .door-panel { filter: drop-shadow(0 0 6px #eeca7375); }
.door-number {
  padding-bottom: .12em;
  font: clamp(2.3rem, 5.9vw, 5.4rem)/1 var(--serif);
  font-weight: 700;
}

.door-title {
  display: block;
  padding: 8px 2px 0;
  color: var(--parchment);
  font: 1.05rem/1.17 var(--serif);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.no-script { margin-top: 24px; text-align: center; }
.door-notice {
  position: fixed;
  z-index: 3;
  inset: auto auto max(14px, env(safe-area-inset-bottom)) 50%;
  transform: translate(-50%, 7px);
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 10px 16px;
  border: 1px solid #aa8346;
  border-radius: 4px;
  background: #fff0ce;
  color: #24281f;
  box-shadow: 0 6px 22px #0006;
  font-size: .87rem;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.door-notice.is-visible { opacity: 1; transform: translate(-50%, 0); }

.grandfather {
  color: #32291f;
  border-top: 1px solid #d8ab62;
  background: radial-gradient(ellipse at 27% 34%, #f9dfaa, transparent 62%), #f5e8cc;
}
.grandfather-inner, .giving-inner {
  width: min(1130px, calc(100% - 88px));
  margin-inline: auto;
  display: grid;
  align-items: center;
  padding-block: clamp(38px, 6vw, 76px);
}
.grandfather-inner {
  grid-template-columns: minmax(170px, 290px) minmax(0, 1fr);
  gap: clamp(30px, 6.5vw, 96px);
}
.grandfather-art {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  object-position: center 46%;
  border-radius: 49% 49% 4px 4px / 28% 28% 4px 4px;
  border: 2px solid #a67c42;
  box-shadow: 0 7px 20px #533d2c35;
}
.grandfather-copy > p, .charity > p:not(.eyebrow), .book p {
  max-width: 47ch;
  margin-top: 14px;
  line-height: 1.65;
}
.grandfather-credit { color: #753341; font-weight: 650; }

.giving { background: #102e26; border-top: 1px solid #d3ae67; }
.giving-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(26px, 5vw, 72px); align-items: stretch; }
.book { align-self: center; }
.book-link {
  display: grid;
  grid-template-columns: minmax(90px, 172px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  text-decoration: none;
}
.book-cover {
  width: 100%;
  height: auto;
  border: 1px solid #e9c57973;
  border-radius: 2px;
  box-shadow: 0 10px 22px #05171299;
}
.book h2 { color: var(--cream); font-size: clamp(1.7rem, 3.3vw, 2.8rem); line-height: .98; }
.book p { color: var(--parchment); }
.book-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--gold);
  font-size: .9rem;
  text-decoration: underline;
  text-underline-offset: .22em;
}
.book-link:hover .book-action { color: var(--gold-bright); }
.charity {
  color: #30261d;
  background: #f5e8cc;
  border: 1px solid #d1a75b;
  border-radius: 8px;
  padding: clamp(23px, 3.6vw, 43px);
}
.charity .eyebrow { color: #753341; }
.charity h2 { margin-top: 10px; font-size: clamp(2rem, 3.6vw, 3.65rem); }
.charity h2 em { color: #751f2c; }
.charity .cta { margin-top: 19px; }
.charity a:focus-visible { outline-color: #751f2c; }
.footer { border-top: 1px solid var(--line); }

@media (max-width: 950px) {
  .hero-copy { max-width: 65%; }
  .doors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .giving-inner { width: calc(100% - 56px); gap: 24px; }
}

@media (max-width: 640px) {
  .topbar-inner, .footer-inner { width: calc(100% - 32px); min-height: 53px; }
  .wordmark { font-size: 1.3rem; }
  .topbar nav, .footer-inner > div { gap: 12px; }
  .topbar nav a, .footer-inner > div a { font-size: .84rem; }
  .hero { display: grid; min-height: 0; }
  .hero-inner {
    grid-row: 1;
    width: calc(100% - 35px);
    padding: 30px 0 15px;
    text-align: center;
  }
  .hero-copy { max-width: none; }
  .hero-description { margin: 12px auto 0; }
  .hero-actions { justify-content: center; margin-top: 17px; }
  .hero-art {
    position: static;
    grid-row: 2;
    width: 100%;
    height: clamp(180px, 59vw, 310px);
    object-position: center 43%;
    mask-image: linear-gradient(to bottom, transparent, #000 24%);
  }
  .section-inner, .grandfather-inner, .giving-inner { width: calc(100% - 34px); }
  .calendar { padding: 23px 0 43px; }
  .calendar-heading { margin-bottom: 20px; }
  .calendar-heading h2 { font-size: clamp(2rem, 8.6vw, 3.2rem); }
  .doors { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px 10px; }
  .door-number { font-size: clamp(2.35rem, 9vw, 4.9rem); }
  .door-title { padding-top: 6px; font-size: .92rem; }
  .grandfather-inner { grid-template-columns: minmax(100px, 175px) minmax(0, 1fr); gap: 17px; }
  .grandfather h2 { font-size: clamp(1.8rem, 6.2vw, 2.8rem); }
  .grandfather-copy > p, .charity > p:not(.eyebrow), .book p { font-size: .9rem; }
  .giving-inner { grid-template-columns: 1fr; gap: 30px; }
  .book-link { grid-template-columns: minmax(75px, 115px) minmax(0, 1fr); }
}

@media (max-width: 390px) {
  h1 { font-size: clamp(2.55rem, 10.8vw, 3.25rem); }
  .topbar nav > a:first-child { display: none; }
  .footer-inner { gap: 9px; }
  .footer-inner > div { gap: 9px; }
  .hero-actions { gap: 8px; }
  .hero-actions .cta { padding-inline: 10px; font-size: 1rem; }
  .book-link { grid-template-columns: 82px minmax(0, 1fr); gap: 13px; }
}

@media (max-width: 465px) {
  .grandfather-inner { grid-template-columns: 1fr; text-align: center; }
  .grandfather-art { width: min(215px, 68%); max-height: 260px; justify-self: center; }
  .grandfather-copy > p { margin-inline: auto; }
}

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