/* =========================================================
   HUNDEWETTER – clean.css
   Gemeinsame Grundlage für Startseite (index.html) und Produktseite (produkt.html).
   Wird NACH styles.css bzw. produkt.css geladen.

   Inhalt:
   1. Tokens (Farben, Schrift, Abstände)
   2. Basis-Typografie
   3. Kopfzeile (Logo · Navigation · Warenkorb · Menü)
   4. Knöpfe und Textlinks
   5. Logo-Stempel (Farben)

   Farbregel: Weiß, Tinte, ein neutraler Flächenton. Rot nur als kleiner Akzent
   (Logo, Kauf-Knopf, kleine Markierungen). Das Marken-Hellblau (--sky) gehört genau EINEM
   Abschnitt: „Größe finden“ auf der Startseite. Sonst nirgends farbige Flächen, kein Creme.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #fff;                              /* Seitenhintergrund */
  --ink: #1b1b1b;                          /* Text */
  --muted: rgba(27, 27, 27, .55);          /* Nebentext */
  --line: rgba(27, 27, 27, .12);           /* Haarlinien */
  --line-strong: rgba(27, 27, 27, .22);    /* Umrandung von Bedienelementen */
  --panel: #f5f4f0;                        /* einziger Flächenton */
  --red: #e33529;                          /* Akzent */
  --sky: #afd8fb;                          /* Marken-Hellblau: nur der Abschnitt „Größe finden“ */
  --on-sky: rgba(27, 27, 27, .78);         /* Nebentext auf Hellblau (Kontrast ca. 6 : 1) */

  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --logo-font: "Bayon", "Bebas Neue", "Impact", sans-serif;   /* nur im Logo */

  --h1: clamp(44px, 7.5vw, 128px);         /* Hero-Überschrift (Obergrenze) */
  --h2: clamp(28px, 3.6vw, 56px);          /* Abschnittstitel */
  --h3: clamp(20px, 1.8vw, 26px);

  --hdr: 64px;                             /* Höhe der Kopfzeile */
  --gutter: clamp(20px, 4vw, 56px);        /* Seitenrand */
  --section-y: clamp(72px, 10vw, 160px);   /* Abstand über/unter Abschnitten */
  --maxw: 1600px;                         /* größte Inhaltsbreite */
  --radius: 2px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Alte Namen aus styles.css / produkt.css zeigen auf die neuen Werte,
     damit nirgends mehr Creme, Hellblau oder die Plakatschrift auftaucht. */
  --cream: #fff;
  --blue: var(--panel);
  --white: #fff;
  --display: var(--sans);
  --body: var(--sans);
}
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  :root { --hdr: 56px; --gutter: clamp(16px, 5vw, 28px); }
}

/* ---------- 2. Basis-Typografie ---------- */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }

/* kleine Überzeile über Titeln */
.eyebrow {
  display: block;
  font-size: 11.5px; line-height: 1.3; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}

:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; }

/* ---------- 3. Kopfzeile ----------
   Schmaler weißer Balken, bleibt beim Scrollen oben stehen.
   position: sticky → die Kopfzeile nimmt ihren Platz selbst ein, Inhalte rutschen
   nie darunter (kein zusätzlicher Abstand am Seitenanfang nötig). */
.header {
  position: sticky; top: 0; left: auto; right: auto; z-index: 50;
  height: var(--hdr);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 0 var(--gutter);
  background: transparent;   /* weiße Fläche + Linie liegen in ::before (blendet über dem Hero aus) */
  border-bottom: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  color: var(--ink);
}
.header::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 -1px;
  background: #fff; border-bottom: 1px solid var(--line);
  transition: opacity .5s var(--ease);
}

/* Logo: Stempel + Wortmarke in einer Zeile */
.logo {
  position: static; justify-self: start;
  display: inline-flex; align-items: center; gap: 9px;
  height: auto; color: var(--red);
}
.logo__mark { width: 40px; height: 40px; margin: 0; flex: none; }
.logo__word {
  font-family: var(--logo-font); font-size: 29px; line-height: 1; font-weight: 400;
  letter-spacing: .01em; text-transform: uppercase; white-space: nowrap;
  padding-top: 3px;   /* Bayon sitzt optisch etwas hoch */
}
.logo__word br { display: none; }

/* Navigation */
.nav {
  position: static; transform: none;
  display: flex; align-items: center; gap: clamp(20px, 2.6vw, 38px);
  font-size: 13px; line-height: 1; letter-spacing: .04em; white-space: nowrap;
}
.nav a { position: relative; padding: 8px 0; color: var(--ink); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .4s cubic-bezier(.7, 0, .2, 1);
}
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

/* rechts: Warenkorb (+ Menü am Handy) */
.header__actions { justify-self: end; display: flex; align-items: center; gap: 6px; margin-right: -8px; }
.cart, .menu-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 8px;
  border: 0; background: none; color: var(--ink); cursor: pointer;
  font-size: 13px; letter-spacing: .04em; line-height: 1;
}
.cart svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cart__count { font-size: 11px; font-variant-numeric: tabular-nums; }
.menu-btn { display: none; }
.menu-btn__icon { position: relative; width: 18px; height: 10px; }
.menu-btn__icon::before, .menu-btn__icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.4px; background: currentColor;
  transition: transform .3s var(--ease);
}
.menu-btn__icon::before { top: 1px; }
.menu-btn__icon::after { bottom: 1px; }
.header.is-open .menu-btn__icon::before { transform: translateY(3.3px) rotate(45deg); }
.header.is-open .menu-btn__icon::after { transform: translateY(-3.3px) rotate(-45deg); }

/* Kopfzeile über dem Kino-Hero der Startseite (main.js setzt .is-over, solange der Hero darunter liegt):
   ausgeblendet – der Hero hat Logo, Navigation, Korb und runden Menü-Knopf selbst. Nach dem Hero blendet der
   weiße Balken weich ein. Der Menü-Knopf im Hero öffnet sie (.is-open): dann immer der weiße Balken mit allen Links. */
.header { transition: opacity .45s var(--ease), visibility 0s 0s; }
.header.is-over:not(.is-open) { opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility 0s .3s; }

/* alter „Jetzt shoppen“-Reiter: entfällt */
.btn-tab { display: none; }

/* Handy / Hochkant: Logo links, Warenkorb + Menü rechts, Links als weißes Aufklappfeld */
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .header { grid-template-columns: 1fr auto; gap: 12px; }
  .logo__mark { width: 34px; height: 34px; }
  .logo__word { font-size: 24px; }
  .menu-btn { display: inline-flex; gap: 8px; }
  .cart, .menu-btn { height: 44px; }   /* Tippfläche */
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px var(--gutter) 12px;
    background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    font-size: 16px; letter-spacing: .01em;
  }
  .header.is-open .nav { display: flex; }
  .nav a { padding: 16px 0; }
  .nav a + a { border-top: 1px solid var(--line); }
  .nav a::after { display: none; }
}

/* Schmales Querformat (kleines Fenster, Handy quer): sechs Links + Wetterschalter + Warenkorb
   brauchen Platz – Seitenspalten nur so breit wie ihr Inhalt, Links etwas enger. */
@media (min-width: 761px) and (max-width: 920px) and (min-aspect-ratio: 1/1) {
  .header { grid-template-columns: auto 1fr auto; gap: 14px; }
  .nav { justify-self: center; gap: clamp(10px, calc(6vw - 36px), 20px); font-size: 12.5px; letter-spacing: .02em; }
}

/* ---------- 4. Knöpfe und Textlinks ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px; border-radius: var(--radius);
  border: 1px solid var(--ink); background: none; color: var(--ink); cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 500; line-height: 1;
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--ink); color: #fff; }
/* Kauf-Knopf: die einzige rote Fläche */
.btn--primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em;
  transition: opacity .25s;
}
.link:hover { opacity: .6; }

/* Bestseller-Kopf (Startseite): Knopf „Zum Kleiderschrank“ → bestseller.html.
   Steht rechts außen neben Hinweis und Pfeilen der Kleiderstange; am Handy als eigene, volle Zeile darunter. */
.best__head .best__schrank { order: 3; flex: none; height: 44px; padding: 0 20px; margin-left: -8px; }
.best__head > div:first-child { margin-right: auto; }
.best__schrank svg { width: 16px; height: 16px; flex: none; transition: transform .3s var(--ease); }
.best__schrank svg path { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.best__schrank:hover svg, .best__schrank:focus-visible svg { transform: translateX(4px); }
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .best .best__head { flex-wrap: wrap; }
  .best__head .best__schrank { height: 48px; margin: 0; }
}
@media (max-width: 560px) {
  .best__head .best__schrank { flex: 1 0 100%; margin-top: 6px; }
}

/* ---------- 5. Logo-Stempel ----------
   Der Stempel wird von main.js / produkt.js als SVG eingesetzt. Innenkreis weiß statt hellblau,
   helle Details weiß statt creme – per CSS, damit es auf beiden Seiten gleich aussieht. */
.js-stamp { display: block; }
.js-stamp svg { display: block; width: 100%; height: 100%; overflow: visible; }
.js-stamp svg > circle:nth-of-type(2) { fill: #fff; }
.js-stamp [stroke="#f3f3e9"] { stroke: #fff; }
.js-stamp [fill="#f3f3e9"] { fill: #fff; }
.stamp__ring { transform-origin: 100px 100px; }
.stamp__ring text { font-family: var(--logo-font); font-size: 23px; letter-spacing: 0; fill: #fff; }
