:root {
    /* Light theme (default) */
    --bg: #bad1dd;
    /* soft off-white */
    --card: #ffffff;
    /* pure white cards */
    --text: #111827;
    /* dark gray text */
    --muted: #4b5563;
    /* softer gray text */
    --border: #e5e7eb;
    /* light border */
    --accent: #0ea5e9;
    /* cyan blue accent */
    --shadow: 0 8px 20px rgba(0, 0, 0, .05);
    --maxw: 1120px;
    --radius: 16px;
    --space: clamp(.75rem, 1vw, 1rem);
    --space-lg: clamp(1.25rem, 2vw, 1.75rem);
    --space-xl: clamp(2rem, 5vw, 4.5rem);
}

/* Auto dark theme (system preference) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111827;
        /* softer dark */
        --card: #1f2937;
        /* dark gray card */
        --text: #f9fafb;
        /* bright text */
        --muted: #9ca3af;
        /* muted gray */
        --border: #374151;
        /* lighter border */
        --shadow: 0 8px 24px rgba(0, 0, 0, .4);
    }
}

/* Manual toggle dark mode */
[data-theme="dark"] {
    --bg: #111827;
    --card: #1f2937;
    --text: #f9fafb;
    --muted: #dddee0;
    --border: #374151;
    --shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

/* ensure [hidden] actually hides elements */
[hidden] {
    display: none !important;
}

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

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    max-width: 100%;
    overflow-x: hidden;
}

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

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

section {
    padding: var(--space-xl) 0;
    background: var(--bg);
    padding-top: 120px !important;
}

/* section {
    scroll-margin-top: 100px;
} */

.mb-2 {
    margin-bottom: 20px;
}

.mb-3 {
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    section {
        padding-top: 120px !important;
    }
}


h1,
h2 {
    line-height: 1.15;
}

h1 {
    font-size: clamp(2rem, 3.6vw, 3.2rem);
    margin: 0 0 .5rem;
}

h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    margin: 0 0 .75rem;
}

p {
    color: var(--text);
}

.btn {
    display: inline-block;
    padding: .8rem 1.1rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid var(--border);
    transition: transform .15s, background .2s, color .2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}

.btn-ghost {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text);
}

[data-theme="dark"] .btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 9999;
    backdrop-filter: saturate(120%) blur(8px);
    -webkit-backdrop-filter: saturate(120%) blur(8px);
    /* Fallback first */
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    /* Then your preferred OKLab mix (newer Safari will override) */
    background: color-mix(in oklab, var(--bg) 92%, transparent);
    border-bottom: 4px double var(--border);
}

header {
    min-height: 80px;
    /* or use min-height */
}

main.hero {
    padding-top: var(--header-height, 64px);
}

[data-theme="dark"] header svg {
    stroke: white;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .6rem 0;
    height: 90px;
}

.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: inherit;
    font-weight: 800;
}

.brand svg {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.nav-links {
    display: flex;
    gap: .25rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    padding: .55rem .85rem;
    border-radius: 999px;
    color: var(--muted);
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--text);
    background: var(--card);
    box-shadow: var(--shadow);
}

.theme-toggle {
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    background: var(--card);
}

.hamburger {
    display: none;
    background: var(--card);
    border: 1px solid var(--border);
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.hamburger svg {
    width: 22px;
    height: 22px;
}

/* mobile menu: let [hidden] control visibility */
.mobile {
    padding: .5rem 0 1rem;
}

.mobile a {
    display: block;
    padding: .7rem .8rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
}

/* show hamburger on small screens; hide inline nav; show mobile menu when not [hidden] */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: inline-grid;
        place-items: center;
    }

    .mobile {
        display: block;
    }
}

/* never show the mobile menu on desktop */
@media (min-width: 901px) {
    .mobile {
        display: none !important;
    }
}

/* HERO CONTAINER */
.hero {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 50px);
    /* full viewport height */
    width: 100%;
    /* background: #a5cfda; #b9dff3 */
    /* background: #b9e7f3; */

    /* dark background */
    color: rgba(255, 255, 255, .25);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0;
    overflow: hidden;
}

[data-theme="dark"] .hero {
    background: color-mix(in oklab, var(--bg) 92%, transparent);
    color: var(--text);
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

@media (max-width: 600px) and (min-height: 750px) {
    .hero-content {
        gap: 2rem;
        /* custom gap for tall, narrow devices */
    }
}

.hero-button-container {
    margin-top: 1rem;
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Animated text container */
.hero p {
    text-transform: uppercase;
    letter-spacing: .5em;
    display: inline-block;
    border: 4px double rgba(255, 255, 255, .25);
    border-width: 4px 0;
    padding: 1.5em 0;
    margin: 0;
    width: 80%;
    /* responsive width */
    max-width: 40em;
}

/* Animated text itself */
.hero p span {
    font: 700 4em/1 "Oswald", sans-serif;
    letter-spacing: 0;
    padding: .25em 0 .325em;
    display: block;
    margin: 0 auto;
    text-shadow: 0 0 80px rgba(255, 255, 255, .5);

    /* Clip Background Image */
    -webkit-background-clip: text;
    background-clip: text;

    /* Animate Background Image */
    -webkit-text-fill-color: transparent;
    /* animation: aitf 80s linear infinite; */
    /* animation: aitf 40s linear infinite normal; */

    /* Smooth hardware acceleration */
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Fallback when text fill isn’t supported */
@supports not (-webkit-background-clip: text) {
    .hero p span {
        -webkit-text-fill-color: currentColor;
        color: var(--text);
        background: none;
    }
}

/* default: smallest */
.hero p span {
    background-image: url('../assets/image/animated-text-fill-blue-black-384w.webp');
    background-repeat: repeat-y;
    background-size: auto;
    /* or exact to match stripe scale */
}

[data-theme="dark"] .hero p span {
    background-image: url('../assets/image/animated-text-fill-blue-384w.webp');
}

/* medium phones / small tablets */
@media (min-width: 481px) {
    .hero p span {
        background-image: url('../assets/image/animated-text-fill-blue-black-506w.webp');
    }

    [data-theme="dark"] .hero p span {
        background-image: url('../assets/image/animated-text-fill-blue-506w.webp');
    }
}

/* larger phones / tablets */
@media (min-width: 769px) {
    .hero p span {
        background-image: url('../assets/image/animated-text-fill-blue-black-768w.webp');
    }

    [data-theme="dark"] .hero p span {
        background-image: url('../assets/image/animated-text-fill-blue-768w.webp');
    }
}

/* fallback for older browsers */
@supports not (background-image: url("../assets/image/animated-text-fill-blue-black-384w.webp")) {
    .hero p span {
        background-image: url('../assets/image/animated-text-fill-blue-black.png');
    }

    [data-theme="dark"] .hero p span {
        background-image: url('../assets/image/animated-text-fill-blue.png');
    }
}

/* polite to data-savers */
@media (prefers-reduced-data: reduce) {

    .hero p span,
    [data-theme="dark"] .hero p span {
        background: #000;
        /* or switch to the gradient from section #1 */
    }
}













.faserText {
    animation: aitf 40s linear infinite reverse;
}

.elektroText {
    border-top: 0px;
    animation: aitf 40s linear infinite normal;
}


.hero-logo {
    display: block;
    max-width: 180px;
    /* Adjust logo size */
    margin: 2rem auto;
    /* Center with spacing */
    height: auto;
    animation: fadeIn 1.2s ease-out;
    /* Optional fade-in */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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


/* Animation */
@keyframes aitf {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* RESPONSIVE: Smaller text on narrow screens */
@media (max-width: 768px) {
    .hero p span {
        font-size: 2.5em;
    }

    .hero p {
        letter-spacing: .3em;
        width: 90%;
    }
}

@media (max-width: 480px) {
    .hero p span {
        font-size: 2em;
    }

    .hero p.reveal {
        font-size: 0.7em;
    }
}

/* HERO CONTAINER - END */

/* Cards pop slightly more */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--space-lg);
    height: 100%;
}

.card-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 0.75rem 0;
    min-height: 20rem;
}


.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space);
}

@media (max-width:960px) {
    .hero {
        grid-template-columns: 1fr;
    }

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

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: var(--space);
    align-items: start;
}

@media (max-width:960px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

}

.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .35s, transform .35s;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}


/* ===========================
   SERVICES (Flex, simple bleed, responsive)
   =========================== */
#services {
    padding: 4rem 0;
}

.services-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

/* Card container */
.service-card {
    width: 80%;
    max-width: 1200px;
    /* cap width */
    margin: 0 auto;
    /* center horizontally */
    padding: 2rem;

    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);

    display: flex;
    /* horizontal layout */
    flex-wrap: nowrap;
    align-items: center;
    /* vertical centering */
    gap: 2rem;

    position: relative;
    overflow: visible;
    /* allow image to bleed */
    transition: transform .3s ease, box-shadow .3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .1);
}

/* Put image on the right for even cards */
.service-card:nth-child(even) {
    flex-direction: row-reverse;
}

/* Image box (fixed square) */
.service-image {
    flex: 0 0 300px;
    width: 300px;
    height: 300px;
    position: relative;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    /* box-shadow: var(--shadow); */
    transform: translateY(-10px);
    /* subtle float */
}

/* Bleed: odd -> left, even -> right */
.service-card:nth-child(odd) .service-image {
    margin-left: -75px;
}

.service-card:nth-child(even) .service-image {
    margin-right: -75px;
}

/* Info */
.service-info {
    flex: 1 1 auto;
    min-width: 0;
    /* prevent overflow */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* vertical centering of text */
    gap: .5rem;
    overflow-wrap: anywhere;
    /* safety on very narrow screens */
}

.service-info h3 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--text);
}

.service-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

/* ---------- Responsive ---------- */
/* <= 900px: wider cards, smaller image, smaller bleed */
@media (max-width: 900px) {
    .service-card {
        width: 90%;
        padding: 1.5rem;
        gap: 1.25rem;
    }

    .service-image {
        flex-basis: 220px;
        width: 220px;
        height: 220px;
    }

    .service-card:nth-child(odd) {
        margin-right: 20px;
    }

    .service-card:nth-child(odd) .service-image {
        margin-left: -70px;
    }

    .service-card:nth-child(even) {
        margin-left: 20px;
    }

    .service-card:nth-child(even) .service-image {
        margin-right: -70px;
    }


    .service-info h3 {
        font-size: 1.35rem;
    }

    .service-info p {
        font-size: .98rem;
    }
}

/* <= 600px: even wider cards, tighter image/bleed, smaller fonts */
@media (max-width: 600px) {
    .service-card {
        width: 92%;
        padding: 1.1rem;
        gap: .9rem;


    }

    .service-image {
        flex-basis: 120px;
        width: 120px;
        height: 120px;
        margin-top: 20px;
    }

    .service-card:nth-child(odd) {
        margin-right: 0px;
    }

    .service-card:nth-child(odd) .service-image {
        margin-left: -36px;
    }

    .service-card:nth-child(even) {
        margin-left: 0px;
    }

    .service-card:nth-child(even) .service-image {
        margin-right: -36px;
    }

    .service-info h3 {
        font-size: 1.15rem;
    }

    .service-info p {
        font-size: .95rem;
    }
}



/* === SERVICES SECTION (END)=== */


/* === About ===*/