 :root {
    --bg-0: #121212;
    --bg-1: #1a0000;
    --bg-2: #060208;
    --text: #F5F5F5;
    --muted: rgba(245, 245, 245, 0.85);
    --gold: #C6A75E;
    --red: #9F1919;
    --deep-red: #8b0000;
    --bright-red: #ff2200;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at 18% 12%, rgba(139, 0, 0, 0.24), transparent 44%),
        radial-gradient(circle at 82% 24%, rgba(159, 25, 25, 0.22), transparent 42%),
        linear-gradient(145deg, var(--bg-0) 0%, #140708 46%, #1a0809 76%, #1f0a0b 100%);
    color: var(--text);
    font-family: "Inter", sans-serif;
}

body {
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: page-fade-in 0.5s ease forwards;
    overflow-x: hidden;
}

body.cursor-enhanced {
    cursor: none;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: difference;
    will-change: transform;
}

body.page-ready {
    opacity: 1;
}

body.page-exit {
    opacity: 0;
}

.progress-track {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 90;
    background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(200, 30, 0, 0.75), rgba(139, 0, 0, 0.92));
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 80;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
    background: rgba(18, 18, 18, 0.3);
    backdrop-filter: blur(8px);
}

.site-nav a,
.site-nav span {
    text-decoration: none;
    color: var(--text);
}

.brand {
    font-family: "Syne", sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    letter-spacing: 0.08em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    font-family: "DM Mono", monospace;
    font-size: clamp(0.8rem, 1.1vw, 0.95rem);
    letter-spacing: 0.06em;
}
.nav-links a[href*="ai"]:hover { color: #8b0000 !important; }
.nav-links a[href*="photos"]:hover { color: #1055cc !important; }

.scroll-shell {
    height: 600vh;
    position: relative;
}

.sticky-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.canvas-stack {
    position: absolute;
    inset: 0;
}

.loop-canvas,
.loop-canvas--bloom {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.loop-canvas--bloom {
    z-index: 0;
    filter: blur(60px) opacity(0.2);
    transform: scale(1.04);
}

.loop-canvas {
    z-index: 1;
}

.panel-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.panel {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(760px, calc(100% - 2.2rem));
    transform: translate3d(-50%, -50%, 0);
    opacity: 0;
    text-align: center;
    will-change: transform, opacity;
}

.hero-intro {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
}

.hero-intro h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    margin: 0;
}

.hero-main-content {
    opacity: 0;
    transform: translateY(14px);
    text-align: center;
}

.panel h1,
.panel h2 {
    margin: 0.4rem 0 0;
    font-family: "Syne", sans-serif;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.01em;
    font-size: clamp(2.1rem, 5vw, 4.6rem);
    color: var(--text);
    opacity: 1;
}

.panel p {
    margin: 0.9rem auto 0;
    max-width: 62ch;
    color: var(--muted);
    font-size: clamp(0.95rem, 1.4vw, 1.12rem);
}

.panel-label {
    margin: 0;
    font-family: "DM Mono", monospace;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    font-size: 0.9rem;
}

.panel-rule {
    width: min(260px, 60vw);
    margin: 1rem auto 0.2rem;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.32);
    transform-origin: left center;
}

.metric-wrap {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.2rem;
    margin-top: 0.8rem;
    font-family: "Syne", sans-serif;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    color: var(--gold);
}

.section {
    position: relative;
    z-index: 4;
    padding: 7rem 1.2rem;
}

.section-build {
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.95), rgba(26, 0, 0, 0.96));
}

.build-layout {
    width: min(1140px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2.6rem;
}

.build-left {
    position: sticky;
    top: 18vh;
    align-self: start;
}

.build-number {
    margin: 0;
    font-family: "DM Mono", monospace;
    font-size: clamp(3rem, 7vw, 6rem);
    color: rgba(245, 245, 245, 0.18);
}

.build-left h2 {
    margin: 0.4rem 0 0;
    font-family: "Syne", sans-serif;
    font-size: clamp(2rem, 4.4vw, 3.8rem);
    line-height: 1.05;
}

.build-card {
    border-left: 2px solid rgba(200, 30, 0, 0.6);
    border-top: 1px solid rgba(139, 0, 0, 0.15);
    border-right: 1px solid rgba(139, 0, 0, 0.15);
    border-bottom: 1px solid rgba(139, 0, 0, 0.15);
    padding: 1.2rem 1rem 1.2rem 2rem;
    margin-bottom: 4rem;
    background: rgba(18, 18, 18, 0.62);
}

.build-card h3 {
    margin: 0;
    font-family: "Syne", sans-serif;
    font-size: clamp(1.3rem, 2vw, 1.9rem);
    font-weight: 800;
}

.build-card p {
    margin-top: 0.75rem;
    color: var(--muted);
}

.section-divisions {
    background: #121212;
}

.division-row {
    width: min(1140px, 100%);
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
}

.division-row.reverse .division-content {
    order: 1;
}

.division-row.reverse .division-visual {
    order: 2;
}

.division-visual {
    min-height: 460px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(139, 0, 0, 0.15);
    background: linear-gradient(160deg, rgba(18, 18, 18, 0.9), rgba(30, 6, 6, 0.9));
}

#mini-knot-canvas {
    width: min(300px, 90%);
    height: min(300px, 90%);
}

.shape-card {
    width: 100%;
    min-height: 320px;
    display: grid;
    place-items: center;
}

.rotating-square {
    width: 160px;
    height: 160px;
    border: 2px solid #8b0000;
    box-shadow: 0 0 28px rgba(139, 0, 0, 0.22);
    animation: square-spin 8s linear infinite;
}

@keyframes square-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.division-content {
    border: 1px solid rgba(139, 0, 0, 0.15);
    padding: 1.3rem;
    background: rgba(18, 18, 18, 0.58);
}

.division-label {
    margin: 0;
    font-family: "DM Mono", monospace;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.7rem;
    color: var(--gold);
}

.division-content h3 {
    margin: 0.5rem 0 0;
    font-family: "Syne", sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 3.6vw, 3rem);
}

.division-content p {
    color: var(--muted);
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.62rem 1rem;
    border: 1px solid rgba(159, 25, 25, 0.7);
    text-decoration: none;
    color: var(--text);
    font-family: "DM Mono", monospace;
    font-size: 0.86rem;
    letter-spacing: 0.05em;
    transition: background 220ms ease, border-color 220ms ease;
}

.cta-button:hover {
    background: rgba(159, 25, 25, 0.18);
    border-color: rgba(200, 30, 0, 0.9);
}

.section-vision {
    background: #060208;
    text-align: center;
}

.vision-inner {
    width: min(980px, 100%);
    margin: 0 auto;
    position: relative;
}

.vision-ghost {
    margin: 0;
    font-family: "DM Mono", monospace;
    font-size: clamp(4.5rem, 12vw, 8rem);
    color: rgba(180, 0, 0, 0.08);
}

.vision-inner h2 {
    margin: 0.1rem 0 0;
    font-family: "Syne", sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4.6vw, 4rem);
    line-height: 1.04;
}

.vision-inner > p {
    width: min(760px, 100%);
    margin: 1rem auto 0;
    color: var(--muted);
    line-height: 1.7;
}

.stats-grid {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat-box {
    border: 1px solid rgba(180, 0, 0, 0.2);
    padding: 1.1rem;
    background: rgba(18, 18, 18, 0.62);
}

.stat-num {
    margin: 0;
    font-family: "DM Mono", monospace;
    font-size: clamp(2.4rem, 4.6vw, 3.8rem);
    color: var(--gold);
}

.stat-label {
    margin-top: 0.45rem;
    color: var(--muted);
    font-family: "DM Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.section-footer-cta {
    background: linear-gradient(180deg, #0f090b 0%, #0a0708 100%);
}

.footer-cta-inner {
    width: min(1080px, 100%);
    margin: 0 auto;
    text-align: center;
}

.footer-cta-inner h2 {
    margin: 0;
    font-family: "Syne", sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.footer-cta-inner > p {
    color: var(--muted);
    margin-top: 0.85rem;
}

.service-columns {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    text-align: left;
}

.service-columns h3 {
    margin: 0;
    font-family: "DM Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: rgba(245, 245, 245, 0.74);
}

.service-columns p {
    margin-top: 0.6rem;
    font-family: "DM Mono", monospace;
    font-size: 0.8rem;
    line-height: 1.8;
    color: rgba(245, 245, 245, 0.62);
}

.bottom-strip {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(139, 0, 0, 0.2);
    font-family: "DM Mono", monospace;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    color: rgba(245, 245, 245, 0.56);
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@keyframes page-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.page-shell {
    min-height: 100vh;
    padding: 7rem 1.2rem 2rem;
}

.page-wrap {
    width: min(980px, 100%);
    margin: 0 auto;
}

.page-wrap h1 {
    font-family: "Syne", sans-serif;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    margin: 0;
    font-weight: 800;
}

.page-wrap p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .build-layout,
    .division-row,
    .stats-grid,
    .service-columns {
        grid-template-columns: 1fr;
    }

    .build-left {
        position: static;
    }

    .division-row.reverse .division-content,
    .division-row.reverse .division-visual {
        order: initial;
    }

    .site-nav {
        padding: 0.92rem 0.95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body {
        cursor: auto;
    }

    .custom-cursor {
        display: none;
    }

    .reveal,
    .reveal.visible {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .rotating-square {
        animation: none;
    }
}
