/* =========================================================================
   Studio Ruhe - Konzeptprojekt (R8)
   Eigenes Design-System, bewusst NICHT die Tokens der Hauptseite.
   Regeln: docs/REBRAND/03_REFERENZEN_SPEC.md §8 + 07_DESIGN_QUALITAET.md.
   Keine Kacheln, keine Icons ausser Nav/Formular, keine Sterne, keine
   Yoga-Silhouetten. Terrakotta traegt die Seite, nicht als Tupfer auf Beige.
   Organisch: die Bildmasken und der atmende Kreis, nicht die Flaechen.
   ========================================================================= */

@font-face {
  font-family: 'Petrona';
  src: url('assets/fonts/Petrona-latin.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('assets/fonts/DMSans-latin.woff2') format('woff2');
  font-weight: 100 1000; font-style: normal; font-display: swap;
}

:root {
  /* Palette (Brief). --terra traegt auf Sand nur grosse Schrift (3,3:1),
     deshalb --clay fuer Text und Flaechen, --muted fuer Fliesstext-Sekundaer. */
  --terra:   #c8623a;
  --clay:    #a3472a;   /* Text auf Sand 4,9:1 · Flaeche mit Sandtext 4,9:1 */
  --sand:    #f3e9dc;
  --sand-2:  #ece0cf;   /* Tonwert fuer den Kursplan, keine aufgehellte Akzentfarbe */
  --sand-3:  #fbf6ee;
  --olive:   #6b6b4a;   /* Linien und Marken (als Text zu schwach) */
  --olive-ink: #4f4f36; /* Lehrenden-Namen, 6,3:1 auf Sand-2 */
  --terra-light: #e08a5f; /* kleine Akzenttexte auf --ink, 5,4:1 */
  --muted:   #5b574c;   /* Sekundaertext, 6,1:1 auf Sand; auch Platzhalter auf --sand-3, 6,7:1 */
  --sand-dim: #efe1d3;  /* gedaempfter Text auf --clay, 4,69:1 - ersetzt opacity (R14, Spec §8 w) */
  --ink:     #2e2a26;
  --line:    #ddceb8;
  --line-2:  #c9b79c;
  --line-dark: #4a4239;

  --font-display: 'Petrona', 'Iowan Old Style', Georgia, serif;
  --font-text: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --d1:    clamp(3rem, 10vw, 7.5rem);
  --d2:    clamp(1.9rem, 4vw, 3.25rem);
  --d3:    clamp(1.5rem, 2.6vw, 2.25rem);
  --lead:  clamp(1.0625rem, 1.3vw, 1.3125rem);
  --body:  1.0625rem;
  --small: 0.9375rem;
  --micro: 0.8125rem;

  --gut:  clamp(1.25rem, 5vw, 3.5rem);
  --sec:  clamp(4.5rem, 10vw, 8.5rem);
  --measure: 62ch;
  --wrap: 1180px;

  --r: 4px;
  --dur: 300ms;
  --slow: 800ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --head-h: 68px;

  color-scheme: light;
}

/* --- Basis ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 20px);
}
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--body);
  line-height: 1.62;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}
.probe :focus-visible, .foot :focus-visible, .menu :focus-visible { outline-color: var(--sand); }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--sand); padding: 12px 18px; font-weight: 500;
}
.skip:focus { left: 8px; top: 8px; }

.h2 {
  font-family: var(--font-display);
  font-size: var(--d2); font-weight: 400;
  line-height: 1.06; letter-spacing: -0.012em;
  max-width: 18ch;
}
.h2--light { color: var(--sand); }

/* --- Buttons, Links ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: .8rem 1.6rem;
  background: var(--clay); color: var(--sand);
  border: 1px solid var(--clay); border-radius: 999px;
  font-weight: 500; font-size: var(--small);
  text-decoration: none; cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn--light { background: var(--sand); color: var(--clay); border-color: var(--sand); }
.btn--light:hover { background: var(--sand-3); border-color: var(--sand-3); color: var(--clay); }
.lnk {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--ink); font-weight: 500; font-size: var(--small);
  text-decoration: none; border-bottom: 1px solid var(--terra);
  transition: border-color var(--dur) var(--ease);
}
.lnk:hover { border-color: var(--ink); }

/* --- Kopf ----------------------------------------------------------------- */
.head {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1.25rem;
  height: var(--head-h); padding: 0 var(--gut);
  background: var(--sand);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.head.is-stuck { border-bottom-color: var(--line); }
.head__mark {
  margin-right: auto; padding-block: .4rem; text-decoration: none;
  font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -0.01em;
}
.head__nav { display: none; }
.head__nav ul { display: flex; gap: 1.5rem; }
.head__nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: var(--small); color: var(--muted); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.head__nav a:hover { color: var(--ink); border-bottom-color: var(--terra); }
.head__cta {
  display: none; align-items: center; min-height: 44px; padding: .5rem 1.2rem;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: var(--small); font-weight: 500; text-decoration: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.head__cta:hover { border-color: var(--clay); background: var(--sand-3); }

.burger {
  width: 44px; height: 44px; margin-right: -10px;
  display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; color: var(--ink);
}
.burger__box { display: block; width: 22px; }
.burger__box i { display: block; height: 1px; background: currentColor; margin: 6px 0; }

.menu {
  position: absolute; top: var(--head-h); left: 0; right: 0; z-index: 39;
  background: var(--sand); border-bottom: 1px solid var(--line);
  padding: .5rem var(--gut) 1.5rem;
}
.menu[hidden] { display: none; }
.menu a {
  display: block; padding: .7rem 0; text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-size: 1.4rem;
}
.menu li:last-child a { border-bottom: 0; }

/* --- Hero: Typografie mit atmendem Kreis ---------------------------------- */
.hero {
  position: relative;
  padding: clamp(4rem, 12vw, 9rem) var(--gut) clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}
/* Definierte Form mit harter Kante, kein Verlauf und kein Halo (07 §1). */
.atem {
  position: absolute; z-index: 0;
  left: clamp(-1rem, 3vw, 4.5rem); top: clamp(1rem, 4vw, 3rem);
  width: clamp(15rem, 33vw, 27rem); aspect-ratio: 1;
  border: 1px solid var(--terra); border-radius: 50%;
  animation: atem 9s var(--ease) infinite;
}
@keyframes atem {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.055); }
}
.hero__in { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; }
.hero__h1 {
  font-family: var(--font-display); font-size: var(--d1); font-weight: 400;
  line-height: .95; letter-spacing: -0.03em;
}
.hero__sub {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  font-size: var(--lead); color: var(--muted); max-width: 46ch;
}
.hero__now {
  margin-top: 1.5rem; padding-top: .9rem;
  border-top: 1px solid var(--line-2);
  font-size: var(--small); max-width: 44ch;
}
.hero__now strong { font-weight: 500; }
.hero__act { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }

/* --- Drei Wege: Bild-Text-Reihen mit organischer Maske -------------------- */
.wege { padding: var(--sec) var(--gut); max-width: var(--wrap); margin: 0 auto; }
.weg {
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; margin-top: clamp(2.5rem, 6vw, 5rem);
}
.weg__img img {
  width: 100%;
  border-radius: 58% 42% 47% 53% / 44% 51% 49% 56%;
}
.weg--flip .weg__img img { border-radius: 44% 56% 61% 39% / 53% 43% 57% 47%; }
.weg:last-child .weg__img img { border-radius: 51% 49% 38% 62% / 60% 47% 53% 40%; }
.weg__h {
  font-family: var(--font-display); font-size: var(--d3); font-weight: 400; line-height: 1.1;
}
.weg__txt p { margin-top: .9rem; max-width: 44ch; color: var(--muted); }
.weg__meta { font-size: var(--small); color: var(--olive-ink); }

/* --- Kursplan: Filter-Oberflaeche ----------------------------------------- */
.plan {
  background: var(--sand-2);
  border-block: 1px solid var(--line);
  padding: var(--sec) var(--gut);
}
.plan__head, .filter, .plan__count, .plan__list, .plan__empty {
  max-width: var(--wrap); margin-inline: auto;
}
.plan__lead { margin-top: 1rem; color: var(--muted); max-width: var(--measure); }

.filter { margin-top: clamp(2rem, 4vw, 3rem); display: grid; gap: 1rem; }
.filter__row { display: grid; gap: .5rem; }
.filter__lbl { font-size: var(--micro); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  min-height: 44px; padding: .45rem 1rem;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: var(--small); cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip:hover { border-color: var(--clay); }
.chip[aria-pressed="true"] { background: var(--clay); border-color: var(--clay); color: var(--sand); }
.filter__row--sel { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.filter__row--sel select {
  min-height: 44px; padding: .4rem .8rem;
  background: var(--sand-3); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: var(--small);
}
.reset {
  min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer;
  color: var(--clay); font-size: var(--small);
  border-bottom: 1px solid var(--terra);
}

.plan__count { margin-top: 1.75rem; font-size: var(--small); color: var(--muted); }
.plan__list { margin-top: .5rem; }
.tag { margin-top: 2.25rem; }
.tag[hidden] { display: none; }
.tag__h {
  display: flex; align-items: baseline; gap: .75rem;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 400;
  padding-bottom: .5rem; border-bottom: 1px solid var(--line-2);
}
.tag__heute {
  font-family: var(--font-text); font-size: var(--micro);
  color: var(--sand); background: var(--clay);
  padding: .15rem .6rem; border-radius: 999px;
}
.tag__heute[hidden] { display: none; }

.kurs {
  display: grid; gap: .1rem .5rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.kurs[hidden] { display: none; }
.kurs__zeit {
  font-family: var(--font-display); font-size: 1.35rem;
  font-variant-numeric: lining-nums tabular-nums;
}
.kurs__zeit span { font-family: var(--font-text); font-size: var(--micro); color: var(--muted); }
.kurs__titel { font-size: 1.0625rem; font-weight: 500; }
.kurs__meta { font-size: var(--small); color: var(--muted); }
.kurs__wer { font-size: var(--small); color: var(--olive-ink); }
.pick {
  min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer;
  color: var(--clay); font-size: var(--small);
  border-bottom: 1px solid var(--terra);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.pick:hover { color: var(--ink); border-color: var(--ink); }
.plan__empty { margin-top: 2rem; color: var(--muted); max-width: var(--measure); }
.plan__empty[hidden] { display: none; }

/* --- Bildband -------------------------------------------------------------- */
.band { margin: 0; }
.band img { width: 100%; }
.band figcaption {
  max-width: var(--wrap); margin: .9rem auto 0; padding: 0 var(--gut);
  font-size: var(--small); color: var(--muted);
}

/* --- Preise: drei Spalten mit Linien, keine Karten ------------------------- */
.preise { padding: var(--sec) var(--gut); max-width: var(--wrap); margin: 0 auto; }
.preise__lead { margin-top: 1rem; color: var(--muted); max-width: var(--measure); }
.tarife { margin-top: clamp(2rem, 4vw, 3rem); display: grid; }
.tarif { padding: 1.75rem 0; border-top: 1px solid var(--line-2); }
.tarif__n { font-family: var(--font-display); font-size: 1.4rem; }
.tarif__p {
  font-family: var(--font-display); font-size: clamp(2.75rem, 6vw, 4rem);
  line-height: 1; color: var(--clay); margin: .35rem 0 .9rem;
}
.tarif__p span { font-size: .4em; }
.tarif__d { font-size: var(--small); color: var(--muted); }
.preise__fuss {
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line-2);
  font-size: var(--small); color: var(--muted); max-width: 62ch;
}

/* --- Brief an Einsteiger ---------------------------------------------------- */
.brief { background: var(--sand-3); border-block: 1px solid var(--line); padding: var(--sec) var(--gut); }
.brief__in { max-width: var(--wrap); margin: 0 auto; }
.brief__h { max-width: 22ch; }
.brief__txt {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 56ch;
  font-size: clamp(1.0625rem, 1.35vw, 1.1875rem);
  line-height: 1.75;
}
.brief__txt p + p { margin-top: 1.1rem; }
.brief__sig { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.35; }

/* --- Acht Lehrende: Namensband ---------------------------------------------- */
.team { padding: var(--sec) var(--gut); max-width: var(--wrap); margin: 0 auto; }
.team__txt { margin-top: 1rem; color: var(--muted); max-width: var(--measure); }
.team__band {
  margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.5rem;
  border-top: 1px solid var(--line-2);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.5rem); line-height: 1.35;
}
.team__band span { display: inline-block; white-space: nowrap; }
.team__band span::after { content: ' · '; color: var(--terra); }
.team__band span:last-child::after { content: ''; }

/* --- Probestunde: die eine Flaeche in der Akzentfarbe ----------------------- */
.probe { background: var(--clay); color: var(--sand); padding: var(--sec) var(--gut); }
.probe__in { max-width: var(--wrap); margin: 0 auto; }
.probe__lead { margin-top: 1rem; max-width: var(--measure); }
.form { margin-top: clamp(2rem, 4vw, 2.75rem); max-width: 42rem; }
.row { display: grid; gap: 1.25rem; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: var(--small); font-weight: 500; margin-bottom: .4rem; }
.field__opt { font-weight: 400; color: var(--sand-dim); }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: .7rem 1rem;
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--sand-3);
  border: 1px solid transparent; border-radius: var(--r);
}
.field textarea { min-height: 6rem; resize: vertical; line-height: 1.55; }
/* Ohne eigene Regel setzt Chromium #757575 - auf --sand-3 nur 4,28:1 (R14). */
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:hover, .field textarea:hover { border-color: var(--sand); }
.field input[readonly] { color: var(--muted); }
.field.is-bad input { border-color: #6d1f14; background: #fdeee9; }
.field__hint { margin-top: .45rem; font-size: var(--micro); color: var(--sand-dim); }
.clear {
  background: none; border: 0; padding: 0 0 0 .25rem; cursor: pointer;
  color: var(--sand); font-size: var(--micro); border-bottom: 1px solid currentColor;
}
.clear[hidden] { display: none; }
.err { margin-top: .4rem; font-size: var(--micro); font-weight: 500; color: #ffe1d8; }
.form__note { margin-top: 1rem; font-size: var(--small); color: var(--sand-dim); }

/* --- Wo wir sind ------------------------------------------------------------ */
.wo { padding: var(--sec) var(--gut); }
.wo__grid { max-width: var(--wrap); margin: 0 auto; display: grid; gap: clamp(2rem, 4vw, 4rem); }
.wo__adr { margin-top: 1.5rem; font-size: var(--lead); }
.wo__mail { margin-top: .6rem; font-size: var(--small); color: var(--muted); }
.wo__h { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: .35rem; }
.wo__h + p { color: var(--muted); max-width: 46ch; margin-bottom: 1.5rem; }
.wo__txt p:last-child { margin-bottom: 0; }

/* --- Fuss -------------------------------------------------------------------- */
.foot { background: var(--ink); color: var(--sand); padding: clamp(3rem, 6vw, 4.5rem) var(--gut) 2rem; }
.foot__grid {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; gap: 2rem; font-size: var(--small);
}
.foot__mark { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: .3rem; }
.foot__h { font-size: var(--micro); font-weight: 500; color: var(--terra-light); margin-bottom: .5rem; font-family: var(--font-text); }
.foot__nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.foot__note {
  max-width: var(--wrap); margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  padding-top: 1.25rem; border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between;
  font-size: var(--micro);
}
.foot__more {
  background: none; border: 0; padding: .6rem 0; min-height: 44px; cursor: pointer;
  color: var(--terra-light); font-size: var(--micro); border-bottom: 1px solid var(--terra-light);
}
.about { max-width: 70ch; margin: 1.25rem auto 0; font-size: var(--micro); }
.about[hidden] { display: none; }
.about p + p { margin-top: .6rem; }

/* --- Toast ------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 80; max-width: min(92vw, 34rem);
  padding: .9rem 1.2rem; border-radius: var(--r);
  background: var(--ink); color: var(--sand); font-size: var(--small);
  box-shadow: 0 12px 34px rgba(46, 42, 38, .22);
}

/* --- Reveal: langsame Einblendung, Maske auf den Kindern (Spec §8 h) --------- */
[data-reveal] > * {
  opacity: 0; transform: translateY(10px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
[data-reveal] > * + * { transition-delay: 90ms; }
[data-reveal].is-visible > * { opacity: 1; transform: none; }
html:not(.js) [data-reveal] > * { opacity: 1; transform: none; }

/* --- Breakpoints -------------------------------------------------------------- */
@media (min-width: 620px) {
  .row { grid-template-columns: 1fr 1fr; }
  .kurs {
    grid-template-columns: 7.5rem minmax(0, 1fr) auto;
    align-items: baseline;
  }
  .kurs__zeit { grid-row: 1 / span 2; }
  .kurs__titel { grid-column: 2; }
  .kurs__meta { grid-column: 2; }
  .kurs__wer { grid-column: 3; grid-row: 1; text-align: right; }
  .kurs__act { grid-column: 3; grid-row: 2; text-align: right; }
  .wo__grid { grid-template-columns: 1fr 1.3fr; }
}

@media (min-width: 860px) {
  .tarife { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .tarif { padding: 0 2rem; border-top: 0; border-left: 1px solid var(--line-2); }
  .tarif:first-child { padding-left: 0; border-left: 0; }
  .tarif:last-child { padding-right: 0; }
  .foot__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .weg { grid-template-columns: 5fr 7fr; }
  .weg--flip .weg__img { order: 2; }
  .weg--flip .weg__txt { order: 1; }
}

@media (min-width: 1000px) {
  :root { --head-h: 76px; }
  .head__nav { display: block; }
  .head__cta { display: inline-flex; }
  .burger, .menu { display: none; }
  .filter { gap: .75rem; }
  .filter__row { grid-template-columns: 5.5rem minmax(0, 1fr); align-items: center; gap: 1rem; }
  .filter__row--sel { display: grid; }
  .filter__row--sel select { justify-self: start; }
  .reset { grid-column: 2; justify-self: start; }
  .kurs { grid-template-columns: 8.5rem minmax(0, 1fr) 12rem auto; }
  .kurs__wer { grid-column: 3; grid-row: 1 / span 2; text-align: left; align-self: center; }
  .kurs__act { grid-column: 4; grid-row: 1 / span 2; text-align: right; align-self: center; }
}

/* --- Bewegung aus -------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .atem { animation: none; }
  [data-reveal] > * { opacity: 1 !important; transform: none !important; }
}
html.reduce .atem { animation: none; }
html.reduce [data-reveal] > * { opacity: 1; transform: none; }
