/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Lenis handles smooth scrolling, native smooth-scroll causes conflicts */
    scroll-behavior: auto !important;
    scroll-padding-top: 100px;
}

body {
    background-color: var(--color-background);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    font-size: var(--text-body-lg-size);
    font-weight: var(--text-body-md-weight);
    line-height: var(--line-height-relaxed);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

/* Typography Base */
h1,
h2,
h3,
h4,
h5,
h6,
.display-lg,
.heading-xl,
.heading-md {
    font-family: var(--font-display);
    color: var(--color-text-primary);
    margin: 0;
    font-weight: 400;
    /* Epilogue looks premium at various weights */
    letter-spacing: -0.02em;
    /* Slight negative letter spacing for display font */
}

em,
    i {
        font-family: "Playfair Display", serif;
        font-style: italic;
        background: var(--gradient-primary);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        color: transparent;
        font-weight: 900;
        letter-spacing: -0.01em;
    }

p {
    display: block;
}

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

a {
    color: inherit;
    transition: color var(--transition-fast);
    text-decoration: none;
}

.text-center {
    text-align: center;
}

/* Mesh Gradient Background */
.mesh-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background-color: var(--color-background);
}

.color-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: drift 20s infinite alternate ease-in-out;
    will-change: transform;
}

.orb-1 {
    width: 60vw;
    height: 60vw;
    top: -20%;
    left: -10%;
    background: radial-gradient(circle, var(--color-mesh-1) 0%, transparent 100%);
    animation-delay: 0s;
}

.orb-2 {
    width: 50vw;
    height: 50vw;
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, var(--color-mesh-2) 0%, transparent 100%);
    animation-delay: -10s;
}

.orb-3 {
    width: 45vw;
    height: 45vw;
    top: 40%;
    left: 30%;
    background: radial-gradient(circle, var(--color-mesh-3) 0%, transparent 100%);
    animation-delay: -20s;
}

.orb-4 {
    width: 55vw;
    height: 55vw;
    top: 10%;
    right: 20%;
    background: radial-gradient(circle, var(--color-mesh-4) 0%, transparent 100%);
    animation-delay: -30s;
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    33% { transform: translate(15vw, -15vh) scale(1.3) rotate(10deg); }
    66% { transform: translate(-12vw, 12vh) scale(0.7) rotate(-8deg); }
    100% { transform: translate(-8vw, -8vh) scale(1.2) rotate(4deg); }
}

a:hover {
    color: var(--color-primary-light);
}

/* Prevent global a:hover from bleeding into components that manage their own hover state */
.btn-premium:hover,
.btn-case-study:hover,
.btn-arrow:hover {
    color: inherit;
}

/* Typography Classes */
.display-lg {
    font-size: var(--text-display-lg-size);
    font-weight: var(--text-display-lg-weight);
    line-height: var(--text-display-lg-height);
    letter-spacing: var(--text-display-lg-spacing);
}

.heading-xl {
    font-size: var(--text-heading-xl-size);
    font-weight: var(--text-heading-xl-weight);
    line-height: var(--text-heading-xl-height);
    letter-spacing: var(--text-heading-xl-spacing);
}

.heading-lg {
    font-size: var(--text-heading-lg-size);
    font-weight: var(--text-heading-lg-weight);
    line-height: var(--text-heading-lg-height);
    letter-spacing: var(--text-heading-lg-spacing);
}

.heading-md {
    font-size: var(--text-heading-md-size);
    font-weight: var(--text-heading-md-weight);
    line-height: var(--text-heading-md-height);
    letter-spacing: var(--text-heading-md-spacing);
}

.body-lg {
    font-size: var(--text-body-lg-size);
    font-weight: var(--text-body-lg-weight);
    line-height: var(--text-body-lg-height);
    letter-spacing: var(--text-body-lg-spacing);
}

.body-md {
    font-size: var(--text-body-md-size);
    font-weight: var(--text-body-md-weight);
    line-height: var(--text-body-md-height);
    letter-spacing: var(--text-body-md-spacing);
}

.body-sm {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0em;
}

.label-md {
    font-size: var(--text-label-md-size);
    font-weight: var(--text-label-md-weight);
    line-height: var(--text-label-md-height);
    letter-spacing: var(--text-label-md-spacing);
    text-transform: uppercase;
}

/* Text Colors */
.text-primary {
    color: var(--color-text-primary);
}

.text-primary-light {
    color: var(--color-primary-light);
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-muted {
    color: var(--color-text-muted);
}

/* Media Queries for Typography */
@media (max-width: 768px) {
    .display-lg {
        font-size: 48px;
    }

    .heading-xl {
        font-size: 28px;
    }

    .heading-lg {
        font-size: 22px;
    }
}