/* ============================================
   Velvetz – Institutional Narrative
   Category-Defining Aesthetic
   ============================================ */

/* --- Design Tokens --- */
:root {
    --bg: #0A0A0B;
    /* Matte Black */
    --surface: #121214;
    /* Deep Charcoal */
    --text: #EAEAEA;
    /* Soft White */
    --text-muted: #7A7A7A;
    --gold: #BFA14A;
    /* Muted Gold */
    --gold-hover: #D4B65B;

    --font-main: 'Inter', system-ui, -apple-system, sans-serif;

    --spacing-section: 10rem;
    --spacing-block: 4rem;
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 800px;
    /* Narrative focus */
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* --- Typography --- */
h1,
h2,
h3 {
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

p {
    font-weight: 400;
    color: var(--text);
}

.text-muted {
    color: var(--text-muted);
}

.gold-accent {
    color: var(--gold);
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transition: opacity 2s ease;
}

.fade-in.visible {
    opacity: 1;
}

/* --- Global Nav --- */
.nav {
    padding: 2rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    background: #0A0A0B;
    /* Exact match to body for 'floating' effect */
    /* Removed backdrop-filter to ensure seamless color match */
    z-index: 100;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Brand Logo - Seamless Integration */
.brand-logo {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.brand-logo img {
    height: 40px;
    /* Optimal header height */
    width: auto;
    display: block;
    mix-blend-mode: normal;
    /* Ensure purity */
}

/* Nav Actions - Consistent */
.btn-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    padding: 0.5rem 1rem;
    position: relative;
}

/* Hover underline effect */
.btn-text::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 4px;
    /* Slightly up */
    left: 1rem;
    background-color: var(--gold);
    transition: width 0.3s ease;
}

.btn-text:hover::after {
    width: calc(100% - 2rem);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    border-radius: 4px;
    /* Slightly squarer for institutional feel */
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
    transition: opacity 0.5s ease, color 0.5s ease, border-color 0.5s ease;
    /* Slower, smoother */
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
    border: 1px solid var(--text);
}

.btn-primary:hover {
    background: var(--text);
    /* No flip */
    color: var(--bg);
    opacity: 0.8;
    /* Subtle fade only */
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 1rem;
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.1);
    /* No border flash */
    color: var(--text);
    /* Subtle text brighten */
    opacity: 0.8;
}

/* --- Video Background Layers --- */

/* Video Container Base */
.video-bg-hero,
.video-bg-depth {
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    /* No interaction */
}

.video-bg-hero video,
.video-bg-depth video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video A: Hero Environment */
.video-bg-hero {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: 0;
    /* JS will fade this in */
    transition: opacity 1.5s ease-out;
}

.video-bg-hero video {
    filter: none;
    /* Full 4K Sharpness */
    opacity: 0.3;
    /* Adjusted for visibility without blur */
}

/* Gradient Overlay for Hero (Top -> Transparent, Bottom -> BG) */
.video-bg-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(10, 10, 11, 0.4) 0%,
            rgba(10, 10, 11, 0) 50%,
            #0A0A0B 100%);
    z-index: 1;
}

/* Video B: Infrastructure Depth (Global) */
.video-bg-depth {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
    /* Behind everything */
    opacity: 0;
    /* JS will fade this in */
    transition: opacity 2s ease-out;
}

.video-bg-depth video {
    opacity: 0.18;
    /* Slightly more visible */
    filter: brightness(0.8) contrast(1.1) saturate(0.9);
    /* Less aggressive filtering */
}

/* Vignette Overlay for Depth */
.video-bg-depth::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center,
            transparent 0%,
            rgba(10, 10, 11, 0.8) 100%);
    z-index: 1;
}

/* Mobile Fallback */
@media (max-width: 768px) {

    .video-bg-hero,
    .video-bg-depth {
        display: none;
        /* Disable on mobile for performance */
    }
}

/* --- SECTIONS --- */

/* 1. Hero (Refined for Decision Clarity) */
.hero-category {
    padding: 18rem 0 12rem;
    /* Significantly increased top whitespace */
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 6rem;
    align-items: center;
}

.hero-text {
    text-align: left;
    max-width: 640px;
}

/* Staggered Motion Classes */
.hero-headline,
.hero-sub,
.hero-proof,
.cta-group-minimal,
.hero-trust {
    opacity: 0;
    animation: simpleFadeIn 0.6s ease-out forwards;
    /* Standardized Calm Duration */
}

@keyframes simpleFadeIn {
    to {
        opacity: 1;
    }
}

.hero-headline {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
    max-width: 560px;
    /* Constrained for psychological focus */
    animation-delay: 0.2s;
    /* Slight initial pause */
}

/* Supporting Pair */
.hero-sub {
    font-size: 1.25rem;
    color: var(--text);
    /* Brighter for clarity */
    margin-bottom: 0.5rem;
    max-width: 540px;
    line-height: 1.5;
    animation-delay: 0.5s;
}

.hero-proof {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 500;
    animation-delay: 0.5s;
    /* Grouped with sub */
}

.cta-group-minimal {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation-delay: 0.8s;
}

.hero-trust {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    animation-delay: 1s;
}

/* Phone Frame - Reduced Dominance */
.hero-visual {
    display: flex;
    justify-content: flex-end;
    /* Align right */
    position: relative;
}

/* Phone Frame - Full Visibility Priority */
.iphone-frame-minimal {
    width: 280px;
    /* ~12% reduction from 320px */
    border-radius: 46px;
    /* Adjusted radius */
    border: 4px solid #1a1a1c;
    overflow: hidden;
    background: #000;
    box-shadow:
        0 0 0 1px #333,
        0 40px 80px -20px rgba(0, 0, 0, 0.6);
    /* Softer shadow */
    position: relative;
    aspect-ratio: 9/16;
    z-index: 10;
    padding: 0;
}

/* Dynamic Island / Notch Simulation */
.iphone-frame-minimal::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 84px;
    /* Scaled down */
    height: 24px;
    background: #000;
    border-radius: 20px;
    z-index: 20;
    pointer-events: none;
}

.phone-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 42px;
    background: #000;
    filter: none;
    /* Full 4K Sharpness */
}

/* --- Product Document Layout (Stripe/Apple Style) --- */

/* Scroll Gravity Rules - Calm Effect */
.doc-section {
    padding: 180px 0;
    /* Increased by 20% for calm rhythm */
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    opacity: 0;
    /* Removed transform: translateY for pure opacity fade */
    transition: opacity 0.6s ease-out;
    /* Slower, calmer fade */
}

/* Revealed State */
.doc-section.visible {
    opacity: 1;
}

/* Document Content Container */
.doc-content {
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
    width: 100%;
}

/* 1. Eyebrow Label */
.eyebrow {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #C0A062;
    /* Slightly muted/matte gold */
    margin-bottom: 2rem;
    /* More breathing room */
    font-weight: 600;
}

/* 2. Headline */
.doc-headline {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 24px;
    /* Increased */
    color: var(--text);
    letter-spacing: -0.02em;
}

/* 3. Supporting Line */
.doc-supporting {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #888;
    /* Softer mute */
    margin-bottom: 32px;
    /* Increased */
}

/* 4. Minimal Content Body */
.doc-body {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 2rem;
}

/* 5. Closure Line */
.section-closure {
    font-size: 0.85rem;
    color: #555;
    margin-top: 5rem;
    /* More space before closure */
    font-weight: 500;
    letter-spacing: 0.02em;
    text-align: left;
    border-top: 1px solid #1a1a1c;
    padding-top: 2rem;
    display: inline-block;
    width: 100%;
}

/* Specific Component Overrides for Doc Layout */

/* Model Split (Fits in 640px) */
.model-split-doc {
    display: flex;
    gap: 4rem;
    margin-bottom: 2rem;
    align-items: baseline;
}

.split-item h3 {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: #EAEAEA;
    /* Ensure text dominates, remove bright gold here if needed */
}

.split-item .gold-accent {
    color: #C0A062;
    /* Matte Gold check */
}

/* Infra Grid (Fits in 640px) */
.infra-grid-doc {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    /* Tighter gap */
    margin-bottom: 2rem;
}

.infra-item-doc {
    font-size: 1rem;
    color: #7A7A7A;
    padding: 1rem 0;
    /* Slightly more padding */
    border-bottom: 1px solid #1a1a1c;
    transition: color 0.4s ease;
    /* Slow transition */
}

.infra-item-doc:hover {
    color: var(--text);
    /* Subtle text brighten only */
}

/* Command List */
.command-list-doc {
    list-style: none;
    margin-bottom: 2rem;
}

.command-list-doc li {
    font-size: 1.1rem;
    padding: 1.25rem 0;
    /* More padding */
    border-bottom: 1px solid #1a1a1c;
    color: var(--text);
}

/* Footer Links */
.footer-links-doc {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    /* More space */
    margin-bottom: 2rem;
}

.footer-links-doc a {
    font-size: 0.9rem;
    color: #555;
    transition: color 0.4s ease;
}

.footer-links-doc a:hover {
    color: #888;
    /* Very subtle hover */
}

/* Final Close */
.close-block .doc-headline {
    font-size: 2.5rem;
}

/* --- Invisible CTA System (Refined) --- */
.invisible-cta-block {
    margin-top: 64px;
    /* Increased */
    margin-bottom: 80px;
    /* Increased */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 10;
}

.cta-pre-text {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 2rem;
    font-weight: 500;
    opacity: 0.8;
}

.cta-post-text {
    font-size: 0.8rem;
    color: #444;
    margin-top: 2rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Button Override for Invisible System */
.invisible-cta-block .btn-primary {
    transition: opacity 0.4s ease;
    /* Slower */
    transform: none !important;
    box-shadow: none !important;
    background: #EAEAEA;
    color: #000;
    border: none;
}

.invisible-cta-block .btn-primary:hover {
    opacity: 0.7;
    /* Only opacity change */
    transform: none !important;
    background: #EAEAEA;
    color: #000;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .doc-section {
        padding: 120px 0;
        /* Scaled down but generous vertical rhythm */
    }

    .doc-headline {
        font-size: 2.25rem;
    }

    .model-split-doc {
        flex-direction: column;
        gap: 4rem;
        /* Consistent wide gap */
    }

    .footer-links-doc {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Restoration of Hero Stacking */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
        /* "Billion-dollar" clarity gap */
    }

    .hero-visual {
        justify-content: center;
        margin-top: 4rem;
        /* Clear separation from text */
    }

    .cta-group-minimal {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .btn-secondary,
    .btn-primary {
        width: 100%;
        margin-left: 0;
    }

    /* IA Sections */
    .model-split {
        flex-direction: column;
        gap: 3rem;
    }

    .infra-grid-minimal {
        grid-template-columns: 1fr;
        gap: 4rem;
        /* Consistent wide gap */
    }

    .footer-links-minimal {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* 2. The Shift */
.narrative-block {
    padding: var(--spacing-section) 0;
}

.narrative-large {
    font-size: 2.5rem;
    line-height: 1.3;
}

/* 3. Founder Narrative */
.manifesto-block {
    padding: var(--spacing-section) 0;
}

.manifesto-text {
    font-size: 1.5rem;
    border-left: 2px solid var(--surface);
    /* Minimal structure */
    padding-left: 2rem;
}

.manifesto-text p {
    margin-bottom: 1.5rem;
}

/* 4. Product Myth */
.myth-block {
    padding: var(--spacing-section) 0;
    text-align: center;
}

.myth-statement {
    font-size: 2rem;
    color: var(--text);
}

/* 5. Infra Grid */
.infra-block {
    padding: var(--spacing-section) 0;
}

.infra-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.infra-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--gold);
}

.infra-item p {
    font-size: 1rem;
    color: var(--text-muted);
}

/* 6. Close */
.close-block {
    padding: var(--spacing-section) 0;
    text-align: center;
    padding-bottom: 15rem;
    /* Extra space at bottom */
}

.close-statement {
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

/* Footer */
.footer {
    padding: 4rem 0;
    border-top: 1px solid var(--surface);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
}

.footer-links a {
    margin-left: 2rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--text);
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    /* Hero Stacking */
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        /* Center text on mobile */
        gap: 3rem;
    }

    .hero-text {
        text-align: center;
        order: 1;
        /* Ensure text is first */
    }

    .hero-visual {
        order: 2;
        /* Phone below text */
        margin-top: 2rem;
    }

    .hero-headline {
        font-size: 2.5rem;
    }

    .hero-sub {
        font-size: 1.1rem;
        margin-left: auto;
        margin-right: auto;
        /* Center subhead */
    }

    /* Narrative Typography */
    .narrative-large {
        font-size: 1.8rem;
    }

    .manifesto-text {
        font-size: 1.25rem;
    }

    .myth-statement {
        font-size: 1.5rem;
    }

    .close-statement {
        font-size: 1.8rem;
    }

    .infra-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cta-group-minimal {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        /* Center buttons */
    }

    .btn-secondary {
        margin-left: 0;
        width: 100%;
        /* Full width buttons on mobile */
    }

    .btn-primary {
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-links a {
        margin: 0 1rem;
    }
}