/* Header variables */
:root {
    --header-height: 72px;
    --header-height-mobile: 64px;
    --header-bg-transparent: transparent;
    --header-bg-scrolled: rgba(0, 0, 0, 0.9);
    --text-color: #FFFFFF;
    --text-hover: rgba(255, 255, 255, 0.7);
    --accent-color: #FFFFFF;
    --mobile-menu-bg: rgba(0, 0, 0, 0.95);
    --transition-speed: 300ms;
}

/* Header Container */
.stripe-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: background-color var(--transition-speed) ease, backdrop-filter var(--transition-speed) ease;
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
}

.stripe-header.scrolled {
    background-color: var(--header-bg-scrolled);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    width: 100%;
    max-width: 1200px;
    /* Aligns with standard content width */
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* 1. Left Section: Logo */
.header-logo {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.5px;
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
    z-index: 1002;
    /* Above mobile menu overlay if needed */
}

.header-logo:hover {
    opacity: 0.8;
}

/* Logo Image */
.logo-img {
    height: 65px;
    width: auto;
    display: block;
}

/* 2. Center Section: Desktop Nav */
.header-nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    /* Regular */
    font-size: 16px;
    color: var(--text-color);
    text-decoration: none;
    opacity: 1;
    transition: opacity 0.2s ease;
    position: relative;
}

.nav-link:hover {
    opacity: 0.7;
}

/* Active state for demo purposes - could be class based */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: white;
    transform: scaleX(1);
}

/* 3. Right Section: Desktop Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-text {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 12px;
    transition: opacity 0.2s ease;
}

.btn-text:hover {
    opacity: 0.7;
}

.btn-primary {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: #000000;
    background-color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 24px;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.btn-primary:hover {
    transform: scale(1.02);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    padding: 0;
    z-index: 1002;
    margin-left: 20px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: white;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    /* Start off-screen */
    width: 100%;
    /* Full width for better UX on small screens, or clamp */
    max-width: 400px;
    /* Drawer style */
    height: 100vh;
    background: var(--mobile-menu-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1001;
    padding: 80px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Apple-like ease */
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 500;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu-overlay.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delay manually if JS isn't doing it, or just use CSS nth-child */
.mobile-menu-overlay.active .mobile-nav-link:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(2) {
    transition-delay: 0.15s;
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(3) {
    transition-delay: 0.2s;
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(4) {
    transition-delay: 0.25s;
}

/* Sign in */
.mobile-menu-overlay.active .mobile-nav-link:nth-child(5) {
    transition-delay: 0.3s;
}

/* Get started */

/* Mobile Button styling inside menu */
.mobile-nav-link.btn-mobile-primary {
    background: white;
    color: black;
    border: none;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-top: 20px;
}

/* Active Hamburger Animation */
.mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* Responsive Breakpoints */
@media (max-width: 1023px) {

    .header-nav,
    .header-actions {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .stripe-header {
        height: var(--header-height-mobile);
    }
}