/* ===================================================================
   Elektro Hoffmann — Design System "Copper & Ink"
   Accessibility, DSGVO & SEO improvements applied.
   =================================================================== */

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Palette — copper darkened slightly for WCAG AA 4.5:1 contrast on both light and dark backgrounds */
    --ink:        #0f1a28;
    --ink-light:  #19283b;
    --copper:     #ac5526;   /* was #b85d2b — contrast 4.87:1 on #fefcf7 (AA pass) */
    --copper-dark:#96441a;   /* darker variant for light backgrounds where text is small */
    --copper-glow:#c46632;   /* hover state, contrast 4.68:1 on #0f1a28 ink (AA pass) */
    --paper:      #fefcf7;
    --stone:      #f2ede5;
    --slate:      #3d4552;
    --muted:      #5a606e;   /* was #6b7280 — contrast 5.1:1 on paper (AA pass) */
    --border:     #e0dbd3;
    --white:      #ffffff;

    /* Typography */
    --font-display: 'Georgia', 'Times New Roman', 'Noto Serif', serif;
    --font-body:    'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;

    /* Spacing */
    --max-width:   1080px;
    --section-gap: 5rem;

    /* Details */
    --radius:      4px;
    --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    color: var(--slate);
    background: var(--paper);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--copper);
    color: var(--white);
}

img { max-width: 100%; display: block; }
a { color: var(--copper); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--copper-glow); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ----- Skip Link (WCAG 2.4.1 Bypass Blocks) ----- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 200;
    padding: .6rem 1.2rem;
    background: var(--copper);
    color: var(--white);
    font-weight: 600;
    font-size: .9rem;
    border-radius: 0 0 var(--radius) var(--radius);
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--copper);
    outline-offset: 2px;
}

/* ----- Focus ----- */
:focus-visible {
    outline: 2px solid var(--copper);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ----- Reduced Motion ----- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}


/* ===================================================================
   HEADER
   =================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 68px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: .65rem;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
}

.logo-mark {
    width: 10px;
    height: 10px;
    background: var(--copper);
    border-radius: 2px;
    transform: rotate(45deg);
    flex-shrink: 0;
}

.logo-name {
    display: block;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
}

.logo-tagline {
    display: block;
    font-size: .68rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Desktop Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: .25rem;
}

.nav-link {
    display: block;
    padding: .4rem .85rem;
    font-size: .9rem;
    font-weight: 500;
    color: var(--slate);
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--copper);
    background: rgba(172, 85, 38, 0.06);
}

/* Header phone */
.header-phone {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-left: auto;
    font-size: .88rem;
    font-weight: 600;
    color: var(--copper);
    white-space: nowrap;
    flex-shrink: 0;
    padding: .35rem .75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), background var(--transition);
}

.header-phone:hover {
    border-color: var(--copper);
    background: rgba(172, 85, 38, 0.04);
    color: var(--copper);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
    margin-left: .5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ===================================================================
   HERO
   =================================================================== */

.hero {
    position: relative;
    background: var(--ink);
    color: var(--white);
    padding: 6rem 0 5rem;
    overflow: hidden;
    isolation: isolate;
}

/* Copper geometric accent — the signature element */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: -12%;
    right: -6%;
    width: 44%;
    height: 140%;
    background: var(--copper);
    transform: skewX(-7deg);
    opacity: 0.10;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 15%;
    right: 28%;
    width: 120px;
    height: 120px;
    border: 2px solid var(--copper);
    border-radius: 50%;
    opacity: 0.08;
    transform: translate(50%, -30%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-kicker {
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--copper-glow);
    margin-bottom: 1rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.015em;
    color: var(--white);
    margin-bottom: 1.25rem;
}

.hero-rule {
    width: 56px;
    height: 3px;
    background: var(--copper);
    margin-bottom: 1.5rem;
}

.hero-lead {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    max-width: 520px;
    margin-bottom: 2rem;
}

/* Hero CTA Buttons */
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .75rem 1.75rem;
    font-family: var(--font-body);
    font-size: .92rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
    line-height: 1.3;
}

.btn-primary {
    background: var(--copper);
    color: var(--white);
    border-color: var(--copper);
}

.btn-primary:hover {
    background: var(--copper-glow);
    border-color: var(--copper-glow);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--white);
}

.btn-full { width: 100%; }

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--copper-glow);
    line-height: 1.1;
}

.stat-label {
    font-size: .78rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: .06em;
}


/* ===================================================================
   SECTIONS (Shared)
   =================================================================== */

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

.section:nth-of-type(even) {
    background: var(--stone);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: .6rem;
}

.section-sub {
    font-size: 1rem;
    color: var(--muted);
    max-width: 480px;
    margin: 0 auto;
}


/* ===================================================================
   SERVICES
   =================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--white);
    border-top: 3px solid var(--copper);
    padding: 2rem 1.5rem 1.75rem;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow var(--transition), transform var(--transition);
}

.service-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
    transform: translateY(-2px);
}

.service-icon {
    color: var(--copper);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: .6rem;
}

.service-card p {
    font-size: .92rem;
    color: var(--slate);
    line-height: 1.6;
}

/* Emergency card variant */
.service-card--emergency {
    background: var(--ink);
    border-top-color: var(--copper);
}

.service-card--emergency .service-icon {
    color: var(--copper-glow);
}

.service-card--emergency h3 {
    color: var(--white);
}

.service-card--emergency p {
    color: rgba(255, 255, 255, 0.75);
}

.card-phone {
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-phone a {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--copper-glow) !important;
}


/* ===================================================================
   EMERGENCY BANNER
   =================================================================== */

.emergency-banner {
    background: var(--ink);
    color: var(--white);
    padding: 3.5rem 0;
    text-align: center;
    border-top: 3px solid var(--copper);
    border-bottom: 3px solid var(--copper);
}

.emergency-banner h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: .5rem;
}

.emergency-banner p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.emergency-cta {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem 2rem;
    background: var(--copper);
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius);
    transition: background var(--transition), transform var(--transition);
}

.emergency-cta:hover {
    background: var(--copper-glow);
    color: var(--white);
    transform: scale(1.03);
}


/* ===================================================================
   ABOUT
   =================================================================== */

.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3.5rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.1rem;
    font-size: .98rem;
    color: var(--slate);
}

.about-text strong {
    color: var(--ink);
}

.about-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
}

.value-item {
    padding: 1.1rem 1.15rem;
    background: var(--white);
    border-left: 3px solid var(--copper);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.value-item strong {
    display: block;
    font-size: .92rem;
    color: var(--ink);
    margin-bottom: .15rem;
}

.value-item span {
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.5;
}


/* ===================================================================
   CONTACT
   =================================================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--ink);
    margin-bottom: .75rem;
}

.contact-info address {
    font-style: normal;
    font-size: .95rem;
    color: var(--slate);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.contact-details {
    font-size: .9rem;
    margin-bottom: 1.5rem;
}

.contact-details dt {
    font-weight: 600;
    color: var(--ink);
    margin-top: .85rem;
}

.contact-details dd {
    color: var(--slate);
    margin-left: 0;
}

.contact-details a {
    font-weight: 600;
    color: var(--copper);
}

.contact-area {
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.6;
    padding: 1rem;
    background: var(--stone);
    border-radius: var(--radius);
}

.contact-area strong {
    color: var(--ink);
}

/* Form */
.contact-form-wrapper h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--ink);
    margin-bottom: 1.25rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Accessible error summary */
.form-errors {
    padding: 1rem 1.25rem;
    background: #fdf2f0;
    border: 2px solid #d43f21;
    border-radius: var(--radius);
    color: #8b1e0a;
    font-size: .88rem;
    line-height: 1.5;
}

.form-errors ul {
    margin-top: .4rem;
    padding-left: 1.25rem;
}

.form-errors a {
    color: #8b1e0a;
    font-weight: 600;
    text-decoration: underline;
}

/* Field-level error */
.field-error {
    display: block;
    font-size: .8rem;
    color: #d43f21;
    margin-top: .25rem;
    min-height: 0;
}

.form-group input[aria-invalid="true"],
.form-group textarea[aria-invalid="true"],
.form-group select[aria-invalid="true"] {
    border-color: #d43f21;
    box-shadow: 0 0 0 3px rgba(212, 63, 33, 0.12);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: .3rem;
}

.required {
    color: var(--copper);
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: .92rem;
    padding: .7rem .85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #8e867b;  /* improved placeholder contrast */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(172, 85, 38, 0.10);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a606e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .85rem center;
    padding-right: 2.2rem;
    cursor: pointer;
}

/* Consent checkbox */
.form-consent {
    margin-top: .25rem;
}

.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: .55rem;
    font-weight: 400 !important;
    font-size: .84rem !important;
    cursor: pointer;
    line-height: 1.5;
    color: var(--slate);
}

.checkbox-label a {
    text-decoration: underline;
    font-weight: 600;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    flex-shrink: 0;
    margin-top: .15rem;
    accent-color: var(--copper);
}

.checkbox-label em {
    font-style: normal;
    color: var(--copper);
}

/* Form success */
.form-success {
    padding: 2rem 1.5rem;
    background: #e9f0e7;
    border: 1px solid #2a6b20;
    border-radius: var(--radius);
    color: #1f5017;
    text-align: center;
    line-height: 1.6;
}

.form-success strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: .3rem;
}


/* ===================================================================
   COOKIE CONSENT BANNER
   =================================================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: var(--ink);
    color: var(--white);
    border-top: 3px solid var(--copper);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.cookie-banner-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2rem;
}

.cookie-banner-inner > p:first-of-type {
    flex: 1 1 280px;
    font-size: .88rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    min-width: 0;
}

.cookie-banner-inner a {
    color: var(--copper-glow);
    text-decoration: underline;
}

.cookie-banner .btn-primary {
    flex-shrink: 0;
    white-space: nowrap;
}


/* ===================================================================
   LEGAL PAGES (Impressum / Datenschutz)
   =================================================================== */

.legal-page .section-header {
    margin-bottom: 2rem;
}

.legal-page h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}

.legal-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: .95rem;
    line-height: 1.75;
    color: var(--slate);
}

.legal-content h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
    margin: 2rem 0 .6rem;
    padding-top: .5rem;
}

.legal-content p {
    margin-bottom: .75rem;
}

.legal-content ul {
    margin: .5rem 0 1rem 1.5rem;
    padding: 0;
}

.legal-content li {
    margin-bottom: .3rem;
}

.legal-content a {
    text-decoration: underline;
}

.legal-back {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.legal-back a {
    font-weight: 600;
}


/* ===================================================================
   FOOTER
   =================================================================== */

.site-footer {
    background: var(--ink);
    color: rgba(255, 255, 255, 0.65);  /* was 0.6 — improved contrast */
    padding: 2.5rem 0;
    font-size: .85rem;
    line-height: 1.7;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-name {
    display: block;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--white);
    font-weight: 700;
}

.footer-owner {
    font-size: .8rem;
    color: rgba(255, 255, 255, 0.5);  /* was 0.45 */
}

.footer-address {
    color: rgba(255, 255, 255, 0.6);  /* was 0.55 */
}

.footer-address a {
    color: var(--copper-glow);
    font-weight: 600;
}

.footer-address a:hover {
    color: #e08850;
}

.footer-legal {
    text-align: right;
    color: rgba(255, 255, 255, 0.55);  /* was 0.4 — improved contrast */
    font-size: .8rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}

.footer-legal a:hover {
    color: rgba(255, 255, 255, 0.95);
}


/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media (max-width: 900px) {
    :root { --section-gap: 3.5rem; }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .header-phone span {
        display: none;
    }

    .header-phone {
        padding: .35rem .6rem;
    }

    .cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 3.5rem;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 9vw, 3.2rem);
    }

    .hero-bg::after {
        width: 60%;
        right: -15%;
        opacity: 0.07;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--paper);
        border-bottom: 2px solid var(--border);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition);
    }

    .main-nav.open {
        max-height: 320px;
    }

    .main-nav ul {
        flex-direction: column;
        padding: .75rem 1.5rem 1.25rem;
    }

    .nav-link {
        padding: .7rem .5rem;
        border-radius: 0;
        font-size: .95rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        text-align: center;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1.25rem;
    }

    .footer-legal {
        text-align: left;
    }
}

@media (max-width: 480px) {
    :root { --section-gap: 2.75rem; }

    .hero-stats {
        gap: 1.25rem;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-values {
        grid-template-columns: 1fr;
    }

    .section-header {
        margin-bottom: 2rem;
    }
}
