/* 
   BonBern — Drift-Inspired Premium Design System
   GSAP-powered, scroll-animated, white + dark hybrid
*/

/* ===== LOCAL FONT DEFINITIONS ===== */
@font-face {
    font-family: 'Avenir Next';
    src: url('fonts/Avenir-Next-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Avenir Next';
    src: url('fonts/Avenir-Next-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Unageo';
    src: url('fonts/Unageo-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Unageo';
    src: url('fonts/Unageo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Unageo';
    src: url('fonts/Unageo-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Unageo';
    src: url('fonts/Unageo-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Unageo';
    src: url('fonts/Unageo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Unageo';
    src: url('fonts/Unageo-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Unageo';
    src: url('fonts/Unageo-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Louis George Cafe';
    src: url('fonts/Louis George Cafe Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Louis George Cafe';
    src: url('fonts/Louis George Cafe.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Louis George Cafe';
    src: url('fonts/Louis George Cafe Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===== FONT IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@1&display=swap');

/* ===== DESIGN TOKENS ===== */
:root {
    /* White palette */
    --cream: #FFFFFF;
    --cream-light: #FFFFFF;
    --cream-muted: #F0F0F0;
    --cream-muted-hover: #E5E5E5;
    --espresso: #111111;
    --espresso-hover: #000000;

    /* Dark palette */
    --bg-void: #050505;
    --bg-surface: #0a0a0a;
    --bg-elevated: #111111;
    --bg-card: #141414;
    --bg-hover: #1a1a1a;

    /* Text hierarchy */
    --text-primary: #f0f0f0;
    --text-secondary: #8a8a8a;
    --text-tertiary: #555555;
    --text-muted: #333333;

    /* Accent — cinematic red (used sparingly) */
    --accent: #e23028;
    --accent-bright: #ff4438;
    --accent-dim: #991b15;
    --accent-glow: rgba(226, 48, 40, 0.25);
    --accent-subtle: rgba(226, 48, 40, 0.08);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.025);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.18);

    /* Typography */
    --font-title: 'Avenir Next', system-ui, -apple-system, sans-serif;
    --font-subtitle: 'Unageo', system-ui, -apple-system, sans-serif;
    --font-body: 'Louis George Cafe', system-ui, -apple-system, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;

    /* Spacing */
    --section-pad-y: clamp(6rem, 12vh, 10rem);
    --section-pad-x: clamp(1.5rem, 5vw, 6rem);

    /* Radius */
    --radius-sm: 0.75rem;
    --radius-md: 1.25rem;
    --radius-lg: 2rem;
    --radius-xl: 2.5rem;
    --radius-2xl: 3rem;
    --radius-pill: 100px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-spring: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: clip;
}

/* Selection styling */
::selection {
    background: var(--espresso);
    color: var(--cream-light);
}

/* Hide scrollbar globally */
::-webkit-scrollbar { display: none; }
.scrollbar-hide { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6, .font-title {
    font-family: var(--font-title);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.font-subtitle, .subtitle, .section-label, .feature-nav-btn {
    font-family: var(--font-subtitle);
}

.font-body {
    font-family: var(--font-body);
}

.font-serif {
    font-family: var(--font-serif) !important;
    font-style: italic;
}

/* ===== CUSTOM ANIMATIONS ===== */
@keyframes fade-in-down {
    0% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-down {
    animation: fade-in-down 0.2s ease-out forwards;
}

/* ===== GSAP ANIMATION HELPERS ===== */
.gsap-fade-up {
    opacity: 0;
    transform: translateY(60px);
    will-change: transform, opacity;
}

.gsap-fade-in {
    opacity: 0;
    will-change: opacity;
}

.gsap-scale-in {
    opacity: 0;
    transform: scale(0.9);
    will-change: transform, opacity;
}

.gsap-slide-left {
    opacity: 0;
    transform: translateX(80px);
    will-change: transform, opacity;
}

.gsap-slide-right {
    opacity: 0;
    transform: translateX(-80px);
    will-change: transform, opacity;
}

/* Parallax helper — GSAP reads data-speed */
[data-parallax] {
    will-change: transform;
}

/* ===== GLASSMORPHISM CARDS ===== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    transition: all 0.5s var(--ease-spring);
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: 
        0 25px 60px -15px rgba(0, 0, 0, 0.6),
        0 0 40px -10px var(--accent-glow);
}

/* ===== NAVBAR — Floating Pill ===== */
.navbar-pill {
    background: white;
    border-radius: 9999px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: 'Avenir Next', system-ui, -apple-system, sans-serif !important;
    font-weight: 700 !important;
}

.navbar-pill:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

/* Hamburger lines */
.hamburger-line {
    display: block;
    width: 18px;
    height: 2px;
    background: #000;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.77, 0, 0.175, 1),
                opacity 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    transform-origin: center;
}

.hamburger-open .hamburger-line:first-child {
    transform: translateY(3px) rotate(45deg);
}

.hamburger-open .hamburger-line:last-child {
    transform: translateY(-3px) rotate(-45deg);
}

/* Navbar dropdown */
.navbar-dropdown {
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.navbar-dropdown.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* ===== HERO ===== */
.hero-heading {
    font-size: clamp(1.5rem, 3.5vw, 2.75rem);
    font-weight: 500;
    color: white;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-align: center;
}

.hero-serif-accent {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
}

.hero-cta-bar {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background-color: var(--cream);
    color: var(--espresso);
}

.about-btn-dark {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--espresso);
    color: var(--cream-light);
    padding: 0.875rem 1.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.about-btn-dark:hover {
    background: var(--espresso-hover);
}

.about-btn-dark .btn-icon {
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--espresso);
    font-size: 14px;
}

.about-btn-muted {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--cream-muted);
    color: var(--espresso);
    padding: 0.875rem 1.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.about-btn-muted:hover {
    background: var(--cream-muted-hover);
}

.about-btn-muted .btn-icon {
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--espresso);
    font-size: 14px;
}

/* About divider */
.about-divider {
    display: flex;
    align-items: center;
    gap: 2px;
    width: 100%;
    padding: 3rem 0;
}

.about-divider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cream-muted);
    flex-shrink: 0;
}

.about-divider-line {
    flex: 1;
    height: 2px;
    background: var(--cream-muted);
}

/* ===== FEATURES / SERVICES SECTION ===== */
.features-bg {
    background-image: url('images/Agentic_fg_251207.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.feature-card {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .feature-card {
        padding: 2.5rem;
    }
}

.feature-card video {
    border-radius: 1rem;
    overflow: hidden;
}

.feature-nav-btn {
    width: 100%;
    text-align: left;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.feature-nav-btn.active {
    background: rgba(0, 0, 0, 0.2);
    color: white;
}

.feature-nav-btn:not(.active) {
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.4);
}

.feature-nav-btn:not(.active):hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Feature card reveal animation state */
.feature-card-hidden {
    opacity: 0;
    transform: translateX(4rem);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.feature-card-visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== WORK CARDS (Who We Work With) ===== */
.work-card {
    transition: all 0.5s var(--ease-spring);
    flex: 1;
    min-width: 0;
}

.work-container:hover .work-card {
    opacity: 0.5;
    transform: scale(0.96);
}

.work-container:hover .work-card:hover {
    flex: 2;
    opacity: 1;
    transform: scale(1.03);
    z-index: 10;
}

.work-card:hover .card-bg-gradient { opacity: 1; }
.work-card:hover .card-image { transform: scale(1.08) rotate(-1deg); }
.work-card:hover .card-content { transform: translateY(-10px); }
.work-card:hover .vertical-label { opacity: 0.08; }

.vertical-label {
    writing-mode: vertical-rl;
    transform: rotate(-180deg);
    transition: all 0.5s var(--ease-spring);
}

/* ===== TEAM CARDS ===== */
.team-card {
    perspective: 1200px;
}

.team-card-inner {
    transition: transform 0.7s var(--ease-spring);
    transform-style: preserve-3d;
}

.team-card:hover .team-card-inner {
    transform: rotateY(6deg) rotateX(3deg);
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: white;
    color: black;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

.btn-cta-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: black;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.5);
}

.btn-cta-dark:hover {
    transform: scale(1.05);
}

.btn-cta-dark:active {
    transform: scale(0.95);
}

/* ===== FOOTER ===== */
.cinematic-footer-wrapper {
    -webkit-font-smoothing: antialiased;
}

@keyframes footer-breathe {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.9; }
}

@keyframes footer-scroll-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes footer-heartbeat {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(226, 48, 40, 0.5)); }
    15%, 45% { transform: scale(1.25); filter: drop-shadow(0 0 12px rgba(226, 48, 40, 0.8)); }
    30% { transform: scale(1); }
}

.animate-footer-breathe { animation: footer-breathe 8s ease-in-out infinite alternate; }
.animate-footer-scroll-marquee { animation: footer-scroll-marquee 40s linear infinite; }
.animate-footer-heartbeat { animation: footer-heartbeat 2s var(--ease-out-quart) infinite; }

.footer-aurora {
    background: radial-gradient(circle at 50% 50%, rgba(200, 30, 20, 0.25) 0%, rgba(30, 30, 30, 0.25) 40%, transparent 70%);
}

.footer-bg-grid {
    background-size: 60px 60px;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px), 
        linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
}

.footer-giant-bg-text {
    font-size: 26vw;
    line-height: 0.75;
    font-weight: 600;
    letter-spacing: -0.05em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.04);
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 60%);
    -webkit-background-clip: text;
    background-clip: text;
}

.footer-text-glow {
    background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.55) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0px 0px 25px rgba(255,255,255,0.12));
}

.footer-glass-pill {
    background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    box-shadow: 
        0 10px 30px -10px rgba(0,0,0,0.8), 
        inset 0 1px 1px rgba(255,255,255,0.08),
        inset 0 -1px 2px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.4s var(--ease-out-expo);
}

.footer-glass-pill:hover {
    background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 
        0 20px 50px -10px rgba(0,0,0,0.9), 
        inset 0 1px 1px rgba(255,255,255,0.15);
    color: #ffffff;
}

/* ===== PRELOADER ===== */
@keyframes slideUpFade {
    0% { transform: translateY(30px); opacity: 0; }
    30% { transform: translateY(0); opacity: 1; }
    70% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-30px); opacity: 0; }
}

.role-animate {
    animation: slideUpFade 0.15s ease-out forwards;
}

/* ===== GRADIENT UTILITIES ===== */
.text-gradient {
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.35) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Section label — small caps */
.section-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: var(--accent);
}

/* ===== BONBERN SVG LOGO (about + feature cards) ===== */
.bonbern-mark {
    width: 40px;
    height: 40px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    :root {
        --section-pad-y: 4rem;
    }
    
    .work-container {
        flex-direction: column !important;
    }
    
    .work-card {
        min-height: 300px !important;
    }
}

/* ===== PROCESS CARDS ===== */
.process-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.75rem;
    padding: 2.25rem;
    transition: all 0.5s var(--ease-spring);
    position: relative;
    overflow: hidden;
}

.process-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(226, 48, 40, 0.4);
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px -15px rgba(0, 0, 0, 0.7),
        0 0 30px -5px rgba(226, 48, 40, 0.2);
}

.process-card .process-num {
    font-family: var(--font-title);
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.15);
    transition: color 0.4s ease;
}

.process-card:hover .process-num {
    color: var(--accent);
}

.social-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(226, 48, 40, 0.35);
}

/* Global Floating CTA Animation */
@keyframes float-pulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

#global-floating-cta .floating-cta-inner {
    animation: float-pulse 4s ease-in-out infinite;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .gsap-fade-up,
    .gsap-fade-in,
    .gsap-scale-in,
    .gsap-slide-left,
    .gsap-slide-right {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .feature-card-hidden {
        opacity: 1 !important;
        transform: none !important;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
