/* ================================================================
   DNBX.de — layout.css
   Grid, Spacing, Global Layout Primitives
   ================================================================ */

/* ---------- Container ---------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

/* ---------- Section ---------- */
.section { padding: clamp(4.5rem, 10vh, 8rem) 0; }

.section-label {
  display: inline-block;
  font-size: clamp(0.7rem, 0.9vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 0.85rem;
}

.section-desc {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  color: var(--muted);
  max-width: 540px;
  line-height: 1.7;
}

/* ---------- Section Waves / Curves ---------- */

/*
 * .section-wave  — sits between two sections, fills to the NEXT section's bg.
 *   The <path class="wave-fill-next"> fill is set by theme.js at runtime.
 *   We provide a sensible default so it's never invisible before JS runs.
 */
.section-wave {
  position: relative;
  width: 100%;
  line-height: 0;
  margin-bottom: -1px;   /* close the 1-px gap caused by sub-pixel rendering */
  overflow: hidden;
  z-index: 2;            /* sit above section backgrounds */
}
.section-wave svg {
  width: 100%;
  height: clamp(40px, 6vw, 72px);
  display: block;
}
/* Default fill = bg-secondary so it's visible even before JS sets it */
.wave-fill-next {
  fill: var(--bg-secondary);
  transition: fill 0.4s ease;
}
/* Subtle same-bg divider: slightly darker tint, not near-invisible */
.wave-subtle svg { height: clamp(24px, 3vw, 40px); }
.wave-fill-same  { fill: var(--bg-secondary); opacity: 0.6; }

/*
 * .landing-curve — organic curve used at section → section transitions.
 *   Uses currentColor so the parent's color: value controls the fill.
 *   Set color on the wrapper to match the DESTINATION section's background.
 */
.landing-curve {
  position: relative;
  width: 100%;
  line-height: 0;
  margin-bottom: -1px;
  overflow: hidden;
  z-index: 2;
}
.landing-curve svg {
  display: block;
  width: 100%;
  height: clamp(32px, 5vw, 56px);
}
.landing-curve path { transition: fill 0.4s ease; }

/* Archive (bg-secondary) → Branding (bg): fill with --bg */
.landing-section-color         { color: var(--bg); }
.landing-section-color path    { fill: var(--bg); }

/* Contact (bg-secondary) → Footer (bg): fill with --bg */
.landing-footer-color          { color: var(--bg); }
.landing-footer-color path     { fill: var(--bg); }

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1);
  will-change: opacity;
}
.reveal.revealed { opacity: 1; }
.reveal[data-delay="50"]  { transition-delay: 50ms; }
.reveal[data-delay="80"]  { transition-delay: 80ms; }
.reveal[data-delay="100"] { transition-delay: 100ms; }
.reveal[data-delay="120"] { transition-delay: 120ms; }
.reveal[data-delay="130"] { transition-delay: 130ms; }
.reveal[data-delay="150"] { transition-delay: 150ms; }
.reveal[data-delay="160"] { transition-delay: 160ms; }
.reveal[data-delay="190"] { transition-delay: 190ms; }
.reveal[data-delay="200"] { transition-delay: 200ms; }
.reveal[data-delay="240"] { transition-delay: 240ms; }

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .branding-modes { grid-template-columns: 1fr 1fr; }
  .footer-top-row { flex-direction: row; justify-content: space-between; align-items: center; }
  .cookie-banner.active { bottom: 2rem; }
}
@media (min-width: 1024px) {
}

/* ── TEMP: hide all section dividers except the first (hero → about) ── */
/* Remove this block to restore all dividers */
.divider-hidden { display: none !important; }
