:root {
    /* Chromatic Guidelines: The Neutral Base (0-2% Saturation) */
    --bg-base: #121212;
    /* Deep Charcoal */
    --bg-surface: #1A1A1A;
    /* Elevated Card Surface */

    /* The Chroma-Punch (Signature Hue) */
    --accent-brand: #FF3300;
    /* Safety Orange / Maxon-style aggressive accent */
    --accent-hover: #CC2900;

    /* Contrast Density */
    --text-primary: #FFFFFF;
    /* Headline Contrast 7:1 */
    --text-secondary: #A3A3A3;
    /* Body Contrast 4.5:1 */
    --border-bound: rgba(255, 255, 255, 0.15);
    /* 1px at 15% opacity */

    /* Animation Easing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
}

/* --- Container (Legal Pages) --- */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 5vw;
}

/* --- Typography: Architectural Hierarchy --- */
.h1-hero {
    font-family: 'Inter', sans-serif;
    font-size: clamp(48px, 6vw, 80px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.h2-section {
    font-family: 'Inter', sans-serif;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

h1 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

h2 {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 640px;
    /* Optimal ocular flow */
}

.tech-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

p,
ul {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

ul {
    padding-left: 24px;
}

li {
    font-family: 'Inter', sans-serif;
    margin-bottom: 8px;
}

strong {
    color: var(--text-primary);
}

/* --- Navigation --- */
nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 5vw;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-mark {
    width: 16px;
    height: 16px;
    background: var(--accent-brand);
}

.nav-group {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease-out-expo);
    border-bottom: 2px solid transparent;
    padding-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-brand);
}

/* --- Buttons: Dual-Objective CTA --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 32px;
    border-radius: 0;
    /* Brutalist/Architectural */
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-brand);
    color: #FFFFFF;
    border: 1px solid var(--accent-brand);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

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

.btn-ghost:hover {
    background: var(--bg-surface);
    border-color: rgba(255, 255, 255, 0.4);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-brand);
    text-decoration: none;
    margin-bottom: 48px;
    font-weight: 800;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent-hover);
}

/* --- Spatial Architecture 1: The Cinematic Hero (100vh) --- */
.hero {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    padding: 0 5vw;
    position: relative;
    /* Parallax Depth */
    background-image: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=2564&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::after {
    /* Dimmer overlay to ensure 7:1 contrast for text */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(18, 18, 18, 0.95) 0%, rgba(18, 18, 18, 0.6) 50%, rgba(18, 18, 18, 0.2) 100%);
    z-index: 1;
}

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

.cta-group {
    display: flex;
    gap: 16px;
    margin-top: 48px;
    flex-wrap: wrap;
}

/* --- Spatial Architecture 2: The Proof Gallery Grid --- */
.gallery-section {
    padding: 120px 5vw;
    background: var(--bg-base);
    border-top: 1px solid var(--border-bound);
}

.section-header {
    margin-bottom: 64px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    grid-auto-flow: dense;
}

.bento-cell {
    position: relative;
    border: 1px solid var(--border-bound);
    background: var(--bg-surface);
    overflow: hidden;
    aspect-ratio: 16/11;
    cursor: pointer;
}

.cell-large {
    grid-column: span 8;
}

.cell-small {
    grid-column: span 4;
}

@media (max-width: 1024px) {
    .cell-large {
        grid-column: span 12;
    }

    .cell-small {
        grid-column: span 6;
        aspect-ratio: 1;
    }
}

@media (max-width: 600px) {
    .cell-small {
        grid-column: span 12;
    }
}

.bento-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
    opacity: 0;
    /* Start hidden for skeleton reveal */
}

/* Micro-Kinetic Transitions */
.bento-cell:hover .bento-img {
    transform: scale(1.05);
}

.bento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18, 18, 18, 0.9) 0%, transparent 60%);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
}

.bento-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.arrow-icon {
    opacity: 0;
    transform: translateX(-16px);
    transition: all 0.4s var(--ease-out-expo);
    color: var(--accent-brand);
}

.bento-cell:hover .arrow-icon {
    opacity: 1;
    transform: translateX(0);
}

/* Skeleton Reveal System */
.skeleton-mask {
    position: absolute;
    inset: 0;
    background: #1A1A1A;
    background-image: linear-gradient(90deg, #1A1A1A 0px, #252525 40px, #1A1A1A 80px);
    background-size: 600px;
    animation: shimmer 2s infinite linear;
    z-index: 5;
    transition: opacity 0.5s ease;
}

@keyframes shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.loaded .skeleton-mask {
    opacity: 0;
    pointer-events: none;
}

.loaded .bento-img {
    opacity: 1;
}

/* --- Spatial Architecture 3: Deep-Dive Feature Modules (70/30) --- */
.deep-dive {
    display: grid;
    grid-template-columns: 7fr 3fr;
    border-top: 1px solid var(--border-bound);
    background: var(--bg-base);
}

.deep-dive.reverse {
    grid-template-columns: 3fr 7fr;
}

@media (max-width: 1024px) {

    .deep-dive,
    .deep-dive.reverse {
        grid-template-columns: 1fr;
        border-top: none;
    }

    .deep-dive.reverse .dd-text {
        order: 2;
    }

    .deep-dive.reverse .dd-visual {
        order: 1;
    }
}

.dd-visual {
    border-right: 1px solid var(--border-bound);
    border-left: 1px solid var(--border-bound);
    position: relative;
    background: var(--bg-surface);
    overflow: hidden;
    min-height: 500px;
}

.deep-dive.reverse .dd-visual {
    border-right: none;
}

/* Parallax inner image */
.dd-visual-bg {
    position: absolute;
    inset: -10%;
    /* Bleed to allow parallax movement */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    width: 120%;
    height: 120%;
}

.dd-text {
    padding: 80px 5vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-tag {
    color: var(--accent-brand);
    margin-bottom: 24px;
    display: inline-block;
}

/* --- Technical Footer --- */
footer {
    padding: 64px 5vw;
    background: var(--bg-base);
    border-top: 1px solid var(--border-bound);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    footer {
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
    }
}