/* ==========================================================================
   Bienensachverständige NRW – Startseite (finale Version)
   Zwei farbige Hälften mit schräger Trennkante, große Sechsecke als Schaltflächen.
   ========================================================================== */

:root {
  color-scheme: light;

  --ivr: #537328;
  --ivr-dark: #376429;
  --ivr-light: #A6A814;
  --lv: #FAB500;
  --lv-light: #FEDB92;
  --lv-ink: #9A6500;

  --ink: #1E1E1C;
  --muted: #5E5A50;
  --paper: #FBF8F0;
  --line: #EAE3D2;

  --pad-x: clamp(1.25rem, 4vw, 3rem);
  --seam: 4rem;                    /* Breite der schrägen Trennkante */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* --- Begrüßung ---------------------------------------------------------------- */

.welcome {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) 1rem clamp(1.5rem, 4vw, 2.5rem);
  background: var(--paper);
}

.welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='90' viewBox='0 0 52 90'%3E%3Cpath fill='none' stroke='%23F0DCAE' stroke-width='1.3' d='M0-30 26-15 26 15 0 30-26 15-26-15zM52-30 78-15 78 15 52 30 26 15 26-15zM26 15 52 30 52 60 26 75 0 60 0 30zM0 60 26 75 26 105 0 120-26 105-26 75zM52 60 78 75 78 105 52 120 26 105 26 75z'/%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
}

.welcome__inner {
  position: relative;
  max-width: 46rem;
  margin: 0 auto;
}

.welcome__mark {
  width: 68px;
  height: auto;
  margin-bottom: .75rem;
}

.welcome__kicker {
  margin: 0 0 .5rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lv-ink);
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.lead {
  margin: 0 auto;
  font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem);
  color: var(--muted);
  text-wrap: pretty;
}

/* --- Geteilte Auswahl (statisch) --------------------------------------------------- */

.split {
  display: flex;
  min-height: max(28rem, 50vh);
}

.pane {
  --accent: var(--ivr);
  --accent-2: var(--ivr-light);
  --accent-ink: var(--ivr);
  --bg: linear-gradient(160deg, #F3F6EA 0%, #DFE9CB 100%);

  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: flex-start;          /* beide Sechsecke auf gleicher Höhe, unabhängig von der Textlänge */
  justify-content: center;
  overflow: hidden;
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad-x) calc(clamp(2.5rem, 5vw, 4rem) + 3rem);  /* unten Platz für das Wasserzeichen */
  background: var(--bg);
}

.pane--lvwli {
  --accent: var(--lv);
  --accent-2: var(--lv-light);
  --accent-ink: var(--lv-ink);
  --bg: linear-gradient(160deg, #FFF8E6 0%, #FFE7AC 100%);
}

/* Regionsname als Wasserzeichen (aus data-region), an der Außenkante der Hälfte */
.pane::before {
  content: attr(data-region);
  position: absolute;
  bottom: -.16em;
  z-index: 0;
  font-size: clamp(2.75rem, 6vw, 6rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  white-space: nowrap;
  color: var(--accent);
  opacity: .11;
  pointer-events: none;
}

.pane--ivr::before   { left: -.02em; }
.pane--lvwli::before { right: -.02em; }

/* Ab Tablet-Breite: nebeneinander mit schräger Trennkante */
@media (min-width: 48rem) {
  .pane--ivr {
    z-index: 1;
    margin-right: calc(-1 * var(--seam));
    padding-right: calc(var(--pad-x) + var(--seam));
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--seam)) 100%, 0 100%);
  }

  .pane--lvwli {
    padding-left: calc(var(--pad-x) + var(--seam) / 2);
  }
}

/* Schmale Bildschirme: untereinander */
@media (max-width: 47.99rem) {
  .split {
    flex-direction: column;
    min-height: 0;
  }

  /* Höhe aus dem Inhalt, nicht aus dem Restplatz des Bildschirms (sonst verdecken sich die Hälften) */
  .pane { flex: none; }
}

/* --- Sechseck als Schaltfläche ------------------------------------------------------ */

.hex-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 26rem);
  text-align: center;
  color: inherit;
  text-decoration: none;
  border-radius: 12px;
}

.hex-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 8px;
}

/* Der Schatten muss auf einem nicht beschnittenen Element liegen */
.hex-wrap {
  display: block;
  width: min(100%, 21rem);
  filter: drop-shadow(0 14px 22px rgba(60, 40, 0, .2));
  transition: transform .3s var(--ease), filter .3s var(--ease);
}

.hex-card:hover .hex-wrap,
.hex-card:focus-visible .hex-wrap {
  transform: translateY(-6px);
  filter: drop-shadow(0 22px 30px rgba(60, 40, 0, .28));
}

.hex {
  display: block;
  aspect-ratio: .866;               /* Sechseck mit Spitze oben */
  padding: 9px;                     /* Randbreite in der Verbandsfarbe */
  clip-path: var(--hex);
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
}

.hex__inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 19% 7%;
  clip-path: var(--hex);
  background: #fff;
}

.hex__inner img {
  display: block;
  width: 100%;
  height: auto;
}

.caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  margin-top: 1.1rem;
}

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.hex-card h2 {
  margin: 0;
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem);
  line-height: 1.2;
  text-wrap: balance;
  text-decoration: underline transparent;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  transition: text-decoration-color .3s var(--ease);
}

.hex-card:hover h2,
.hex-card:focus-visible h2 { text-decoration-color: var(--accent); }

.text {
  max-width: 24rem;
  color: var(--muted);
}

/* --- Fußzeile ------------------------------------------------------------------- */

.footer {
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
  background: var(--paper);
}

.footer p { margin: 0 0 .25rem; }

.footer a {
  color: inherit;
  text-underline-offset: 3px;
}

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

/* --- Bewegung reduzieren --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
