/* =========================================================================
   ATAMIS — Divi-5-Helper
   Enthält AUSSCHLIESSLICH, was Divi nativ nicht ausdrücken kann.
   Alles andere (Farben, Typo, Abstände, Karten, Buttons, FAQ) lebt in
   Divi Global Colors + Global Presets und bleibt im Builder editierbar.
   Quelle des Designs: atamis-design-system-v2.css (Claude-Design-Handoff)
   ========================================================================= */

:root {
  --atamis-night: #04041d;
  --atamis-forest: #0e2d17;
  --atamis-green: #25793e;
  --atamis-green-logo: #2c7a3e;
  --atamis-lavender: #b9a7f4;
  --atamis-lavender-soft: #d7cef4;
  --atamis-lavender-bg: #e8e1fe;
  --atamis-paper: #fdfcff;
  --atamis-text-soft: #4a4762;
  --atamis-success: #2c7a3e;
  --atamis-error: #b3403a;
  --atamis-warn-bg: #fdf3e4;
  --radius-pill: 999px;
  --shadow-soft: 0 6px 30px rgba(20,10,60,.07);
  --shadow-medium: 0 12px 40px rgba(20,10,60,.12);
}

/* --- 1. Signatur-Geste: <em> in Headlines = kursiv + Grün, nie fett --------- */
.et_pb_heading h1 em, .et_pb_heading h2 em, .et_pb_heading h3 em,
.et_pb_heading h4 em, .et_pb_heading h5 em, .et_pb_heading h6 em,
.et_pb_text h1 em, .et_pb_text h2 em, .et_pb_text h3 em,
.et_pb_module h1 em, .et_pb_module h2 em, .et_pb_module h3 em {
  font-style: italic;
  font-weight: 400;
  color: var(--atamis-green);
}
/* Auf dunklen Sektionen wird die Akzentfarbe zu Flieder */
.atamis-on-dark h1 em, .atamis-on-dark h2 em, .atamis-on-dark h3 em,
.atamis-on-dark .et_pb_heading em, .atamis-on-dark .et_pb_text em {
  color: var(--atamis-lavender);
}

/* --- 2. Atem-Kreis: das einzige dauerhaft bewegte Element ------------------ */
.atamis-breath { position: relative; }
.atamis-breath > .et_pb_row,
.atamis-breath > .et_pb_row_inner { position: relative; z-index: 2; }
.atamis-breath::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: min(620px, 78vw); height: min(620px, 78vw);
  margin: -min(310px, 39vw) 0 0 -min(310px, 39vw);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185,167,244,.34) 0%, rgba(185,167,244,.14) 45%, rgba(185,167,244,0) 70%);
  animation: atamis-breathe 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
.atamis-breath--strong::before { background: radial-gradient(circle, rgba(185,167,244,.5) 0%, rgba(185,167,244,.2) 45%, rgba(185,167,244,0) 70%); }
@keyframes atamis-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .85; }
  50%      { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
}

/* --- 3. Fokus & Skip-Link (WCAG) ------------------------------------------ */
body.atamis-body :focus-visible {
  outline: 3px solid var(--atamis-lavender);
  outline-offset: 2px;
  border-radius: 4px;
}
.atamis-skip {
  position: absolute; left: 16px; top: -72px; z-index: 100000;
  background: var(--atamis-green); color: #fff; padding: 10px 20px;
  border-radius: var(--radius-pill); text-decoration: none;
  font-family: 'Space Grotesk', sans-serif; transition: top .2s ease;
}
.atamis-skip:focus { top: 12px; }
::selection { background: var(--atamis-lavender-soft); color: var(--atamis-night); }

/* --- 4. FluentForms-Skin: Plugin-Formulare erben den Marken-Look ---------- */
.atamis-form-shell .fluentform .ff-el-input--label label,
.atamis-form-shell .fluentform label.ff-el-form-check-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--atamis-night);
}
.atamis-form-shell .fluentform input[type=text],
.atamis-form-shell .fluentform input[type=email],
.atamis-form-shell .fluentform input[type=tel],
.atamis-form-shell .fluentform select,
.atamis-form-shell .fluentform textarea {
  min-height: 52px;
  border: 2px solid var(--atamis-lavender-soft) !important;
  border-radius: 12px !important;
  background: #fff !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 16px !important;
  color: var(--atamis-night) !important;
  padding: 12px 16px !important;
  box-shadow: none !important;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.atamis-form-shell .fluentform textarea { min-height: 120px; }
.atamis-form-shell .fluentform input:focus,
.atamis-form-shell .fluentform select:focus,
.atamis-form-shell .fluentform textarea:focus {
  border-color: var(--atamis-green) !important;
  box-shadow: 0 0 0 4px rgba(37,121,62,.12) !important;
  outline: none !important;
}
.atamis-form-shell .fluentform .ff-btn-submit {
  background: var(--atamis-green) !important;
  border: 2px solid var(--atamis-green) !important;
  color: #fff !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 600 !important;
  font-size: 17px !important;
  padding: 15px 32px !important;
  border-radius: var(--radius-pill) !important;
  min-height: 52px;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.atamis-form-shell .fluentform .ff-btn-submit:hover {
  background: #1f6a35 !important;
  border-color: #1f6a35 !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}
.atamis-form-shell .fluentform .ff-el-is-error input,
.atamis-form-shell .fluentform .ff-el-is-error textarea,
.atamis-form-shell .fluentform .ff-el-is-error select {
  border-color: var(--atamis-error) !important;
}
.atamis-form-shell .fluentform .error.text-danger,
.atamis-form-shell .fluentform .ff-el-is-error .error {
  color: var(--atamis-error) !important;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
}
.atamis-form-shell .fluentform .ff-message-success {
  background: rgba(44,122,62,.08) !important;
  border: 2px solid var(--atamis-success) !important;
  border-radius: 20px !important;
  color: var(--atamis-forest) !important;
  font-family: 'Outfit', sans-serif;
  padding: 24px !important;
}
/* Formulare auf dunklen Sektionen */
.atamis-on-dark .atamis-form-shell .fluentform .ff-el-input--label label,
.atamis-on-dark .atamis-form-shell .fluentform label.ff-el-form-check-label { color: var(--atamis-night); }

/* --- 4b. Karten-Raster: Zwischenstufe Tablet = 2 Spalten (Design-Vorgabe) --
   Divi macht Spalten unter 980px pauschal 100% breit; das Design sieht
   zwischen 721px und 1020px zwei Karten nebeneinander vor. */
@media (min-width: 721px) and (max-width: 980px) {
  .et_pb_column.atamis-grid-col {
    width: 48.5% !important;
    float: left;
    margin-right: 3% !important;
  }
  .et_pb_column.atamis-grid-col:nth-of-type(2n) { margin-right: 0 !important; }
}

/* --- 5. Bild-Hover in Karten (ruhig, 1.02) -------------------------------- */
.atamis-img-hover .et_pb_image_wrap img { transition: transform .5s ease; }
.atamis-img-hover:hover .et_pb_image_wrap img { transform: scale(1.02); }

/* --- 6. Porträt-Rahmen (Platzhalter „Foto: Marei“) ------------------------ */
.atamis-portrait .et_pb_image_wrap {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  background: var(--atamis-lavender-bg);
  padding: 0;
}

/* --- 7. Lesetypografie Artikel + Rechtsseiten (Print inklusive) ---------- */
.atamis-longform p { text-wrap: pretty; }
.atamis-longform h2 { scroll-margin-top: 110px; }
@media print {
  .et-l--header, .et-l--footer, .atamis-noprint { display: none !important; }
  .atamis-longform { font-size: 12pt; color: #000; }
}

/* --- 8. Bewegung respektieren -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .atamis-breath::before { animation: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
