/* ==========================================================================
   JG-Bits — Divi compatibility layer
   Loaded last in <head> (functions.php), after Divi's critical/inline CSS, so
   equal-specificity rules in main.css already win. This file only handles what
   Divi sets with higher specificity or what main.css leaves to browser defaults.

   Editor convention: put the mockup classes into Divi's "CSS Class" field
   (Section: "section s-dark", Row: "row grid cols-3", Column: "bezel__core svc"),
   and data attributes (data-reveal, data-split, ...) into "Attributes".
   ========================================================================== */

/* ---------- Base: Divi sets these, main.css relies on browser defaults ---------- */
body { font-weight: 400; }
h1, h2, h3, h4, h5, h6 { padding-bottom: 0; }
p { padding-bottom: 0; }
/* Divi's body line-height variable is "1.6em" (inherits as px); unitless keeps small text tight. */
html:root { --et_global_body_font_height: 1.6; }
/* Divi prints its Theme Options CSS inside <body>, after this file, and colours every heading
   (heading colour) and link (link colour). Design-system colours are inherited from the section. */
html body { font-family: var(--font-sans); line-height: 1.6; } /* Divi: 1.6em would inherit as px */
body :is(h1, h2, h3, h4, h5, h6) { color: inherit; font-family: var(--font-display); }
body a { color: inherit; }
/* Classed lists are components (.tags, .checks, ...); plain lists keep Divi/.prose styling. */
:is(.entry-content, .et-l--body) :is(ul, ol):where([class]) { list-style: none; padding: 0; line-height: inherit; }

/* ---------- Layout: rows and columns carrying design-system classes ---------- */
/* :not(.et_pb_row_nested) matches the specificity of newer Divi critical CSS (.et_pb_row:not(…):not(.et_pb_row_nested) { width: 80% }) */
.et_pb_row.row:not(.et_pb_row_nested) { width: min(100% - 2 * var(--gutter), var(--container)); max-width: none; padding: 0; }
.et_pb_row.row--narrow:not(.et_pb_row_nested) { width: min(100% - 2 * var(--gutter), var(--container-narrow)); }
.et_pb_row.row + .et_pb_row.row { margin-top: 0; }
.et_pb_row.row + .et_pb_row.row.split--post { margin-top: 4rem; } /* single post: TOC + article below the image */
.et_pb_section.section { padding-inline: 0; }

/* Divi 5 flex layout: sections and columns space their children with gap from --section-gutter /
   --module-gutter. Design-system sections space content with margins instead. */
.et_pb_section:is(.section, .hero, .page-hero, .trust, .e404) { --section-gutter: 0px; --module-gutter: 0px; }

/* Grid/split rows: CSS grid from main.css places the columns, not Divi's widths, floats and gutters. */
.et_pb_row:is(.grid, .split, .bento, .stats) > .et_pb_column,
.et_pb_row_inner.svc-item > .et_pb_column_inner { width: auto; margin-inline: 0; float: none; }
.et_pb_row:is(.grid, .split, .bento, .stats)::after { content: none; }
/* Wrapped rows (columns stacked): spacing comes from the modules' margins, not Divi's row gap. */
.et_pb_row.row:not(.grid, .split, .bento, .stats, .page-hero__grid, .sec-head-row) { row-gap: 0; }

/* Spacing comes from the design system (margins on headings, paragraphs, components). */
.et-l .et_pb_row:is(.row, .grid, .split) .et_pb_column .et_pb_module { margin-bottom: 0; }

/* Mockup child selectors, with Divi's module wrapper in between. */
.svc > .et_pb_module:has(.tags) { margin-top: auto; padding-top: 1.5rem; }
.svc > .et_pb_module:has(.link-arrow) { margin-top: auto; }
.svc > .et_pb_module:has(.tags) + .et_pb_module:has(.link-arrow) { margin-top: 0; }
.svc > .et_pb_code + .et_pb_module:has(.tags) { padding-top: 0; } /* mockup: padding only after a paragraph (p + .tags) */
/* Dark feature card: column "bezel__core svc svc--feature". Whole card clickable: add "card-link",
   the link-arrow inside stretches over the card (real link, keyboard and screen readers see one link). */
.et_pb_column.bezel__core.svc--feature { background: var(--ink-800); box-shadow: none; color: var(--text-on-dark); }
.svc--feature.svc p { color: rgba(243,241,238,.7); }
.et_pb_column.card-link { transition: box-shadow .25s var(--ease-out-expo), transform var(--dur-ui) var(--ease-fluid); }
.et_pb_column.card-link:hover { box-shadow: inset 0 0 0 1px rgba(172,112,42,.55); }
.et_pb_column.card-link.svc--feature:hover { box-shadow: inset 0 0 0 1px rgba(172,112,42,.7); }
.et_pb_column.card-link:active { transform: translateY(-2px) scale(.99); transition-duration: var(--dur-press); }
.et_pb_column.card-link :is(.et_pb_module, .et_pb_text_inner, p) { position: static; }
.et_pb_column.card-link .link-arrow::after { content: ""; position: absolute; inset: 0; }
/* Divi columns are flex containers, so margins no longer collapse as in the mockup's block layout.
   1) A text module followed by another module: its last margin would add to the next one (mockup:
      they collapse). Cards (.svc, .ref, .process__track) and stats (.stat) are flex in the mockup too: keep theirs.
      The trust label keeps its gap to the marquee (code module, no margin of its own).
   2) The last text module in a column: the margin would sit at the column's end. Columns that are grid
      items (cards, split halves) or the head next to a button (.sec-head-row) keep it, as in the mockup.
   "statement" (large text, its 1em margin is the gap below) always keeps it. */
.et_pb_column:not(.svc, .ref, .stat, .process__track) > .et_pb_text:not(:last-child, .statement) > .et_pb_text_inner > :last-child:not(.trust__label),
.et_pb_column:not(.et_pb_row:is(.grid, .split, .bento, .stats) > *, .sec-head-row > *, .process__track) > .et_pb_text:last-child:not(.statement) > .et_pb_text_inner > :last-child { margin-bottom: 0; }
/* ...except the section's very last paragraph outside grids: the mockup's section padding keeps that margin. */
.et_pb_row:last-child:not(.grid, .bento, .stats, .split) > .et_pb_column:last-child > .et_pb_text:last-child > .et_pb_text_inner > p:last-child { margin-bottom: 1em; }

/* Column with class btn-row: buttons side by side. */
:is(.et_pb_column, .et_pb_column_inner).btn-row { display: flex; flex-direction: row; flex-wrap: wrap; gap: .75rem; align-items: center; }
:is(.et_pb_column, .et_pb_column_inner).btn-row > .et_pb_button_module_wrapper { margin: 0; }

/* Compare table in a text module: Divi's .entry-content table border, margin and cell padding off. */
body .entry-content table.compare { border: 0; margin: 0; }
body .entry-content .compare :is(th, td) { padding: .95rem 1rem; border-top: 0; }
@media (max-width: 767px) { body .entry-content .compare :is(th, td) { padding: .75rem .4rem; } }

/* ---------- Buttons: Divi Button module + class "btn" (optional btn--ghost, btn--sm, btn--light) ---------- */
body .et_pb_module.et_pb_button.btn,
body .et_pb_module.et_pb_button.btn:hover {
  border: 0; font-size: .95rem; font-weight: 600; line-height: 1.6; letter-spacing: -.005em; flex-direction: row;
  padding: .5rem 1.35rem; color: var(--btn-fg); background: var(--btn-bg);
}
body .et_pb_module.et_pb_button.btn:hover { background: var(--copper-btn-hover); }
body .et_pb_module.et_pb_button.btn--ghost:hover { background: rgba(52,48,60,.04); }
:is(.s-dark, .s-ink, .s-deep, .on-dark, .hero, .page-hero, .cta-band) .et_pb_module.et_pb_button.btn--ghost:hover { background: rgba(255,255,255,.06); }
body .et_pb_module.et_pb_button.btn--light:hover { background: #fff; }
body .et_pb_module.et_pb_button.btn--sm { padding: .3rem 1.05rem; font-size: .875rem; }

/* Divi's icon font arrow -> the design system's thin up-right arrow (same as .btn__ico). */
body .et_pb_module.et_pb_button.btn::after,
body .et_pb_module.et_pb_button.btn:hover::after {
  content: ""; position: static; display: block; flex: none; opacity: 1; margin: 0; transform: none;
  width: 1.05rem; height: 1.05rem; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8.5 7H17v8.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8.5 7H17v8.5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--dur-ui) var(--ease-fluid);
}
body .et_pb_module.et_pb_button.btn:hover::after { transform: translateX(3px); }

/* Other button icons (same set as the theme icons): btn--shield, btn--bolt, btn--arrow, btn--chat, btn--euro, btn--gauge */
body .et_pb_module.et_pb_button.btn--shield::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.2 4.8 6v5.6c0 4.4 3 8.3 7.2 9.4 4.2-1.1 7.2-5 7.2-9.4V6L12 3.2Z'/%3E%3Cpath d='m9 12.2 2.1 2.1L15.2 10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.2 4.8 6v5.6c0 4.4 3 8.3 7.2 9.4 4.2-1.1 7.2-5 7.2-9.4V6L12 3.2Z'/%3E%3Cpath d='m9 12.2 2.1 2.1L15.2 10'/%3E%3C/svg%3E"); }
body .et_pb_module.et_pb_button.btn--bolt::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 3.5 5.5 13.2h6L10.8 20.5l7.7-9.7h-6L13 3.5Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 3.5 5.5 13.2h6L10.8 20.5l7.7-9.7h-6L13 3.5Z'/%3E%3C/svg%3E"); }
body .et_pb_module.et_pb_button.btn--arrow::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
body .et_pb_module.et_pb_button.btn--chat::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 17.8V7a2.5 2.5 0 0 1 2.5-2.5h9A2.5 2.5 0 0 1 19 7v6.5a2.5 2.5 0 0 1-2.5 2.5H8.6L5 18.9Z'/%3E%3Cpath d='M9 9.5h6M9 12.5h3.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 17.8V7a2.5 2.5 0 0 1 2.5-2.5h9A2.5 2.5 0 0 1 19 7v6.5a2.5 2.5 0 0 1-2.5 2.5H8.6L5 18.9Z'/%3E%3Cpath d='M9 9.5h6M9 12.5h3.5'/%3E%3C/svg%3E"); }
body .et_pb_module.et_pb_button.btn--euro::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 6.6A7 7 0 1 0 17.5 17.4'/%3E%3Cpath d='M4.5 10.2h8.5M4.5 13.8h8.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 6.6A7 7 0 1 0 17.5 17.4'/%3E%3Cpath d='M4.5 10.2h8.5M4.5 13.8h8.5'/%3E%3C/svg%3E"); }
body .et_pb_module.et_pb_button.btn--gauge::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.4 17.5a8.5 8.5 0 1 1 15.2 0'/%3E%3Cpath d='m12 13.2 3.6-4.4'/%3E%3Ccircle cx='12' cy='13.6' r='1.2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.4 17.5a8.5 8.5 0 1 1 15.2 0'/%3E%3Cpath d='m12 13.2 3.6-4.4'/%3E%3Ccircle cx='12' cy='13.6' r='1.2'/%3E%3C/svg%3E"); }

/* ---------- Page components built from Divi modules ---------- */
/* Hero photo: Image module "page-hero__bg" covers the whole section (rows/columns must not be its containing block). */
.page-hero :is(.et_pb_row, .et_pb_column) { position: static; }
.et_pb_image.page-hero__bg { position: absolute; inset: 0; z-index: -2; margin: 0; }
.et_pb_image:is(.page-hero__bg, .media) .et_pb_image_wrap { display: block; width: 100%; height: 100%; }
.et_pb_section.page-hero.page-hero--legal { padding-bottom: 4rem; }
/* Webseitencheck: centred hero, the result card below overlaps it */
.et_pb_section.page-hero.page-hero--scan { padding-bottom: clamp(6rem, 4rem + 6vw, 10rem); }
.page-hero--scan h1 { max-width: none; }
.page-hero--scan .t-lead { margin-inline: auto; }
.et_pb_section.section.scan-pull { padding-top: 0; margin-top: -4rem; position: relative; z-index: 2; }
.scan-pull .et_pb_column { min-height: 0; } /* Divi's 1px would show while the result card is hidden */
.et_pb_section.page-hero.page-hero--pull { padding-bottom: clamp(8rem, 6rem + 6vw, 12rem); } /* contact form overlaps the hero (row contact-pull) */
.et-l .et_pb_row.contact-pull { margin-bottom: clamp(-7rem, -5rem - 3vw, -4rem); } /* Divi resets row margins */
/* Home hero: glow and fade (code module) sit in the section, not in the row/column/module. */
.hero :is(.et_pb_row, .et_pb_column, .et_pb_code, .et_pb_code_inner) { position: static; }
/* Divi 5 sections are column flex: align-items centres horizontally, justify-content vertically (mockup: row flex + align-items) */
.et_pb_section.hero { justify-content: center; }

/* Home process (section "process", data-hscroll): the section is the mockup's 100dvh wrapper; row
   "process__host" runs to the right edge, its column "process__track" holds the cards (text modules
   "process__card bezel__core") side by side and is moved by main.js. Phones and reduced motion: stacked. */
.et_pb_section.section.process { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding-block: 7rem 4rem; }
.process .sec-head { margin-bottom: 3rem; }
.et_pb_row.process__host:not(.et_pb_row_nested) { width: 100%; max-width: none; margin: 0; padding: 0 0 0 max(var(--gutter), calc((100vw - var(--container)) / 2)); }
.et_pb_row.process__host > .et_pb_column.process__track { width: max-content; flex: none; margin: 0; gap: clamp(1rem, .5rem + 1.5vw, 1.75rem); }
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) { .et_pb_column.process__track { flex-direction: row; } }
@media (max-width: 767px), (prefers-reduced-motion: reduce) { .et_pb_row.process__host > .et_pb_column.process__track { width: auto; flex: 1; } }
.et_pb_text.bezel__core { height: auto; } /* card as text module: bezel__core's height:100% would stretch it to the whole column */
.media img[data-parallax] { scale: 1.12; }
/* Reason list: each Text module "reason" is one grid row (title | text). */
.et_pb_text.reason > .et_pb_text_inner { display: contents; }
/* CTA band on a Row: Divi's row padding reset would remove the band's padding. */
.et_pb_row.row.cta-band { padding: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(1.5rem, 1rem + 4vw, 5rem); }

/* ---------- Theme Builder header/footer wrappers add no spacing or width ---------- */
.et-l--header .et_pb_section,
.et-l--footer .et_pb_section { padding: 0; background: none; }
.et-l--header .et_pb_row,
.et-l--footer .et_pb_row { width: auto; max-width: none; padding: 0; }
/* Divi 5 sections are flex: width:auto would shrink the footer row to its content, the dark .footer must span the page. */
/* .et_pb_section raises specificity: Divi's critical CSS can ship .et_pb_row:not(…):not(.et_pb_row_nested) { width: 80% } */
.et-l--footer .et_pb_section :is(.et_pb_row, .et_pb_column) { width: 100%; }
/* The header layout only holds the fixed nav: Divi's column min-height:1px left a 1px light line above the hero. */
.et-l--header .et_pb_section .et_pb_column { min-height: 0; }
.et-l--header .et_pb_module,
.et-l--footer .et_pb_module { margin-bottom: 0; }
.et-l--header ul,
.et-l--footer ul { list-style: none; padding: 0; line-height: inherit; }

/* ---------- Logged-in admin bar sits above the floating nav ---------- */
.admin-bar .nav { top: calc(1rem + 32px); }
.admin-bar .overlay { padding-top: calc(6.5rem + 32px); }
@media (max-width: 782px) {
  .admin-bar .nav { top: calc(1rem + 46px); }
  .admin-bar .overlay { padding-top: calc(6.5rem + 46px); }
}

/* ---------- Heading module with a type class (e.g. "t-h2" on an H1 for the 404 page) ---------- */
.et_pb_heading:is(.t-h1, .t-h2, .t-h3) .et_pb_module_heading { font-size: inherit; line-height: inherit; letter-spacing: inherit; }

/* ---------- 404: centred content (the mockup's single centred wrapper is split into Divi modules) ---------- */
.e404 .et_pb_column.btn-row { justify-content: center; }
.e404 :is(h1, .t-lead) { margin-inline: auto; }
.e404 .t-lead { max-width: 34rem; }
.e404 .et_pb_text, .e404 .et_pb_text_inner { text-align: center; }

/* ---------- Visual Builder only: Divi colours every text module with the body colour ---------- */
html .et-fb-post-content .et_pb_bg_layout_light:not(.et_pb_button) { color: inherit; }
html .et-fb-post-content .page-hero .et_pb_bg_layout_light.t-lead { color: rgba(243,241,238,.74); }
html .et-fb-post-content .et_pb_bg_layout_light.muted { color: var(--muted-on-light); }
html .et-fb-post-content :is(.s-dark, .s-ink, .s-deep, .hero, .page-hero, .on-dark) .et_pb_bg_layout_light.muted { color: var(--muted-on-dark); }

/* Centred section head on a Divi column: Divi forces the last column's right margin to 0, so the
   auto margins from main.css would push it right. The row centres it instead. */
.et_pb_row:has(> .sec-head--center) { justify-content: center; }
.et_pb_row > .et_pb_column.sec-head--center { margin-inline: 0; }
/* Class "center" on a row or column: Divi's text modules set their own alignment. */
:is(.et_pb_row, .et_pb_column).center :is(.et_pb_text, .et_pb_text_inner, .et_pb_heading) { text-align: center; }

/* Service list (Cloud): column "svc-list" holds one nested row "svc-item" per service (graphic | text). */
.svc-list > .et_pb_row_inner { width: 100%; max-width: none; margin: 0; }
.svc-item > .et_pb_column_inner > .et_pb_module { margin-bottom: 0; }
/* Reference cards: KPI block sits on the card bottom (mockup: .ref__kpi margin-top auto). */
.ref > .et_pb_module:has(.ref__kpi) { margin-top: auto; }
.ref > .et_pb_button_module_wrapper { margin-top: auto; } /* card button sits at the bottom */
.et_pb_column.ref-card[hidden] { display: none; } /* filter (main.js): Divi's display:flex would beat the hidden attribute */
/* Team card photo: class "team-card__img" sits on the Image module, so the <img> inside fills it. */
.et-l .et_pb_column.team-card > .et_pb_image.team-card__img { margin-bottom: 1.5rem; } /* beats the module margin reset above */
.et-l .et_pb_column.team-card > .et_pb_image.team-card__img { aspect-ratio: auto; } /* the <img> carries the 4:5 crop, photos may have other ratios */
.et_pb_image.team-card__img :is(.et_pb_image_wrap, img) { display: block; width: 100%; border-radius: inherit; }
.et_pb_image.team-card__img img { aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: 50% 15%; }
/* Section head with a button on the right (row "sec-head-row"), wraps on small screens. */
.et_pb_row.sec-head-row { justify-content: space-between; align-items: flex-end; gap: .75rem; margin-bottom: 3rem; }
.et_pb_row.sec-head-row > .et_pb_column { width: auto; flex: 0 1 auto; margin-inline: 0; }

/* Focus list ([data-focus]): each "reason" Text module's inner wrapper is display:contents, so the
   dim/slide state goes on its children (mockup: .reasons.is-anim .reason > *). */
.reasons.is-anim .reason > .et_pb_text_inner > * { transition: opacity .7s var(--ease-out-expo), transform .9s var(--ease-out-expo); }
.reasons.is-anim .reason:not(.is-on) > .et_pb_text_inner > * { opacity: .3; transform: translateY(.75rem); }
/* FAQ: column "acc" with one Code module per <details> item. */
.et_pb_column.acc { gap: .6rem; }
