/* ==========================================================================
   RockDome Defense - Design System & Main Styles
   ========================================================================== */

/* 1. VARIABLES & TOKENS
   ========================================================================== */
:root {
    /* Colors */
    --bg-color: #050505;
    --surface-color: #121212;
    --accent-amber: #FF4800;
    --text-primary: #ECECEC;
    --text-secondary: #888888;
    --text-strong: #fff;
    --surface-color-alt: #111;
    --surface-color-hover: #181818;
    --grid-line: rgba(255, 255, 255, 0.08);
    --alpha-white-20: rgba(255, 255, 255, 0.2);
    --alpha-white-10: rgba(255, 255, 255, 0.1);
    --alpha-white-05: rgba(255, 255, 255, 0.05);
    --alpha-white-03: rgba(255, 255, 255, 0.03);
    --alpha-white-02: rgba(255, 255, 255, 0.02);
    --alpha-amber-50: rgba(255, 72, 0, 0.5);
    --alpha-amber-40: rgba(255, 72, 0, 0.4);
    --alpha-amber-30: rgba(255, 72, 0, 0.3);
    --alpha-amber-10: rgba(255, 72, 0, 0.1);
    --alpha-amber-05: rgba(255, 72, 0, 0.05);
    --alpha-amber-03: rgba(255, 72, 0, 0.03);
    --overlay-dark-80: rgba(0, 0, 0, 0.8);
    --overlay-dark-50: rgba(0, 0, 0, 0.5);
    --shadow-deep: 0 20px 40px rgba(0, 0, 0, 0.4);

    /* Typography */
    --font-display: 'Manrope', sans-serif;
    --font-tech: 'Space Mono', monospace;

    /* Sizing & Spacing */
    --nav-padding: clamp(1rem, 3vw, 2rem);
    --container-padding: 5vw;
}

/* 2. RESET & BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: none;
    /* Custom cursor override */
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-display);
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

body.page-home {
    container-type: inline-size;
}

/* 3. TYPOGRAPHY
   ========================================================================== */
h1,
h2,
h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

p {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
}

.tech-text {
    font-family: var(--font-tech);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--accent-amber);
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;

    @media (max-width: 768px) {
        margin-bottom: 0.5rem;
    }
}

/* Glitch/Hover Text Effect */
.tactical-reveal {
    position: relative;
    display: inline-block;
    color: var(--text-strong);
    transition: color 0.4s ease, letter-spacing 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;

    &:hover {
        color: var(--accent-amber);
        letter-spacing: 0.05em;
        text-shadow: 0 0 15px var(--alpha-amber-40);

        &::before {
            left: 150%;
            transition: left 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        }
    }

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 50%;
        height: 100%;
        background: linear-gradient(90deg,
                transparent,
                var(--alpha-amber-10),
                var(--alpha-amber-40),
                var(--alpha-amber-10),
                transparent);
        transform: skewX(-25deg);
        pointer-events: none;
    }
}

/* 4. UI OVERLAYS (Cursor, HUD, Noise)
   ========================================================================== */
.cursor-dot,
.cursor-circle {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 4px;
    height: 4px;
    background: var(--accent-amber);
}

.cursor-circle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--alpha-amber-30);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-circle.active {
    width: 80px;
    height: 80px;
    background-color: var(--alpha-amber-05);
    border-color: var(--accent-amber);
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.4"/%3E%3C/svg%3E');
    opacity: 0.05;
    pointer-events: none;
    z-index: 9000;
}

.hud-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 100px 100px;
    pointer-events: none;
    z-index: -1;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

.hud-metadata {
    position: absolute;
    right: 2rem;
    top: 20%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: var(--font-tech);
    font-size: 0.6rem;
    color: var(--accent-amber);
    opacity: 0.3;
    text-align: right;
    pointer-events: none;
    z-index: 5;

    @media (max-width: 768px) {
        display: none;
    }
}

.hud-line {
    border-right: 2px solid var(--accent-amber);
    padding-right: 0.5rem;
}

/* 5. NAVIGATION
   ========================================================================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: var(--nav-padding) var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    mix-blend-mode: exclusion;
    transition: all 0.3s ease;

    @media (max-width: 768px) {
        padding: 1.5rem var(--container-padding);
    }
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: -0.05em;

    @media (max-width: 768px) {
        font-size: 1.2rem;
    }
}

.nav-links {
    display: flex;
    gap: 2rem;

    @media (max-width: 768px) {
        gap: 1.5rem;
    }
}

.nav-item {
    font-family: var(--font-tech);
    font-size: 0.8rem;
    color: var(--text-strong);
    text-decoration: none;
    text-transform: uppercase;
    opacity: 0.7;
    transition: opacity 0.3s;

    &:hover {
        opacity: 1;
        color: var(--accent-amber);
    }

    @media (max-width: 768px) {
        font-size: 0.7rem;
    }
}

/* 6. COMPONENTS & UTILITIES
   ========================================================================== */
/* CTA Button */
.cta-btn {
    margin-top: 3rem;
    padding: 1rem 2.5rem;
    background: transparent;
    border: 1px solid var(--alpha-white-20);
    color: var(--text-strong);
    font-family: var(--font-tech);
    text-transform: uppercase;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    display: inline-block;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: var(--accent-amber);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: -1;
    }

    &:hover {
        border-color: var(--accent-amber);
        color: #000;

        &::before {
            transform: translateX(100%);
        }
    }
}

/* 7. SECTIONS
   ========================================================================== */

/* --- HERO SECTION --- */
#hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 var(--container-padding);
    overflow: hidden;
    container-type: inline-size;
}

@container (max-width: 767px) {
    #hero:not(.hero-product) {
        padding-right: 2rem;
    }

    #hero:not(.hero-product) .hero-content {
        width: 100%;
        max-width: none;
    }

    #hero:not(.hero-product) .hero-headline > span {
        white-space: normal;
    }
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
}

.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-video-active #canvas-container {
    display: none;
}

.hero-video-active::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 7, 10, 0.18) 0%, rgba(5, 7, 10, 0.62) 100%),
        linear-gradient(90deg, rgba(5, 7, 10, 0.7) 0%, rgba(5, 7, 10, 0.18) 58%, rgba(5, 7, 10, 0.52) 100%);
    z-index: 1;
    pointer-events: none;
}

@container (max-width: 900px) {
    .hero-video-active .hero-bg-video {
        display: none;
    }

    .hero-video-active::after {
        display: none;
    }

    .hero-video-active #canvas-container {
        display: block;
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
}

.hero-headline {
    font-size: clamp(2.5rem, 8vw, 6rem);
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    opacity: 0;
    line-height: 1;

    span.highlight {
        color: var(--text-strong);
        -webkit-text-stroke: 0;
    }

    @media (max-width: 1024px) {
        font-size: clamp(3rem, 10vw, 5rem);
    }

    > span {
        display: inline-block;
        white-space: nowrap;
        will-change: contents;
    }
}

.hero-scramble {
    position: relative;
    display: inline-block;
}

.hero-scramble>span {
    display: block;
    white-space: inherit;
}

.hero-scramble-live {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-scramble-ghost {
    visibility: hidden;
    pointer-events: none;
    user-select: none;
}

.hero-sub {
    max-width: 600px;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    border-left: 2px solid var(--accent-amber);
    padding-left: clamp(1rem, 2.5vw, 2rem);
    opacity: 0;
    transform: translateX(-20px);
}

/* --- THREAT SECTION (HORIZONTAL SCROLL) --- */
#threats-pin {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: var(--surface-color);
    position: relative;
    container-type: inline-size;

    @media (max-width: 768px) {
        height: auto;
        overflow: visible;
    }
}

.threats-container {
    display: flex;
    height: 100%;
    width: 300vw;
    /* 3 sections wide */

    @media (max-width: 768px) {
        width: 100%;
        flex-direction: column;
    }
}

.threat-panel {
    width: 100vw;
    height: 100vh;
    padding: clamp(4rem, 8vw, 6rem) var(--container-padding);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    border-right: 1px solid var(--alpha-white-05);
    position: relative;
    overflow: hidden;

    @container (min-width: 769px) {
        gap: 4rem;
    }

    @media (max-width: 768px) {
        width: 100%;
        height: auto;
        min-height: 80vh;
        padding: clamp(6rem, 15vw, 8rem) 8vw;
        grid-template-columns: 1fr;
        gap: 2rem;

        p {
            font-size: 1rem;
            max-width: 100%;
        }
    }
}

.panel-grid-bg {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50%;
    height: 100%;
    background-image: radial-gradient(circle, #222 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
    z-index: 0;
}

.threat-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.threat-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
    color: var(--text-strong);
    line-height: 1.1;

    @container (max-width: 900px) {
        font-size: 3rem;
    }

    @media (max-width: 768px) {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 1.5rem;
        max-width: 100%;
    }
}

.threat-stat {
    font-family: var(--font-tech);
    font-size: clamp(4rem, 10vw, 8rem);
    color: var(--surface-color);
    -webkit-text-stroke: 1px var(--text-secondary);
    opacity: 0.15;
    position: absolute;
    top: 2rem;
    right: var(--container-padding);
    z-index: 0;
    pointer-events: none;

    @container (max-width: 900px) {
        font-size: 4rem;
        top: 1rem;
    }

    @media (max-width: 768px) {
        font-size: clamp(4rem, 15vw, 6rem);
        top: 2rem;
        right: auto;
        left: 8vw;
    }
}

.threat-image {
    position: relative;
    width: 100%;
    height: auto;
    opacity: 0.4;
    z-index: 1;
    filter: grayscale(100%);
    pointer-events: none;
    justify-self: center;

    @container (max-width: 900px) {
        width: 50vw;
        right: var(--container-padding);
        opacity: 0.15;
    }

    @media (max-width: 768px) {
        width: 100%;
        max-width: 400px;
        opacity: 0.3;
        right: auto;
        justify-self: center;
        margin-top: 2rem;
    }
}

/* --- MANIFESTO SECTION --- */
#manifesto {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (max-width: 768px) {
    #manifesto {
        height: auto;
        min-height: 100vh;
        padding: 4rem var(--container-padding) 8rem; /* Reduced top padding from 8rem to 4rem */
    }
}

.manifesto-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.impact-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    filter: grayscale(100%) contrast(150%);
}

.tracking-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    opacity: 0.4;
}

.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    border: 1px solid var(--accent-amber);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    mask-image: conic-gradient(from 0deg, black 20deg, transparent 20deg 70deg, black 70deg 110deg, transparent 110deg 160deg, black 160deg 200deg, transparent 200deg 250deg, black 250deg 290deg, transparent 290deg);
}

@media (max-width: 768px) {
    .crosshair {
        width: 200px;
        height: 200px;
    }
}

.manifesto-inner {
    position: relative;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0 var(--container-padding);
}

.manifesto-text {
    font-size: clamp(2rem, 8vw, 6rem);
    line-height: 1.1;
    margin-bottom: 5vh;
    mix-blend-mode: difference;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
}

@media (max-width: 768px) {
    .manifesto-text {
        font-size: clamp(1.8rem, 8vw, 2.22rem); /* Slightly reduced size */
        margin-bottom: 1.5rem; /* Reduced from 3rem */
    }
}

.manifesto-switcher {
    position: relative;
    width: 100%;
    max-width: 1200px;
    display: grid;
    place-items: center;
    margin-top: 5vh;
}

@media (max-width: 768px) {
    .manifesto-switcher {
        margin-top: 1rem; /* Reduced from 2rem */
    }
}

.manifesto-sub-copy {
    grid-area: 1 / 1;
    width: 100%;
    max-width: 800px;
    opacity: 0;
    transform: translateY(30px);
    text-align: center;

    .main-copy {
        font-size: clamp(1.2rem, 3vw, 1.8rem);
        color: var(--text-strong);
        line-height: 1.4;
        font-weight: 700;
    }
}

@media (max-width: 768px) {
    .manifesto-sub-copy .main-copy {
        font-size: 1.1rem;
    }
}

.solution-pillars {
    grid-area: 1 / 1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: left;
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;

    &.active {
        pointer-events: all;
    }
}

@media (max-width: 768px) {
    .solution-pillars {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        transform: none !important; /* Prevent GSAP from pushing it too far */
    }
}

.pillar {
    padding: 2rem;
    background: var(--alpha-white-03);
    border-top: 1px solid var(--accent-amber);
    position: relative;

    h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        text-transform: uppercase;
    }

    p {
        font-size: 0.95rem;
        color: var(--text-secondary);
    }
}

.pillar-num {
    font-family: var(--font-tech);
    font-size: 0.8rem;
    color: var(--accent-amber);
    display: block;
    margin-bottom: 1rem;
}

/* --- SOLUTIONS SECTION (BENTO GRID) --- */
#solutions {
    padding: 8rem 2rem;
    background-color: var(--bg-color);
}

.section-header {
    margin-bottom: 4rem;
    padding-left: 1rem;
    border-left: 4px solid var(--accent-amber);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-template-rows: auto;
    min-height: 600px;
    gap: 1.5rem;
}

.bento-card {
    background: var(--surface-color);
    border: 1px solid var(--alpha-white-10);
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s;

    a {
        text-decoration: none;
        color: inherit;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        height: 100%;
        padding: 3rem;

        @media (max-width: 1024px) {
            padding: 2rem;
        }
    }

    &:hover {
        border-color: var(--accent-amber);

        .card-bg {
            transform: scale(1.05);
            opacity: 0.6;
            filter: grayscale(0%);
        }

        .corner {
            opacity: 1;
        }
    }
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    transition: transform 0.6s, opacity 0.6s;
    filter: grayscale(100%);
    pointer-events: none;
    overflow: hidden;
}

.card-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
}

.card-content {
    position: relative;
    z-index: 2;
}

.card-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Decorative Corners */
.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--accent-amber);
    border-style: solid;
    transition: all 0.3s;
    opacity: 0;
}

.tl {
    top: 10px;
    left: 10px;
    border-width: 2px 0 0 2px;
}

.br {
    bottom: 10px;
    right: 10px;
    border-width: 0 2px 2px 0;
}

/* 8. FOOTER
   ========================================================================== */
footer {
    position: relative;
    padding: 4rem 2rem 6rem;
    border-top: 1px solid var(--alpha-white-10);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    font-family: var(--font-tech);
    font-size: 0.8rem;
    color: var(--text-secondary);

    @media (max-width: 768px) {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding: 3rem var(--container-padding);
        text-align: center;
    }
}

.footer-left {
    justify-self: start;

    @media (max-width: 768px) {
        justify-self: auto;
    }
}

.footer-center {
    justify-self: center;
    text-align: center;

    @media (max-width: 768px) {
        justify-self: auto;
    }
}

.footer-right {
    justify-self: end;

    @media (max-width: 768px) {
        justify-self: auto;
    }
}

.footer-legal {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    display: flex;
    gap: 0.5rem;
    align-items: center;

    @media (max-width: 768px) {
        position: static;
        transform: none;
        margin-top: 1rem;
    }
}

.footer-legal a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: var(--accent-amber);
}

.footer-legal .separator {
    opacity: 0.5;
}

/* Texture Utilities */
.bg-texture-grid {
    background-color: var(--surface-color);
    background-image: radial-gradient(circle, var(--alpha-white-05) 1px, transparent 1px);
    background-size: 30px 30px;
    position: relative;
    z-index: 1;
}

.bg-texture-manifesto {
    background-color: var(--bg-color);
    background-image: linear-gradient(to bottom, transparent 50%, var(--alpha-white-02) 50%);
    background-size: 100% 4px;
    position: relative;
    z-index: 1;
}

/* 9. PRODUCT PAGE SPECIFICS (Refactored from rockdome.html)
   ========================================================================== */

/* --- OPERATIONAL CYCLE --- */
.cycle-row {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 10vh;
    border-left: 1px solid var(--alpha-white-10);
    padding-left: 2rem;
    position: relative;

    @media(min-width: 900px) {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-left: none;
        padding-left: 0;
    }

    /* Alternating layout */
    &:nth-child(even) {
        @media(min-width: 900px) {
            flex-direction: row-reverse;
        }
    }
}

.cycle-row .text-col {
    @media(min-width: 900px) {
        width: 40%;
    }
}

.cycle-row .visual-col {
    aspect-ratio: 16/9;
    background: var(--surface-color-alt);
    border: 1px solid var(--alpha-white-10);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;

    @media(min-width: 900px) {
        width: 50%;
    }
}

.visual-module-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: grayscale(100%);
}

.cycle-row .visual-col h3,
.visual-overlay {
    position: relative;
    z-index: 2;
}

.visual-overlay {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-family: var(--font-tech);
    font-size: 0.8rem;
    color: var(--accent-amber);
    background: var(--overlay-dark-80);
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--accent-amber);
}

/* --- COMPARISON TABLE --- */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 3rem;
    border: 1px solid var(--alpha-white-10);
    font-family: var(--font-tech);
}

.comparison-table th,
.comparison-table td {
    text-align: left;
    padding: 1.5rem;
    border-bottom: 1px solid var(--alpha-white-10);
}

.comparison-table th {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.col-highlight {
    background: var(--alpha-amber-05);
    /* Amber with low opacity */
    border-left: 2px solid var(--accent-amber);
    border-right: 2px solid var(--accent-amber);
    color: var(--text-strong);
    position: relative;
    top: -1px;
}

.col-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-amber);
    box-shadow: 0 0 10px var(--accent-amber);
}

.comparison-table tbody tr:last-child .col-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-amber);
    box-shadow: 0 0 10px var(--accent-amber);
}

.check-good {
    color: var(--accent-amber);
    font-weight: bold;
}

.check-bad {
    color: var(--text-secondary);
    opacity: 0.5;
}

@media (max-width: 768px) {
    .comparison-table {
        border: none;
    }

    .comparison-table thead {
        display: none;
    }

    .comparison-table tr {
        display: block;
        margin-bottom: 2rem;
        border: 1px solid var(--alpha-white-10);
        background: var(--alpha-white-02);
    }

    .comparison-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid var(--alpha-white-05);
        font-size: 0.9rem;
    }

    /* Target Capability (first td) */
    .comparison-table td:first-child {
        background: var(--alpha-white-05);
        color: var(--text-strong);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        justify-content: center;
        border-bottom: 1px solid var(--alpha-white-10);
    }

    .comparison-table td[data-product]::before {
        content: attr(data-product);
        color: var(--text-secondary);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .comparison-table .col-highlight::before {
        position: static;
        height: auto;
        width: auto;
        background: none;
        box-shadow: none;
        content: attr(data-product);
        color: var(--text-secondary);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .comparison-table tbody tr:last-child .col-highlight::after {
        display: none;
    }
}

/* --- APPLICATIONS GRID (Specific tweaks to Bento) --- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1px;
    /* Gap for border effect */
    background: var(--alpha-white-10);
    border: 1px solid var(--alpha-white-10);

    @media (max-width: 768px) {
        gap: var(--container-padding);
        background: none;
        border: none;
    }
}

.app-card {
    background: var(--surface-color);
    padding: 3rem 2rem;
    min-height: 400px;
    position: relative;
    transition: background 0.4s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    @media (max-width: 768px) {
        justify-content: center;
    }

    &:hover {
        background: var(--surface-color-hover);
    }

    h3 {
        margin-bottom: 1rem;
        font-size: 1.8rem;
        color: var(--text-strong);
        position: relative;
        z-index: 2;
    }
}

.card-shield {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border: 1px solid var(--accent-amber);
    border-radius: 50%;
    opacity: 0;
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(0.5);
}

.app-card:hover .card-shield {
    opacity: 0.2;
    transform: scale(1);
}

/* --- HERO REDESIGN (Product Page) --- */
.hero-product {
    align-items: flex-end;
    /* Align to bottom-left or center-left */
    padding-bottom: 15vh;
}

.hero-product .hero-content {
    margin: 0;
    max-width: 800px;
    text-align: left;
    /* Force left align */

    @media (min-width: 900px) {
        bottom: 3rem;
    }
}

.hero-product .hero-headline {
    color: var(--text-strong);
    -webkit-text-stroke: 0;
    opacity: 1;
}

.hero-product .hero-sub {
    border-left: none;
    padding-left: 0;
    opacity: 1;
    transform: none;
}

#typewriter-text {
    font-family: var(--font-tech);
    font-size: 1rem;
    color: var(--accent-amber);
    margin-bottom: 0;
}

/* Technical Brackets for subhead */
.bracket-box {
    display: inline-block;
    position: relative;
    padding: 0 1rem;
    color: var(--accent-amber);

    &::before,
    &::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 10px;
        border: 1px solid var(--accent-amber);
        opacity: 0.7;
    }

    &::before {
        left: 0;
        border-right: none;
    }

    &::after {
        right: 0;
        border-left: none;
    }
}

/* 10. AEGIS PAGE SPECIFICS
   ========================================================================== */

/* --- BRIEFING (SPLIT) --- */
.briefing {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 80vh;
    border-bottom: 1px solid var(--alpha-white-10);

    @media (min-width: 900px) {
        grid-template-columns: 1fr 1fr;
    }
}

.briefing-vis {
    background: var(--surface-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 400px;
}

.interceptor-model-shell {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interceptor-model-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease;
    filter: drop-shadow(0 1.5rem 3rem rgba(0, 0, 0, 0.45));
    background: transparent;
}

.interceptor-model-shell.is-ready .interceptor-model-video {
    opacity: 1;
    visibility: visible;
}

.interceptor-model-shell.is-ready .aki-model-placeholder {
    opacity: 0;
    visibility: hidden;
}

/* Placeholder for 3D Object/Animation */
.aki-model-placeholder {
    width: 300px;
    height: 300px;
    border: 1px dashed var(--accent-amber);
    border-radius: 50%;
    position: relative;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.briefing-text {
    padding: clamp(3rem, 5vw, 5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.briefing-stat-grid {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    border-top: 1px solid var(--alpha-white-10);
    padding-top: 2rem;
}

.briefing-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-strong);
    font-family: var(--font-display);
}

/* --- SCROLL TELLING OPS (STICKY) --- */
.scroll-ops {
    position: relative;
    height: 500vh;
    /* Leave extra dwell time for the final step before the sticky section releases */
}

.sticky-container {
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;

    @media (min-width: 900px) {
        grid-template-columns: 1.5fr 1fr;
    }
}

.video-stage {
    position: relative;
    border-right: 1px solid var(--alpha-white-10);
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
    height: 50vh;

    @media (min-width: 900px) {
        height: 100vh;
    }
}

.video-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-size: cover;
    background-position: center;
    text-align: center;
    padding: 2rem;
    isolation: isolate;
}

.video-frame.active {
    opacity: 1;
    visibility: visible;
}

.video-frame>* {
    position: relative;
    z-index: 2;
}

.video-frame-media,
.video-frame-overlay {
    position: absolute;
    inset: 0;
}

.video-frame-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-frame-overlay {
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.5) 100%),
        radial-gradient(circle at center, rgba(255, 103, 31, 0.08) 0%, rgba(0, 0, 0, 0.55) 72%);
}

/* Abstract representations of the video clips for the code */
.vf-1 {
    background: radial-gradient(circle, #1a1a1a 0%, #000 100%);
}

.vf-1 .video-frame-media {
    object-position: 70% center;
}

.vf-2 {
    background: radial-gradient(circle, #2a1a1a 0%, #000 100%);
}

.vf-3 {
    background: radial-gradient(circle, #0a0a0a 0%, #000 100%);
}

.vf-3 .video-frame-media {
    object-position: left center;
}

.vf-4 {
    background: radial-gradient(circle, #111 0%, #000 100%);
}

.vf-4 .video-frame-media {
    object-position: 70% center;
}

.vf-1>span,
.vf-1>h3,
.vf-2>span,
.vf-2>h3,
.vf-3>span,
.vf-3>h3 {
    display: none;
}

.reticle {
    width: 200px;
    height: 200px;
    border: 1px solid var(--alpha-amber-50);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    display: none;
}

.reticle::before,
.reticle::after {
    content: '';
    position: absolute;
    background: var(--accent-amber);
}

.reticle::before {
    top: 50%;
    left: -10px;
    width: 220px;
    height: 1px;
}

.reticle::after {
    top: -10px;
    left: 50%;
    width: 1px;
    height: 220px;
}

.narrative-stage {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    height: 50vh;

    @media (min-width: 900px) {
        padding: 4rem;
        height: 100vh;
    }
}

.narrative-step {
    position: absolute;
    top: 50%;
    left: 2rem;
    right: 2rem;
    transform: translateY(-50%) translateX(30px);
    opacity: 0;

    pointer-events: none;

    @media (min-width: 900px) {
        left: 4rem;
        right: 4rem;
        transform: translateY(-50%) translateX(50px);
    }
}

.narrative-step.active {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: all;
}

.step-number {
    font-size: clamp(3rem, 5vw, 5rem);
    font-family: var(--font-display);
    color: var(--surface-color);
    -webkit-text-stroke: 1px var(--alpha-white-10);
    font-weight: 800;
    position: absolute;
    top: -2rem;
    left: -1rem;
    z-index: -1;
}

/* --- AEGIS SPECS --- */
.aegis-specs {
    padding: 10vh var(--container-padding);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    border-bottom: 1px solid var(--alpha-white-10);
}

/* --- FOOTER CTA --- */
.footer-cta {
    padding: 10vh var(--container-padding);
    text-align: center;
    border-bottom: 1px solid var(--alpha-white-10);

    h2 {
        font-size: clamp(2.5rem, 6vw, 5rem);
        margin-bottom: 3rem;

        span {
            color: var(--accent-amber);
            display: block;
        }
    }
}

/* 11. CONTACT PAGE SPECIFICS
   ========================================================================== */

/* --- HERO ADJUSTMENTS --- */
.hero-contact {
    height: 60vh;
    /* Shorter hero for contact page */
    min-height: 500px;
    align-items: center;
    padding-bottom: 0;
}

/* --- SPLIT LAYOUT --- */
.contact-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    padding: 5rem var(--container-padding) 10rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .contact-split {
        grid-template-columns: 1fr 1.2fr;
        gap: 6rem;
    }
}

/* --- LEFT COLUMN: INFO --- */
.location-card {
    background: var(--alpha-white-03);
    border: 1px solid var(--alpha-white-10);
    padding: 2rem;
    position: relative;
    max-width: 400px;
}

.mono-address {
    font-family: var(--font-tech);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
    box-shadow: 0 0 5px currentColor;
}

.status-dot.green {
    background-color: #00ff41;
    color: #00ff41;
}

.status-dot.amber {
    background-color: var(--accent-amber);
    color: var(--accent-amber);
}

.direct-line {
    padding-left: 1rem;
    border-left: 2px solid var(--accent-amber);
}

/* --- RIGHT COLUMN: TERMINAL FORM --- */
.contact-form-container {
    width: 100%;
}

.terminal-header {
    background: var(--alpha-white-10);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--alpha-white-10);
    border-bottom: none;
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 10px;
    height: 10px;
    background: var(--alpha-white-20);
    border-radius: 50%;
}

.tactical-form {
    background: var(--overlay-dark-50);
    border: 1px solid var(--alpha-white-10);
    padding: 2rem;
    padding-top: 3rem;
}

.form-group {
    margin-bottom: 2.5rem;
    position: relative;
}

.tactical-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--alpha-white-20);
    color: var(--text-strong);
    font-family: var(--font-tech);
    font-size: 1.1rem;
    padding: 0.5rem 0;
    outline: none;
    transition: all 0.3s;
}

.tactical-input:focus {
    border-bottom-color: var(--accent-amber);
}

.tactical-input::placeholder {
    color: var(--alpha-white-20);
    font-size: 0.9rem;
}

/* Animated Input Line */
.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent-amber);
    box-shadow: 0 0 10px var(--accent-amber);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tactical-input:focus~.input-line {
    width: 100%;
}

/* Select styling */
select.tactical-input {
    cursor: pointer;
}

select.tactical-input option {
    background: #000;
    color: var(--text-strong);
    padding: 10px;
}

/* --- PROFESSIONAL CONTACT LAYOUT (REPLACE PREVIOUS) --- */

.contact-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem var(--container-padding) 4rem;
}

.contact-wrapper #canvas-container {
    position: fixed;
    inset: 0;
}

.contact-container {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    position: relative;
    z-index: 10;
}

@media (min-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr 1fr;
        gap: 8rem;
        align-items: flex-start;
        /* Align top or center? Center often looks better for low content */
        align-items: center;
    }
}

.contact-text {
    max-width: 500px;
}

/* Form Styling (Refined with Background) */
.professional-form {
    background: var(--surface-color);
    padding: 3rem;
    border: 1px solid var(--alpha-white-05);
    border-top: 3px solid var(--accent-amber);
    box-shadow: var(--shadow-deep);
    position: relative;
}

.professional-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--alpha-amber-03) 0%, transparent 100%);
    pointer-events: none;
}

.simple-label {
    font-family: var(--font-display);
    /* Back to standard font */
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

/* Override previous hero/contact specific bits if needed, or just append */
/* 12. UTILITIES
   ========================================================================== */
.u-py-10vh {
    padding-top: 10vh !important;
    padding-bottom: 10vh !important;
}

.u-px-container {
    padding-left: var(--container-padding) !important;
    padding-right: var(--container-padding) !important;
}

.u-text-center {
    text-align: center !important;
}

.u-mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.u-max-w-800 {
    max-width: 800px !important;
}

.u-max-w-600 {
    max-width: 600px !important;
}

.u-w-full {
    width: 100% !important;
}

.u-d-block {
    display: block !important;
}

.u-d-inline-block {
    display: inline-block !important;
}

.u-d-flex {
    display: flex !important;
}

.u-align-center {
    align-items: center !important;
}

.u-mt-05 {
    margin-top: 0.5rem !important;
}

.u-mt-1 {
    margin-top: 1rem !important;
}

.u-mt-1-5 {
    margin-top: 1.5rem !important;
}

.u-mt-2 {
    margin-top: 2rem !important;
}

.u-mt-3 {
    margin-top: 3rem !important;
}

.u-mb-05 {
    margin-bottom: 0.5rem !important;
}

.u-mb-1 {
    margin-bottom: 1rem !important;
}

.u-mb-1-5 {
    margin-bottom: 1.5rem !important;
}

.u-mb-2 {
    margin-bottom: 2rem !important;
}

.u-mb-3 {
    margin-bottom: 3rem !important;
}

.u-color-amber {
    color: var(--accent-amber) !important;
}

.u-color-green {
    color: #00ff41 !important;
}

.u-color-white {
    color: var(--text-strong) !important;
}

.u-color-black-333 {
    color: #333 !important;
}

.u-color-red {
    color: red !important;
}

.u-font-tech {
    font-family: var(--font-tech) !important;
}

.u-font-size-1 {
    font-size: 1rem !important;
}

.u-font-size-1-1 {
    font-size: 1.1rem !important;
}

.u-opacity-07 {
    opacity: 0.7 !important;
}

.u-opacity-1 {
    opacity: 1 !important;
}

.u-border-none {
    border: none !important;
}

.u-border-left-none {
    border-left: none !important;
}

.u-padding-left-0 {
    padding-left: 0 !important;
}

.u-transform-none {
    transform: none !important;
}

.u-resize-none {
    resize: none !important;
}

.u-text-stroke-0 {
    -webkit-text-stroke: 0 !important;
}

.u-w-30-perc {
    width: 30% !important;
}

.u-mb-0 {
    margin-bottom: 0 !important;
}

.u-font-size-3 {
    font-size: 3rem !important;
}

.u-my-1 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

.u-font-clamp-hero {
    font-size: clamp(3rem, 5vw, 4rem) !important;
}

.u-lh-1-1 {
    line-height: 1.1 !important;
}

.u-font-size-08 {
    font-size: 0.8rem !important;
}

.u-font-size-07 {
    font-size: 0.7rem !important;
}

.u-font-size-1-5 {
    font-size: 1.5rem !important;
}

.u-m-0 {
    margin: 0 !important;
}

.u-pt-1-5 {
    padding-top: 1.5rem !important;
}

.u-border-top-white-01 {
    border-top: 1px solid var(--alpha-white-10) !important;
}

.u-d-none {
    display: none !important;
}
