/* =========================================================
   base.css - Fundament (Reset, Design-Tokens, Typografie)
   CEFAMEX Solutions · 2025
   Stil: hell, technisch, minimal
========================================================= */

/* =========================================================
   LOKALE WEBFONTS – Inter + Architects Daughter
   Vollständig lokal · DSGVO-konform · ohne Google
========================================================= */

/* Inter Regular (400) */
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter/inter-v20-latin-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Inter Medium (500) */
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter/inter-v20-latin-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Inter SemiBold (600) */
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter/inter-v20-latin-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Inter Bold (700) */
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter/inter-v20-latin-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Inter Italic (optional) – lassen wir drin, aber NICHT im body */
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter/inter-v20-latin-italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* Architects Daughter */
@font-face {
    font-family: "Architects Daughter";
    src: url("../fonts/architects-daughter/architects-daughter-v20-latin-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* ================================
   1) DESIGN-TOKENS
================================ */
:root {
    --page-width: 1300px;
    --section-y: 3.5rem;

    --blue-50: #e0f2fe;
    --blue-100: #cfe8fd;
    --blue-400: #0077cc;
    --blue-500: #0066cc;
    --blue-600: #0055aa;
    --blue-700: #004999;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --white: #ffffff;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 8px 28px rgba(15, 23, 42, 0.14);

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-14: 3.5rem;

    --font-base: 1rem;
    --font-sm: 0.9rem;
    --font-lg: 1.125rem;
    --font-xl: 1.5rem;
    --font-2xl: 2rem;
    --font-3xl: 2.5rem;

    --lh-base: 1.7;
}

/* ================================
   2) RESET + STRUCTURE FIX
================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

html,
body {
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure {
    margin: 0;
    padding: 0;
}

ul,
ol {
    list-style-position: outside;
}

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* ================================
   3) GLOBAL-BILDER
================================ */
main img,
main picture,
main video {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

header img {
    max-width: none;
    height: auto;
    border-radius: 0;
    display: block;
}

/* ================================
   4) BODY-STYLES
================================ */
body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: var(--font-base);
    font-weight: 400;
    line-height: var(--lh-base);
    letter-spacing: -0.003em;
    /* angepasst, nicht zu negativ */
    color: var(--gray-800);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
}

/* Unterseiten-Offset */
body.unterseite {
    padding-top: 80px;
}

/* ================================
   6) TYPOGRAFIE
================================ */

.email::after {
    content: "@" "cefamex-solutions.de";
}

h1,
h2,
h3,
h4 {
    color: var(--gray-900);
    line-height: 1.2;
    font-style: normal;
    /* verhindert Italic-Fallback */
}

h1 {
    font-size: var(--font-3xl);
    font-weight: 600;
    /* korrekt */
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

h2 {
    font-size: var(--font-2xl);
    font-weight: 550;
    letter-spacing: -0.006em;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: var(--font-xl);
    font-weight: 500;
    letter-spacing: -0.003em;
    margin-bottom: 0.5rem;
}

h4 {
    font-weight: 500;
}

p {
    margin-bottom: 0.75rem;
    letter-spacing: -0.003em;
    color: var(--gray-700);
}

/* ================================
   7) LINKS
================================ */
a {
    color: var(--blue-600);
    text-decoration: none;
    transition: color 0.18s ease;
}

a:hover {
    color: var(--blue-700);
    text-decoration: underline;
}

/* ================================
   8) BILDER (Content)
================================ */
main img {
    border-radius: var(--radius-md);
}

/* ================================
   9) TABELLEN
================================ */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

th,
td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
}

th {
    font-weight: 600;
    color: var(--gray-700);
}

/* ================================
   10) FORMULAR-ELEMENTE
================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    background: var(--gray-50);
    padding: 0.65rem 0.8rem;
    font-size: 1rem;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--blue-500);
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 102, 204, 0.15);
}

/* ================================
   11) BUTTONS
================================ */
button,
.btn {
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.4rem;
    font-weight: 500;
    letter-spacing: -0.003em;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
    transition: background-color 0.18s, transform 0.1s, box-shadow 0.18s;
}

.btn--primary {
    background: var(--blue-600);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
    background: var(--blue-700);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: var(--gray-100);
    color: var(--gray-800);
}

.btn--secondary:hover {
    background: var(--gray-200);
}

button:active,
.btn:active {
    transform: scale(0.97);
}

/* ================================
   12) FOCUS VISIBILITY
================================ */
:focus-visible {
    outline: 2px solid var(--blue-500);
    outline-offset: 3px;
}

/* ================================
   13) RESPONSIVE
================================ */
@media (max-width: 900px) {
    h1 {
        font-size: 2.1rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .page-wrapper {
        padding: 0 1rem;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.85rem;
    }

    h2 {
        font-size: 1.45rem;
    }

    .section {
        padding: 2.5rem 0;
    }
}