/* =============== CSS VARIABLES =============== */
:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #2563eb;
    --secondary-color: #0f172a;
    --accent-color: #0891b2;
    --text-color: #1e293b;
    --text-light: #475569;
    --text-lighter: #94a3b8;
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xl: 3.25rem;
    --font-size-lg: 2.25rem;
    --font-size-md: 1.5rem;
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --header-height: 4rem;
    --section-padding: 5rem 0;
    --container-width: 1200px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* =============== RESET & BASE =============== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { font-weight: var(--font-weight-bold); line-height: 1.2; color: var(--secondary-color); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { border: none; outline: none; cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; font-size: inherit; }

/* =============== REUSABLE =============== */
.container { max-width: var(--container-width); margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.section { padding: var(--section-padding); }
.section__header { text-align: center; margin-bottom: 3rem; }
.section__title { font-size: var(--font-size-lg); margin-bottom: 1rem; }
.section__line { width: 60px; height: 4px; background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); margin: 0 auto 2.5rem; border-radius: 2px; }
.section__description { font-size: 1.125rem; color: var(--text-light); max-width: 650px; margin: 0 auto; line-height: 1.7; }
.button { display: inline-block; padding: 0.875rem 2rem; font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); border-radius: 0.5rem; transition: all var(--transition-normal); cursor: pointer; text-align: center; }
.button__primary { background: var(--primary-color); color: white; }
.button__primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.button__secondary { background: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); }
.button__secondary:hover { background: var(--primary-color); color: white; transform: translateY(-2px); }
.button__full { width: 100%; }

/* =============== HEADER =============== */
.header { position: fixed; top: 0; left: 0; width: 100%; background: var(--bg-color); box-shadow: var(--shadow-sm); z-index: 100; transition: all var(--transition-normal); }
.header.scroll-header { box-shadow: var(--shadow-md); }
.nav { display: flex; justify-content: space-between; align-items: center; height: var(--header-height); }
.nav__logo { display: flex; align-items: center; gap: 0.75rem; font-size: 1.25rem; font-weight: var(--font-weight-bold); color: var(--secondary-color); }
.nav__logo-img { height: 40px; width: auto; object-fit: contain; }
.nav__list { display: flex; gap: 1.5rem; align-items: center; }
.nav__link { font-weight: var(--font-weight-medium); color: var(--text-color); transition: color var(--transition-fast); position: relative; }
.nav__link::after { content: ''; position: absolute; bottom: -0.5rem; left: 0; width: 0; height: 2px; background: var(--primary-color); transition: width var(--transition-normal); }
.nav__link:hover, .nav__link.active-link { color: var(--primary-color); }
.nav__link:hover::after, .nav__link.active-link::after { width: 100%; }
.nav__link--cta { background: var(--primary-color); color: white !important; padding: 0.5rem 1.25rem; border-radius: 0.375rem; font-weight: var(--font-weight-semibold); }
.nav__link--cta::after { display: none; }
.nav__link--cta:hover { background: var(--primary-dark); }
.nav__toggle { display: none; flex-direction: column; gap: 0.25rem; cursor: pointer; }
.nav__toggle span { width: 1.5rem; height: 2px; background: var(--text-color); transition: all var(--transition-normal); }

/* =============== HERO =============== */
.home { min-height: 100vh; display: flex; align-items: center; background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%); padding-top: var(--header-height); }
.home__container { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; align-items: center; }
.home__eyebrow { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--primary-color); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.home__title { font-size: var(--font-size-xl); margin-bottom: 1.5rem; background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1.15; }
.home__description { font-size: 1.2rem; color: var(--text-light); margin-bottom: 1.5rem; line-height: 1.7; }
.home__description--secondary { font-size: 1.05rem; color: var(--text-lighter); font-style: italic; }
.home__buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.home__cta-note { flex-basis: 100%; font-size: 0.85rem; color: var(--text-lighter); margin-top: -0.25rem; }

.home__visual { display: flex; align-items: center; justify-content: center; }
.home__hero-img { width: 100%; max-width: 500px; height: auto; border-radius: 1rem; object-fit: contain; }

/* =============== TRUST CHIPS (HERO) =============== */
.home__trust { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.home__trust-chip { font-size: 0.8rem; font-weight: var(--font-weight-medium); color: var(--text-light); background: var(--bg-card); border: 1px solid var(--border-color); padding: 0.35rem 0.75rem; border-radius: 2rem; }

/* =============== PROBLEMS =============== */
.problems { background: var(--bg-color); }
.problems__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.problem__card { background: var(--bg-secondary); padding: 2rem; border-radius: 0.75rem; border: 1px solid var(--border-color); transition: all var(--transition-normal); }
.problem__card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.problem__icon { width: 48px; height: 48px; color: var(--primary-color); margin-bottom: 1rem; }
.problem__icon svg { width: 100%; height: 100%; }
.problem__title { font-size: 1.1rem; margin-bottom: 0.75rem; color: var(--secondary-color); }
.problem__text { color: var(--text-light); font-size: 0.95rem; line-height: 1.7; }

/* =============== SERVICES =============== */
.services { background: var(--bg-secondary); }
.services__grid--three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 1200px; margin: 0 auto; align-items: stretch; }
.service__card { background: var(--bg-card); padding: 2.5rem 2rem; border-radius: 1rem; box-shadow: var(--shadow-sm); transition: all var(--transition-normal); border: 1px solid var(--border-color); display: flex; flex-direction: column; text-align: left; }
.service__card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.service__card--featured { border-color: var(--primary-color); border-width: 2px; position: relative; }
.service__card--featured::before { content: 'Most Requested'; position: absolute; top: -0.75rem; left: 2rem; background: var(--primary-color); color: white; font-size: 0.75rem; font-weight: var(--font-weight-semibold); padding: 0.25rem 0.75rem; border-radius: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.service__number { font-size: 2.5rem; font-weight: var(--font-weight-bold); color: var(--primary-light); opacity: 0.3; margin-bottom: 0.5rem; }
.service__title { font-size: 1.35rem; margin-bottom: 0.75rem; color: var(--secondary-color); font-weight: var(--font-weight-bold); line-height: 1.3; }
.service__tagline { font-size: 1rem; font-weight: var(--font-weight-medium); color: var(--primary-color); margin-bottom: 1.5rem; line-height: 1.5; }
.service__content { display: flex; flex-direction: column; width: 100%; flex: 1; }
.service__description { color: var(--text-light); line-height: 1.7; margin-bottom: 1.5rem; font-size: 0.95rem; }
.service__scope-title { font-size: 0.9rem; font-weight: var(--font-weight-semibold); color: var(--secondary-color); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.service__list { list-style: none; margin: 0 0 1.5rem 0; padding: 0; }
.service__list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.5rem; color: var(--text-light); line-height: 1.6; font-size: 0.95rem; }
.service__list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-color); font-weight: var(--font-weight-bold); }
.service__benefit { font-size: 0.95rem; font-weight: var(--font-weight-semibold); color: var(--text-color); background: linear-gradient(135deg, rgba(8,145,178,0.08) 0%, rgba(8,145,178,0.04) 100%); padding: 0.875rem 1rem; border-left: 3px solid var(--accent-color); border-radius: 0.375rem; margin-bottom: 1.5rem; }
.service__cta { margin-top: auto; align-self: flex-start; }

/* =============== CASE STUDY =============== */
.case-study { background: var(--bg-color); }
.case-study__content { max-width: 900px; margin: 0 auto; border-radius: 1rem; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border-color); }
.case-study__body { padding: 2.5rem; }
.case-study__block { margin-bottom: 2rem; }
.case-study__subtitle { font-size: 1.1rem; color: var(--primary-color); margin-bottom: 0.75rem; font-weight: var(--font-weight-semibold); }
.case-study__text { color: var(--text-light); line-height: 1.7; }
.case-study__text strong { color: var(--text-color); }
.case-study__list { list-style: none; padding: 0; }
.case-study__list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.5rem; color: var(--text-light); line-height: 1.6; }
.case-study__list li::before { content: "→"; position: absolute; left: 0; color: var(--primary-color); font-weight: var(--font-weight-bold); }
.case-study__results { background: var(--bg-secondary); padding: 2rem; border-radius: 0.75rem; margin-top: 2rem; }
.case-study__metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 1rem; }
.case-study__metric { text-align: center; background: var(--bg-card); padding: 1.5rem 1rem; border-radius: 0.75rem; border: 1px solid var(--border-color); transition: all var(--transition-normal); }
.case-study__metric:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.case-study__metric-value { display: block; font-size: 2rem; font-weight: var(--font-weight-bold); color: var(--primary-color); margin-bottom: 0.25rem; line-height: 1.2; }
.case-study__metric-label { font-size: 0.85rem; color: var(--text-light); line-height: 1.4; }

/* Architecture diagram image */
.case-study__diagram { margin: 2rem 0; }
.case-study__diagram-img { width: 100%; height: auto; border-radius: 0.75rem; }

/* Metric cards with icons */
.case-study__metric-icon { width: 40px; height: 40px; margin: 0 auto 0.5rem; color: var(--primary-color); opacity: 0.6; }
.case-study__metric-icon svg { width: 100%; height: 100%; }

/* =============== ABOUT =============== */
.about { background: var(--bg-secondary); padding-top: 3rem; }
.about__content { display: grid; grid-template-columns: 280px 1fr; gap: 3rem; align-items: start; }
.about__image { position: static; }
.about__img { width: 100%; height: auto; border-radius: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.08); transition: all var(--transition-normal); object-fit: cover; border: 1px solid var(--border-color); }
.about__img:hover { box-shadow: 0 12px 28px rgba(0,0,0,0.12); border-color: var(--primary-color); }
.about__text { color: var(--text-light); margin-bottom: 1rem; line-height: 1.8; }
.about__text--mission { font-size: 1.1rem; font-weight: var(--font-weight-semibold); color: var(--text-color); background: linear-gradient(135deg, rgba(30,64,175,0.08) 0%, rgba(8,145,178,0.08) 100%); padding: 1rem 1.25rem; border-left: 3px solid var(--primary-color); border-radius: 0.375rem; margin-bottom: 1.5rem; }
.about__credentials { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.credential__item { display: flex; gap: 1rem; padding: 0.75rem 1rem; background: var(--bg-color); border-radius: 0.5rem; border: 1px solid var(--border-color); }
.credential__label { font-size: 0.8rem; font-weight: var(--font-weight-semibold); color: var(--primary-color); text-transform: uppercase; letter-spacing: 0.05em; min-width: 110px; flex-shrink: 0; }
.credential__value { font-size: 0.9rem; color: var(--text-light); }

/* =============== CONTACT =============== */
.contact { background: var(--bg-color); }
.contact__content { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; align-items: start; }
.contact__info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact__card { display: flex; gap: 1rem; padding: 1.5rem; background: var(--bg-secondary); border-radius: 0.75rem; transition: all var(--transition-normal); border: 1px solid var(--border-color); }
.contact__card:hover { background: white; box-shadow: var(--shadow-md); transform: translateX(5px); }
.contact__card-icon { width: 48px; height: 48px; background: #dbeafe; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; color: var(--primary-color); flex-shrink: 0; }
.contact__card-icon svg { width: 24px; height: 24px; }
.contact__card-title { font-size: 1rem; margin-bottom: 0.25rem; color: var(--secondary-color); }
.contact__card-info { color: var(--text-light); font-size: var(--font-size-sm); word-break: break-word; }
.contact__guarantee { background: linear-gradient(135deg, rgba(30,64,175,0.05) 0%, rgba(8,145,178,0.05) 100%); border: 1px solid rgba(30,64,175,0.15); border-radius: 0.75rem; padding: 1.25rem; }
.contact__guarantee p { font-size: 0.9rem; color: var(--text-light); line-height: 1.7; }
.contact__guarantee strong { color: var(--text-color); }
.contact__form { background: var(--bg-card); padding: 2rem; border-radius: 1rem; box-shadow: var(--shadow-md); border: 1px solid var(--border-color); }
.form__group { margin-bottom: 1.5rem; }
.form__label { display: block; margin-bottom: 0.5rem; font-weight: var(--font-weight-medium); color: var(--secondary-color); }
.form__input { width: 100%; padding: 0.875rem 1rem; border: 1px solid var(--border-color); border-radius: 0.5rem; background: var(--bg-color); color: var(--text-color); transition: all var(--transition-fast); }
.form__input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(30,64,175,0.1); }
.form__input::placeholder { color: var(--text-lighter); }
.form__textarea { resize: vertical; min-height: 120px; }
.form__error { display: block; margin-top: 0.25rem; font-size: var(--font-size-sm); color: #ef4444; }
.form__status { margin-top: 1rem; text-align: center; font-weight: var(--font-weight-medium); }
.form__status.success { color: #10b981; }
.form__status.error { color: #ef4444; }
.contact__form.form--success { animation: successFlash 0.6s ease; }
@keyframes successFlash { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); } 50% { box-shadow: 0 0 0 8px rgba(16,185,129,0.1); } 100% { box-shadow: var(--shadow-md); } }
.form__trust { margin-top: 1rem; text-align: center; font-size: 0.85rem; color: var(--text-light); line-height: 1.5; }
.form__trust--small { margin-top: 0.25rem; font-size: 0.8rem; }
.form__trust--small a { color: var(--primary-color); text-decoration: none; }
.form__trust--small a:hover { text-decoration: underline; }
.required { color: #ef4444; font-weight: var(--font-weight-bold); }

/* =============== FOOTER =============== */
.footer { background: var(--bg-secondary); color: var(--text-color); padding: 2rem 0; border-top: 1px solid var(--border-color); }
.footer__container { display: flex; justify-content: space-between; align-items: center; }
.footer__text { font-size: var(--font-size-sm); opacity: 0.8; }
.footer__link { color: var(--primary-color); text-decoration: underline; transition: opacity var(--transition-fast); }
.footer__link:hover { opacity: 0.7; }

/* =============== IMPRESSUM =============== */
.impressum { min-height: calc(100vh - var(--header-height) - 8rem); padding-top: calc(var(--header-height) + 3rem); }
.impressum__container { max-width: 800px; }
.impressum__content { background: var(--bg-card); padding: 3rem; border-radius: 1rem; box-shadow: var(--shadow-md); }
.impressum__section { margin-bottom: 2.5rem; }
.impressum__section:last-of-type { margin-bottom: 0; }
.impressum__subtitle { font-size: 1.25rem; color: var(--primary-color); margin-bottom: 1rem; font-weight: var(--font-weight-semibold); }
.impressum__text { color: var(--text-light); line-height: 1.8; margin-bottom: 0.5rem; }
.impressum__text a { color: var(--primary-color); text-decoration: none; transition: color var(--transition-fast); }
.impressum__text a:hover { color: var(--primary-dark); text-decoration: underline; }
.impressum__back { margin-top: 3rem; text-align: center; }

/* =============== FAQ =============== */
.faq { background: var(--bg-color); }
.faq__grid { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq__item { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 0.75rem; overflow: hidden; transition: all var(--transition-normal); }
.faq__item[open] { border-color: var(--primary-light); box-shadow: var(--shadow-sm); background: var(--bg-color); }
.faq__question { padding: 1.25rem 1.5rem; font-weight: var(--font-weight-semibold); color: var(--secondary-color); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 1.05rem; line-height: 1.4; }
.faq__question::-webkit-details-marker { display: none; }
.faq__question::after { content: '+'; font-size: 1.5rem; font-weight: var(--font-weight-light); color: var(--primary-color); flex-shrink: 0; transition: transform var(--transition-normal); }
.faq__item[open] .faq__question::after { content: '−'; }
.faq__question:hover { color: var(--primary-color); }
.faq__answer { padding: 0 1.5rem 1.25rem; }
.faq__answer p { color: var(--text-light); line-height: 1.7; font-size: 0.95rem; }

/* =============== ANIMATIONS =============== */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* =============== RESPONSIVE =============== */
@media screen and (max-width: 968px) {
    :root { --font-size-xl: 2.5rem; --font-size-lg: 2rem; --font-size-md: 1.25rem; --section-padding: 4rem 0; }
    /* Hamburger menu at tablet too — nav items don't fit */
    .nav__menu { position: fixed; top: var(--header-height); left: -100%; width: 100%; height: calc(100vh - var(--header-height)); background: var(--bg-color); padding: 2rem 1.5rem; box-shadow: var(--shadow-lg); transition: left var(--transition-normal); z-index: 100; }
    .nav__menu.show-menu { left: 0; }
    .nav__menu-backdrop { display: none; position: fixed; top: var(--header-height); left: 0; width: 100%; height: calc(100vh - var(--header-height)); background: rgba(0,0,0,0.4); z-index: 99; transition: opacity var(--transition-normal); }
    .nav__menu-backdrop.show-menu { display: block; }
    .nav__list { flex-direction: column; gap: 1.5rem; }
    .nav__toggle { display: flex; }
    .nav__toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav__toggle.active span:nth-child(2) { opacity: 0; }
    .nav__toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
    .nav__link--cta { align-self: flex-start; margin-top: 0.5rem; }
    .home { min-height: auto; padding-top: calc(var(--header-height) + 1.5rem); padding-bottom: 2rem; }
    .home__container { grid-template-columns: 1fr; }
    .home__description { margin-bottom: 1rem; }
    .home__visual { display: flex; justify-content: center; margin-top: 0.75rem; }
    .home__hero-img { max-width: 600px; width: 100%; }
    .home__trust { flex-direction: column; }
    .about__content { grid-template-columns: 1fr; gap: 2rem; display: flex; flex-direction: column; }
    .about__data { display: contents; }
    .about__text--mission { order: 1; }
    .about__image { position: static; max-width: 300px; margin: 0 auto; order: 2; }
    .about__text:not(.about__text--mission) { order: 3; }
    .about__credentials { order: 4; }
    .contact__content { grid-template-columns: 1fr; }
    .services__grid--three { grid-template-columns: repeat(2, 1fr); }
    .service__card--featured { margin-top: 0.75rem; }
    .problems__grid { grid-template-columns: repeat(2, 1fr); }
    .case-study__metrics { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

@media screen and (max-width: 768px) {
    :root { --font-size-xl: 2rem; --font-size-lg: 1.75rem; --section-padding: 3rem 0; }
    .home__buttons { flex-direction: column; }
    .home__buttons .button__primary { order: 1; }
    .home__cta-note { order: 2; }
    .home__buttons .button__secondary { order: 3; }
    .home__hero-img { max-width: 100%; width: 100%; }
    .button { width: 100%; text-align: center; }
    .service__cta { width: 100%; text-align: center; }
    .services__grid--three { grid-template-columns: 1fr; }
    .service__card--featured { margin-top: 0.75rem; }
    .footer__container { flex-direction: column; gap: 0.5rem; text-align: center; }
    .problems__grid { grid-template-columns: 1fr; }
    .case-study__metrics { grid-template-columns: 1fr; }
    .credential__item { flex-direction: column; gap: 0.25rem; }
}

@media screen and (max-width: 480px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
    .home__title { font-size: 1.85rem; }
    .home__description { font-size: 1rem; }
    .service__card, .contact__form { padding: 1.5rem; }
    .case-study__body { padding: 1.5rem; }
}
