/*
Theme Name: DiaLoge – Divi Child
Theme URI: https://nadinegeyer.de
Description: Schlankes, responsives Child-Theme für nadinegeyer.de auf Basis von Divi 5.
Author: Jens Luniak
Author URI: https://luniak.net
Template: Divi
Version: 1.0.2
Text Domain: dialoge-divi-child
Requires at least: 6.6
Requires PHP: 8.1
*/

/*
 * Projektgrundlage
 * ----------------
 * Die eigentliche Gestaltung wird in Divi 5 mit Designvariablen und
 * Voreinstellungen aufgebaut. Dieses Stylesheet enthält robuste
 * Grundwerte, Hilfsklassen und barriereärmere Standards.
 */

:root {
  /* Aus dem DiaLoge-Logo abgeleitete Grundfarben */
  --dialoge-petrol: #28859b;
  --dialoge-petrol-deep: #12677a;
  --dialoge-petrol-bright: #0f8eaa;
  --dialoge-sky: #8fc0cb;
  --dialoge-graphite: #585858;
  --dialoge-grey: #8f8f8f;
  --dialoge-ink: #202a2d;
  --dialoge-paper: #ffffff;
  --dialoge-mist: #f1f7f8;
  --dialoge-line: #d7e4e7;

  /*
   * Lesefreundliche, flüssige Typografie.
   * Der Fließtext beginnt bei 17 px und wächst behutsam.
   */
  --dialoge-text-xs: clamp(0.875rem, 0.85rem + 0.08vw, 0.9375rem);
  --dialoge-text-sm: clamp(0.9375rem, 0.91rem + 0.1vw, 1rem);
  --dialoge-text: clamp(1.0625rem, 1.025rem + 0.15vw, 1.15rem);
  --dialoge-text-lg: clamp(1.1875rem, 1.11rem + 0.3vw, 1.375rem);

  --dialoge-h6: clamp(1.05rem, 1rem + 0.16vw, 1.15rem);
  --dialoge-h5: clamp(1.18rem, 1.1rem + 0.3vw, 1.35rem);
  --dialoge-h4: clamp(1.35rem, 1.2rem + 0.55vw, 1.65rem);
  --dialoge-h3: clamp(1.55rem, 1.32rem + 0.8vw, 2rem);
  --dialoge-h2: clamp(1.9rem, 1.52rem + 1.45vw, 2.85rem);
  --dialoge-h1: clamp(2.35rem, 1.82rem + 2.2vw, 4rem);

  /* Flüssige Abstände */
  --dialoge-space-xs: clamp(0.5rem, 0.42rem + 0.25vw, 0.75rem);
  --dialoge-space-s: clamp(0.85rem, 0.68rem + 0.55vw, 1.25rem);
  --dialoge-space-m: clamp(1.4rem, 1.05rem + 1.1vw, 2.25rem);
  --dialoge-space-l: clamp(2.25rem, 1.55rem + 2.35vw, 4.25rem);
  --dialoge-space-xl: clamp(3.5rem, 2.25rem + 4vw, 7rem);
  --dialoge-space-2xl: clamp(5rem, 3rem + 6vw, 10rem);

  /* Breiten und Oberflächen */
  --dialoge-content: 76rem;
  --dialoge-reading: 45rem;
  --dialoge-radius-s: 0.5rem;
  --dialoge-radius-m: 1rem;
  --dialoge-radius-l: 1.75rem;
  --dialoge-shadow-soft: 0 1rem 3rem rgb(32 42 45 / 0.1);

  /*
   * Sichere Rückfallebene.
   * assets/fonts/fonts.css überschreibt diese Variablen
   * mit Manrope und Fraunces.
   */
  --dialoge-font-body:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  --dialoge-font-display:
    ui-serif,
    Georgia,
    Cambria,
    "Times New Roman",
    serif;
}

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

body {
  color: var(--dialoge-ink);
  background: var(--dialoge-paper);
  font-family: var(--dialoge-font-body);
  font-size: var(--dialoge-text);
  font-weight: 450;
  line-height: 1.66;
  letter-spacing: 0.002em;
  overflow-wrap: break-word;
  font-kerning: normal;
  font-optical-sizing: auto;
  font-synthesis: none;
  font-variant-ligatures: common-ligatures contextual;
  font-variant-numeric: proportional-nums oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Überschriften */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--dialoge-graphite);
  font-family: var(--dialoge-font-display);
  font-weight: 580;
  font-optical-sizing: auto;
  font-synthesis: none;
  line-height: 1.1;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  font-size: var(--dialoge-h1);
  line-height: 1.03;
  letter-spacing: -0.016em;
}

h2 {
  font-size: var(--dialoge-h2);
  line-height: 1.08;
  letter-spacing: -0.014em;
}

h3 {
  font-size: var(--dialoge-h3);
  line-height: 1.13;
}

h4 {
  font-size: var(--dialoge-h4);
  line-height: 1.18;
}

h5 {
  font-size: var(--dialoge-h5);
  line-height: 1.22;
}

h6 {
  font-size: var(--dialoge-h6);
  line-height: 1.25;
}

p,
li,
dd,
figcaption {
  text-wrap: pretty;
}

p {
  margin-block: 0 1em;
}

strong,
b {
  font-weight: 680;
}

small,
figcaption {
  font-size: var(--dialoge-text-sm);
  line-height: 1.55;
}

blockquote {
  margin-inline: 0;
  padding-inline-start: var(--dialoge-space-m);
  border-inline-start: 0.22rem solid var(--dialoge-sky);
  color: var(--dialoge-graphite);
  font-size: var(--dialoge-text-lg);
  font-weight: 450;
  line-height: 1.5;
}

ul,
ol {
  padding-inline-start: 1.35em;
}

li + li {
  margin-block-start: 0.35em;
}

a {
  color: var(--dialoge-petrol-deep);
  font-weight: 560;
  text-decoration-line: underline;
  text-decoration-thickness: 0.075em;
  text-decoration-color: rgb(18 103 122 / 0.45);
  text-underline-offset: 0.18em;
  transition:
    color 160ms ease,
    text-decoration-color 160ms ease;
}

a:hover {
  color: var(--dialoge-petrol-bright);
  text-decoration-color: currentColor;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  line-height: 1.45;
}

:focus-visible {
  outline: 3px solid var(--dialoge-petrol-bright);
  outline-offset: 4px;
}

::selection {
  color: var(--dialoge-paper);
  background: var(--dialoge-petrol-deep);
}

/* Hilfsklassen für Divi-Module und -Bereiche */

.dialoge-container {
  width: min(calc(100% - 2rem), var(--dialoge-content));
  margin-inline: auto;
}

.dialoge-reading-width {
  width: min(100%, var(--dialoge-reading));
}

.dialoge-section-space {
  padding-block: var(--dialoge-space-xl);
}

.dialoge-section-space-large {
  padding-block: var(--dialoge-space-2xl);
}

.dialoge-surface {
  border: 1px solid var(--dialoge-line);
  border-radius: var(--dialoge-radius-l);
  background: var(--dialoge-paper);
  box-shadow: var(--dialoge-shadow-soft);
}

.dialoge-surface-soft {
  border-radius: var(--dialoge-radius-l);
  background: var(--dialoge-mist);
}

.dialoge-accent-text {
  color: var(--dialoge-petrol);
}

.dialoge-lead {
  max-width: 38em;
  color: var(--dialoge-graphite);
  font-size: var(--dialoge-text-lg);
  font-weight: 450;
  line-height: 1.55;
}

.dialoge-eyebrow {
  color: var(--dialoge-petrol-deep);
  font-family: var(--dialoge-font-body);
  font-size: var(--dialoge-text-sm);
  font-weight: 720;
  letter-spacing: 0.075em;
  line-height: 1.3;
  text-transform: uppercase;
}

.dialoge-prose {
  font-size: var(--dialoge-text);
  line-height: 1.66;
}

.dialoge-prose > * {
  margin-block: 0;
}

.dialoge-prose > * + * {
  margin-block-start: 1em;
}

.dialoge-prose h2 {
  margin-block-start: 1.65em;
}

.dialoge-prose h3,
.dialoge-prose h4 {
  margin-block-start: 1.5em;
}

.dialoge-prose h2 + *,
.dialoge-prose h3 + *,
.dialoge-prose h4 + * {
  margin-block-start: 0.55em;
}

/*
 * Moderne Schaltflächen.
 * Nur dort wirksam, wo die Klasse dialoge-button vergeben wurde.
 */

.dialoge-button .et_pb_button,
a.dialoge-button,
button.dialoge-button {
  display: inline-flex;
  min-height: 3.35rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.45rem;
  border: 0;
  border-radius: 999px;
  color: var(--dialoge-paper);
  background: var(--dialoge-petrol-deep);
  font-family: var(--dialoge-font-body);
  font-size: var(--dialoge-text-sm);
  font-weight: 680;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.dialoge-button .et_pb_button:hover,
a.dialoge-button:hover,
button.dialoge-button:hover {
  color: var(--dialoge-paper);
  background: var(--dialoge-petrol-bright);
  box-shadow: 0 0.75rem 1.75rem rgb(18 103 122 / 0.22);
  transform: translateY(-2px);
}

/* Sprungmarken unter einer möglichen festen Navigation */

[id] {
  scroll-margin-top: 7rem;
}

/* Mobil und Tablet */

@media (max-width: 47.99rem) {
  body,
  .et_pb_text,
  .et_pb_text p,
  .et_pb_text li {
    line-height: 1.62;
  }

  h1,
  .et_pb_text h1,
  .et_pb_heading_container h1 {
    line-height: 1.06;
    letter-spacing: -0.01em;
  }

  h2,
  .et_pb_text h2,
  .et_pb_heading_container h2 {
    line-height: 1.1;
    letter-spacing: -0.008em;
  }

  h3,
  .et_pb_text h3,
  .et_pb_heading_container h3 {
    line-height: 1.14;
  }

  .dialoge-container {
    width: min(calc(100% - 1.25rem), var(--dialoge-content));
  }

  .dialoge-section-space {
    padding-block: var(--dialoge-space-l);
  }

  .dialoge-section-space-large {
    padding-block: var(--dialoge-space-xl);
  }

  .dialoge-button .et_pb_button,
  a.dialoge-button,
  button.dialoge-button {
    min-height: 3.25rem;
    padding-inline: 1.25rem;
  }
}

/* Sehr schmale Smartphones */

@media (max-width: 29.99rem) {
  :root {
    --dialoge-h1: clamp(2.15rem, 1.8rem + 1.8vw, 2.6rem);
    --dialoge-h2: clamp(1.75rem, 1.5rem + 1.2vw, 2.15rem);
  }

  body,
  .et_pb_text,
  .et_pb_text p,
  .et_pb_text li {
    font-size: 1.0625rem;
    line-height: 1.6;
  }
}

/* Reduzierte Bewegung */

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

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

/* =========================================================
   Projektfonts – müssen nach allen Divi- und Grundwerten stehen
   ========================================================= */

:root {
  --dialoge-font-body:
    "Manrope",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  --dialoge-font-display:
    "Fraunces",
    Georgia,
    serif;
}

/* Fließtext */

body,
.et_pb_text,
.et_pb_text p,
.et_pb_text li,
.et_pb_menu,
.et_pb_button,
button,
input,
select,
textarea {
  font-family: var(--dialoge-font-body) !important;
}

body,
.et_pb_text,
.et_pb_text p,
.et_pb_text li {
  font-size: var(--dialoge-text);
  font-weight: 450;
  line-height: 1.66;
  letter-spacing: 0.002em;
  font-kerning: normal;
  font-optical-sizing: auto;
}

/* Überschriften */

h1,
h2,
h3,
h4,
h5,
h6,
.et_pb_text h1,
.et_pb_text h2,
.et_pb_text h3,
.et_pb_text h4,
.et_pb_text h5,
.et_pb_text h6,
.et_pb_heading_container h1,
.et_pb_heading_container h2,
.et_pb_heading_container h3 {
  font-family: var(--dialoge-font-display) !important;
  font-weight: 580 !important;
  font-style: normal;
  font-optical-sizing: auto;
  font-synthesis: none;
  color: var(--dialoge-graphite);
  letter-spacing: -0.012em;
}

h1,
.et_pb_text h1,
.et_pb_heading_container h1 {
  font-size: var(--dialoge-h1);
  line-height: 1.03;
  letter-spacing: -0.016em;
}

h2,
.et_pb_text h2,
.et_pb_heading_container h2 {
  font-size: var(--dialoge-h2);
  line-height: 1.08;
  letter-spacing: -0.014em;
}

h3,
.et_pb_text h3,
.et_pb_heading_container h3 {
  font-size: var(--dialoge-h3);
  line-height: 1.13;
}

h4,
.et_pb_text h4 {
  font-size: var(--dialoge-h4);
}

h5,
.et_pb_text h5 {
  font-size: var(--dialoge-h5);
}

h6,
.et_pb_text h6 {
  font-size: var(--dialoge-h6);
}