/*
 * Essential Capital website — single global stylesheet.
 *
 * Built from the old WordPress/Divi site; the values and the owner-approved
 * changes since are in /DESIGN.md. Fixed Divi breakpoints: desktop >= 981px,
 * tablet 768–980px, phone <= 767px. Values that change per breakpoint are tokens on
 * :root (base layer).
 *
 * Cascade layers, lowest to highest priority — a later layer always wins,
 * whatever the selector specificity:
 *   base        fonts, design tokens, element defaults
 *   layout      page frame, sections, rows, columns
 *   components  legal-page header, button, icons, side navigation, consent banner, footer
 *   pages       homepage (hero, sections, steps, contact), legal pages, 404, print
 *   motion      scroll effects, entrance animations, reduced-motion overrides
 *
 * Class names: ec- prefix, single hyphens only (ec-hero-logo, ec-col-1-2).
 */

@layer base, layout, components, pages, motion;

@layer base {
  /* ---------- Fonts (self-hosted, owner-supplied) ---------- */

  @font-face {
    font-family: "Besley";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/besley.d0232ebf.woff2") format("woff2");
  }
  @font-face {
    font-family: "Besley";
    font-style: italic;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/besley-italic.4b5d4e60.woff2") format("woff2");
  }
  @font-face {
    font-family: "Karla";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/karla.f113d4e4.woff2") format("woff2");
  }
  @font-face {
    font-family: "Karla";
    font-style: italic;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/karla-italic.6a12f452.woff2") format("woff2");
  }

  /* ---------- Design tokens ---------- */

  :root {
    /* Owner palettes (coolors.co; docs/04-projects/essential-website/design-tokens.md):
       100 = lightest, 900 = darkest (greys: 950). Components use the aliases
       below, not these. */
    --ec-blue-100: #f0f0f0;
    --ec-blue-200: #c3c9d0;
    --ec-blue-300: #96a2b1;
    --ec-blue-400: #697b91;
    --ec-blue-500: #3c5472;
    --ec-blue-600: #0f2d52;
    --ec-blue-700: #0f2544;
    --ec-blue-800: #0e1e36;
    --ec-blue-900: #0e1628;

    --ec-grey-100: #f0f0f0;
    --ec-grey-200: #d5d7da;
    --ec-grey-300: #b9bdc4;
    --ec-grey-400: #9ea3ae;
    --ec-grey-500: #828997;
    --ec-grey-600: #4b556a;
    --ec-grey-700: #303b54;
    --ec-grey-800: #14213d;
    --ec-grey-900: #0e1628;
    --ec-grey-950: #080a12;

    --ec-yellow-100: #f0f0f0;
    --ec-yellow-200: #f3ddb9;
    --ec-yellow-300: #f6ca81;
    --ec-yellow-400: #f9b749;
    --ec-yellow-500: #fca311;
    --ec-yellow-600: #db8811;
    --ec-yellow-700: #ba6c10;
    --ec-yellow-800: #995110;
    --ec-yellow-900: #78350f;

    /* Aliases used by components */
    --ec-color-ink: var(--ec-blue-900);
    --ec-color-paper: #ffffff;
    --ec-color-accent: var(--ec-yellow-500);
    /* Hover of buttons: light fill for outline buttons, lighter ink for filled ones. */
    --ec-color-hover-surface: var(--ec-grey-100);
    --ec-color-hover-ink: var(--ec-grey-700);
    --ec-color-muted: var(--ec-grey-500);
    --ec-color-line: var(--ec-grey-200);
    /* Table header rows (Cookie-Richtlinie). */
    --ec-color-surface: var(--ec-grey-100);

    /* Corner radius of images, tables and buttons. */
    --ec-radius: 8px;

    --ec-font-heading: "Besley", Georgia, "Times New Roman", serif;
    --ec-font-body: "Karla", Helvetica, Arial, Lucida, sans-serif;

    /* Type scale in Tailwind steps (owner, 2026-10-15), fluid: each size
       grows from its phone value at 375px to its tablet/desktop value at
       768px, without jumps at the breakpoints. --ec-fluid runs 0 → 1 over
       that range (clamped by each size). */
    --ec-fluid: ((100vw - 375px) / 393);
    --ec-text-size: clamp(
      16px,
      calc(16px + 2 * var(--ec-fluid)),
      18px
    ); /* base → lg */
    --ec-text-sm: 14px; /* sm: small print, banner details */
    --ec-text-ui: 16px; /* base: buttons, banner text, header link */
    --ec-h1-size: clamp(
      36px,
      calc(36px + 24 * var(--ec-fluid)),
      60px
    ); /* 4xl → 6xl */
    --ec-h2-size: clamp(
      30px,
      calc(30px + 18 * var(--ec-fluid)),
      48px
    ); /* 3xl → 5xl */
    --ec-h3-size: clamp(
      24px,
      calc(24px + 12 * var(--ec-fluid)),
      36px
    ); /* 2xl → 4xl */
    --ec-h4-size: clamp(
      20px,
      calc(20px + 10 * var(--ec-fluid)),
      30px
    ); /* xl → 3xl */
    --ec-claim-size: clamp(
      24px,
      calc(24px + 6 * var(--ec-fluid)),
      30px
    ); /* hero claim: 2xl → 3xl */
    --ec-subheading-size: clamp(
      20px,
      calc(20px + 4 * var(--ec-fluid)),
      24px
    ); /* homepage text sub-headings: xl → 2xl */
    --ec-banner-title-size: clamp(
      20px,
      calc(20px + 4 * var(--ec-fluid)),
      24px
    ); /* xl → 2xl */
    --ec-step-size: clamp(
      60px,
      calc(60px + 12 * var(--ec-fluid)),
      72px
    ); /* 6xl → 7xl */
    --ec-icon-size: 88px;

    --ec-section-padding: 54px;
    --ec-row-padding: 27px;
    --ec-gutter: 5.5%;
  }

  /* Divi: sections 4% / rows 2% of the width between 981 and 1349px (54/27px from 1350px). */
  @media (min-width: 981px) and (max-width: 1349.98px) {
    :root {
      --ec-section-padding: 4vw;
      --ec-row-padding: 2vw;
    }
  }

  @media (max-width: 980.98px) {
    :root {
      --ec-icon-size: 80px;
      --ec-section-padding: 50px;
      --ec-row-padding: 30px;
    }
  }

  @media (max-width: 767.98px) {
    :root {
      --ec-icon-size: 72px;
    }
  }

  /* Homepage: the old site's larger sizes as the closest Tailwind steps
     (owner, 2026-10-15), fluid from a 375px screen to 980px. */
  .ec-home {
    --ec-fluid-wide: ((100vw - 375px) / 605);
    --ec-text-size: clamp(
      16px,
      calc(16px + 4 * var(--ec-fluid-wide)),
      20px
    ); /* base → xl */
    --ec-h2-size: clamp(
      36px,
      calc(36px + 24 * var(--ec-fluid-wide)),
      60px
    ); /* 4xl → 6xl */
    --ec-claim-size: clamp(
      24px,
      calc(24px + 12 * var(--ec-fluid-wide)),
      36px
    ); /* 2xl → 4xl */
    --ec-subheading-size: clamp(
      24px,
      calc(24px + 12 * var(--ec-fluid-wide)),
      36px
    ); /* 2xl → 4xl */
    --ec-step-size: clamp(
      72px,
      calc(72px + 24 * var(--ec-fluid-wide)),
      96px
    ); /* 7xl → 8xl */

    font-size: var(--ec-text-size);
    line-height: var(--ec-text-line);
  }

  /* Legal pages and 404 (owner, 2026-10-15): 16px text and a smaller heading
     scale for long documents (Tailwind steps, fluid from 375px to 768px). */
  .ec-legal,
  .ec-notfound {
    --ec-text-size: 16px; /* base */
    --ec-h1-size: clamp(
      36px,
      calc(36px + 12 * var(--ec-fluid)),
      48px
    ); /* 4xl → 5xl */
    --ec-h2-size: clamp(
      24px,
      calc(24px + 6 * var(--ec-fluid)),
      30px
    ); /* 2xl → 3xl */
    --ec-h3-size: clamp(
      20px,
      calc(20px + 4 * var(--ec-fluid)),
      24px
    ); /* xl → 2xl */
    --ec-h4-size: clamp(
      18px,
      calc(18px + 2 * var(--ec-fluid)),
      20px
    ); /* lg → xl */

    font-size: var(--ec-text-size);
    line-height: var(--ec-text-line);
  }

  /* Values derived from the text size, rounded to whole pixels. Declared on
     the homepage and the legal pages too, so they follow their text size. Vertical rhythm of
     running text: headings sit close to their text and far from the text
     before them. */
  :root,
  .ec-home,
  .ec-legal,
  .ec-notfound {
    --ec-text-line: round(nearest, calc(var(--ec-text-size) * 1.5), 1px);
    --ec-space-paragraph: round(nearest, calc(var(--ec-text-line) * 0.5), 1px);
    --ec-space-before-heading: round(
      nearest,
      calc(var(--ec-text-line) * 1.7),
      1px
    );
    --ec-space-after-heading: round(
      nearest,
      calc(var(--ec-text-line) * 0.75),
      1px
    );
    --ec-space-after-h1: round(nearest, calc(var(--ec-text-line) * 0.6), 1px);
    --ec-space-between-headings: var(--ec-space-after-h1);
  }

  /* Browsers without round() (Chrome < 125): the same values unrounded, so
     line heights and spacing never fall back to 0 or "normal". */
  @supports not (width: round(1px, 1px)) {
    :root,
    .ec-home,
    .ec-legal,
    .ec-notfound {
      --ec-text-line: calc(var(--ec-text-size) * 1.5);
      --ec-space-paragraph: calc(var(--ec-text-line) * 0.5);
      --ec-space-before-heading: calc(var(--ec-text-line) * 1.7);
      --ec-space-after-heading: calc(var(--ec-text-line) * 0.75);
      --ec-space-after-h1: calc(var(--ec-text-line) * 0.6);
    }
  }

  /* ---------- Base ---------- */

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

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

  body {
    margin: 0;
    background-color: var(--ec-color-paper);
    color: var(--ec-color-ink);
    font-family: var(--ec-font-body);
    font-size: var(--ec-text-size);
    font-weight: 500;
    line-height: var(--ec-text-line);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-wrap: break-word;
    /* Header, main, footer: main grows so the footer sits at the bottom of
       short pages (404) whatever the footer's height. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
  }

  main {
    flex: 1 0 auto;
  }

  /* Divi resets margins and spaces blocks with padding-bottom. */
  h1,
  h2,
  h3,
  h4,
  p,
  ul,
  table {
    margin: 0;
  }

  p {
    padding-bottom: var(--ec-space-paragraph);
    text-wrap: pretty; /* avoids single-word last lines */
  }

  p:last-of-type {
    padding-bottom: 0;
  }

  h1,
  h2,
  h3,
  h4 {
    padding-bottom: 10px;
    font-family: var(--ec-font-heading);
    font-weight: 700;
    line-height: 1.3;
  }

  /* Like codepaws-website: long German words hyphenate only where the markup
     has a soft hyphen (&shy; at compound boundaries — automatic hyphenation
     picks poor break points); any other word breaks as a last resort.
     Multi-line headings are balanced. */
  h1,
  h2,
  h3,
  h4 {
    -webkit-hyphens: manual;
    hyphens: manual;
    text-wrap: balance;
  }

  /* Soft hyphens are for phones. From 768px most words fit, and soft hyphens
     would only make balanced headings and paragraphs hyphenate needlessly
     ("markt-üblichen"). The few words that are still wider than their column
     there keep them up to the width where they fit (.ec-hyphenate-<px>:
     hyphenate below <px>; .ec-hyphenate: at every width). */
  @media (min-width: 768px) {
    main,
    main h1,
    main h2,
    main h3,
    main h4 {
      -webkit-hyphens: none;
      hyphens: none;
    }
  }

  /* Wider than its column at every width (e.g. the AGB title in the legal
     text column). */
  @media (min-width: 768px) {
    .ec-hyphenate {
      -webkit-hyphens: manual;
      hyphens: manual;
    }
  }

  @media (min-width: 768px) and (max-width: 799.98px) {
    .ec-hyphenate-800 {
      -webkit-hyphens: manual;
      hyphens: manual;
    }
  }

  @media (min-width: 768px) and (max-width: 1019.98px) {
    .ec-hyphenate-1020 {
      -webkit-hyphens: manual;
      hyphens: manual;
    }
  }

  @media (min-width: 768px) and (max-width: 1119.98px) {
    .ec-hyphenate-1120 {
      -webkit-hyphens: manual;
      hyphens: manual;
    }
  }

  @media (min-width: 768px) and (max-width: 1239.98px) {
    .ec-hyphenate-1240 {
      -webkit-hyphens: manual;
      hyphens: manual;
    }
  }

  h1 {
    font-size: var(--ec-h1-size);
  }

  h2 {
    font-size: var(--ec-h2-size);
  }

  h3 {
    font-size: var(--ec-h3-size);
  }

  h4 {
    font-size: var(--ec-h4-size);
  }

  strong {
    font-weight: 700;
  }

  a {
    color: var(--ec-color-accent);
    text-decoration: none;
  }

  /* Links underline on hover (text, header and footer links alike). */
  @media (hover: hover) {
    a:hover {
      text-decoration: underline;
    }
  }

  /* One keyboard focus style for the whole site: ink outline on light
     backgrounds, accent on dark ones. */
  :focus-visible {
    outline: 2px solid var(--ec-color-ink);
    outline-offset: 2px;
  }

  .ec-header :focus-visible,
  .ec-footer :focus-visible,
  .ec-hero :focus-visible,
  .ec-section-dark :focus-visible,
  .ec-sidenav :focus-visible {
    outline-color: var(--ec-color-accent);
  }

  img {
    display: block;
    max-width: 100%;
    height: auto;
  }

  ul {
    padding: 0 0 var(--ec-space-paragraph) 1em;
    /* Separate from var(): only then do browsers without round() drop it. */
    padding-left: round(nearest, 1em, 1px);
    list-style-type: disc;
  }

  /* Visually hidden, still read by screen readers. */
  .ec-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@layer layout {
  /* ---------- Layout grid (section / row / columns) ---------- */

  /* Scroll effects shift columns up to 100px sideways; clip them like the old
     site's page wrapper did, so phones never scroll horizontally. */
  main {
    overflow-x: hidden;
    overflow-x: clip;
  }

  .ec-section {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* One screen tall. Small-viewport units: on phones the visible screen with
       the address bar shown, like the old site's height fixed at load (100vh
       would hide the bottom of the hero behind the address bar). */
    min-height: 100vh;
    min-height: 100svh;
    padding: var(--ec-section-padding) 0;
    background-color: var(--ec-color-paper);
    color: var(--ec-color-ink);
  }

  .ec-section-dark {
    background-color: var(--ec-color-ink);
    color: var(--ec-color-paper);
  }

  .ec-row {
    position: relative;
    width: 80%;
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--ec-row-padding) 0;
  }

  .ec-cols {
    display: flex;
    align-items: center;
    column-gap: var(--ec-gutter);
  }

  .ec-col-2-3 {
    width: 64.833%;
  }

  .ec-col-1-3 {
    width: 29.666%;
  }

  .ec-col-1-2 {
    width: 47.25%;
  }

  .ec-col-1-4 {
    width: 20.875%;
  }

  @media (max-width: 980.98px) {
    .ec-cols {
      flex-wrap: wrap;
    }

    .ec-cols > * {
      width: 100%;
      margin-bottom: 30px;
    }

    .ec-cols > :last-child {
      margin-bottom: 0;
    }

    /* Rows with the image on the left show the text first on small screens. */
    .ec-cols-image-first > :first-child {
      order: 2;
    }

    .ec-cols-image-first > :last-child {
      order: 1;
      margin-bottom: 30px;
    }
  }
}

@layer components {
  /* ---------- Header (legal pages and 404, not on the homepage) ---------- */

  .ec-header {
    position: sticky;
    top: 0;
    z-index: 10010;
    padding: 12px 8px;
    background-color: var(--ec-color-ink);
  }

  .ec-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .ec-header-logo {
    display: block;
    width: 50%;
  }

  .ec-header-logo img {
    width: 300px;
  }

  .ec-header-home {
    padding: 5px 16px;
    color: var(--ec-color-paper);
    font-size: var(--ec-text-ui);
    font-weight: 700;
    line-height: 27px;
  }

  /* ---------- Buttons ---------- */

  /* One button style for the site (cookie banner, "Zustimmung verwalten"):
     ink outline on white; .ec-button-primary is filled ink. */
  .ec-button {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--ec-color-ink);
    border-radius: var(--ec-radius);
    background-color: var(--ec-color-paper);
    color: var(--ec-color-ink);
    font-family: var(--ec-font-body);
    font-size: var(--ec-text-ui);
    font-weight: 700;
    line-height: 24px;
    text-decoration: none;
    cursor: pointer;
    transition:
      background-color 0.3s,
      border-color 0.3s;
  }

  .ec-button-primary {
    background-color: var(--ec-color-ink);
    color: var(--ec-color-paper);
  }

  /* The same button as a link (404 page). */
  a.ec-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  @media (hover: hover) {
    .ec-button:hover {
      background-color: var(--ec-color-hover-surface);
      text-decoration: none;
    }

    .ec-button-primary:hover {
      border-color: var(--ec-color-hover-ink);
      background-color: var(--ec-color-hover-ink);
    }
  }

  /* ---------- Icons (SVG masks, coloured by currentColor) ---------- */

  .ec-icon {
    display: inline-block;
    width: var(--ec-icon-size);
    height: var(--ec-icon-size);
    background-color: currentColor;
    -webkit-mask: var(--ec-icon) center / var(--ec-icon-zoom, contain) no-repeat;
    mask: var(--ec-icon) center / var(--ec-icon-zoom, contain) no-repeat;
  }

  /* --ec-icon-zoom scales a glyph inside its box, so each icon appears as
     large as the old site's icon (measured: envelope 88×66, phone 84×84,
     WhatsApp 77×77 in an 88px box). */
  .ec-icon-angles-down {
    --ec-icon: url("../icons/angles-down.9201669c.svg");
    --ec-icon-zoom: 49%;
  }

  .ec-icon-envelope {
    --ec-icon: url("../icons/envelope.72a0d872.svg");
    --ec-icon-zoom: 100%;
  }

  .ec-icon-phone {
    --ec-icon: url("../icons/phone.e43dc81a.svg");
    --ec-icon-zoom: 96%;
  }

  .ec-icon-whatsapp {
    --ec-icon: url("../icons/whatsapp.5b205449.svg");
    --ec-icon-zoom: 87.5%;
  }

  /* ---------- Side navigation (homepage) ---------- */

  .ec-sidenav {
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 99998;
    width: 50px;
    padding: 10px 4px 10px 10px;
    translate: 0 -50%;
    animation: ec-fade-in-right 1.5s cubic-bezier(0.77, 0, 0.175, 1);
  }

  .ec-sidenav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: normal;
  }

  .ec-sidenav li {
    padding: 10px;
  }

  /* Diamond marker */
  .ec-sidenav a {
    position: relative;
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    box-shadow: inset 0 0 0 0.125rem var(--ec-color-accent);
    transform: rotate(45deg);
    transition: box-shadow 0.3s ease;
  }

  .ec-sidenav a.is-active {
    box-shadow: inset 0 0 0 0.5rem var(--ec-color-accent);
    transform: scale(1.375) rotate(45deg);
  }

  /* Larger touch target (28px) without changing the look. */
  .ec-sidenav a::after {
    content: "";
    position: absolute;
    inset: -6px;
  }

  @media (hover: hover) {
    .ec-sidenav a:not(.is-active):hover {
      box-shadow: inset 0 0 0 0.25rem var(--ec-color-accent);
    }
  }

  @keyframes ec-fade-in-right {
    from {
      opacity: 0;
      transform: translateX(100%);
    }

    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  /* ---------- Cookie consent banner ---------- */

  /* Card in the site's style: heading font for the title, body text 16px,
     palette colours, 8px corners. Never taller than the screen: only the
     message and the settings scroll, title and buttons stay visible. */
  .ec-consent {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 480px;
    max-width: calc(100% - 32px);
    max-height: calc(100% - 32px);
    padding: 24px;
    border-radius: var(--ec-radius);
    background-color: var(--ec-color-paper);
    box-shadow: 0 12px 40px rgba(14, 22, 40, 0.25);
    color: var(--ec-color-ink);
    font-size: var(--ec-text-ui);
    line-height: 1.5;
  }

  .ec-consent[hidden] {
    display: none;
  }

  .ec-consent:focus {
    outline: none;
  }

  .ec-consent-title {
    padding: 0;
    font-family: var(--ec-font-heading);
    font-size: var(--ec-banner-title-size);
    font-weight: 700;
    line-height: 1.2;
  }

  /* The chevron button is painted in currentColor: inherit the ink colour
     instead of the browser's default button colour (system blue on iOS). */
  .ec-consent-category-toggle {
    grid-column-start: 3;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background-color: currentColor;
    color: inherit;
    cursor: pointer;
    -webkit-mask: url("../icons/chevron-down.a723e503.svg") center / 16px no-repeat;
    mask: url("../icons/chevron-down.a723e503.svg") center / 16px no-repeat;
    transition:
      transform 0.5s,
      opacity 0.3s;
  }

  .ec-consent-body {
    flex: 0 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .ec-consent-message {
    padding: 0;
  }

  /* Settings ("Einstellungen ansehen"): one box per category in the style of
     the cookie tables — white, 1px line border, rounded, grey header row; the
     opened description below a 1px line. */
  .ec-consent-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
  }

  .ec-consent-categories[hidden] {
    display: none;
  }

  .ec-consent-category {
    overflow: hidden;
    border: 1px solid var(--ec-color-line);
    border-radius: var(--ec-radius);
    background-color: var(--ec-color-paper);
  }

  .ec-consent-category-header {
    display: grid;
    grid-template-columns: 1fr auto 18px;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background-color: var(--ec-color-surface);
  }

  .ec-consent-category-title {
    font-weight: 700;
  }

  .ec-consent-always-active {
    font-size: var(--ec-text-sm);
    font-weight: 700;
  }

  /* Switch: grey when off, accent yellow when on. */
  .ec-consent-switch {
    position: relative;
    display: block;
    width: 34px;
    height: 20px;
  }

  .ec-consent-switch input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
  }

  .ec-consent-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background-color: var(--ec-color-muted);
    transition: background-color 0.3s;
  }

  .ec-consent-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--ec-color-paper);
    transition: left 0.3s;
  }

  .ec-consent-switch input:checked + .ec-consent-switch-track {
    background-color: var(--ec-color-accent);
  }

  .ec-consent-switch input:checked + .ec-consent-switch-track::after {
    left: 17px;
  }

  .ec-consent-switch input:focus-visible + .ec-consent-switch-track {
    outline: 2px solid var(--ec-color-ink);
    outline-offset: 2px;
  }

  .ec-consent-category-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
  }

  /* Accordion: the panel's grid row grows from 0 to the text's height. */
  .ec-consent-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
  }

  .ec-consent-category.is-open .ec-consent-panel {
    grid-template-rows: 1fr;
  }

  .ec-consent-panel > div {
    min-height: 0;
    overflow: hidden;
  }

  .ec-consent-description {
    padding: 12px 14px;
    border-top: 1px solid var(--ec-color-line);
    font-size: var(--ec-text-sm);
    line-height: 1.5;
  }

  /* "Akzeptieren" and "Ablehnen" equally wide side by side (equal
     prominence), the settings button across the full width below. */
  .ec-consent-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .ec-consent-buttons .ec-button {
    white-space: nowrap;
  }

  .ec-consent-buttons .ec-button:last-child {
    grid-column: 1 / -1;
  }

  .ec-consent-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 0;
    font-size: var(--ec-text-sm);
    line-height: 1.5;
  }

  @media (hover: hover) {
    .ec-consent-category-toggle:hover {
      opacity: 0.7;
    }
  }

  /* Phones: a full-width sheet at the bottom, buttons stacked. */
  @media (max-width: 767.98px) {
    .ec-consent {
      bottom: 0;
      left: 0;
      width: 100%;
      max-width: 100%;
      max-height: 100%;
      padding: 20px 16px 16px;
      border-radius: var(--ec-radius) var(--ec-radius) 0 0;
    }

    .ec-consent-buttons {
      grid-template-columns: 1fr;
    }
  }

  /* Low screens (phones held sideways): buttons side by side again, so the
     text keeps some room. */
  @media (max-height: 500px) {
    .ec-consent {
      gap: 12px;
      padding: 16px;
    }

    .ec-consent-buttons {
      grid-template-columns: 1fr 1fr auto;
    }

    .ec-consent-buttons .ec-button:last-child {
      grid-column: auto;
    }
  }

  /* ---------- Footer ---------- */

  .ec-footer {
    padding: 20px 0;
    background-color: var(--ec-color-ink);
    color: var(--ec-color-paper);
    text-align: center;
  }

  .ec-footer .ec-row {
    padding: 0;
  }

  /* Legal pages and 404: footer in the page's 16px text, not larger. */
  main:is(.ec-legal, .ec-notfound) ~ .ec-footer {
    --ec-text-line: 24px;
    font-size: 16px;
    line-height: var(--ec-text-line);
  }

  .ec-footer-menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0;
    list-style: none;
    line-height: var(--ec-text-line);
  }

  .ec-footer-menu li {
    margin-bottom: 0.5em;
    margin-bottom: round(nearest, 0.5em, 1px);
  }

  .ec-footer-menu a {
    color: var(--ec-color-paper);
  }

  /* The old menu sat in a Divi sidebar module with 30px right padding (desktop only). */
  @media (min-width: 981px) {
    .ec-footer nav {
      padding-right: 30px;
    }
  }

  @media (max-width: 980.98px) {
    .ec-footer-menu {
      flex-direction: column;
      gap: 0;
      margin-bottom: 12px;
    }
  }
}

@layer pages {
  /* ---------- Homepage hero ---------- */

  /* clip, not hidden: overflow: hidden would make the hero a scroll container
     and its scroll-driven animations (logo, hint) would never move. */
  .ec-hero {
    overflow: hidden;
    overflow: clip;
    padding-bottom: 0;
    color: var(--ec-color-paper);
  }

  /* Parallax layer: 130% of the hero, anchored at the bottom. A scroll-driven
     animation (motion layer; motion.js in older browsers) moves it by
     0.3 × scroll; the default offset equals the scroll-0 position. */
  .ec-hero-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 130%;
    background: url("../img/water-esg-investing.a81626e7.jpg") 50% 0 / cover no-repeat;
    transform: translateY(30vh);
  }

  /* Divi turns the parallax off on mobile devices (motion.js sets the class). */
  .ec-mobile-device .ec-hero-bg {
    height: 100%;
    transform: none;
  }

  .ec-hero-brand {
    padding: 10px 0 27px;
  }

  .ec-hero-logo {
    width: 100%;
  }

  .ec-hero-claim {
    font-size: var(--ec-claim-size);
  }

  .ec-hero-hint {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    text-align: center;
  }

  .ec-hero-hint .ec-icon {
    --ec-icon-size: 72px;
    display: block;
    margin: 0 auto 4px;
  }

  .ec-hero-hint p {
    font-weight: 700;
  }

  /* ---------- Homepage sections ---------- */

  /* Heading pair (<hgroup>): the question is the section's h2, the answer a
     <p> styled like it, so screen readers get one heading per section. */
  .ec-heading :is(h2, p) {
    text-align: center;
  }

  .ec-heading p {
    padding-bottom: 10px;
    font-family: var(--ec-font-heading);
    font-size: var(--ec-h2-size);
    font-weight: 700;
    line-height: 1.3;
    text-wrap: balance;
  }

  /* The answer overlaps the question by ~0.7 of the heading size. */
  .ec-heading h2 {
    margin-bottom: -0.7em;
    margin-bottom: round(nearest, -0.7em, 1px);
    filter: opacity(15%);
    backface-visibility: hidden;
  }

  /* Sub-heading (an h6 on the old site, same look). */
  .ec-text h3 {
    font-size: var(--ec-subheading-size);
  }

  /* Full-width text rows (source note, "Wie kann ich starten?"): about 75
     characters per line like the text columns next to images. */
  .ec-row.ec-text > * {
    max-width: calc(var(--ec-text-size) * 36);
  }

  /* Phones: keep text and images clear of the fixed side navigation (its
     active diamond reaches ~38px from the right edge). */
  @media (max-width: 767.98px) {
    .ec-home .ec-row {
      width: auto;
      margin-right: max(10%, 46px);
      margin-left: 10%;
    }
  }

  .ec-accent {
    color: var(--ec-color-accent);
  }

  .ec-media img {
    width: 100%;
    margin: 0 auto;
    border-radius: var(--ec-radius);
  }

  @media (max-width: 980.98px) {
    .ec-media img {
      width: 50%;
    }
  }

  @media (max-width: 767.98px) {
    .ec-media img {
      width: 100%;
    }
  }

  /* Small print with a line height that fits its size. */
  .ec-footnote {
    color: var(--ec-color-muted);
    font-size: var(--ec-text-sm);
    line-height: 1.5;
  }

  .ec-footnote small {
    font-size: inherit;
  }

  /* Last homepage section fills the viewport minus the footer (old theme
     fallback value). Small-viewport units: like the old site's height fixed at
     load, it does not change while the mobile address bar shows or hides. */
  .ec-section-last {
    min-height: calc(100vh - 100px);
    min-height: calc(100svh - 100px);
  }

  /* Steps 1–4 */
  .ec-steps {
    list-style: none;
    line-height: var(--ec-text-line);
  }

  .ec-steps li {
    position: relative;
    padding-top: 30px;
  }

  /* Faint number behind the step text, shifted out to the left. */
  .ec-steps-number {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin-left: -0.35em;
    font-family: var(--ec-font-heading);
    font-size: var(--ec-step-size);
    font-weight: 700;
    line-height: var(--ec-text-line);
    filter: opacity(15%);
    backface-visibility: hidden;
  }

  .ec-steps.ec-cols {
    align-items: flex-start;
  }

  @media (max-width: 980.98px) {
    .ec-steps .ec-col-1-4 {
      width: 47.25%;
    }

    .ec-steps > :nth-last-child(-n + 2) {
      margin-bottom: 0;
    }
  }

  @media (max-width: 767.98px) {
    .ec-steps .ec-col-1-4 {
      width: 100%;
    }

    .ec-steps > :nth-last-child(2) {
      margin-bottom: 30px;
    }
  }

  /* Contact: icon link above the bold label */
  .ec-contact {
    align-items: flex-start;
    text-align: center;
  }

  /* The label overlaps the bottom of the faint icon, as on the old site. */
  .ec-contact a {
    display: block;
    width: fit-content;
    margin: 0 auto -24px;
    color: var(--ec-color-ink);
  }

  .ec-contact .ec-icon {
    display: block;
    /* Top, like the old icon font's glyphs. */
    -webkit-mask-position: 50% 0;
    mask-position: 50% 0;
    filter: opacity(15%);
    backface-visibility: hidden;
    transition: filter 0.3s;
  }

  @media (hover: hover) {
    .ec-contact a:hover .ec-icon {
      filter: opacity(35%);
    }
  }

  /* ---------- Legal pages ---------- */

  .ec-legal {
    padding: var(--ec-section-padding) 0;
  }

  /* Document meta data under the title ("Version …, Stand …"). */
  .ec-meta {
    color: var(--ec-color-muted);
    font-size: var(--ec-text-sm);
    line-height: 1.5;
  }

  /* Running text (legal pages, 404, homepage text columns): a heading is
     close to its own text and clearly separated from the text before it.
     The previous block's bottom spacing counts towards the gap above. */
  :is(.ec-legal, .ec-notfound, .ec-text) :is(h1, h2, h3, h4) {
    padding-bottom: var(--ec-space-after-heading);
    line-height: 1.15;
  }

  :is(.ec-legal, .ec-notfound) h1 {
    padding-bottom: var(--ec-space-after-h1);
  }

  :is(.ec-legal, .ec-notfound, .ec-text) * + :is(h2, h3, h4) {
    margin-top: calc(
      var(--ec-space-before-heading) - var(--ec-space-paragraph)
    );
  }

  /* A table's bottom margin collapses with the heading's top margin (paragraphs
     use padding instead), so after a table the heading gets the full gap. */
  :is(.ec-legal, .ec-notfound, .ec-text) .ec-table + :is(h2, h3, h4) {
    margin-top: var(--ec-space-before-heading);
  }

  :is(.ec-legal, .ec-notfound, .ec-text) :is(h1, h2, h3, h4) + :is(h2, h3, h4) {
    margin-top: var(--ec-space-between-headings);
  }

  /* Cookie lists in the Cookie-Richtlinie: white table with a grey header row,
     rounded like the images. */
  .ec-table {
    margin-bottom: var(--ec-space-paragraph);
    overflow: hidden;
    border: 1px solid var(--ec-color-line);
    border-radius: var(--ec-radius);
  }

  .ec-table table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
  }

  .ec-table th,
  .ec-table td {
    padding: 12px 14px;
    vertical-align: top;
  }

  .ec-table thead th {
    border-bottom: 1px solid var(--ec-color-line);
    white-space: nowrap;
    background-color: var(--ec-color-surface);
    font-weight: 700;
  }

  .ec-table tbody tr + tr td {
    border-top: 1px solid var(--ec-color-line);
  }

  /* Column widths: name, type, expiry, purpose (the rest); a column only grows
     beyond them when its content needs it, so both tables line up. */
  .ec-table th:nth-child(1) {
    width: 28%;
  }

  .ec-table th:nth-child(2) {
    width: 16%;
  }

  .ec-table th:nth-child(3) {
    width: 20%;
  }

  /* Cookie names are identifiers: keep them on one line. */
  .ec-table td:first-child {
    font-weight: 700;
    white-space: nowrap;
  }

  /* Phones (the four columns need ~560px): one block per
     cookie — the name as a grey bar, then each value with its column name in
     front. On paper always the table. */
  @media screen and (max-width: 767.98px) {
    .ec-table thead {
      display: none;
    }

    .ec-table tr,
    .ec-table td {
      display: block;
    }

    .ec-table td {
      padding: 0 20px;
    }

    .ec-table td::before {
      content: attr(data-label) ": ";
      font-weight: 700;
    }

    .ec-table td:first-child {
      margin-bottom: 10px;
      padding: 12px 20px;
      border-bottom: 1px solid var(--ec-color-line);
      background-color: var(--ec-color-surface);
      white-space: normal;
    }

    .ec-table td:first-child::before {
      content: none;
    }

    .ec-table td:last-child {
      padding-bottom: 14px;
    }

    .ec-table tbody tr + tr td {
      border-top: 0;
    }

    .ec-table tbody tr + tr {
      border-top: 1px solid var(--ec-color-line);
    }
  }

  /* ---------- 404 ---------- */

  /* Centred like a homepage section: faint "404" with the title tucked under
     it (as the homepage heading pairs), short text, one button. */
  .ec-notfound {
    --ec-notfound-code-size: clamp(
      96px,
      calc(96px + 32 * var(--ec-fluid)),
      128px
    ); /* 8xl → 9xl */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--ec-section-padding) 0;
    text-align: center;
  }

  .ec-notfound .ec-row {
    max-width: calc(var(--ec-text-size) * 37);
  }

  .ec-notfound-code {
    margin-bottom: -0.3em;
    margin-bottom: round(nearest, -0.3em, 1px);
    padding: 0;
    font-family: var(--ec-font-heading);
    font-size: var(--ec-notfound-code-size);
    font-weight: 700;
    line-height: 1;
    filter: opacity(15%);
    backface-visibility: hidden;
  }

  .ec-notfound-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding-top: var(--ec-space-after-heading);
  }

  /* ---------- Print ---------- */

  /* Paper: A4 margins, ink on white (no dark sections, no background photo),
     smaller type, compact spacing, decorative photos and screen-only controls
     left out, no page break right after a heading or inside a table row. */
  @media print {
    @page {
      margin: 18mm 16mm;
    }

    :root,
    .ec-home,
    .ec-legal,
    .ec-notfound {
      --ec-text-size: 14px;
      --ec-text-sm: 12px;
      --ec-h1-size: 30px;
      --ec-h2-size: 22px;
      --ec-h3-size: 18px;
      --ec-h4-size: 16px;
      --ec-claim-size: 20px;
      --ec-subheading-size: 18px;
      --ec-step-size: 40px;
      --ec-icon-size: 48px;
      --ec-section-padding: 0px;
      --ec-row-padding: 12px;
    }

    body {
      display: block;
      min-height: 0;
    }

    .ec-header,
    .ec-hero,
    .ec-section,
    .ec-section-dark,
    .ec-footer {
      background: none !important;
      color: var(--ec-color-ink);
    }

    .ec-header {
      position: static;
      padding: 0 0 12px;
      border-bottom: 1px solid var(--ec-color-line);
    }

    .ec-header-logo img {
      width: 200px;
    }

    .ec-header-logo img,
    .ec-hero-logo {
      filter: brightness(0);
    }

    .ec-header-home,
    .ec-sidenav,
    .ec-consent,
    .ec-button,
    .ec-hero-hint,
    .ec-hero-bg,
    .ec-footer nav,
    img[alt=""] {
      display: none !important;
    }

    /* Full text width, no screen-height sections. */
    .ec-row,
    .ec-home .ec-row {
      width: auto;
      max-width: none;
      margin: 0;
    }

    .ec-section,
    .ec-section-last {
      display: block;
      min-height: 0;
      padding: 0 0 12px;
    }

    .ec-hero-logo {
      width: 280px;
    }

    .ec-notfound {
      padding: 24px 0;
    }

    .ec-media img {
      width: auto;
      max-width: 100%;
      max-height: 60mm;
      margin: 0;
    }

    .ec-cols > * {
      margin-bottom: 12px;
    }

    /* One left edge on paper (the hero logo and text are left-aligned). */
    .ec-heading :is(h2, p) {
      text-align: left;
    }

    /* Step numbers stay inside the page margin. */
    .ec-steps-number {
      margin-left: 0;
    }

    a {
      color: inherit;
      text-decoration: underline;
    }

    .ec-contact a {
      text-decoration: none;
    }

    h1,
    h2,
    h3,
    h4 {
      break-after: avoid;
      break-inside: avoid;
    }

    p,
    li {
      orphans: 3;
      widows: 3;
    }

    img,
    .ec-table tr,
    .ec-steps li,
    .ec-contact > * {
      break-inside: avoid;
    }

    .ec-footer {
      padding: 12px 0 0;
      border-top: 1px solid var(--ec-color-line);
      font-size: var(--ec-text-sm);
    }

    /* Scroll effects set opacity/transform inline; on paper all is shown. */
    [data-motion],
    [data-animate] {
      opacity: 1 !important;
      transform: none !important;
      animation: none !important;
    }
  }
}

@layer motion {
  /* ---------- Scroll effects (CSS scroll-driven animations) ---------- */

  /*
   * Divi's motion effects, tied 1:1 to the scroll position (like
   * codepaws-website). Divi measures where an element's middle (bottom for
   * the hero hint) sits in the viewport: 0 = at the bottom edge, 100 = at the
   * top edge. That is exactly the view-timeline range "entry 50%" to
   * "exit 50%" ("entry 100%" to "exit 100%" for the bottom), so the keyframe
   * percentages below are Divi's range points (MOTION_PRESETS in motion.js;
   * test/motion.test.mjs checks they match). Browsers without scroll-driven
   * animations get the effects from motion.js instead.
   */
  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      [data-motion] {
        animation-duration: auto;
        animation-timing-function: linear;
        animation-fill-mode: both;
        animation-timeline: view();
        animation-range: entry 50% exit 50%;
      }

      [data-motion="hero-hint"] {
        animation-range: entry 100% exit 100%;
      }

      [data-motion="hero-logo"] {
        animation-name: ec-motion-hero-logo;
      }

      [data-motion="hero-hint"] {
        animation-name: ec-motion-hero-hint;
      }

      [data-motion="heading-1"] {
        animation-name: ec-motion-heading-1;
      }

      [data-motion="heading-2"] {
        animation-name: ec-motion-heading-2;
      }

      [data-motion="heading-row"] {
        animation-name: ec-motion-heading-row;
      }

      [data-motion="text-from-right"] {
        animation-name: ec-motion-text-from-right;
      }

      [data-motion="text-from-left"] {
        animation-name: ec-motion-text-from-left;
      }

      [data-motion="image-from-right"] {
        animation-name: ec-motion-image-from-right;
      }

      [data-motion="image-from-left"] {
        animation-name: ec-motion-image-from-left;
      }

      [data-motion="text-from-below"] {
        animation-name: ec-motion-text-from-below;
      }

      [data-motion="row-fade"] {
        animation-name: ec-motion-row-fade;
      }

      /* Divi measures with the viewport height + 100px on phones and tablets. */
      @media (hover: none) and (pointer: coarse) {
        [data-motion] {
          animation-timeline: view(block 0px -100px);
        }
      }

      /* Hero parallax on mouse/trackpad devices: the image moves by 0.3 × the
         scroll distance, starting at its scroll-0 offset (30vh). Touch
         devices get no parallax, as on the old site. */
      /* Not on devices motion.js treats as mobile (e.g. an iPad with a
         trackpad): their background layer is only 100% tall. */
      @media (hover: hover) and (pointer: fine) {
        :root:not(.ec-mobile-device) .ec-hero-bg {
          animation: ec-parallax linear both;
          animation-timeline: scroll(root);
          animation-range: 0 1000vh;
        }
      }

      @media not ((hover: hover) and (pointer: fine)) {
        .ec-hero-bg {
          height: 100%;
          transform: none;
        }
      }
    }
  }

  @keyframes ec-motion-hero-logo {
    0%,
    50% {
      transform: translate(0px, 0px);
    }

    100% {
      transform: translate(0px, -100px);
    }
  }

  @keyframes ec-motion-hero-hint {
    0% {
      opacity: 1;
    }

    20%,
    100% {
      opacity: 0;
    }
  }

  @keyframes ec-motion-heading-1 {
    0% {
      opacity: 0;
    }

    50%,
    80% {
      opacity: 1;
    }

    100% {
      opacity: 0;
    }
  }

  @keyframes ec-motion-heading-2 {
    0%,
    10% {
      opacity: 0;
    }

    50%,
    85% {
      opacity: 1;
    }

    100% {
      opacity: 0;
    }
  }

  @keyframes ec-motion-heading-row {
    0%,
    75% {
      opacity: 1;
    }

    100% {
      opacity: 0;
    }
  }

  @keyframes ec-motion-text-from-right {
    0% {
      opacity: 0;
      transform: translate(100px, 0px);
    }

    20% {
      transform: translate(0px, 0px);
    }

    20%,
    80% {
      opacity: 1;
    }

    100% {
      opacity: 0;
      transform: translate(0px, 0px);
    }
  }

  @keyframes ec-motion-text-from-left {
    0% {
      opacity: 0;
      transform: translate(-100px, 0px);
    }

    20% {
      transform: translate(0px, 0px);
    }

    20%,
    80% {
      opacity: 1;
    }

    100% {
      opacity: 0;
      transform: translate(0px, 0px);
    }
  }

  @keyframes ec-motion-image-from-right {
    0% {
      opacity: 0;
      transform: translate(50px, 0px);
    }

    20% {
      transform: translate(0px, 0px);
    }

    20%,
    80% {
      opacity: 1;
    }

    100% {
      opacity: 0;
      transform: translate(0px, 0px);
    }
  }

  @keyframes ec-motion-image-from-left {
    0% {
      opacity: 0;
      transform: translate(-50px, 0px);
    }

    20% {
      transform: translate(0px, 0px);
    }

    20%,
    80% {
      opacity: 1;
    }

    100% {
      opacity: 0;
      transform: translate(0px, 0px);
    }
  }

  @keyframes ec-motion-text-from-below {
    0% {
      opacity: 0;
      transform: translate(0px, 50px);
    }

    20%,
    80% {
      opacity: 1;
      transform: translate(0px, 0px);
    }

    100% {
      opacity: 0;
      transform: translate(0px, 0px);
    }
  }

  @keyframes ec-motion-row-fade {
    0% {
      opacity: 0;
    }

    20%,
    80% {
      opacity: 1;
    }

    100% {
      opacity: 0;
    }
  }

  @keyframes ec-parallax {
    from {
      transform: translateY(30vh);
    }

    to {
      transform: translateY(330vh);
    }
  }

  /* ---------- Scroll effects (fallback) and entrance animations (motion.js) ---------- */

  @media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
    html {
      scroll-behavior: smooth;
    }

    /* Only after the first render, so the initial state does not animate. */
    .ec-motion-ready [data-motion] {
      transition:
        opacity 200ms linear,
        transform 200ms linear;
    }

    [data-animate]:not(.is-animated) {
      opacity: 0;
    }

    /* Failsafe: `scripting: enabled` does not mean motion.js runs (a module may
       fail to load). Until motion.js marks the page with .ec-animate, the
       hidden content appears after 3 s instead of staying invisible. */
    :root:not(.ec-animate) [data-animate]:not(.is-animated) {
      animation: ec-reveal 0s 3s both;
    }

    /* Cookie banner settings fade in like the old Complianz banner's. */
    .ec-consent-categories {
      animation: ec-fade 1s ease;
    }

    [data-animate="fade-hint"].is-animated {
      animation: ec-fade 1200ms ease-in-out 1000ms both;
    }

    [data-animate="slide-loop"].is-animated {
      animation: ec-slide-top 2000ms ease-in-out 750ms infinite both;
    }

    [data-animate^="zoom-"].is-animated {
      animation: ec-zoom 400ms ease-in-out both;
    }

    [data-animate="zoom-1"].is-animated {
      animation-delay: 200ms;
    }

    [data-animate="zoom-2"].is-animated {
      animation-delay: 600ms;
    }

    [data-animate="zoom-3"].is-animated {
      animation-delay: 1000ms;
    }

    [data-animate="zoom-4"].is-animated {
      animation-delay: 1400ms;
    }
  }

  @keyframes ec-fade {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  /* Divi slideTop at 20% intensity: -40% of the old 76px icon module. */
  @keyframes ec-slide-top {
    from {
      opacity: 0;
      transform: translateY(-30.4px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes ec-zoom {
    from {
      opacity: 0;
      transform: scale(0.85);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  /* Failsafe reveal for entrance-animated content (see the failsafe rule above). */
  @keyframes ec-reveal {
    to {
      opacity: 1;
    }
  }

  /* ---------- Reduced motion ---------- */

  /* Scroll effects, entrance animations and smooth scrolling only run under
     prefers-reduced-motion: no-preference (see above); these are the remaining
     always-on animations and transitions. */
  @media (prefers-reduced-motion: reduce) {
    .ec-consent-panel,
    .ec-consent-category-toggle {
      transition: none;
    }

    .ec-sidenav {
      animation: none;
    }
  }
}
