/**
 * MXD Solutions, shared base styles.
 * Loaded on every page. Page-specific styles live in each <style> block.
 */

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

:root {
    --black: #000000;
    --white: #f0ece4;
    --red: #e8533e;
    --grey: #1a1a1a;
    --grey-light: #2a2a2a;
    --text-muted: #5a5a5a;
}

html {
    font-family: 'DM Sans', sans-serif;
    background: var(--black);
    color: var(--white);
    cursor: default;
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--black);
    color: var(--white);
}

/* Noise overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    pointer-events: none;
    z-index: 1000;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ BUTTONS ============ */
.btn-solutions {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--white);
    text-decoration: none;
    border: 1px solid var(--white);
    padding: 0.9rem 0;
    width: 200px;
    text-align: center;
    transition: background 0.3s ease, color 0.3s ease;
}

.btn-solutions:hover {
    background: var(--white);
    color: var(--black);
}

.btn-fitted {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    position: relative;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 20;
}

.btn-fitted-shape {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 0;
    padding-right: 20px;
    width: 200px;
    background: var(--red);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
    transition: background 0.3s ease, clip-path 0.3s ease;
}

.btn-fitted:hover .btn-fitted-shape {
    background: #d04530;
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 0 100%);
}

.btn-fitted-text {
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.btn-outline {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--white);
    text-decoration: none;
    border: 1px solid var(--grey-light);
    padding: 0.9rem 0;
    width: 200px;
    text-align: center;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

/* ============ BACK LINK ============ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 3rem;
    transition: color 0.3s ease;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards 0.2s;
}

.back-link:hover { color: var(--red); }

.back-link::before {
    content: '←';
    display: inline-block;
    transition: transform 0.3s ease;
}

.back-link:hover::before {
    transform: translateX(-4px);
}

/* ============ FOOTER ============ */
.footer {
    padding: 3rem;
    border-top: 1px solid var(--grey);
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 1.5rem;
    }

    /* Action buttons stretch full-width on mobile */
    .btn-solutions,
    .btn-outline,
    .btn-fitted,
    .btn-fitted .btn-fitted-shape {
        width: 100%;
    }
}
