/* ============================================================
   Melanie Straub – Hair Expert
   base.css: Farben, Schrift, Glas-Stil, Buttons, Navigation,
   Footer, Einblenden, Seitenübergänge.
   Wird von allen Seiten geladen.
   ============================================================ */

/* ---------- Farben & Grundwerte (aus dem Briefing) ---------- */
:root {
  --bg: #f8f6f3;          /* warmes Off-White */
  --bg-2: #f0ece8;        /* helles, kühles Beige */
  --taupe: #c8bdb5;       /* Taupe-Beige */
  --champagne: #d8c9b8;   /* Champagner */
  --taupe-dark: #665c57;  /* dunkles Taupe */
  --text: #302d2b;        /* Textfarbe */
  --white: #ffffff;

  --text-soft: #5b5450;   /* etwas hellerer Fliesstext */
  --line: rgba(102, 92, 87, 0.16);

  /* Glas auf hellem Grund */
  --glass-bg: rgba(255, 255, 255, 0.52);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 24px 60px rgba(102, 92, 87, 0.12);
  --glass-blur: blur(18px) saturate(1.15);

  --radius: 28px;
  --ease: cubic-bezier(0.34, 1.32, 0.5, 1);     /* leicht federnd */
  --ease-soft: cubic-bezier(0.2, 0.8, 0.2, 1);  /* weich */

  --font-head: "Jost", "Inter", system-ui, sans-serif; /* klar & gut lesbar */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: var(--font-head); /* keine Schreibschrift mehr */
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(38px, 5.6vw, 72px); }
h2 { font-size: clamp(30px, 3.8vw, 50px); }
h3 { font-size: clamp(21px, 1.8vw, 25px); }

h1 em,
h2 em {
  font-style: normal; /* betonte Wörter nur farbig, nicht kursiv */
  color: var(--taupe-dark);
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  color: var(--white);
  background: var(--text);
  border-radius: 999px;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Hintergrund ---------- */
.page-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(70% 60% at 85% 0%, rgba(216, 201, 184, 0.55), transparent 70%),
    radial-gradient(60% 60% at 0% 100%, rgba(200, 189, 181, 0.35), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  pointer-events: none;
}

/* Weiche, langsam ziehende Farbflecken (sehr dezent) */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora span {
  position: absolute;
  width: 50vmax;
  height: 50vmax;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.45;
  will-change: transform;
}

.aurora span:nth-child(1) {
  top: -18vmax;
  right: -12vmax;
  background: radial-gradient(circle, #e9dccd, transparent 65%);
  animation: aurora-a 26s ease-in-out infinite alternate;
}

.aurora span:nth-child(2) {
  bottom: -22vmax;
  left: -18vmax;
  background: radial-gradient(circle, #d6ccc4, transparent 65%);
  animation: aurora-b 30s ease-in-out infinite alternate;
}

.aurora span:nth-child(3) {
  top: 35%;
  left: 40%;
  width: 36vmax;
  height: 36vmax;
  opacity: 0.5;
  background: radial-gradient(circle, #ffffff, transparent 65%);
  animation: aurora-c 34s ease-in-out infinite alternate;
}

@keyframes aurora-a { to { transform: translate(-16vw, 18vh) scale(1.1); } }
@keyframes aurora-b { to { transform: translate(18vw, -14vh) scale(0.92); } }
@keyframes aurora-c { to { transform: translate(-22vw, -16vh) scale(1.15); } }

/* ---------- Layout ---------- */
.container {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

.container--narrow {
  width: min(820px, 100% - 48px);
}

.section {
  padding-block: clamp(72px, 10vw, 128px);
  scroll-margin-top: 90px;
}

.section--tight {
  padding-block: clamp(48px, 6vw, 80px);
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
}

.section-head p {
  margin-top: 20px;
  color: var(--text-soft);
}

.eyebrow {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--taupe-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.lead {
  color: var(--text-soft);
  font-size: clamp(17px, 1.4vw, 19px);
}

.script {
  font-family: var(--font-script);
  font-size: 1.9em;
  font-weight: 400;
  line-height: 1;
  color: var(--taupe-dark);
}

.note {
  color: var(--taupe-dark);
  font-size: 14px;
  letter-spacing: 0.04em;
}

/* ---------- Glas ---------- */
.glass {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    var(--glass-shadow);
}

.card {
  padding: clamp(26px, 3vw, 40px);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  overflow: hidden;
  font: 600 15px/1.2 var(--font-body);
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 400ms var(--ease),
    background-color 250ms ease,
    box-shadow 250ms ease,
    color 250ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn__arrow {
  transition: transform 400ms var(--ease);
}

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

/* Lichtreflex beim Hover */
.btn::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.35) 50%, transparent 58%);
  transform: translateX(-60%);
  transition: transform 800ms ease;
  pointer-events: none;
}

.btn:hover::after {
  transform: translateX(60%);
}

.btn--primary {
  color: var(--white);
  background: var(--taupe-dark);
  box-shadow: 0 12px 30px rgba(102, 92, 87, 0.28);
}

.btn--primary:hover {
  background: var(--text);
  box-shadow: 0 16px 38px rgba(48, 45, 43, 0.3);
}

.btn--glass {
  color: var(--text);
  border-color: var(--glass-border);
  background: rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 26px rgba(102, 92, 87, 0.1);
}

.btn--glass:hover {
  background: rgba(255, 255, 255, 0.85);
}

.btn--small {
  padding: 12px 20px;
  font-size: 14px;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.text-link {
  color: var(--taupe-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(102, 92, 87, 0.35);
  text-underline-offset: 4px;
  transition: text-decoration-color 200ms ease;
}

.text-link:hover {
  text-decoration-color: currentColor;
}

/* Kleine Glas-Pillen (z. B. "26 Jahre Erfahrung") */
.chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  color: var(--taupe-dark);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Platzhalter (klar gekennzeichnet) ---------- */
.placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 160px;
  padding: 24px;
  color: var(--taupe-dark);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  border: 1.5px dashed rgba(102, 92, 87, 0.35);
  border-radius: inherit;
  background:
    repeating-linear-gradient(135deg, rgba(216, 201, 184, 0.18) 0 14px, rgba(255, 255, 255, 0.18) 14px 28px),
    var(--bg-2);
}

.placeholder svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  opacity: 0.7;
}

.placeholder strong {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.placeholder small {
  max-width: 34ch;
  opacity: 0.85;
}

/* Inline-Platzhalter in Texten */
.todo {
  padding: 1px 6px;
  color: var(--taupe-dark);
  font-size: 0.9em;
  border: 1px dashed rgba(102, 92, 87, 0.45);
  border-radius: 6px;
  background: rgba(216, 201, 184, 0.25);
}

/* Foto mit automatischem Platzhalter:
   Fehlt die Bilddatei, wird der Platzhalter angezeigt (onerror im HTML) */
.photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-2);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 30%);
}

.photo .placeholder {
  position: absolute;
  inset: 0;
  display: none;
}

.photo.is-missing img {
  display: none;
}

.photo.is-missing .placeholder {
  display: grid;
}

/* ============================================================
   Kopfzeile: Logo – Glas-Navigation – Button
   ============================================================ */
.site-header {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 50;
  pointer-events: none;
}

.site-header__inner {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  width: min(1240px, 100% - 32px);
  margin-inline: auto;
}

.site-header__inner > * {
  pointer-events: auto;
}

/* Logo: runder Glas-Kreis mit Monogramm + Name */
.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 50px;
  height: 50px;
  font: 500 18px/1 var(--font-head);
  letter-spacing: -0.02em;
  color: var(--taupe-dark);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background:
    radial-gradient(110% 80% at 50% 0%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 60%),
    rgba(240, 236, 232, 0.6);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 26px rgba(102, 92, 87, 0.14);
  transition: transform 450ms var(--ease);
}

.brand:hover .brand__mark {
  transform: scale(1.06) rotate(-4deg);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font: 500 18px/1.1 var(--font-head);
}

.brand__sub {
  color: var(--taupe-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Glas-Pille mit Menüpunkten */
.nav {
  position: relative;
}

.nav__panel {
  position: relative;
  padding: 6px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 36px rgba(102, 92, 87, 0.12);
  transition: background-color 400ms ease;
}

.nav__list {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__item {
  display: block;
  padding: 11px 20px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 999px;
  transition: color 250ms ease;
}

.nav__item:hover,
.nav__item[aria-current="page"] {
  color: var(--text);
}

.nav__item[aria-current="page"] {
  font-weight: 600;
}

/* Die weisse Glas-Pille hinter dem aktiven Punkt (Position: site.js) */
.nav__indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    inset 0 1px 0 #fff,
    0 6px 16px rgba(102, 92, 87, 0.14);
  pointer-events: none;
  /* Bewusst KEIN eigener view-transition-name: sonst liegt die Pille beim
     Seitenwechsel über der Schrift. Das Gleiten macht site.js. */
}

.nav__indicator.is-ready {
  transition:
    transform 550ms var(--ease),
    width 550ms var(--ease),
    height 550ms var(--ease);
}

/* Burger (nur Handy) */
.nav__toggle {
  display: none;
}

.nav__panel-cta {
  display: none;
}

/* Beim Scrollen: Glas deckender, damit Inhalt nicht durchscheint */
.site-header.is-scrolled .nav__panel,
.site-header.is-scrolled .brand__mark,
.site-header.is-scrolled .nav__bar {
  background-color: rgba(248, 246, 243, 0.82);
}

/* ---------- Handy-Navigation ---------- */
@media (max-width: 1100px) {
  .site-header__cta {
    display: none;
  }

  .nav {
    position: static;
  }

  .nav__bar {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 14px 36px rgba(102, 92, 87, 0.12);
  }

  .nav__toggle {
    position: relative;
    display: block;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
  }

  .nav__toggle span {
    position: absolute;
    left: 50%;
    width: 18px;
    height: 1.5px;
    margin-left: -9px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 350ms var(--ease), opacity 200ms ease;
  }

  .nav__toggle span:nth-child(1) { top: 16px; }
  .nav__toggle span:nth-child(2) { top: 21px; }
  .nav__toggle span:nth-child(3) { top: 26px; }

  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

  .nav__label {
    padding-left: 12px;
    color: var(--taupe-dark);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .nav__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 16px;
    right: 16px;
    padding: 10px;
    border-radius: 28px;
    background: rgba(248, 246, 243, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.97);
    transform-origin: top center;
    transition:
      opacity 250ms ease,
      transform 400ms var(--ease),
      visibility 0s linear 400ms;
  }

  .nav.is-open .nav__panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity 250ms ease,
      transform 400ms var(--ease),
      visibility 0s;
  }

  .nav__list {
    flex-direction: column;
  }

  .nav__item {
    padding: 15px 20px;
    font-size: 17px;
  }

  .nav__panel-cta {
    display: flex;
    width: 100%;
    margin-top: 8px;
  }
}

@media (min-width: 1101px) {
  .nav__bar {
    display: contents;
  }

  .nav__label {
    display: none;
  }
}

@media (max-width: 480px) {
  .brand__text {
    display: none;
  }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding: 40px 0 28px;
}

.footer {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: clamp(28px, 4vw, 48px);
}

.footer h2 {
  margin-bottom: 14px;
  color: var(--taupe-dark);
  font: 600 12px/1.4 var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer p {
  color: var(--text-soft);
  font-size: 15px;
}

.footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.footer ul a {
  color: var(--text-soft);
  text-decoration: none;
  transition: color 200ms ease;
}

.footer ul a:hover {
  color: var(--text);
}

.footer .brand {
  margin-bottom: 16px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  padding: 20px 8px 0;
  color: var(--taupe-dark);
  font-size: 13px;
}

.footer__bottom nav {
  display: flex;
  gap: 20px;
}

.footer__bottom a {
  color: inherit;
  text-decoration: none;
}

.footer__bottom a:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .footer {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Einblenden beim Scrollen
   Regel: .reveal nur auf Glas-Karten selbst oder auf Kästen OHNE
   Glas darin – sonst "springt" der Blur am Ende an
   ============================================================ */
.reveal {
  transition:
    opacity 800ms ease var(--d, 0ms),
    transform 900ms var(--ease-soft) var(--d, 0ms);
}

.js .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(26px);
}

/* Schon beim Öffnen sichtbar -> sofort da, ohne Einblenden (site.js) */
.reveal.is-instant {
  transition: none;
}

/* Einblenden der Kopfzeile – direkt auf den Glas-Teilen.
   Nur beim ersten Öffnen: beim Wechsel zwischen den Seiten setzt
   config.js die Klasse .no-intro, dann bleibt alles einfach stehen. */
.brand__mark,
.nav__panel,
.nav__bar,
.site-header__cta {
  animation: header-in 700ms var(--ease) backwards;
}

.no-intro .brand__mark,
.no-intro .nav__panel,
.no-intro .nav__bar,
.no-intro .site-header__cta {
  animation: none;
}

@keyframes header-in {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@media (max-width: 1100px) {
  /* Auf dem Handy ist das Panel das Klapp-Menü – nicht einblenden */
  .nav__panel {
    animation: none;
  }
}

/* ============================================================
   Seitenübergänge (Chrome, Edge, Safari 18+)
   ============================================================ */
@view-transition {
  navigation: auto;
}

.page-background {
  view-transition-name: page-bg;
}

/* Die ganze Kopfzeile ist auf allen Seiten gleich -> bleibt stehen. */
.site-header {
  view-transition-name: site-header;
}

::view-transition-old(page-bg) {
  display: none;
}

::view-transition-new(page-bg) {
  animation: none;
}

/* Kopfzeile: kein Ausblenden, nur ein ganz kurzer Wechsel der Menü-Schrift */
::view-transition-old(site-header),
::view-transition-new(site-header) {
  animation-duration: 250ms;
}

/* Inhalt: Standard-Überblendung des Browsers (alt und neu liegen
   übereinander und tauschen sich weich aus) – nie ein leerer Moment */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 350ms;
}



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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal:not(.is-visible) {
    opacity: 1;
    transform: none;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
