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

:root {
    /* Typography system */
    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    --font-display: var(--font-sans);

    /* Type scale (responsive) */
    --text-xs: clamp(0.78rem, 0.72rem + 0.2vw, 0.85rem);
    --text-sm: clamp(0.9rem, 0.84rem + 0.2vw, 0.98rem);
    --text-md: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
    --text-lg: clamp(1.1rem, 1.02rem + 0.35vw, 1.25rem);
    --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
    --text-2xl: clamp(2.2rem, 1.8rem + 2.2vw, 3.2rem);

    /* Rhythm */
    --leading-tight: 1.15;
    --leading-normal: 1.55;
    --leading-loose: 1.8;

    /* Tracking */
    --tracking-tight: -0.015em;
    --tracking-normal: 0.01em;
    --tracking-wide: 0.08em;
    --tracking-wider: 0.12em;

    /* Colors - Enhanced palette */
    --ink: #0f172a;
    --ink-muted: rgba(15, 23, 42, 0.8);
    --ink-subtle: rgba(15, 23, 42, 0.65);
    --accent: #6b8e23;
    --accent-2: #8fbc8f;
    --accent-light: rgba(107, 142, 35, 0.1);
    --accent-glow: rgba(107, 142, 35, 0.3);

    /* Video color grade (tune these to taste) */
    --oil-hue: 70deg; /* shifts “wine red” toward olive */
    --oil-tint: rgba(122, 143, 42, 0.22); /* olive oil green */
    --oil-tint-2: rgba(216, 197, 106, 0.10); /* golden highlight */
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-md);
    line-height: var(--leading-normal);
    color: var(--ink);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Fallback gradient - shows if video doesn't load */
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 30%, #f1f5f9 60%, #e2e8f0 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    position: relative;
    overflow-x: hidden;
    padding: 2rem 1rem;
}

.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0;
    /* Olive oil grade (works even if the raw clip is wine/red) */
    filter:
        brightness(0.92)
        contrast(1.12)
        saturate(1.25)
        sepia(0.28)
        hue-rotate(var(--oil-hue));
    transition: opacity 1.5s ease-in;
}

.background-video.loaded {
    opacity: 0.4;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        /* global tint */
        linear-gradient(135deg, var(--oil-tint) 0%, rgba(122, 143, 42, 0.06) 52%, var(--oil-tint-2) 100%),
        /* soft “swirl” highlights */
        radial-gradient(circle at 20% 45%, rgba(216, 197, 106, 0.16) 0%, transparent 52%),
        radial-gradient(circle at 80% 80%, rgba(122, 143, 42, 0.12) 0%, transparent 55%);
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: -1;
    animation: pulseGlow 8s ease-in-out infinite;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(107, 142, 35, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(107, 142, 35, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(143, 188, 143, 0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
    animation: pulseGlow 8s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.container {
    text-align: center;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 4rem);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    gap: 4rem;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6rem;
    flex-wrap: wrap;
    flex: 1;
    transition: all 0.3s ease;
    padding: 2rem 0;
}

.magic-image {
    max-width: 320px;
    width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0) scale(1);
    transform: translateZ(0) scale(1);
    will-change: transform;
    border-radius: 50%;
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.12),
        0 10px 30px rgba(107, 142, 35, 0.08),
        0 0 0 1px rgba(107, 142, 35, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: floatImage 6s ease-in-out infinite;
}

@keyframes floatImage {
    0%, 100% {
        transform: translateY(0px) translateZ(0) scale(1);
    }
    50% {
        transform: translateY(-15px) translateZ(0) scale(1.02);
    }
}

.magic-image:hover {
    transform: translateY(-10px) translateZ(0) scale(1.05);
    box-shadow: 
        0 35px 90px rgba(0, 0, 0, 0.15),
        0 15px 40px rgba(107, 142, 35, 0.15),
        0 0 0 1px rgba(107, 142, 35, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.magic-image::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(107, 142, 35, 0.15), rgba(107, 142, 35, 0));
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    filter: blur(10px);
}

.magic-image:hover::after {
    opacity: 1;
}


.magic-text {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 300;
    color: var(--ink);
    letter-spacing: var(--tracking-wider);
    line-height: var(--leading-tight);
    margin: 0;
    animation: fadeInFloat 2s ease-out 0.2s both;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    display: inline-block;
    padding: 0.5rem 0;
}

.magic-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.magic-text:hover {
    transform: translateY(-5px);
    color: var(--ink);
    letter-spacing: var(--tracking-wide);
    text-shadow: 0 4px 25px rgba(107, 142, 35, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.magic-text:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .background-video {
        opacity: 0.3;
    }
    
    .video-overlay {
        opacity: 0.8;
    }
    
    .container {
        padding: 2rem 1rem;
        gap: 3rem;
        min-height: calc(100vh - 2rem);
    }
    
    .logo-section {
        flex-direction: column;
        gap: 2rem;
        padding: 1rem 0;
    }
    
    .magic-image {
        max-width: 250px;
    }
    
    .magic-text {
        letter-spacing: var(--tracking-wide);
    }
    
    .magic-text:hover {
        letter-spacing: var(--tracking-wide);
    }
    
    .careers-section {
        padding: 2rem 1.5rem;
        width: calc(100% - 2rem);
        border-radius: 20px;
    }
    
    .careers-message {
        font-size: var(--text-md);
    }
}

@keyframes fadeInFloat {
    0% {
        opacity: 0;
        transform: translateY(20px) translateZ(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

.careers-section {
    margin-top: auto;
    padding: 2.5rem 3rem;
    animation: fadeInFloat 2s ease-out 0.3s both;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(107, 142, 35, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(255, 255, 255, 0.5);
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    width: calc(100% - 4rem);
    position: relative;
    overflow: hidden;
}

.careers-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(107, 142, 35, 0.05), transparent);
    transition: left 0.6s ease;
}

.careers-section:hover::before {
    left: 100%;
}

.careers-section:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 24px rgba(107, 142, 35, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 0 rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 1);
}

.careers-message {
    color: var(--ink-muted);
    font-size: var(--text-lg);
    margin-bottom: 0;
    font-weight: 400;
    line-height: var(--leading-loose);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.careers-tech {
    color: var(--ink-subtle);
    font-size: var(--text-sm);
    margin-bottom: 1.5rem;
    font-weight: 300;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.careers-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 2px solid transparent;
    position: relative;
    padding: 0 4px 2px;
    margin-left: 6px;
    display: inline-block;
}

.careers-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.careers-link:hover {
    color: #556b2f;
    transform: translateY(-3px);
    text-shadow: 0 2px 12px rgba(107, 142, 35, 0.25);
}

.careers-link:focus-visible {
    outline: 3px solid rgba(107, 142, 35, 0.4);
    outline-offset: 4px;
    border-radius: 6px;
}

.careers-link:hover::before {
    width: 100%;
}

.careers-link:active {
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
