:root {
    --black: #000000;
    --black-opacity-10: rgba(0, 0, 0, 0.1);
    --black-opacity-70: rgba(0, 0, 0, 0.7);
    --white: #ffffff;
    --white-opacity-10: rgba(255, 255, 255, 0.1);
    --white-opacity-70: rgba(255, 255, 255, 0.7);
    --secondary-200: #e2e2e2;
    --secondary-500: rgba(0, 0, 0, 0.75);
    --secondary-800: #1a1c1c;
    --white-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);

    --background-color-primary: #FBF9F6;
    --background-color-secondary: #F5F3EF;
    --background-color-tertiary: #EDE8E2;
    --background-color-quaternary: #FFFFFF;
    --border-color: rgba(0, 0, 0, 0.09);
    --eyebrow-color: rgba(26, 26, 26, 0.50);
    --title-color: #1A1A1A;
    --subtitle-color: rgba(26, 26, 26, 0.72);
    --filter-chip-background: #CCCCCC;
    --filter-chip-transparent-background: rgba(0, 0, 0, 0.10);
    --small-button-background-secondary: #000000;
    --small-button-text: #ffffff;
    --page-background: #f6f6f6;
    --title-text-color: var(--black);
    --description-text-color: var(--secondary-500);
    --eyebrow-text-color: var(--secondary-500);
    --highlight-text-color: var(--secondary-200);
    --duration-background-color: var(--white-opacity-70);
    --duration-text-color: var(--black);
    --separation-border-color: var(--black-opacity-10);
    --stroke-color: var(--secondary-500);
    --menu-button-color: var(--secondary-800);
    --expander-background-color: var(--white-opacity-10);
    --expander-icon-color: var(--black);
    --button-color: var(--black);
    --underlined-text-color: var(--black);
    --old-button-background: var(--black-opacity-10);
    --modal-background: var(--white);
    --modal-close-button-color: var(--secondary-800);
    --modal-button-background-color: var(--black-opacity-10);
    --modal-button-text-color: var(--black-opacity-70);
    --footer-background-color: var(--white);
    --footer-text-color: var(--secondary-500);
    --gradient-color: var(--white-gradient);

    --accent-orange: #FF7F00;
}

/* Material Icons Outlined configuration */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.material-symbols-outlined[data-weight="fill"] {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Glass and Overlay Utilities */
.glass-edge { 
    border: 1px solid var(--border-color); 
}
.gradient-overlay { 
    background: linear-gradient(180deg, rgba(0,0,0,0.02) 0%, transparent 100%); 
}
.blur-overlay { 
    backdrop-filter: blur(20px); 
    background-color: rgba(250, 249, 249, 0.75); 
}

/* Smooth Scrolling (Lenis Managed) */
html {
    scroll-behavior: initial !important;
}
html.lenis {
    height: auto;
}
.lenis-smooth {
    scroll-behavior: auto !important;
}
.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}
.lenis-stopped {
    overflow: hidden;
}
.lenis-scrolling iframe {
    pointer-events: none;
}

/* WebGL Background Canvas */
#canvas-webgl {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.7;
}

/* Typography Custom Font-Face and overrides for strictly Greed Standard */
@font-face {
    font-family: 'Greed Standard';
    src: local('Greed Standard'), local('GreedStandard');
}

body, html, h1, h2, h3, h4, h5, h6, p, a, button, span:not(.material-symbols-outlined), div:not(.material-symbols-outlined), li, select, input, textarea {
    font-family: 'Greed Standard' !important;
    font-style: normal !important;
}

/* Theme Color transitions */
body {
    background-color: var(--background-color-primary);
    color: var(--title-color);
    transition: background-color 0.8s ease, color 0.8s ease;
}

/* Premium Buttons Styling */
.btn-premium-white {
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 14px 20px;
    gap: 10px;
    border-radius: 34px;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-family: 'Greed Standard' !important;
    font-style: normal !important;
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    color: #000000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    outline: none;
    user-select: none;
}
.btn-premium-white:hover {
    background: #000000;
    color: #FFFFFF;
    border-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}
.btn-premium-white:active {
    transform: translateY(0);
}

.btn-premium-black {
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 14px 20px;
    gap: 10px;
    border-radius: 34px;
    background: #000000;
    border: 1px solid #000000;
    font-family: 'Greed Standard' !important;
    font-style: normal !important;
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    color: #FFFFFF;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    outline: none;
    user-select: none;
}
.btn-premium-black:hover {
    background: #FFFFFF;
    color: #000000;
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05);
}
.btn-premium-black:active {
    transform: translateY(0);
}

/* Nav Transition scroll indicators */
#main-nav {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease, padding 0.4s ease;
    border-bottom: 1px solid transparent;
}
#main-nav.scrolled {
    background-color: rgba(250, 249, 249, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}
#main-nav.scrolled .brand-logo {
    transform: scale(0.95);
}
#main-nav .brand-logo {
    transition: transform 0.4s ease;
}

/* Interactive Card Elevate Hover */
.interactive-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease, background-color 0.4s ease;
    border: 1px solid var(--border-color);
}
.interactive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px -15px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.25);
    background-color: var(--background-color-quaternary);
}

/* Clip Path Reveals */
.reveal-clip {
    clip-path: inset(0 100% 0 0);
    transition: none;
}

/* Custom overflow-hidden reveal masks for letters */
.title-reveal-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}
.title-reveal-char {
    display: inline-block;
    transform: translateY(100%);
    will-change: transform;
}

/* Reduced Motion preferences */
@media (prefers-reduced-motion: reduce) {
    .reveal-clip {
        clip-path: none !important;
    }
    .title-reveal-char {
        transform: none !important;
    }
    .interactive-card:hover {
        transform: none;
    }
}

/* Custom living torah button size */
.btn-living-torah {
    width: 205px !important;
    height: 39px !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 39px !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 34px !important;
    box-sizing: border-box !important;
}

/* Pulsing Map Nodes */
.pulsing-node {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
}
.node-dot {
    display: block;
    width: 10px;
    height: 10px;
    background-color: var(--accent-orange);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-orange);
}
.node-pulse {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-orange);
    border-radius: 50%;
    opacity: 0;
    animation: pulse-node-scale 1.8s infinite cubic-bezier(0.25, 0, 0, 1);
    pointer-events: none;
}
@keyframes pulse-node-scale {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}
.node-tooltip {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 9999px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.pulsing-node:hover .node-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Modal Window Classes */
#reservation-modal.active-modal {
    opacity: 1 !important;
    pointer-events: auto !important;
}
#reservation-modal.active-modal #modal-card {
    transform: scale(1) !important;
}

/* ===========================
   Visual-First Benefits Section
   =========================== */
.benefits-visual {
    position: relative;
    overflow: hidden;
}
.benefit-story-card {
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.benefit-story-card:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: rgba(255, 127, 0, 0.45) !important;
    transform: translateY(-4px);
}

/* ===========================
   Stats Number Carousel
   =========================== */
.stat-carousel-card {
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.55s ease,
                border-color 0.55s ease,
                box-shadow 0.55s ease,
                background-color 0.4s ease;
}
.stat-big-number {
    font-size: 80px;
    line-height: 1;
    transition: font-size 0.55s cubic-bezier(0.16, 1, 0.3, 1), color 0.55s ease;
    color: var(--title-color);
}
.stat-card-active .stat-big-number {
    font-size: 112px;
    color: var(--accent-orange);
}
.stat-card-active {
    transform: scale(1.06) !important;
    border-color: rgba(255, 127, 0, 0.22) !important;
    box-shadow: 0 24px 60px -12px rgba(255, 127, 0, 0.13), 0 6px 20px -4px rgba(0,0,0,0.06) !important;
    background-color: var(--background-color-quaternary) !important;
    opacity: 1 !important;
}
.stat-card-inactive {
    opacity: 0.5;
    transform: scale(0.96) !important;
}
.stat-dot {
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}
.stat-dot.active {
    background-color: var(--accent-orange) !important;
    transform: scale(1.4);
}
@media (max-width: 640px) {
    .stat-big-number { font-size: 60px; }
    .stat-card-active .stat-big-number { font-size: 80px; }
    .stats-carousel-track {
        justify-content: flex-start !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-left: calc(50vw - 130px) !important;
        padding-right: calc(50vw - 130px) !important;
    }
    .stats-carousel-track::-webkit-scrollbar { display: none; }
    .stat-carousel-card { scroll-snap-align: center; }
}

/* ===========================
   Cinematic Hero
   =========================== */
.hero-section {
    /* Dark fill for the scale-gap areas around the video wrapper */
    background-color: #0a0a0a;
}
.hero-video-wrapper {
    will-change: transform, border-radius;
    transform: scale(0.86);
    border-radius: 28px;
    overflow: hidden;
}
.hero-video-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===========================
   Pinned How It Works (TV Mockup)
   =========================== */
.howitworks-section {
    overflow: visible;
}
.tv-mockup-container {
    position: sticky;
    top: 120px;
    align-self: flex-start;
}
.tv-frame {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.40), 0 0 0 1px rgba(255,255,255,0.04);
}
.tv-screen {
    background: #0a0a0a;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    position: relative;
}
.tv-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: opacity;
}
.tv-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.04) 3px,
        rgba(0, 0, 0, 0.04) 4px
    );
    pointer-events: none;
    border-radius: 10px;
}
.tv-stand-neck {
    width: 48px;
    height: 28px;
    background: linear-gradient(180deg, #222 0%, #333 100%);
    margin: 0 auto;
    clip-path: polygon(25% 0%, 75% 0%, 90% 100%, 10% 100%);
}
.tv-stand-base {
    width: 120px;
    height: 6px;
    background: linear-gradient(180deg, #2a2a2a 0%, #3a3a3a 100%);
    border-radius: 3px;
    margin: 0 auto;
}
.howitworks-step {
    padding-top: 72px;
    padding-bottom: 72px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: opacity 0.4s ease;
}
.howitworks-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.howitworks-step.step-dimmed {
    opacity: 0.35;
}
.step-number {
    font-size: 88px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--accent-orange);
    opacity: 0.12;
    margin-bottom: 20px;
    transition: opacity 0.4s ease;
}
.howitworks-step.step-active .step-number {
    opacity: 0.18;
}

/* ===========================
   SplitType Line Mask
   =========================== */
.st-line-mask {
    display: block;
    overflow: hidden;
}
.st-line-mask .line {
    display: block;
    will-change: transform;
}

/* ===========================
   Benefit Chips (Mission Section)
   =========================== */
.benefit-chip {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: rgba(0, 0, 0, 0.6) !important;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
}
.benefit-chip:hover {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.85);
    border-color: rgba(0, 0, 0, 0.15);
}
.benefit-chip.active {
    background: #ffffff !important;
    border: 1.5px solid var(--accent-orange) !important;
    color: #000000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.benefit-chip.active .material-symbols-outlined {
    color: var(--accent-orange) !important;
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════ */
@media (max-width: 767px) {

    /* Testimonials Mobile Carousel Override */
    .testimonials-pin-container {
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        display: flex !important;
        padding-bottom: 24px !important;
        scrollbar-width: none; /* Hide scrollbar for clean visual */
    }
    .testimonials-pin-container::-webkit-scrollbar {
        display: none;
    }
    .testimonials-slider {
        display: flex !important;
        gap: 16px !important;
        transform: none !important;
        width: auto !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    .testimonials-slider > div {
        scroll-snap-align: center !important;
        flex-shrink: 0 !important;
        width: 85vw !important;
        min-width: 290px !important;
        max-width: 420px !important;
        height: auto !important;
        min-height: 480px !important;
    }

    /* Typography */
    .text-headline-xl { font-size: 34px !important; line-height: 1.08 !important; letter-spacing: -0.02em !important; }
    .text-headline-lg { font-size: 26px !important; line-height: 1.12 !important; letter-spacing: -0.02em !important; }
    .text-headline-md { font-size: 20px !important; line-height: 1.2 !important; }

    /* Tailwind arbitrary sizes used in stats */
    .text-\[88px\]  { font-size: 52px !important; line-height: 1 !important; }
    .text-\[104px\] { font-size: 52px !important; line-height: 1 !important; }

    /* Section spacing */
    .py-section-gap { padding-top: 64px !important; padding-bottom: 64px !important; }
    .pt-section-gap { padding-top: 64px !important; }
    .pb-section-gap { padding-bottom: 64px !important; }

    /* Hero: ensure enough top padding for nav */
    .hero-text { padding-top: 132px !important; }

    /* How It Works steps */
    .howitworks-step { padding-top: 44px !important; padding-bottom: 44px !important; }
    .step-number { font-size: 56px !important; }

    /* Testimonial cards: remove fixed height to avoid clipping */
    .h-\[620px\] { height: auto !important; min-height: 460px !important; }

    /* Benefit chips: slightly smaller on phone */
    .benefit-chip { font-size: 12px !important; padding-left: 14px !important; padding-right: 14px !important; }

    /* Mission detail panel: stack image below text on small screens */
    #benefit-detail-panel { gap: 20px !important; }

    /* Stats section dividers (md:divide-x won't apply on mobile, add top borders instead) */
    .md\:px-16 { padding-top: 32px !important; border-top: 1px solid rgba(0,0,0,0.08) !important; }
    .md\:pl-16 { padding-top: 32px !important; border-top: 1px solid rgba(0,0,0,0.08) !important; }

    /* CTA / button spacing in hero */
    .hero-text .flex.flex-wrap { gap: 12px !important; }

    /* Nav height */
    #main-nav .h-20 { height: 64px !important; }

    /* Page-margin spacing on mobile already handled via px-4 Tailwind class */
}

/* Extra-small phones */
@media (max-width: 479px) {
    .text-headline-xl { font-size: 28px !important; }
    .text-headline-lg { font-size: 22px !important; }
    .text-\[88px\], .text-\[104px\] { font-size: 42px !important; }
    .text-\[36px\] { font-size: 22px !important; }

    /* Smaller buttons on very small screens */
    .btn-premium-black, .btn-premium-white {
        font-size: 14px !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }
}
