/* =========================================================================
   ellemoose — ein Stylesheet, keine Abhaengigkeiten.
   Aufbau: 1 Schriften  2 Tokens  3 Grundlagen  4 Layout  5 Kopf/Fuss
           6 Bausteine  7 Seiten  8 Formular  9 Lightbox
   ========================================================================= */

/* --- 1 Schriften --------------------------------------------------------- */
/* Selbst gehostet. font-display:swap, damit Text sofort lesbar ist. */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --- 2 Tokens ------------------------------------------------------------ */
:root {
  --paper:  #faf9f6;
  --raised: #ffffff;
  --tint:   #f1eee7;
  --ink:    #1a1917;
  --muted:  #6d6960;
  --line:   #e3dfd6;
  --accent: #2e5544;          /* gedaempftes Waldgruen */
  --focus:  #b4552a;

  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* Fluide Schriftgroessen: waechst mit dem Fenster, ohne Media Queries. */
  --fs-xs:  0.8125rem;
  --fs-sm:  0.9375rem;
  --fs-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-h3:  clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-h2:  clamp(1.5rem, 1.3rem + 0.9vw, 2.125rem);
  --fs-h1:  clamp(2rem, 1.6rem + 2vw, 3.5rem);
  --fs-hero: clamp(2.75rem, 1.9rem + 4vw, 5.5rem);

  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 3rem;     --sp-8: 4.5rem;
  --sp-9: 7rem;

  --wrap: 74rem;
  --radius: 3px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.015em; }
p { margin: 0 0 var(--sp-4); }
img, picture, svg { max-width: 100%; }
img { display: block; height: auto; }

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

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

.muted { color: var(--muted); }
.center { text-align: center; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li + li { margin-top: var(--sp-2); }

/* Sprungmarke: erst beim Tabben sichtbar. */
.skip {
  position: absolute; left: var(--sp-4); top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: var(--sp-3) var(--sp-4); text-decoration: none;
  transition: top .15s var(--ease);
}
.skip:focus { top: var(--sp-4); }

/* --- 4 Layout ------------------------------------------------------------ */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 44rem); }

.section { padding-block: var(--sp-8); }
.section--tint { background: var(--tint); }
.section__title {
  font-size: var(--fs-h2);
  margin-bottom: var(--sp-5);
}
.section__more { margin-top: var(--sp-6); }

.page-head { max-width: 44rem; margin-bottom: var(--sp-7); }
.page-head__title { font-size: var(--fs-h1); margin-bottom: var(--sp-4); }
.page-head__lead { font-size: var(--fs-lead); color: var(--muted); margin: 0; }
/* Folgeabsaetze im Seitenkopf brauchen wieder Abstand, weil der Vorspann
   selbst keinen unteren Rand hat. */
.page-head__lead + p { margin-top: var(--sp-4); }
.page-head p + p:last-of-type { margin-bottom: 0; }
.page-head .btn { margin-top: var(--sp-5); }

.lead { font-size: var(--fs-lead); color: var(--muted); }

.prose { max-width: 42rem; }
.prose h2 { font-size: var(--fs-h3); margin: var(--sp-6) 0 var(--sp-3); }
.prose p { margin-bottom: var(--sp-4); }
.prose a { color: var(--accent); }

/* --- 5 Kopf und Fuss ----------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
  min-height: 4.25rem;
}

/* Elch-Silhouette. Dezent gehalten: im Kopf klein neben dem Namen, im Fuss
   etwas groesser und stark abgeschwaecht, damit sie Textur gibt statt
   Aufmerksamkeit zu ziehen. */
.brand {
  text-decoration: none; line-height: 1.1;
  display: grid; align-items: center;
  grid-template-columns: auto 1fr;
  grid-template-areas: "moose name" "moose by";
  column-gap: 0.55rem;
}
.brand__name { grid-area: name; }
.brand__by   { grid-area: by; }
.brand__moose {
  grid-area: moose;
  display: block; width: 2.1rem;
  opacity: .82;
  transition: opacity .2s var(--ease), transform .3s var(--ease);
}
.brand:hover .brand__moose { opacity: 1; transform: translateX(2px); }

.site-foot__moose {
  display: block; width: 4.5rem;
  opacity: .16;
  margin-bottom: var(--sp-3);
}
.brand__name {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.375rem; letter-spacing: 0.02em;
}
.brand__moose img { width: 100%; height: auto; }
.site-foot__moose img { width: 100%; height: auto; }
.brand__by { font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0.04em; }

.nav { display: flex; align-items: center; gap: var(--sp-6); }
.nav__list { display: flex; gap: var(--sp-5); list-style: none; margin: 0; padding: 0; }
.nav__list a {
  text-decoration: none; font-size: var(--fs-sm); letter-spacing: 0.01em;
  padding-block: var(--sp-2);
  border-bottom: 1px solid transparent;
}
.nav__list a:hover { border-bottom-color: var(--line); }
.nav__list a[aria-current="page"] { border-bottom-color: var(--accent); }

.langs { display: flex; gap: var(--sp-2); list-style: none; margin: 0; padding: 0;
         font-size: var(--fs-xs); letter-spacing: 0.06em; }
.langs li + li::before { content: '/'; color: var(--line); margin-right: var(--sp-2); }
.langs a { text-decoration: none; color: var(--muted); }
.langs a:hover { color: var(--ink); }
.langs__on { font-weight: 600; }

.burger { display: none; }

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: var(--sp-7) var(--sp-6);
  margin-top: var(--sp-8);
  font-size: var(--fs-sm);
}
.site-foot__in {
  display: grid; gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}
.site-foot__brand { font-family: var(--serif); font-size: 1.25rem; margin: 0 0 var(--sp-1); }
.site-foot__note {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: var(--sp-5); margin: 0;
  font-size: var(--fs-xs);
}

/* --- 6 Bausteine --------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  padding: 0.7rem 1.4rem;
  font-size: var(--fs-sm); letter-spacing: 0.02em;
  text-decoration: none; border: 1px solid var(--ink);
  border-radius: var(--radius); cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--small { padding: 0.45rem 0.9rem; font-size: var(--fs-xs); }

.link-more, .link-back {
  text-decoration: none; color: var(--accent);
  font-size: var(--fs-sm); letter-spacing: 0.01em;
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
}
.link-more::after { content: ' →'; }
.link-back::before { content: '← '; }

.tag {
  display: inline-block; margin-top: var(--sp-2);
  font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line);
  padding: 0.1rem 0.5rem; border-radius: 999px;
}

.note {
  border-left: 2px solid var(--accent);
  padding-left: var(--sp-4);
  color: var(--ink);
}
.note--muted { border-left-color: var(--line); color: var(--muted); }

.callout {
  background: var(--tint);
  padding: var(--sp-6);
  border-radius: var(--radius);
  margin-top: var(--sp-8);
  max-width: 46rem;
}
.callout__title { font-size: var(--fs-h3); margin-bottom: var(--sp-3); }
.callout p:last-child { margin-bottom: 0; }

/* Raster und Karten */
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--sp-6);
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}
.card__link { text-decoration: none; display: block; }
.card__media {
  display: block; overflow: hidden;
  background: var(--tint); border-radius: var(--radius);
  aspect-ratio: 4 / 3;
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.card__link:hover .card__media img { transform: scale(1.03); }
.card__body { display: block; padding-top: var(--sp-3); }
.card__title {
  display: block; font-family: var(--serif); font-size: var(--fs-h3);
  line-height: 1.25;
}
.card__lead { display: block; color: var(--muted); font-size: var(--fs-sm); margin-top: var(--sp-1); }

/* Modell- und Teilekarten sind unterschiedlich lang. Als Flex-Spalte mit
   automatischem Abstand vor dem Fuss stehen Preis und Schaltflaeche in
   allen Karten einer Reihe auf derselben Hoehe. */
/* Modell- und Teilekarten sind unterschiedlich lang. Damit Preis und Fuss in
   einer Reihe auf gleicher Hoehe stehen, muss die Flex-Kette durchgehen:
   Karte -> Link -> Koerper. Fehlt ein Glied, greift margin-top:auto nicht. */
.card--model, .card--part { display: flex; flex-direction: column; }
.card--model .card__link { display: flex; flex-direction: column; flex: 1; }
.card--model .card__body, .card--part .card__body {
  display: flex; flex-direction: column; flex: 1;
}
.card--model .card__lead, .card--part .card__lead { margin-bottom: var(--sp-3); }

/* Beschreibung auf zwei Zeilen begrenzen, sonst schiebt eine laengere
   Karte die ganze Reihe auseinander. */
.card--model .card__lead, .card--part .card__lead {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Auch der Titel darf hoechstens zwei Zeilen brauchen. */
.card--model .card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price { margin-top: auto; padding-top: var(--sp-2); font-size: var(--fs-sm); }
.price .muted { margin-left: var(--sp-2); font-size: var(--fs-xs); }
.price--detail { margin-top: var(--sp-5); }

/* Videokarten: 16:9 statt 4:3, mit Abspielzeichen und Laufzeit. */
.grid--videos { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.card__media--video { aspect-ratio: 16 / 9; position: relative; }
.card__title--video { font-size: var(--fs-base); font-family: var(--sans); font-weight: 600; }
.card--video .card__lead { color: var(--accent); }

.play {
  position: absolute; inset: 0; margin: auto;
  width: 3.25rem; height: 3.25rem;
  display: grid; place-items: center;
  background: rgba(20, 19, 17, .72); color: #fff;
  border-radius: 999px;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.play svg { margin-left: 2px; }
.card__link:hover .play { background: var(--accent); transform: scale(1.08); }

.dur {
  position: absolute; right: .5rem; bottom: .5rem;
  background: rgba(20, 19, 17, .82); color: #fff;
  font-size: var(--fs-xs); font-variant-numeric: tabular-nums;
  padding: .1rem .4rem; border-radius: 3px;
}

.small { font-size: var(--fs-xs); }

/* Platzhalter, solange kein Bild vorliegt */
.ph {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(-45deg,
      var(--tint) 0 10px, color-mix(in srgb, var(--tint) 60%, var(--paper)) 10px 20px);
  color: var(--muted);
}
.ph--model span { font-family: var(--serif); font-size: 2.5rem; opacity: .45; }
.ph--soon span {
  font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--paper); padding: 0.25rem 0.7rem; border-radius: 999px;
}

/* --- 7 Seiten ------------------------------------------------------------ */
/* Startseite */
.hero { padding-block: var(--sp-8) var(--sp-7); }
.hero__in {
  display: grid; gap: var(--sp-7);
  grid-template-columns: 1fr;
  align-items: center;
}
.hero__title {
  font-size: var(--fs-hero); letter-spacing: -0.03em; line-height: 0.95;
  margin-bottom: var(--sp-3);
}
.hero__tagline {
  font-size: var(--fs-lead); color: var(--accent);
  margin-bottom: var(--sp-5);
}
.hero__intro { max-width: 34rem; color: var(--muted); margin-bottom: var(--sp-6); }
.hero__img img { width: 100%; border-radius: var(--radius); }

.band { display: grid; gap: var(--sp-7); grid-template-columns: 1fr; }

/* Detailseite */
.detail { padding-block: var(--sp-6) var(--sp-8); }
.crumb { margin-bottom: var(--sp-6); }
.detail__head { max-width: 44rem; margin-bottom: var(--sp-6); }
.detail__title { font-size: var(--fs-h1); margin-bottom: var(--sp-3); }
.detail__lead { font-size: var(--fs-lead); color: var(--muted); margin: 0; }
.detail__hero { margin: 0 0 var(--sp-7); }
/* Hochformate wuerden sonst den ganzen Bildschirm fuellen und alles
   Weitere unter die Falz druecken. Deshalb Hoehe begrenzen und mittig
   setzen; Querformate bleiben dadurch unveraendert volle Breite. */
.detail__hero img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  object-position: center;
  border-radius: var(--radius);
  margin-inline: auto;
}
.detail__body { margin-bottom: var(--sp-8); }
.detail__gallery { margin-bottom: var(--sp-8); }

.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

.zoomable { cursor: zoom-in; }

.pager {
  display: flex; justify-content: space-between; gap: var(--sp-5);
  border-top: 1px solid var(--line); padding-top: var(--sp-5);
}
.pager a { text-decoration: none; display: grid; gap: var(--sp-1); max-width: 45%; }
.pager__next { text-align: right; }
.pager__hint { font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0.04em; }
.pager__name { font-family: var(--serif); font-size: var(--fs-h3); }
.pager a:hover .pager__name { color: var(--accent); }

/* Kontakt */
.contact { display: grid; gap: var(--sp-8); grid-template-columns: 1fr; }
.contact__sub { font-size: var(--fs-h3); margin: var(--sp-6) 0 var(--sp-3); }
.signoff { font-family: var(--serif); font-size: var(--fs-lead); }

/* --- 8 Formular ---------------------------------------------------------- */
.form { max-width: 34rem; }
.field { margin-bottom: var(--sp-5); }
.field label {
  display: block; font-size: var(--fs-sm); margin-bottom: var(--sp-2);
  letter-spacing: 0.01em;
}
.req { color: var(--focus); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: var(--fs-base);
  color: var(--ink); background: var(--raised);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
  transition: border-color .15s var(--ease);
}
.field input:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 9rem; }
.field [aria-invalid="true"] { border-color: var(--focus); }
.field__err { color: var(--focus); font-size: var(--fs-sm); margin: var(--sp-2) 0 0; }

.form__hint { font-size: var(--fs-xs); margin-top: var(--sp-4); }
.form__hint a { color: var(--accent); }

.alert {
  padding: var(--sp-4); border-radius: var(--radius);
  margin-bottom: var(--sp-5); font-size: var(--fs-sm);
}
.alert--ok  { background: color-mix(in srgb, var(--accent) 12%, var(--paper));
              border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--paper)); }
.alert--err { background: color-mix(in srgb, var(--focus) 10%, var(--paper));
              border: 1px solid color-mix(in srgb, var(--focus) 35%, var(--paper)); }

/* Honigtopf: fuer Menschen und Vorleseprogramme unsichtbar, im DOM vorhanden. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- 9 Lightbox ---------------------------------------------------------- */
/* <dialog>: eigene Grundwerte zuruecksetzen, sonst begrenzt der Browser
   Breite und Hoehe und setzt Rahmen und Aussenabstand. */
.lb {
  position: fixed; inset: 0;
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; border: 0;
  background: rgba(20, 19, 17, .94);
  color: #f3f1ec;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: var(--sp-4);
}
.lb:not([open]) { display: none; }
.lb::backdrop { background: rgba(20, 19, 17, .94); }
.lb__bar { display: flex; justify-content: space-between; align-items: center; color: #f3f1ec; }
.lb__count { font-size: var(--fs-sm); letter-spacing: 0.04em; }
/* Flex statt Grid: nur so bezieht sich max-height:100% des Bildes auf die
   feste Zeilenhoehe. Im Grid bemisst sich die implizite Zeile am Bild selbst,
   das Bild waere also nie begrenzt und wuerde die Schaltflaechen ueberdecken. */
.lb__stage {
  display: flex; align-items: center; justify-content: center;
  min-height: 0; overflow: hidden;
}
.lb__stage picture { display: contents; }
.lb__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); }
.lb__nav { display: flex; justify-content: center; gap: var(--sp-4); padding-top: var(--sp-3); }
.lb button {
  font: inherit; font-size: var(--fs-sm);
  background: transparent; color: #f3f1ec;
  border: 1px solid rgba(243, 241, 236, .35);
  border-radius: var(--radius); padding: 0.5rem 1rem; cursor: pointer;
}
.lb button:hover { border-color: #f3f1ec; }
.lb button[disabled] { opacity: .35; cursor: default; }

/* --- Breite Fenster ------------------------------------------------------ */
@media (min-width: 40rem) {
  .contact { grid-template-columns: 1fr; }
}

@media (min-width: 60rem) {
  .hero { padding-block: var(--sp-9) var(--sp-8); }
  .hero__in { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .band { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .contact { grid-template-columns: 1fr 1.1fr; gap: var(--sp-9); }
}

/* --- Schmale Fenster: Menue einklappen ----------------------------------- */
@media (max-width: 52rem) {
  .burger {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    font: inherit; font-size: var(--fs-sm);
    background: none; border: 0; color: inherit; cursor: pointer;
    padding: var(--sp-2);
  }
  .burger__box { display: grid; gap: 4px; width: 20px; }
  .burger__box span { display: block; height: 1.5px; background: currentColor;
                      transition: transform .2s var(--ease), opacity .2s var(--ease); }
  .burger[aria-expanded="true"] .burger__box span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .burger[aria-expanded="true"] .burger__box span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] .burger__box span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

  /* Ohne JavaScript bleibt die Navigation eine gewoehnliche Liste unter dem
     Kopf. Sonst stuende das Klappmenue dauerhaft offen ueber dem Inhalt,
     weil nur JavaScript das hidden-Attribut setzt. */
  .no-js .burger { display: none; }
  .no-js .site-head { position: static; }
  .no-js .site-head__in { flex-wrap: wrap; padding-bottom: var(--sp-4); }
  .no-js .nav {
    position: static; flex-direction: row; flex-wrap: wrap;
    width: 100%; padding: 0; gap: var(--sp-4);
    background: none; border: 0;
  }
  .no-js .nav__list { flex-direction: row; flex-wrap: wrap; gap: var(--sp-4); }
  .no-js .nav__list a { font-size: var(--fs-sm); font-family: var(--sans); }

  .nav {
    position: fixed; inset: 4.25rem 0 auto;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start;
    gap: var(--sp-5);
    padding: var(--sp-6) 1.25rem var(--sp-7);
  }
  .nav[hidden] { display: none; }
  .nav__list { flex-direction: column; gap: var(--sp-4); }
  .nav__list a { font-size: var(--fs-h3); font-family: var(--serif); }
  .pager a { max-width: 48%; }
}

/* --- Bewegung sparsam ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
