/* ==========================================================================
   Avora Living – Grundlagen
   Farben, Schrift, Raster, Buttons und Hilfsklassen. Alle Bausteine der
   Seiten liegen in components.css.

   Farbregeln (Briefing):
   - Creme als Grundflaeche, dunkles Braun fuer grosse Flaechen und Footer,
     warmes Taupe als zweite Flaeche.
   - Gold nur fuer feine Linien und kleine Akzente - als Schriftfarbe auf
     Creme zu schwach (2,3:1). Auf Creme traegt Bronze die Akzentschrift.
   - Oliv fuer alle gefuellten Buttons und vereinzelte Akzente.
   ========================================================================== */

:root {
  /* Flaechen */
  --creme: #F2EDE7;
  --creme-2: #EAE3DA;
  --taupe: #D8CBBB;
  --taupe-2: #C9B9A5;
  --braun-950: #120E0D;
  --braun-900: #201813;
  --braun-800: #2A201A;
  --braun-700: #3A2D23;

  /* Akzente */
  --bronze: #74604D;          /* Akzentschrift auf Creme, 5,1:1 */
  --gold: #B39D78;            /* Linien; als Schrift nur auf Dunkel (6,7:1) */
  --gold-hell: #D2BD95;
  --gold-linie: rgba(179, 157, 120, .45);
  --oliv: #3F3E25;
  --oliv-hell: #53512F;
  --fehler: #9B3B2A;          /* 5,9:1 auf Creme */

  /* Schrift */
  --text: #231C17;
  --text-weich: #5E544B;      /* 6,3:1 auf Creme, 4,6:1 auf Taupe */
  --hell: #F3EEE8;
  --hell-weich: #BDB2A6;      /* 8,4:1 auf Braun */

  --linie-hell: rgba(35, 28, 23, .14);
  --linie-dunkel: rgba(243, 238, 232, .12);

  /* Kontextfarben - dunkle Bereiche ueberschreiben sie (siehe unten) */
  --leise: var(--text-weich);
  --akzent-schrift: var(--bronze);
  --fokus: var(--bronze);
  --rahmen: var(--gold);

  --serif: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  --sans: 'Jost', 'Futura', 'Avenir Next', system-ui, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --abstand: clamp(4.5rem, 10vw, 8.5rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --header-h: 88px;
}

/* Dunkle Bereiche: leise Schrift, Akzente und Fokusring werden heller */
.sektion--dunkel,
.kopfzeile,
.mobilnav,
.hero,
.cta,
.seitenkopf,
.fusszeile,
.lightbox,
.consent {
  --leise: var(--hell-weich);
  --akzent-schrift: var(--gold);
  --fokus: var(--gold-hell);
}

/* Taupe: Bronze waere hier zu schwach (3,7:1) */
.sektion--taupe {
  --akzent-schrift: var(--text-weich);
  --rahmen: rgba(116, 96, 77, .55);
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Keine berechnete Kursive/Fettung - siehe fonts.css */
  font-synthesis: none;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  /* Scrollbar darf die fixierte Kopfzeile nicht beschneiden */
  scrollbar-width: thin;
  overflow-y: auto;
}

/* WebKit kennt scrollbar-width nicht: Leiste ganz ausblenden, damit sie die fixe Kopfzeile nicht anschneidet */
html::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* Offenes Mobilmenue oder offener Dialog: die Seite darunter scrollt nicht mit */
html.menu-offen,
html:has(dialog[open]) {
  overflow: hidden;
}

/* Grundschrift und Grundfarbe. overflow-x: clip faengt breite Effekte ab, ohne position: sticky zu brechen */
body {
  min-height: 100vh;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--creme);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Medien-Reset: als Block (kein Zeilenabstand darunter) und nie breiter als der Container */
img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* Formularelemente erben Schrift und Farbe; Buttons starten ohne eigenes Aussehen */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

/* role=list erhaelt die Semantik, waehrend die Standardpunkte verschwinden */
ul[role='list'],
ol[role='list'] {
  padding: 0;
  list-style: none;
}

/* hidden muss gegen das display: grid/flex der Komponenten gewinnen */
[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Typografie
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
}

p,
li,
dd,
figcaption {
  text-wrap: pretty;
}

strong {
  font-weight: 500;
}

::selection {
  background: var(--gold);
  color: var(--braun-950);
}

/* --------------------------------------------------------------------------
   Fokus und Hilfsklassen
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 3px;
}

.skip {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 300;
  padding: .85rem 1.25rem;
  background: var(--hell);
  color: var(--braun-950);
  font: 500 .8rem/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .25s var(--ease-out);
}

.skip:focus {
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Raster und Sektionen
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--breite, 1240px));
  margin-inline: auto;
}

.container--breit {
  --breite: 1440px;
}

.container--schmal {
  --breite: 860px;
}

.sektion {
  padding-block: var(--abstand);
}

.sektion--dunkel {
  background: var(--braun-900);
  color: var(--hell);
}

.sektion--taupe {
  background: var(--taupe);
}

.sektion--creme-2 {
  background: var(--creme-2);
}

.sektion__aktion {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: clamp(3rem, 5vw, 4rem);
}

/* --------------------------------------------------------------------------
   Ueberschriften-Bausteine
   -------------------------------------------------------------------------- */
.eyebrow {
  display: block;
  margin-bottom: 1.1rem;
  font: 500 .75rem/1.4 var(--sans);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--akzent-schrift);
}

.titel {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.titel--satz {
  font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem);
  letter-spacing: 0;
  text-transform: none;
}

.trenner {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
}

.kopf {
  max-width: 46rem;
  margin: 0 auto clamp(2.75rem, 5vw, 4.25rem);
  text-align: center;
}

.kopf .trenner {
  margin: 1.5rem auto 0;
}

.kopf__text {
  margin-top: 1.25rem;
  font-size: 1.075rem;
  color: var(--leise);
}

.fliesstext > * + * {
  margin-top: 1.1rem;
}

.fliesstext p {
  color: var(--leise);
}

/* --------------------------------------------------------------------------
   Buttons - gefuellt immer in Oliv (Mockup)
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--oliv);
  --btn-fg: var(--hell);
  --btn-rand: rgba(210, 189, 149, .28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  min-height: 3.25rem;
  padding: 1rem 2rem;
  font: 500 .8rem/1.2 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-rand);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color .35s var(--ease-out),
    color .35s var(--ease-out),
    border-color .35s var(--ease-out);
}

.btn:hover {
  --btn-bg: var(--oliv-hell);
}

.btn .icon {
  width: 1.1em;
  height: 1.1em;
  transition: transform .35s var(--ease-out);
}

.btn:hover .icon {
  transform: translateX(4px);
}

/* Ohne Fuellung, fuer dunkle Flaechen */
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--hell);
  --btn-rand: var(--gold-linie);
}

.btn--ghost:hover {
  --btn-bg: rgba(179, 157, 120, .1);
  --btn-rand: var(--gold);
}

/* Ohne Fuellung, fuer helle Flaechen */
.btn--linie {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-rand: rgba(35, 28, 23, .35);
}

.btn--linie:hover {
  --btn-bg: var(--braun-900);
  --btn-fg: var(--hell);
  --btn-rand: var(--braun-900);
}

.btn--klein {
  min-height: 2.75rem;
  padding: .75rem 1.35rem;
  font-size: .72rem;
  letter-spacing: .14em;
}

.btn[disabled] {
  cursor: progress;
  opacity: .75;
}

.btn-reihe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 560px) {
  .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }
}

/* --------------------------------------------------------------------------
   Icons (SVG-Sprite am Seitenanfang)
   -------------------------------------------------------------------------- */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Einblenden beim Scrollen
   .js setzt ein Inline-Skript im <head>. Laedt main.js nicht, nimmt es die
   Klasse nach 4 s wieder weg - dann bleibt nichts unsichtbar.
   -------------------------------------------------------------------------- */
.js [data-reveal],
.js [data-reveal-group] > * {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 1s var(--ease-out),
    transform 1.1s var(--ease-out);
  transition-delay: calc(var(--index, 0) * 90ms);
}

.js [data-reveal].is-visible,
.js [data-reveal-group].is-visible > * {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal],
  .js [data-reveal-group] > * {
    opacity: 1;
    transform: none;
  }
}
