/* ==========================================================================
   UNIFIED HERO SYSTEM (Slake Design Canonical System Primitive)
   Reference Point: Homepage Hero (.hero-new) in index.html
   Enforces absolute pixel-accurate starting Y-coordinates, X-container boundaries,
   typography scales, vertical rhythm, and right-panel card geometry across all pages.
   Zero wasted above-the-fold real estate system.
   ========================================================================== */

global-header { display: block !important; min-height: 80px !important; }

/* ─── 1. Canvas Boundary & Y-Coordinate System (Tight Above-the-Fold Padding) */
.hero-new,
.page-hero,
.hero-terminal,
.services-hero-section,
.about-hero,
.agent-hero,
.start-hero,
.mvp-hero,
.repository-header {
    background-color: var(--slake-bg) !important;
    padding: calc(80px + 0.5rem) 0 2.5rem !important; /* Tight 88px top padding: 80px header + 8px gap */
    position: relative !important;
    overflow: hidden !important;
    color: var(--slake-text) !important;
    border-bottom: 1px solid var(--slake-border) !important;
    margin: 0 !important;
    min-height: auto !important;
}

/* Fine grid texture mask */
.hero-new::after,
.page-hero::after,
.hero-terminal::after,
.services-hero-section::after,
.about-hero::after,
.agent-hero::after,
.start-hero::after,
.mvp-hero::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background-image:
        linear-gradient(var(--slake-grid) 1px, transparent 1px),
        linear-gradient(to right, var(--slake-grid) 1px, transparent 1px) !important;
    background-size: 52px 52px !important;
    mask-image: radial-gradient(ellipse 90% 90% at 50% 0%, black 30%, transparent 100%) !important;
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 0%, black 30%, transparent 100%) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

/* Edge vignette */
.hero-new::before,
.page-hero::before,
.hero-terminal::before,
.services-hero-section::before,
.about-hero::before,
.agent-hero::before,
.start-hero::before,
.mvp-hero::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: radial-gradient(ellipse 120% 80% at 50% 50%,
        transparent 40%,
        rgba(var(--slake-bg-rgb), 0.65) 100%) !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

/* Interactive Spotlight Layer */
.hero-spotlight {
    position: absolute !important;
    inset: 0 !important;
    background: radial-gradient(
        circle 350px at var(--mouse-x, -999px) var(--mouse-y, -999px),
        var(--slake-spotlight, rgba(46, 91, 255, 0.12)) 0%,
        transparent 80%
    ) !important;
    pointer-events: none !important;
    z-index: 1 !important;
    opacity: 0 !important;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.hero-new:hover .hero-spotlight,
.page-hero:hover .hero-spotlight {
    opacity: 1 !important;
}

/* ─── 2. Container Geometry & Alignment */
.hero-container,
.page-hero__shell {
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding: 0 1.5rem !important;
    position: relative !important;
    z-index: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: clamp(1.5rem, 3vw, 3rem) !important;
    box-sizing: border-box !important;
}

@media (min-width: 900px) {
    .hero-container,
    .page-hero__shell {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 3.5rem !important;
        align-items: center !important;
    }

    .hero-container.centered,
    .page-hero__shell.centered {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        max-width: 780px !important;
    }
}

/* ─── 3. Left Column Copy & Typography Scale */
.hero-text,
.page-hero__copy {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    max-width: 640px !important;
    padding-bottom: 0 !important;
}

.centered .hero-text,
.centered .page-hero__copy {
    align-items: center !important;
    max-width: 760px !important;
}

.hero-eyebrow,
.page-hero__eyebrow {
    display: inline-block !important;
    font-family: 'DM Mono', monospace !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    color: var(--slake-text) !important;
    margin-bottom: 1rem !important;
    opacity: 1 !important;
}

.hero-title,
.page-hero h1 {
    font-family: 'Inter', sans-serif !important;
    font-size: clamp(2.1rem, 4.2vw, 3.25rem) !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    color: var(--slake-text) !important;
    letter-spacing: -0.02em !important;
    margin: 0 0 1rem 0 !important;
}

.hero-subtitle,
.page-hero__lede {
    font-family: 'Inter', sans-serif !important;
    font-size: 1.1rem !important;
    color: var(--slake-subtext) !important;
    line-height: 1.7 !important;
    max-width: 58ch !important;
    margin: 0 0 1.25rem 0 !important;
    font-weight: 400 !important;
}

/* ─── 4. Trust Strip / Proof Line */
.hero-proof-line,
.page-hero__trust {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem 1.25rem !important;
    margin: 0.25rem 0 1rem !important;
    padding-top: 0.65rem !important;
    border-top: 1px solid rgba(203, 213, 225, 0.15) !important;
    color: var(--slake-subtext) !important;
    font-family: 'DM Mono', monospace !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

.hero-proof-line span::before,
.page-hero__trust span::before {
    content: '✓ ' !important;
    color: var(--slake-blue) !important;
    margin-right: 0.25rem !important;
}

/* ─── 5. CTA Group & Buttons */
.hero-cta-group,
.page-hero__actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.85rem !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
}

.hero-primary-cta,
.page-hero__actions .btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    background: var(--slake-blue) !important;
    color: #FFFFFF !important;
    font-family: 'DM Mono', monospace !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    padding: 0.95rem 1.5rem !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 20px rgba(46, 91, 255, 0.3) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.hero-primary-cta:hover,
.page-hero__actions .btn-primary:hover {
    background: #1D4ED8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(46, 91, 255, 0.45) !important;
}

.hero-secondary-cta,
.page-hero__actions .btn-secondary,
.page-hero__actions .btn-ghost {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    background: transparent !important;
    color: var(--slake-text) !important;
    border: 1px solid var(--slake-border) !important;
    font-family: 'DM Mono', monospace !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    padding: 0.95rem 1.5rem !important;
    border-radius: 0 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.hero-secondary-cta:hover,
.page-hero__actions .btn-secondary:hover,
.page-hero__actions .btn-ghost:hover {
    border-color: var(--slake-blue) !important;
    color: var(--slake-blue) !important;
    transform: translateY(-2px) !important;
}

.hero-cta-note {
    font-family: 'DM Mono', monospace !important;
    font-size: 0.75rem !important;
    color: var(--slake-subtext) !important;
    margin-top: 0.35rem !important;
}

/* ─── 6. Right Column Glass Proof Panel */
.hero-proof-panel,
.hero-form-card,
.page-hero__proof-card {
    background: var(--slake-panel) !important;
    border: 1px solid var(--slake-border) !important;
    border-radius: 0 !important;
    padding: 1.75rem 1.5rem !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45) !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
}

.hero-proof-kicker {
    font-family: 'DM Mono', monospace !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    color: var(--slake-blue) !important;
    margin-bottom: 0.6rem !important;
}

.hero-proof-panel h2,
.hero-proof-panel h3,
.page-hero__proof-card h2 {
    font-family: 'Inter', sans-serif !important;
    font-size: 1.35rem !important;
    font-weight: 900 !important;
    color: var(--slake-text) !important;
    line-height: 1.25 !important;
    margin: 0 0 0.6rem 0 !important;
    letter-spacing: -0.015em !important;
}

.hero-proof-intro,
.page-hero__proof-card p {
    font-size: 1.08rem !important;
    color: var(--slake-subtext) !important;
    line-height: 1.65 !important;
    margin-bottom: 1.1rem !important;
}

.hero-proof-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    margin-bottom: 1.1rem !important;
}

.hero-proof-tags span {
    font-family: 'DM Mono', monospace !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: var(--slake-text) !important;
    background: var(--slake-card) !important;
    border: 1px solid var(--slake-border) !important;
    padding: 0.35rem 0.7rem !important;
    border-radius: 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

.hero-proof-footer {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-family: 'DM Mono', monospace !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: var(--slake-blue) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    text-decoration: none !important;
    transition: gap 0.2s ease, color 0.2s ease !important;
    margin-top: auto !important;
}

.hero-proof-footer:hover {
    gap: 0.75rem !important;
    color: #60A5FA !important;
}

/* Light mode overrides */
.light-mode .hero-new,
.light-mode .page-hero {
    background-color: #FFFFFF !important;
}

.light-mode .hero-proof-panel,
.light-mode .hero-form-card,
.light-mode .page-hero__proof-card {
    background: #FFFFFF !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06) !important;
}

.light-mode .hero-secondary-cta,
.light-mode .page-hero__actions .btn-secondary {
    border-color: rgba(15, 23, 42, 0.2) !important;
    color: #0F172A !important;
}

.light-mode .hero-proof-line,
.light-mode .page-hero__trust {
    color: #475569 !important;
    border-top-color: rgba(15, 23, 42, 0.12) !important;
}

/* Responsive adjustments (Tight zero-waste mobile layout) */
@media (max-width: 899px) {
    .hero-new,
    .page-hero,
    .hero-terminal,
    .services-hero-section,
    .about-hero,
    .agent-hero,
    .start-hero,
    .mvp-hero,
    .repository-header {
        padding: calc(56px + 0.5rem) 1rem 1.5rem !important; /* Tight 64px top padding: 56px header + 8px gap */
    }

    .hero-container,
    .page-hero__shell {
        gap: 1.5rem !important;
        padding: 0 0.75rem !important;
    }

    .hero-eyebrow,
    .page-hero__eyebrow {
        margin-bottom: 0.65rem !important;
    }

    .hero-title,
    .page-hero h1 {
        max-width: 14ch !important;
        font-size: clamp(2rem, 8.5vw, 2.75rem) !important;
        line-height: 1.15 !important;
        margin-bottom: 0.85rem !important;
    }

    .hero-subtitle,
    .page-hero__lede {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }

    .hero-proof-line,
    .page-hero__trust {
        margin: 0.25rem 0 1rem !important;
        padding-top: 0.5rem !important;
        gap: 0.35rem 0.85rem !important;
        font-size: 0.7rem !important;
    }

    .hero-cta-group,
    .page-hero__actions {
        align-items: stretch !important;
        flex-direction: column !important;
        gap: 0.6rem !important;
        margin-bottom: 0.35rem !important;
    }

    .hero-primary-cta,
    .hero-secondary-cta,
    .page-hero__actions .btn-primary,
    .page-hero__actions .btn-secondary,
    .page-hero__actions .btn-ghost {
        width: 100% !important;
        padding: 0.85rem 1.25rem !important;
        font-size: 0.75rem !important;
        text-align: center !important;
    }

    .hero-proof-panel,
    .page-hero__proof-card {
        max-width: none !important;
        padding: 1.35rem 1.15rem !important;
    }
}

/* ─── 11. Intake Hero Canvas Height (Full Above-the-Fold Viewport Clearance) */
#start-hero {
    min-height: calc(100vh - 80px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}
#start-hero .hero-container {
    width: 100% !important;
}
