/* ==========================================================================
   Elektro Rabending - Main stylesheet
   Mobile first: base styles target small screens, media queries add
   enhancements for larger viewports.
   ========================================================================== */

/* -------- CSS Variables -------- */
:root {
    /* Fonts */
    --main-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --heading-font: "Oswald", "Arial Narrow", Arial, sans-serif;

    /* Brand colours - taken from the logo (red bolt #cc0000, black wordmark) */
    --primary-color: #cc0000;
    --primary-dark: #a30000;
    --primary-tint: #fbeaea;
    --secondary-color: #23272e;
    --highlight-color: #ff5a5a;
    --dark-color: #15181d;
    --dark-soft: #1f232a;
    --light-color: #ffffff;
    --surface-color: #f4f5f7;

    /* Text and lines */
    --text-color: #23272e;
    --muted-color: #5c636e;
    --muted-on-dark: #b9bec6;
    --border-color: #e2e5e9;
    --border-on-dark: rgba(255, 255, 255, 0.12);

    /* Shape and depth */
    --radius: 0.5rem;
    --radius-lg: 0.875rem;
    --shadow-sm: 0 1px 2px rgba(21, 24, 29, 0.06), 0 2px 8px rgba(21, 24, 29, 0.06);
    --shadow-md: 0 12px 32px rgba(21, 24, 29, 0.12);

    /* Layout */
    --nav-height: 4.25rem;

    /* Bootstrap overrides */
    --bs-body-font-family: var(--main-font);
    --bs-body-color: var(--text-color);
    --bs-link-color-rgb: 204, 0, 0;
    --bs-link-hover-color-rgb: 163, 0, 0;
    --bs-border-radius: var(--radius);
}

/* -------- General -------- */

html {
    scroll-padding-top: calc(var(--nav-height) + 1rem);
}

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

body {
    font-family: var(--main-font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-color);
    background-color: var(--light-color);
    padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
}

p,
li,
dd,
blockquote {
    overflow-wrap: break-word;
}

/* German has long compound words - hyphenate body copy on narrow screens only */
@media (max-width: 767.98px) {
    p,
    li,
    dd,
    blockquote {
        hyphens: auto;
    }
}

h1,
h2,
h3,
h4,
.h1,
.h2,
.h3,
.h4 {
    font-family: var(--heading-font);
    font-weight: 600;
    line-height: 1.15;
    color: inherit;
    letter-spacing: 0.01em;
    hyphens: manual;
    overflow-wrap: break-word;
}

h1,
.h1 {
    font-size: clamp(2rem, 1.35rem + 3vw, 3.5rem);
    text-transform: uppercase;
}

h2,
.h2 {
    font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.4rem);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

h3,
.h3 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

h4,
.h4 {
    font-size: 1.1rem;
}

a {
    color: var(--primary-color);
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--primary-dark);
}

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

strong,
b {
    font-weight: 650;
}

:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

::selection {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.text-muted-brand {
    color: var(--muted-color);
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2000;
    padding: 0.6rem 1rem;
    background-color: var(--dark-color);
    color: var(--light-color);
    border-radius: var(--radius);
    font-weight: 600;
    transform: translateY(-200%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
    color: var(--light-color);
}

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

.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-padding-x: 1.25rem;
    --bs-btn-padding-y: 0.65rem;
    --bs-btn-border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    letter-spacing: 0.01em;
}

.btn-lg {
    --bs-btn-padding-x: 1.5rem;
    --bs-btn-padding-y: 0.8rem;
    --bs-btn-font-size: 1.05rem;
}

.btn-brand {
    --bs-btn-color: var(--light-color);
    --bs-btn-bg: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-color: var(--light-color);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-color: var(--light-color);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-focus-shadow-rgb: 204, 0, 0;
}

.btn-outline-brand {
    --bs-btn-color: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-color: var(--light-color);
    --bs-btn-hover-bg: var(--primary-color);
    --bs-btn-hover-border-color: var(--primary-color);
    --bs-btn-active-color: var(--light-color);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-focus-shadow-rgb: 204, 0, 0;
}

.btn-white {
    --bs-btn-color: var(--primary-color);
    --bs-btn-bg: var(--light-color);
    --bs-btn-border-color: var(--light-color);
    --bs-btn-hover-color: var(--primary-dark);
    --bs-btn-hover-bg: #f1f1f1;
    --bs-btn-hover-border-color: #f1f1f1;
    --bs-btn-active-color: var(--primary-dark);
    --bs-btn-active-bg: #e6e6e6;
    --bs-btn-active-border-color: #e6e6e6;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 650;
    text-decoration: none;
}

.link-arrow::after {
    content: "\2192";
    transition: transform 0.2s ease;
}

.link-arrow:hover::after {
    transform: translateX(4px);
}

/* -------- Navigation -------- */

.site-nav {
    min-height: var(--nav-height);
    background-color: var(--light-color);
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow 0.25s ease;
}

.site-nav.is-scrolled {
    box-shadow: var(--shadow-md);
}

.logo {
    height: 36px;
    width: auto;
}

.burger-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

/* Swap the burger for a close icon while the menu is open */
.navbar-toggler[aria-expanded="true"] .burger-icon {
    --fa: "\f00d";
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler:focus-visible {
    outline: 3px solid var(--primary-color);
}

.nav-phone {
    display: inline-grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--light-color);
    text-decoration: none;
}

.nav-phone:hover {
    background-color: var(--primary-dark);
    color: var(--light-color);
}

#nav-top .nav-link {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-color);
}

#nav-top .nav-link:hover,
#nav-top .nav-link:focus-visible,
#nav-top .nav-link.active,
#nav-top .nav-link.show {
    color: var(--primary-color);
}

#nav-top .dropdown-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    text-align: left;
}

#nav-top .dropdown-menu {
    border: 0;
    padding: 0.25rem 0 0.75rem;
    margin: 0;
    background: transparent;
}

#nav-top .dropdown-item {
    padding: 0.5rem 0 0.5rem 1rem;
    font-size: 0.98rem;
    color: var(--text-color);
    white-space: normal;
    border-left: 2px solid var(--border-color);
}

#nav-top .dropdown-item:hover,
#nav-top .dropdown-item:focus-visible {
    background-color: transparent;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

#nav-top .dropdown-item.active,
#nav-top .dropdown-item:active {
    background-color: transparent;
    color: var(--primary-color);
    font-weight: 600;
    border-left-color: var(--primary-color);
}

.nav-cta {
    margin: 1.25rem 0 0.75rem;
}

.navbar-collapse {
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
}

/* -------- Hero (home) -------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 3.5rem 0 4.5rem;
    background-color: var(--dark-color);
    color: var(--light-color);
    isolation: isolate;
}

/* Subtle technical grid in the background */
.hero::before,
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(110deg, transparent 15%, #000 85%);
    mask-image: linear-gradient(110deg, transparent 15%, #000 85%);
}

.hero::after,
.page-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background-color: var(--primary-color);
}

.hero-bolt {
    position: absolute;
    z-index: -1;
    right: -3.5rem;
    bottom: -1rem;
    width: 11rem;
    height: auto;
    opacity: 0.18;
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2.25rem, 1.4rem + 4vw, 4.25rem);
    line-height: 1.05;
    margin-bottom: 1.25rem;
}

.hero-title .accent {
    color: var(--highlight-color);
}

.hero-lead {
    font-size: 1.1rem;
    color: var(--muted-on-dark);
    max-width: 38rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* -------- Eyebrow labels -------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-color);
    hyphens: manual;
}

.eyebrow::before {
    content: "";
    width: 2rem;
    height: 2px;
    background-color: currentColor;
}

.eyebrow-light {
    color: var(--highlight-color);
}

/* -------- Trust bar -------- */

.trust-bar {
    position: relative;
    z-index: 2;
    margin-top: -2.5rem;
}

.trust-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.trust-list li {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1rem;
    background-color: var(--light-color);
    font-size: 0.88rem;
    line-height: 1.35;
    color: var(--muted-color);
    hyphens: manual;
}

.trust-list i {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.trust-list strong {
    display: block;
    font-family: var(--heading-font);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--secondary-color);
}

/* -------- Sections -------- */

.section {
    padding: 3.5rem 0;
}

.section-alt {
    background-color: var(--surface-color);
}

.section-dark {
    background-color: var(--dark-color);
    color: var(--light-color);
}

.section-dark .text-muted-brand,
.section-dark p {
    color: var(--muted-on-dark);
}

.section-dark :focus-visible {
    outline-color: var(--highlight-color);
}

.section-head {
    max-width: 46rem;
    margin-bottom: 2.25rem;
}

.section-head p {
    color: var(--muted-color);
    font-size: 1.05rem;
}

/* -------- Page hero (sub pages) -------- */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 2.5rem 0 2.75rem;
    background-color: var(--dark-color);
    color: var(--light-color);
    isolation: isolate;
}

.page-hero .hero-bolt {
    width: auto;
    height: 70%;
    top: 50%;
    right: -1rem;
    bottom: auto;
    transform: translateY(-50%);
}

.page-hero h1 {
    margin-bottom: 0.5rem;
}

.page-hero .lead {
    font-size: 1.1rem;
    color: var(--muted-on-dark);
    max-width: 44rem;
    margin-bottom: 0;
}

.breadcrumb {
    --bs-breadcrumb-divider-color: var(--muted-on-dark);
    --bs-breadcrumb-item-active-color: var(--light-color);
    --bs-breadcrumb-margin-bottom: 1rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--muted-on-dark);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--light-color);
    text-decoration: underline;
}

.page-hero :focus-visible {
    outline-color: var(--highlight-color);
}

/* -------- Content -------- */

.prose > *:last-child {
    margin-bottom: 0;
}

.prose h2 {
    margin-top: 2.75rem;
}

.prose > section + section {
    margin-top: 3.25rem;
}

.prose h2:first-child,
.prose .page-banner + h2 {
    margin-top: 0;
}

.prose h3 {
    margin-top: 2rem;
}

.prose p,
.prose ul,
.prose ol {
    margin-bottom: 1.15rem;
}

.lead-text {
    font-size: 1.15rem;
    color: var(--secondary-color);
}

.page-banner {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 815 / 302;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 2.25rem;
    background-color: var(--surface-color);
}

.img-frame {
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

/* Lists with icons */
.icon-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.icon-list li {
    position: relative;
    padding-left: 1.85rem;
    margin-bottom: 0.65rem;
}

.icon-list li > i:first-child {
    position: absolute;
    left: 0;
    top: 0.3rem;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.check-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem 1.5rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}

.check-grid li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 600;
    color: var(--secondary-color);
    hyphens: manual;
}

.check-grid i {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background-color: var(--primary-tint);
    color: var(--primary-color);
    font-size: 0.75rem;
}

/* Feature rows (e.g. KNX benefits, extra service areas) */
.feature-list {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.15rem;
    background-color: var(--surface-color);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary-color);
}

.feature-list i {
    flex-shrink: 0;
    margin-top: 0.2rem;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.feature-list a {
    font-weight: 600;
}

/* -------- Service cards -------- */

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.6rem 1.5rem;
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: inherit;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card::before {
    content: "";
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    top: -1px;
    height: 3px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover,
.service-card:focus-visible {
    color: inherit;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.service-card:hover::before,
.service-card:focus-visible::before {
    transform: scaleX(1);
}

.service-card h3 {
    font-size: 1.3rem;
    text-transform: uppercase;
}

.service-card p {
    color: var(--muted-color);
    font-size: 0.97rem;
    margin-bottom: 1.25rem;
}

.service-card .link-arrow {
    margin-top: auto;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.icon-box {
    display: inline-grid;
    place-items: center;
    width: 3.1rem;
    height: 3.1rem;
    margin-bottom: 1.15rem;
    border-radius: var(--radius);
    background-color: var(--primary-tint);
    color: var(--primary-color);
    font-size: 1.3rem;
}

/* -------- Stats -------- */

.stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.75rem 0;
}

.stat {
    padding: 1.25rem 1.35rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background-color: var(--light-color);
}

.stat-number {
    display: block;
    font-family: var(--heading-font);
    font-size: 2.75rem;
    font-weight: 600;
    line-height: 1;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
}

.stat p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted-color);
}

.section-dark .stat {
    background-color: var(--dark-soft);
    border-color: var(--border-on-dark);
}

.section-dark .stat-number {
    color: var(--highlight-color);
}

.section-dark .stat p {
    color: var(--muted-on-dark);
}

.product-visual {
    display: grid;
    place-items: center;
    padding: 2rem;
    background-color: var(--light-color);
    border-radius: var(--radius-lg);
}

/* Fixed height + width/height attributes reserve the space before the image loads */
.product-visual img {
    height: 15rem;
    width: auto;
}

/* -------- Certificates -------- */

.cert-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cert {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 100%;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--light-color);
}

.cert img {
    flex-shrink: 0;
    width: 6rem;
    height: 5rem;
    object-fit: contain;
}

.cert strong {
    display: block;
    color: var(--secondary-color);
}

.cert span {
    font-size: 0.92rem;
    color: var(--muted-color);
}

/* -------- References -------- */

.ref-card {
    display: flex;
    gap: 1rem;
    height: 100%;
    padding: 1.35rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--light-color);
}

.ref-card .icon-box {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    font-size: 1.1rem;
}

.ref-card h3 {
    font-family: var(--main-font);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 0.25rem;
}

.ref-card p {
    margin: 0;
    color: var(--muted-color);
    font-size: 0.95rem;
}

/* -------- Sidebar -------- */

.side-stack {
    display: grid;
    gap: 1.25rem;
}

.side-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background-color: var(--surface-color);
}

.side-card .side-title {
    font-size: 1.15rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.side-card .icon-list {
    margin-bottom: 0;
}

.side-card-dark {
    background-color: var(--dark-color);
    color: var(--light-color);
}

.side-card-dark :focus-visible {
    outline-color: var(--highlight-color);
}

.side-card-logo {
    display: grid;
    place-items: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--light-color);
}

.side-nav a {
    display: block;
    padding: 0.45rem 0 0.45rem 0.9rem;
    border-left: 2px solid var(--border-color);
    color: var(--text-color);
    text-decoration: none;
}

.side-nav a:hover {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Contact list (sidebar, footer, contact page) */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.contact-list li {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
    hyphens: manual;
}

.contact-list i {
    width: 1.1rem;
    margin-top: 0.3rem;
    color: var(--primary-color);
}

.side-card-dark .contact-list i,
.site-footer .contact-list i {
    color: var(--highlight-color);
}

.contact-list a {
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.contact-list a:hover {
    text-decoration: underline;
}

.side-card-dark .contact-list a:hover {
    color: var(--light-color);
}

/* -------- Owner card -------- */

.owner-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 2.25rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background-color: var(--dark-color);
    color: var(--light-color);
    border-left: 4px solid var(--primary-color);
}

.owner-card img {
    width: 7.5rem;
    height: 7.5rem;
    object-fit: cover;
    object-position: 50% 30%;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
}

.owner-name {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    margin: 0;
}

.owner-role {
    color: var(--muted-on-dark);
    margin-bottom: 1rem;
}

.owner-card .contact-list {
    margin: 0;
}

.owner-card .contact-list li {
    margin-bottom: 0.4rem;
}

.owner-card .contact-list i {
    color: var(--highlight-color);
}

.owner-card :focus-visible {
    outline-color: var(--highlight-color);
}

/* -------- Notices and quotes -------- */

.notice {
    position: relative;
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.35rem 1.25rem 3.5rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
    background-color: var(--primary-tint);
}

.notice > i {
    position: absolute;
    left: 1.25rem;
    top: 1.45rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.notice h2,
.notice h3 {
    font-size: 1.15rem;
    margin: 0 0 0.4rem;
    color: var(--primary-dark);
}

.notice p:last-child {
    margin-bottom: 0;
}

.quote-block {
    position: relative;
    margin: 0 0 2rem;
    padding: 1.75rem 1.5rem 1.5rem;
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
}

.quote-block > i {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.quote-block blockquote {
    margin: 0 0 0.75rem;
    font-size: 1.08rem;
    font-style: italic;
    color: var(--secondary-color);
}

.quote-block figcaption {
    font-size: 0.9rem;
    color: var(--muted-color);
}

/* Callout / download box */
.callout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--light-color);
    box-shadow: var(--shadow-sm);
}

.callout .icon-box {
    margin: 0;
}

.callout h2,
.callout h3 {
    font-size: 1.2rem;
    margin: 0 0 0.25rem;
}

.callout p {
    margin: 0;
    color: var(--muted-color);
}

/* Reasons (E-Check) */
.reason-grid {
    display: grid;
    gap: 1rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    counter-reset: reason;
}

.reason {
    position: relative;
    height: 100%;
    padding: 1.35rem 1.35rem 1.35rem 4.25rem;
    border-radius: var(--radius-lg);
    background-color: var(--surface-color);
    counter-increment: reason;
}

.reason::before {
    content: counter(reason);
    position: absolute;
    left: 1.25rem;
    top: 1.25rem;
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--light-color);
    font-family: var(--heading-font);
    font-weight: 600;
}

.reason h3 {
    font-size: 1.15rem;
    margin: 0.35rem 0 0.4rem;
}

.reason p {
    margin: 0;
    font-size: 0.97rem;
    color: var(--muted-color);
}

.badge-float {
    display: block;
    width: 11rem;
    height: auto;
    margin: 0 auto 1.5rem;
}

/* -------- CTA band -------- */

.cta-band {
    position: relative;
    overflow: hidden;
    padding: 3rem 0;
    background-color: var(--primary-color);
    color: var(--light-color);
}

.cta-band h2 {
    margin-bottom: 0.5rem;
}

.cta-band p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
}

.cta-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cta-band :focus-visible {
    outline-color: var(--light-color);
}

/* -------- Contact form -------- */

.form-card {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--light-color);
    box-shadow: var(--shadow-sm);
}

.form-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.req {
    color: var(--primary-color);
    font-weight: 600;
}

.form-control,
.form-select {
    padding: 0.7rem 0.9rem;
    border-color: #ced3d9;
    border-radius: var(--radius);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(204, 0, 0, 0.15);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-size: 0.93rem;
    color: var(--muted-color);
}

/* Honeypot field: hidden from people, visible to simple spam bots */
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-notice {
    margin-top: 1.25rem;
}

.form-notice:focus {
    outline: none;
}

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

.legal h2 {
    font-size: 1.35rem;
    margin-top: 2.5rem;
}

.legal h2:first-child {
    margin-top: 0;
}

.legal h3 {
    font-size: 1.1rem;
    margin-top: 1.75rem;
}

.legal dl {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.15rem 1.5rem;
    margin-bottom: 1.5rem;
}

.legal dt {
    font-weight: 600;
    color: var(--secondary-color);
}

.legal dd {
    margin-bottom: 0.6rem;
}

.legal a {
    overflow-wrap: anywhere;
}

.sitemap-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.sitemap-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.sitemap-list a {
    text-decoration: none;
    font-weight: 500;
}

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

.site-footer {
    background-color: var(--dark-color);
    color: var(--muted-on-dark);
    font-size: 0.95rem;
    padding-top: 3.5rem;
}

.site-footer :focus-visible {
    outline-color: var(--highlight-color);
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--light-color);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer-title {
    font-family: var(--main-font);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--light-color);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
    hyphens: manual;
}

.footer-links a,
.site-footer address a {
    color: var(--muted-on-dark);
    text-decoration: none;
}

.footer-links a:hover,
.site-footer .contact-list a:hover {
    color: var(--light-color);
    text-decoration: underline;
}

.site-footer address {
    margin-bottom: 1rem;
    font-style: normal;
}

.footer-bottom {
    margin-top: 2.5rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-on-dark);
    font-size: 0.85rem;
}

.footer-bottom .container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-bottom a {
    color: var(--muted-on-dark);
}

/* -------- Scroll to top -------- */

.scroll-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1030;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--light-color);
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background-color 0.2s ease;
}

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background-color: var(--primary-dark);
}

.scroll-top:focus-visible {
    outline: 3px solid var(--dark-color);
    outline-offset: 3px;
}

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

.error-code {
    font-family: var(--heading-font);
    font-size: clamp(5rem, 3rem + 10vw, 9rem);
    font-weight: 600;
    line-height: 1;
    color: var(--primary-color);
}

/* -------- Media Queries -------- */

@media (min-width: 576px) {
    .hero-actions,
    .cta-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .owner-card {
        flex-direction: row;
        align-items: center;
    }

    .callout {
        flex-direction: row;
        align-items: center;
    }

    .callout .btn {
        margin-left: auto;
        flex-shrink: 0;
    }

    .badge-float {
        float: right;
        width: 10rem;
        margin: 0 0 1rem 1.5rem;
    }

    .legal dl {
        grid-template-columns: max-content 1fr;
    }

    .legal dd {
        margin-bottom: 0.15rem;
    }
}

@media (min-width: 768px) {
    body {
        font-size: 1.0625rem;
    }

    .logo {
        height: 40px;
    }

    .section {
        padding: 4.5rem 0;
    }

    .hero {
        padding: 5rem 0 6rem;
    }

    .hero-bolt {
        width: 18rem;
        right: 2rem;
        bottom: 50%;
        transform: translateY(50%);
        opacity: 0.22;
    }

    .page-hero {
        padding: 3.25rem 0 3.5rem;
    }

    .page-hero .hero-bolt {
        width: auto;
        right: 3rem;
        transform: translateY(-50%);
        opacity: 0.3;
    }

    .trust-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .trust-list li {
        padding: 1.5rem 1.35rem;
    }

    .cert-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cert {
        flex-direction: column;
        text-align: center;
    }

    .reason-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-card {
        padding: 2.25rem;
    }

    .footer-bottom .container {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 992px) {
    :root {
        --nav-height: 5rem;
    }

    .section {
        padding: 5.5rem 0;
    }

    .hero {
        padding: 6.5rem 0 7.5rem;
    }

    .hero-bolt {
        width: 22rem;
        right: 6%;
        opacity: 1;
    }

    .product-visual img {
        height: 22rem;
    }

    .page-hero .hero-bolt {
        right: 8%;
        opacity: 0.9;
    }

    .trust-bar {
        margin-top: -3.25rem;
    }

    .navbar-collapse {
        max-height: none;
        overflow: visible;
    }

    #nav-top .nav-item {
        margin: 0 0.15rem;
    }

    #nav-top .nav-link {
        padding: 0.5rem 0.65rem;
        border-bottom: 0;
    }

    #nav-top .dropdown-toggle {
        width: auto;
        gap: 0.35rem;
    }

    #nav-top .dropdown-menu {
        min-width: 17rem;
        margin-top: 0.85rem;
        padding: 0.6rem;
        background-color: var(--light-color);
        border-radius: var(--radius);
        box-shadow: var(--shadow-md);
        border-top: 3px solid var(--primary-color);
    }

    #nav-top .dropdown-item {
        padding: 0.55rem 0.8rem;
        border-left: 0;
        border-radius: 0.35rem;
    }

    #nav-top .dropdown-item:hover,
    #nav-top .dropdown-item:focus-visible,
    #nav-top .dropdown-item.active {
        background-color: var(--primary-tint);
    }

    .nav-cta {
        margin: 0 0 0 0.85rem;
    }

    .side-stack {
        position: sticky;
        top: calc(var(--nav-height) + 1.5rem);
    }

    .cta-band {
        padding: 3.75rem 0;
    }

    .cta-actions {
        justify-content: flex-end;
    }
}

@media (min-width: 1024px) {
    #nav-top .nav-link:not(.dropdown-toggle)::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -2px;
        width: 70%;
        height: 0.15rem;
        background-color: var(--primary-color);
        transform: translateX(-50%) scaleX(0);
        transform-origin: center;
        transition: transform 0.3s ease;
    }

    #nav-top .nav-item:hover .nav-link:not(.dropdown-toggle)::after,
    #nav-top .nav-link.active:not(.dropdown-toggle)::after {
        transform: translateX(-50%) scaleX(1);
    }
}

@media (min-width: 1200px) {
    #nav-top .nav-link {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
}

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

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