/* ==========================================================================
   #BASE STYLES
   ========================================================================== */

:root {
    --header-height: 10vh;
    --snap-offset: calc(var(--header-height));
    --peek-next: 10vh;
    /* Increased to ensure section heading + padding visibility */
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    scroll-padding-top: 0;
    scroll-padding-bottom: var(--peek-next);
    /* Add bottom padding for peek effect */
    font-size: 90%;
}

/* Disable snap-scroll on mobile and small screens */
@media (max-width: 768px) {
    html {
        scroll-snap-type: none;
    }
}

.landing-root {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ==========================================================================
   #HEADER STYLES
   ========================================================================== */

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

.landing-header .logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.landing-header .logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.landing-header .brand-text h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.landing-header .brand-text p {
    font-size: 0.875rem;
    color: #666666;
}

.landing-header .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.landing-header .header-link {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.landing-header .header-link:hover {
    color: #111827;
}

.header-separator {
    width: 1.5px;
    height: 24px;
    background-color: #d1d5db;
    margin: 0 0.5rem;
}

/* Main content padding to account for fixed header */
.landing-root main {
    padding-top: var(--header-height);
}

/* ==========================================================================
   #HERO SECTION
   ========================================================================== */

.hero {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    text-align: center;
    justify-content: center;
    align-items: center;
    flex: 1;
    max-width: 1200px;
    position: relative;
    width: 90%;
    padding: 1.5rem 0;
}

.formula-section {
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    padding: 2rem 5%;
    position: relative;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

.hero h2 {
    font-size: 4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: inherit;
    letter-spacing: -0.03em;
    line-height: 1.25;
    word-spacing: 0.1em;
    animation: fadeInUp 0.8s ease-out;
}

.hero-timing {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: inherit;
    font-weight: 700;
    white-space: nowrap;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    animation: gentlePulse 2s ease-in-out infinite;
}

.hero-timing.hero-timing--pending {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #4b5563;
    font-weight: 500;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ==========================================================================
   #COMMON COMPONENTS
   ========================================================================== */

/* Buttons */
.btn-primary {
    background: #1a1a1a;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    border: 1px solid transparent;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: #2d2d2d;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    border: 1px solid #d1d5db;
    color: #1a1a1a;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.btn-secondary:hover {
    border-color: #9ca3af;
    color: #111827;
    transform: translateY(-1px);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin: 0 0 2rem 0;
    padding: 2rem 1rem 0.5rem;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: inherit;
    line-height: 1.3;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.02em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.section-eyebrow {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #4b5563;
    margin-top: -0.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Section separator */
.section-separator {
    content: '';
    display: block;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #9ca3af, #6b7280, #9ca3af, transparent);
    margin: 3rem auto 0;
    box-shadow: 0 1px 3px rgba(156, 163, 175, 0.2);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


.waitlist-form-controls {
    flex-direction: column;
}

.waitlist-form .btn-primary {
    width: 100%;
}

/* ==========================================================================
   #FORMULA EQUATION SECTION
   ========================================================================== */



.formula-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #9ca3af, #6b7280, #9ca3af, transparent);
    box-shadow: 0 1px 3px rgba(156, 163, 175, 0.2);
}

.formula-equation {
    display: flex;
    align-items: stretch;
    /* Vertically center everything */
    justify-content: center;
    gap: 0.5rem;
    /* Tighter gap */
    max-width: 1400px;
    /* Increased max-width to prevent wrapping */
    width: 100%;
    flex-wrap: nowrap;
    box-sizing: border-box;
}

.formula-component {
    flex: 1 1 0px;
    min-width: 240px;
    /* Reduced min-width */
    max-width: 300px;
    /* Reduced max-width to remove whitespace */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    /* Increased gap for more spacing */
    padding: 2rem 1.5rem;
    /* Increased vertical padding */
    border-radius: 12px;
    /* Slightly smaller radius */
    border: 0.5px solid #f3f4f6;
    /* Very light visible boundary */
    transition: all 0.2s ease;
}

.formula-component:hover {
    background-color: #f9fafb;
    /* Very subtle hover state */
    transform: translateY(-2px);
}

.formula-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* Increased gap */
    margin-bottom: 0.5rem;
    /* More space below header */
}

.formula-icon {
    font-size: 2rem;
    /* Larger icon */
    line-height: 1;
}

.formula-header h3 {
    font-size: 1.25rem;
    /* Larger header */
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.formula-body h4 {
    font-size: 1rem;
    /* Larger subheader */
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.35rem 0;
}

.formula-body p {
    font-size: 0.875rem;
    /* Larger description */
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

.formula-operator {
    font-size: 4rem;
    /* Smaller operator */
    font-weight: 100;
    /* Slightly bolder than 200 for visibility */
    color: #111827;
    /* Darker color for better visibility */
    line-height: 1;
    user-select: none;
    margin: 0 3rem;
    /* Tighter margin */
    align-self: center;
}

/* ==========================================================================
   #PROCESS SECTION
   ========================================================================== */

.process-section {
    background: #ffffff;
    padding: 4rem 5%;
}

.process-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.process-column {
    padding: 2rem;
}

.process-column h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: left;
    color: inherit;
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ==========================================================================
   #CALL TO ACTION
   ========================================================================== */

.cta-section {
    text-align: center;
    padding: 4rem 5%;
    position: relative;
    margin: 2rem 0 0;
}

.cta-section .btn-primary {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
}

/* ==========================================================================
   #FOOTER
   ========================================================================== */

.landing-footer {
    background: #1a1a1a;
    color: #ffffff;
    padding: 2rem 5%;
    text-align: center;
}

.footer-actions {
    margin-bottom: 0.75rem;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    line-height: 1;
    color: inherit;
    font-size: 1.5rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.social-links a:hover {
    opacity: 0.7;
}

.footer-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.footer-link:hover {
    color: #d1d5db;
    text-decoration: underline;
}

.social-links .social-label {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #d1d5db;
}

/* ==========================================================================
   #RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 992px) {
    .process-grid {
        grid-template-columns: 1fr;
    }
}

/* Larger intermediate screens - maintain horizontal layout */
@media (min-width: 768px) and (max-width: 991px) {
    .formula-section {
        padding: 2.5rem 4%;
    }

    .formula-equation {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        flex-wrap: nowrap;
    }

    .formula-component {
        flex: 1;
        min-width: 0;
        max-width: 280px;
        padding: 1.75rem 1.25rem;
    }

    .formula-icon {
        font-size: 1.75rem;
    }

    .formula-header {
        gap: 0.65rem;
        margin-bottom: 0.45rem;
    }

    .formula-header h3 {
        font-size: 1.15rem;
    }

    .formula-body h4 {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .formula-body p {
        font-size: 0.8rem;
    }

    .formula-operator {
        font-size: 3rem;
        margin: 0 1.5rem;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {

    /* Header - Keep on one line */
    .landing-header {
        padding: 1rem 3%;
        gap: 0.5rem;
    }

    .landing-header .logo {
        width: 36px;
        height: 36px;
        font-size: 18px;
        border-radius: 8px;
    }

    .landing-header .brand-text h1 {
        font-size: 1.1rem;
    }

    .landing-header .brand-text p {
        font-size: 0.7rem;
    }

    .landing-header .header-actions {
        gap: 0.5rem;
    }

    .landing-header .header-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    .header-separator {
        height: 20px;
        margin: 0 0.25rem;
    }

    .landing-header .btn-primary {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    /* Hero */
    .hero h2 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* Formula Section */
    .formula-section {
        min-height: auto;
        padding: 2rem 4%;
        overflow-x: hidden;
    }

    /* Formula Equation - Keep horizontal on mobile */
    .formula-equation {
        flex-direction: row;
        align-items: center;
        justify-content: space-evenly;
        gap: 0.25rem;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
    }

    .formula-operator {
        font-size: 1.5rem;
        margin: 0;
        flex-shrink: 0;
    }

    .formula-component {
        flex: 1;
        min-width: 0;
        max-width: none;
        padding: 1rem 0.5rem;
        flex-shrink: 1;
        box-sizing: border-box;
    }

    .formula-icon {
        font-size: 1.25rem;
    }

    .formula-header {
        gap: 0.4rem;
        margin-bottom: 0.25rem;
    }

    .formula-header h3 {
        font-size: 0.9rem;
    }

    .formula-body h4 {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .formula-body p {
        font-size: 0.65rem;
    }

    /* Process */
    .process-column {
        padding: 1.5rem;
    }

    .process-column h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Section Titles */
    .section-title {
        font-size: 3rem;
    }
}

@media (max-width: 640px) {
    .section-title {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 3rem;
    }
}

/* Intermediate screens - maintain horizontal layout */
@media (min-width: 481px) and (max-width: 767px) {
    .formula-section {
        padding: 2rem 3%;
    }

    .formula-equation {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        flex-wrap: nowrap;
    }

    .formula-component {
        flex: 1;
        min-width: 0;
        max-width: none;
        padding: 1.25rem 0.75rem;
    }

    .formula-icon {
        font-size: 1.5rem;
    }

    .formula-header {
        gap: 0.5rem;
        margin-bottom: 0.35rem;
    }

    .formula-header h3 {
        font-size: 1rem;
    }

    .formula-body h4 {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .formula-body p {
        font-size: 0.7rem;
    }

    .formula-operator {
        font-size: 2rem;
        margin: 0 0.5rem;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    /* Header - Extra compact */
    .landing-header {
        padding: 0.75rem 2.5%;
    }

    .landing-header .logo {
        width: 32px;
        height: 32px;
        font-size: 16px;
        border-radius: 6px;
    }

    .landing-header .logo-section {
        gap: 0.6rem;
    }

    .landing-header .brand-text h1 {
        font-size: 1rem;
    }

    .landing-header .brand-text p {
        font-size: 0.65rem;
    }

    .landing-header .header-actions {
        gap: 0.4rem;
    }

    .landing-header .header-link {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
    }

    .header-separator {
        height: 18px;
        margin: 0 0.2rem;
    }

    .landing-header .btn-primary {
        font-size: 0.8rem;
        padding: 0.45rem 0.85rem;
        border-radius: 8px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    /* Formula Section - Extra Small Screens */
    .formula-section {
        padding: 1.5rem 3%;
    }

    .formula-component {
        flex: 1;
        min-width: 0;
        padding: 0.75rem 0.4rem;
    }

    .formula-icon {
        font-size: 1rem;
    }

    .formula-header {
        gap: 0.3rem;
        margin-bottom: 0.2rem;
    }

    .formula-header h3 {
        font-size: 0.8rem;
    }

    .formula-body h4 {
        font-size: 0.65rem;
        line-height: 1.2;
    }

    .formula-body p {
        font-size: 0.55rem;
    }

    .formula-operator {
        font-size: 1.25rem;
        margin: 0;
    }

    .formula-equation {
        gap: 0.2rem;
        justify-content: space-evenly;
    }
}

/* ==========================================================================
   #ANIMATIONS
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentlePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ==========================================================================
   #UTILITY CLASSES
   ========================================================================== */

.hidden {
    display: none !important;
}

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

.snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin-top:0;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 80vh;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    /* Extra bottom padding to ensure next heading visible */
}

/* Wrapper for comparison table to avoid full-screen height forcing */
.comparison-wrapper {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin-top: var(--snap-offset);
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: auto;
    height: auto;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Allow comparison section to fit content height */
.snap-section.comparison-wrapper {
    min-height: auto !important;
    height: auto !important;
    padding-bottom: 0;
}

.landing-root main section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin-top: var(--snap-offset);
}

@media (max-width: 1100px) {
    :root {
        --header-height: 96px;
        --peek-next: 110px;
        /* Adjusted for medium screens */
    }

    .hero {
        padding: 1.5rem 5% 1rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 132px;
        --peek-next: 100px;
        /* Adjusted for tablet screens */
    }

    .hero {
        padding: 1rem 6% 0.75rem;
    }

    /* Disable snap-align on sections for smooth scrolling */
    .snap-section {
        scroll-snap-align: none;
        scroll-snap-stop: normal;
    }

    .landing-root main section {
        scroll-snap-align: none;
        scroll-snap-stop: normal;
    }
}

@media (max-width: 520px) {
    :root {
        --header-height: 148px;
        --peek-next: 90px;
        /* Adjusted for mobile screens */
    }

    .hero {
        padding: 0.75rem 6% 0.5rem;
    }
}
