/* --- CSS VARIABLES (COLOR SYSTEM) --- */
:root {
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    --color-slate-950: #020617;
    --color-emerald-50: #ecfdf5;
    --color-emerald-100: #d1fae5;
    --color-emerald-500: #10b981;
    --color-emerald-600: #059669;
    --color-emerald-800: #065f46;
    --color-blue-50: #eff6ff;
    --color-blue-100: #dbeafe;
    --color-blue-500: #3b82f6;
    --color-blue-600: #2563eb;
    --color-blue-700: #1d4ed8;
    --color-blue-900: #1e3a8a;
}

/* --- DOCUMENT RESET & SMOOTH TYPOGRAPHY --- */
html, body {
    background-color: var(--color-slate-50);
    color: var(--color-slate-900);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth transition wrapper for whole page content */
body {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Class triggered when switching language */
body.lang-switching {
    opacity: 0;
    transform: translateY(-8px); /* subtle shift up */
}

*, ::before, ::after {
    box-sizing: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
    font-weight: 900;
    margin-top: 0;
    margin-bottom: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- GLOBAL COMPONENT RESETS --- */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}
.badge-emerald {
    background-color: var(--color-emerald-50);
    color: var(--color-emerald-800);
    border-color: var(--color-emerald-100);
}

.btn {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    padding: 1rem 2rem;
    border-radius: 1rem;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}
.btn-emerald {
    background-color: var(--color-emerald-600);
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.1);
}
.btn-emerald:hover {
    background-color: var(--color-emerald-500);
}
.btn-secondary {
    background-color: #ffffff;
    border: 1px solid var(--color-slate-200);
    color: var(--color-slate-700);
}
.btn-secondary:hover {
    background-color: var(--color-slate-50);
}

/* --- GLOBAL LAYOUT RESET --- */
.global-layout {
    background-color: var(--color-slate-50);
    color: var(--color-slate-900);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- ROSE BADGE PILL (Replaces inline style block) --- */
.badge-rose {
    background-color: #fff1f2;
    color: #9f1239;
    border-color: #ffe4e6;
}

/* --- TEXT UTILITIES --- */
.text-emerald {
    color: var(--color-emerald-600);
}

/* --- BODY SCROLL-LOCK --- */
body.modal-open {
    overflow: hidden !important; /* Locks background viewport scrolling */
    height: 100vh; /* Forces fixed viewport height to support iOS Safari */
}

/* --- MOBILE & SHORT VIEWPORT OVERRIDES --- */
@media (max-width: 48em), (max-height: 40em) {
    .modal {
        align-items: flex-start; /* Prevents vertical centering from clipping top content */
    }
    
    .modal-content {
        margin-top: 1rem; /* Small margin so top of card doesn't touch screen edge */
        margin-bottom: 1rem;
    }
    
    .badge-pill {
        font-size: 0.75rem
    }
    
    .btn {
        font-size: 1rem;
    }
}

/* --- PREVENTS FIXED HEADER FROM COVERING HEADINGS --- */

/* Desktop offset (matches single-row header height) */
section[id],
#features,
#simulators,
#values,
#hire-us,
#about,
#contact {
    scroll-margin-top: 4rem;
}

/* Mobile & Tablet offset (matches taller two-row header height) */
@media (max-width: 48em) {
    section[id],
    #features,
    #simulators,
    #values,
    #hire-us,
    #about,
    #contact {
        scroll-margin-top: 7rem;
    }
}