/* ============================================================
   RUBY – rund um dein Baby
   Design tokens — "Die ruhige Stunde"
   ============================================================ */
:root {
  --paper: #F3EEE4;
  --paper-deep: #EAE2D3;
  --ink: #262220;
  --ink-soft: #5C564F;
  --dusk: #3C4E5E;
  --dusk-deep: #283645;
  --clay: #B1592E;
  --clay-deep: #8F441F;
  --moss: #5C6B4E;
  --line: #DDD3C2;
  --radius: 22px;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;
}

@media (prefers-reduced-motion: no-preference) {
  .wave-anim { animation: drift 9s ease-in-out infinite; }
}
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); color: var(--dusk-deep); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--clay-deep);
  margin-bottom: 0.6em;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 246, 241, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
header.site.scrolled { box-shadow: 0 4px 18px rgba(46, 42, 40, 0.06); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: 1080px;
  margin: 0 auto;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-mark {
  width: 62px; height: 62px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.brand-tag { font-size: 0.72rem; color: var(--ink-soft); display: block; margin-top: -2px; }

/* Nav links */
.links {
  display: flex;
  align-items: center;
}
.links ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
}
.links a {
  display: inline-block;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.links a:hover { color: var(--dusk-deep); background: rgba(40, 54, 69, 0.08); }
.links a.active {
  color: var(--dusk-deep);
  background: rgba(40, 54, 69, 0.12);
  font-weight: 600;
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  position: relative;
  width: 42px; height: 42px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle .bar {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  background: var(--dusk-deep);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle .bar:nth-child(1) { top: 14px; }
.nav-toggle .bar:nth-child(2) { top: 20px; }
.nav-toggle .bar:nth-child(3) { top: 26px; }
.nav-toggle.open .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open .bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(46, 42, 40, 0.35);
  z-index: 39;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.nav-backdrop.open { display: block; opacity: 1; }

/* ---------- Wave divider (signature element) ---------- */
.wave-divider {
  width: 100%;
  display: block;
  line-height: 0;
}
.wave-divider svg { width: 100%; height: 48px; display: block; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 64px 0 40px;
}
.hero p.lead { font-size: 1.15rem; max-width: 46ch; }
.hero-figure {
  position: relative;
  border-radius: 38% 62% 55% 45% / 48% 42% 58% 52%;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--paper-deep);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.2s, color 0.2s;
}
.btn-primary { background: var(--dusk); color: var(--paper); }
.btn-primary:hover { background: var(--dusk-deep); transform: translateY(-1px); }
.btn-ghost { border-color: var(--dusk); color: var(--dusk-deep); }
.btn-ghost:hover { background: var(--dusk); color: var(--paper); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.6em; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.tinted { background: var(--paper-deep); }
.section-head { max-width: 62ch; margin-bottom: 2.4em; }

/* Service cards */
.grid-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 30px 30px 12px 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(38, 34, 32, 0.08); }
.card .thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--paper-deep);
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.card h3 { color: var(--dusk-deep); }
.card .price {
  margin-top: auto;
  padding-top: 14px;
  font-weight: 600;
  color: var(--clay-deep);
  font-size: 0.92rem;
  border-top: 1px dashed var(--line);
}

/* Quote / intro block */
.quote-block {
  border-left: 3px solid var(--clay);
  padding-left: 24px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--dusk-deep);
  margin: 1.4em 0;
}

/* Two column */
.two-col {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 52px;
  align-items: start;
}
.two-col img { border-radius: var(--radius); }

/* Timeline (Werdegang) */
.timeline { border-left: 2px solid var(--line); padding-left: 26px; margin-left: 6px; }
.t-item { position: relative; padding-bottom: 34px; }
.t-item:last-child { padding-bottom: 0; }
.t-item::before {
  content: "";
  position: absolute;
  left: -32px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--moss);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 2px var(--line);
}
.t-item .date { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--clay-deep); font-weight: 600; }

/* Course cards */
.course {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 32px;
  align-items: center;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.course:last-child { border-bottom: none; }
.course img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; }
.course .loc { color: var(--clay-deep); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4em; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; }
.contact-card {
  background: var(--dusk-deep);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 36px;
}
.contact-card h3 { color: var(--paper); }
.contact-card a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.contact-line { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.contact-line .ico { color: var(--moss); font-size: 1.1rem; }

form.contact-form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { font-size: 0.85rem; font-weight: 600; color: var(--dusk-deep); display: block; margin-bottom: 6px; }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--ink);
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--dusk);
  outline-offset: 1px;
  border-color: var(--dusk);
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* Footer */
footer.site {
  background: var(--dusk-deep);
  color: var(--paper-deep);
  padding: 48px 0 28px;
  margin-top: 40px;
}
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
footer.site a { color: var(--paper-deep); text-decoration: none; }
footer.site a:hover { color: var(--moss); }
.footer-links { display: flex; gap: 22px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 28px; padding-top: 20px;
  font-size: 0.85rem; color: rgba(251,246,241,0.65);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.social { display: inline-flex; align-items: center; gap: 8px; }

/* Impressum text page */
.legal h2 { margin-top: 1.4em; }
.legal p { color: var(--ink); }

/* ---------- NEUES KOMPAKTES DROPDOWN MENÜ ---------- */
@media (max-width: 720px) {
  .links {
    position: absolute;
    top: 100%; /* Menü klappt exakt unter dem Header auf */
    left: 0;
    width: 100%;
    background: var(--paper); /* Gleiche Farbe wie der Hintergrund */
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(46, 42, 40, 0.08);
    padding: 16px 0 24px;
    
    /* Zarte Einblend-Animation statt wildem Reinsliden */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s ease;
    z-index: 41;
  }

  .links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .links ul {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 16px; /* Kompakt und aufgeräumt */
  }

  .links ul li {
    width: 100%;
    text-align: center;
  }

  .links a {
    display: inline-block;
    padding: 10px 20px;
    margin: 0;
    
    /* Ganz normale Schriftgröße für optimale Lesbarkeit */
    font-family: var(--font-body);
    font-size: 1.15rem; 
    font-weight: 500;
    color: var(--ink);
  }

  /* Desktop-Unterstrich verstecken */
  .links a::after {
    display: none;
  }

  .links a.active {
    color: var(--clay);
    font-weight: 600;
  }

  .nav-toggle {
    display: block;
    z-index: 42;
  }
}