@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: var(--klartext-ink, #202124);
  --muted: var(--klartext-muted, #5c676d);
  --rule: var(--klartext-line, #d4d9dc);
  --accent: var(--klartext-accent, #b72f29);
  --red-dark: #8b211e;
  --paper: #fbf7f0;
  --fold: #f1e8da;
  --serif: "Source Serif 4", Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: var(--klartext-font, Manrope, Arial, sans-serif);
  font-size: 1rem;
  line-height: 1.6;
}
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--red-dark); text-underline-offset: .2em; }
button { font: inherit; }
:focus-visible { outline: 3px solid #284f6d; outline-offset: 4px; }
.wrap { width: min(100% - 4rem, 71rem); margin-inline: auto; }
.skip {
  position: fixed; inset: .5rem auto auto .75rem; transform: translateY(-150%);
  z-index: 4; padding: .45rem .75rem; background: #fff;
}
.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner, .footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.header-inner { min-height: 4.75rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; line-height: 1.25; }
.brand, .site-header nav a, .site-footer a { text-decoration: none; color: var(--ink); }
.brand img { width: 2.125rem; height: 2.125rem; object-fit: contain; }
.brand span { font-weight: 600; }
.brand strong { font-weight: 800; }
.site-header nav, .footer-inner > div { display: flex; gap: clamp(.9rem, 2vw, 1.75rem); }
.site-header nav a { font-size: .95rem; font-weight: 700; }
.site-header nav a:hover, .site-footer a:hover { color: var(--red-dark); text-decoration: underline; }
.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--fold);
}
.hero-inner {
  min-height: 30rem;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4.4rem);
  padding-block: clamp(2.8rem, 6.5vw, 5.75rem);
}
.eyebrow {
  margin: 0 0 .75rem;
  color: var(--red-dark);
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .105em;
  text-transform: uppercase;
}
h1, h2 { font-family: var(--serif); line-height: 1.025; letter-spacing: -.045em; }
h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(3.35rem, 6vw, 6.35rem);
  font-weight: 730;
}
.lead { max-width: 33rem; margin: 1.35rem 0 1.3rem; font-size: 1.1rem; }
.lesson-facts {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .85rem;
  padding: 0;
  margin: 0 0 1.55rem;
  list-style: none;
  font-size: .875rem;
  font-weight: 750;
}
.lesson-facts li + li::before {
  content: "·";
  color: var(--accent);
  margin: 0 .85rem 0 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .65rem 1.15rem;
  border: 1px solid var(--red-dark);
  border-radius: .3rem;
  color: #fff;
  background: var(--red-dark);
  font-weight: 800;
  text-decoration: none;
  transition: background-color 140ms ease;
}
.button:hover { background: #6c1815; }
.hero-image {
  min-width: 0;
  background: var(--fold);
  border: 1px solid #dfd0bf;
  padding: .48rem;
  border-radius: .4rem;
  box-shadow: 0 10px 22px #62391215;
}
.hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.calendar { padding-block: clamp(2.5rem, 6vw, 4.7rem) 3rem; scroll-margin-top: 1.25rem; }
.calendar-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.calendar-heading h2, .teaching h2 {
  font-size: clamp(2.1rem, 4vw, 3.45rem);
  margin: 0;
  font-weight: 720;
}
.calendar-heading p { color: var(--muted); margin: .6rem 0 0; }
.counter {
  flex: none;
  border: 1px solid #e3ccc3;
  border-radius: 2rem;
  padding: .45rem .85rem;
  background: var(--paper);
  font-size: .875rem;
  font-weight: 800;
}
.calendar-heading .counter { color: var(--red-dark); }
.calendar-status { color: var(--muted); font-size: .9rem; margin: .85rem 0 1.2rem; min-height: 1.4em; }
.retry {
  background: none;
  border: 1px solid var(--rule);
  border-radius: .3rem;
  color: var(--red-dark);
  padding: .45rem .75rem;
  margin-bottom: 1rem;
  cursor: pointer;
  font-weight: 700;
}
.door-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(.55rem, 1.3vw, 1rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.door-grid li { min-width: 0; }
.door {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  width: 100%;
  min-height: 9.25rem;
  padding: .8rem .95rem;
  overflow: hidden;
  color: #552823;
  background: #fcf4ec;
  border: 1px solid #d9bdb0;
  border-radius: .28rem;
  text-align: left;
  isolation: isolate;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.door::after {
  content: "";
  position: absolute;
  inset: .28rem;
  border: 1px solid #8c211a20;
  border-radius: .16rem;
  pointer-events: none;
}
.door:disabled { opacity: 1; }
.door-grid li:nth-child(4n + 2) .door:disabled { background: #f9ede6; }
.door-grid li:nth-child(4n + 3) .door:disabled { background: #f9f2e7; }
.door-grid li:nth-child(4n + 4) .door:disabled { background: #f7eee7; }
.door:not(:disabled) {
  color: #fff;
  cursor: pointer;
  background: var(--red-dark);
  border-color: var(--red-dark);
}
.door:not(:disabled)::after { border-color: #ffffff55; }
.door:not(:disabled):hover { background: #671714; transform: translateY(-3px); box-shadow: 0 8px 18px #6c181526; }
.door-month { font-size: .875rem; font-weight: 750; letter-spacing: .1em; }
.door-number { font: 730 clamp(2.65rem, 4vw, 3.65rem) / .95 var(--serif); letter-spacing: -.045em; }
.door-state {
  display: flex;
  align-items: center;
  gap: .56rem;
  margin-top: auto;
  font-size: .875rem;
  font-weight: 750;
}
.lock {
  position: relative;
  display: block;
  width: .67rem;
  height: .53rem;
  border: 1.4px solid currentColor;
  border-radius: 1.5px;
  flex: none;
  margin-top: .15rem;
}
.lock::before {
  position: absolute;
  content: "";
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: .37rem;
  height: .34rem;
  border: 1.4px solid currentColor;
  border-bottom: 0;
  border-radius: .25rem .25rem 0 0;
}
.door:not(:disabled) .lock::before { left: 70%; transform: translateX(-25%) rotate(22deg); transform-origin: bottom right; }
.teaching {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 2.6rem;
}
.teaching h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.teaching p { max-width: 54rem; }
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner { min-height: 5rem; flex-wrap: wrap; padding-block: .75rem; font-size: .9rem; }
.footer-inner > a { font-weight: 800; }
.lesson {
  position: fixed;
  width: min(100% - 2rem, 38rem);
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 1px solid #bda48f;
  border-radius: .6rem;
  background: #fff;
  color: var(--ink);
  overscroll-behavior: contain;
  box-shadow: 0 1rem 4rem #1f191b44;
}
.lesson::backdrop { background: #211618a6; }
.lesson-inner { position: relative; }
.dialog-close { position: absolute; top: .65rem; right: .65rem; z-index: 1; margin: 0; }
.dialog-close button {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #d9c9ba;
  border-radius: 50%;
  padding: 0 0 .12rem;
  background: #fff;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.dialog-close button:hover { border-color: var(--red-dark); color: var(--red-dark); }
.lesson-image { background: var(--fold); }
.lesson-image img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.lesson-image img:not([src]) { visibility: hidden; }
.lesson-body { padding: clamp(1.15rem, 4vw, 2rem); }
.lesson h2 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); }
.lesson-method { margin: .65rem 0; color: var(--muted); font-weight: 700; }
.lesson-download-info { color: var(--muted); margin: .6rem 0 0; font-size: .875rem; }
@media (max-width: 62rem) {
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
  .door-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 43rem) {
  .wrap { width: min(100% - 2rem, 71rem); }
  .hero-inner { grid-template-columns: 1fr; min-height: auto; padding-block: 2.3rem; gap: 1.45rem; }
  .hero-copy h1 { max-width: 100%; }
  .hero-image img { max-height: 17rem; }
  .calendar-heading { align-items: start; flex-direction: column; gap: .25rem; }
  .header-inner { min-height: 4rem; }
  .site-header .wide-nav { display: none; }
  .door { min-height: 7.6rem; padding: .6rem .65rem; }
  .door-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 22rem) {
  .door { align-items: center; text-align: center; padding-inline: .1rem; }
  .door-state { gap: .25rem; font-size: .82rem; flex-wrap: wrap; justify-content: center; }
  .lock { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
