/* ============================================================
   ZSDX // GLOBAL SYSTEM STYLESHEET
   Shared design system for every page beyond the landing index.
   Tokens · Global chrome · HUD overlay nav · Components · Footer
   ============================================================ */

@import url('nav.css');

:root {
    --bg: #010101;
    --light: #f0f0f0;
    --cursor-size: 10px;
    --grid-color: rgba(255, 255, 255, 0.03);
    --hair: rgba(255, 255, 255, 0.1);
    --hair-soft: rgba(255, 255, 255, 0.06);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background-color: var(--bg); color: var(--light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body { font-family: 'Inter', sans-serif; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid rgba(240,240,240,.9); outline-offset: 2px;
}

/* Lenis */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
html.lenis-stopped { overflow: hidden; }

/* ---------- Structural grid ---------- */
.bg-grid {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-size: 5vw 5vw;
    background-image:
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
}

/* ---------- Cinematic overlays ---------- */
.film-grain {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 9998; opacity: 0.06; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}
.vignette {
    position: fixed; inset: 0; pointer-events: none; z-index: 9000;
    background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.45) 100%);
}

/* ---------- Tech cursor (trailing accent — native cursor stays visible) ---------- */
.cursor-wrapper {
    position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%); mix-blend-mode: difference;
    display: flex; align-items: center; justify-content: center;
}
.cursor-dot { display: none; }
.cursor-ring {
    position: absolute; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,0.35); border-radius: 50%;
    transition: width 0.4s ease, height 0.4s ease, border-color 0.4s ease;
}
.cursor-text {
    position: absolute; top: 120%; left: 50%; transform: translateX(-50%);
    color: #fff; font-family: 'Space Mono', monospace; font-size: 8px; letter-spacing: 0.2em;
    opacity: 0; transition: opacity 0.3s ease; white-space: nowrap;
}
.cursor-wrapper.active .cursor-ring { width: 64px; height: 64px; border-color: #fff; border-style: dashed; animation: spin 4s linear infinite; }
.cursor-wrapper.active .cursor-text { opacity: 1; }

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes targetPulse {
    0%,100% { opacity: 0.55; transform: scale(0.9); }
    50%     { opacity: 1; transform: scale(1.15); }
}

/* ---------- Global micrographics UI ---------- */
.global-ui { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.corner-bracket { position: absolute; width: 2vw; height: 2vw; border-color: rgba(255,255,255,0.2); }
.cb-tl { top: 2rem; left: 2rem; border-top: 1px solid; border-left: 1px solid; }
.cb-tr { top: 2rem; right: 2rem; border-top: 1px solid; border-right: 1px solid; }
.cb-bl { bottom: 2rem; left: 2rem; border-bottom: 1px solid; border-left: 1px solid; }
.cb-br { bottom: 2rem; right: 2rem; border-bottom: 1px solid; border-right: 1px solid; }

.ui-text { font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 0.2em; color: rgba(255,255,255,0.55); text-transform: uppercase; }

.ui-coords {
    position: fixed; top: 6rem; left: 3rem; z-index: 41;
    display: none; flex-direction: column; gap: 0.25rem;
    mix-blend-mode: difference; pointer-events: none;
}
.ui-status {
    position: fixed; bottom: 2rem; right: 3rem; z-index: 41;
    text-align: right; mix-blend-mode: difference; pointer-events: none; display: none;
}
@media (min-width: 768px) { .ui-coords, .ui-status { display: flex; } .ui-status { display: block; } }

/* ============================================================
   REUSABLE COMPONENTS
   ============================================================ */

main { position: relative; z-index: 10; }

/* Page hero */
.page-hero {
    position: relative; z-index: 10;
    padding: 11rem 1.5rem 4rem;
    border-bottom: 1px solid var(--hair-soft);
    overflow: hidden;
}
@media (min-width: 768px) { .page-hero { padding: 14rem 3rem 6rem; } }
@media (min-width: 1024px) { .page-hero { padding: 15rem 4rem 7rem; } }
.page-hero-inner { max-width: 1700px; margin: 0 auto; position: relative; z-index: 2; }
.page-hero-bgtext {
    position: absolute; right: -3vw; bottom: -6vw; z-index: 0;
    font-family: 'Syne', sans-serif; font-weight: 700; font-size: 28vw;
    color: rgba(255,255,255,0.018); letter-spacing: -0.06em; line-height: 0.8;
    pointer-events: none; user-select: none; white-space: nowrap;
}

.eyebrow {
    display: inline-flex; align-items: center; gap: 0.85rem;
    font-family: 'Space Mono', monospace; font-size: 11px;
    letter-spacing: 0.25em; text-transform: uppercase;
    color: rgba(255,255,255,0.65); margin-bottom: 1.75rem;
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: rgba(255,255,255,0.5); }

.page-title {
    font-family: 'Syne', sans-serif; font-weight: 700;
    font-size: clamp(2.75rem, 9vw, 9rem); line-height: 0.9;
    letter-spacing: -0.04em; text-transform: uppercase; color: #fff; margin: 0;
}
.page-title .accent, .accent-italic {
    color: transparent; -webkit-text-stroke: 1.3px rgba(255,255,255,0.5);
    font-family: 'Playfair Display', serif; font-style: italic; font-weight: 300;
    text-transform: none;
}
.text-outline { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.4); }

.page-lede {
    font-family: 'Inter', sans-serif; font-weight: 300;
    font-size: clamp(1.05rem, 1.5vw, 1.4rem); line-height: 1.7;
    color: rgba(255,255,255,0.78); max-width: 60ch; margin-top: 2.25rem;
}
.page-lede strong { color: #fff; font-weight: 500; }

/* Section scaffolding */
.section {
    position: relative; z-index: 10;
    padding: 5rem 1.5rem; border-top: 1px solid var(--hair-soft);
}
@media (min-width: 768px) { .section { padding: 7rem 3rem; } }
@media (min-width: 1024px) { .section { padding: 8rem 4rem; } }
.section-inner { max-width: 1700px; margin: 0 auto; }
.section-label {
    font-family: 'Space Mono', monospace; font-size: 11px;
    letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.6);
    margin-bottom: 2.5rem; display: block;
}
.section-heading {
    font-family: 'Syne', sans-serif; font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem); line-height: 0.95; letter-spacing: -0.035em;
    text-transform: uppercase; color: #fff; margin: 0;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 0.85rem;
    font-family: 'Space Mono', monospace; font-size: 11px;
    letter-spacing: 0.22em; text-transform: uppercase;
    padding: 1.05rem 1.6rem; border: 1px solid rgba(255,255,255,0.4);
    color: #fff; transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.btn .arrow { transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); }
.btn:hover { background: #fff; color: #010101; border-color: #fff; }
.btn:hover .arrow { transform: translateX(6px); }
.btn-solid { background: #fff; color: #010101; border-color: #fff; }
.btn-solid:hover { background: transparent; color: #fff; border-color: rgba(255,255,255,0.25); }

.link-underline {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: 0.2em;
    text-transform: uppercase; color: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.25); padding-bottom: 0.4rem;
    transition: color 0.3s ease, border-color 0.3s ease;
}
.link-underline:hover { color: #fff; border-color: #fff; }
.link-underline .arrow { transition: transform 0.4s ease; }
.link-underline:hover .arrow { transform: translateX(5px); }

/* Reticle accent */
.reticle {
    position: relative; width: 80px; height: 80px; flex-shrink: 0;
}
.reticle .corner { position: absolute; width: 13px; height: 13px; border-color: rgba(255,255,255,0.6); }
.reticle .corner.tl { top: 0; left: 0; border-top: 1px solid; border-left: 1px solid; }
.reticle .corner.tr { top: 0; right: 0; border-top: 1px solid; border-right: 1px solid; }
.reticle .corner.bl { bottom: 0; left: 0; border-bottom: 1px solid; border-left: 1px solid; }
.reticle .corner.br { bottom: 0; right: 0; border-bottom: 1px solid; border-right: 1px solid; }
.reticle::before, .reticle::after { content: ''; position: absolute; background: rgba(255,255,255,0.2); }
.reticle::before { left: 0; right: 0; top: 50%; height: 1px; }
.reticle::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.reticle .core {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 6px; height: 6px; background: #fff; border-radius: 50%;
    box-shadow: 0 0 10px #fff; animation: targetPulse 1.4s ease-in-out infinite;
}

/* Reveal hooks (GSAP toggles these via JS; fallbacks visible) */
.reveal { opacity: 0; }
.no-js .reveal { opacity: 1; }

/* Placeholder media slots */
.media-ph {
    position: relative; width: 100%; height: 100%;
    background-color: #0a0a0a;
    background-image: repeating-linear-gradient(
        -45deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 11px);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.media-ph span {
    font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: 0.3em;
    text-transform: uppercase; color: rgba(255,255,255,0.35);
}
.media-ph video, .media-ph img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
    position: relative; z-index: 10; background: #010101;
    border-top: 1px solid var(--hair); padding: 5rem 1.5rem 2rem;
    overflow: hidden;
}
@media (min-width: 768px) { .site-footer { padding: 6rem 3rem 2.5rem; } }
@media (min-width: 1024px) { .site-footer { padding: 7rem 4rem 2.5rem; } }
.site-footer-inner { max-width: 1700px; margin: 0 auto; position: relative; z-index: 2; }

.footer-cta {
    display: flex; flex-direction: column; gap: 2rem;
    padding-bottom: 4rem; margin-bottom: 3rem;
    border-bottom: 1px solid var(--hair);
}
@media (min-width: 900px) { .footer-cta { flex-direction: row; justify-content: space-between; align-items: flex-end; } }
.footer-cta-title {
    font-family: 'Syne', sans-serif; font-weight: 700;
    font-size: clamp(2.25rem, 6vw, 5.5rem); line-height: 0.9; letter-spacing: -0.04em;
    text-transform: uppercase; color: #fff; margin: 0;
}
.footer-cta-title .accent {
    color: transparent; -webkit-text-stroke: 1.3px rgba(255,255,255,0.5);
    font-family: 'Playfair Display', serif; font-style: italic; font-weight: 300; text-transform: none;
}

.footer-cols {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem 1.5rem;
    margin-bottom: 4rem;
}
@media (min-width: 768px) { .footer-cols { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; } }
.footer-col h4 {
    font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 0.22em;
    text-transform: uppercase; color: rgba(255,255,255,0.6); margin: 0 0 1.5rem;
    display: flex; align-items: center; gap: 0.6rem;
}
.footer-col h4::before { content: ''; width: 14px; height: 1px; background: rgba(255,255,255,0.4); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.footer-col li a, .footer-col li span {
    font-family: 'Inter', sans-serif; font-weight: 300; font-size: 0.95rem;
    color: rgba(255,255,255,0.8); transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-flex; align-items: center; gap: 0.5rem;
}
.footer-col li a:hover { color: #fff; padding-left: 0.35rem; }
.footer-brand-logo { height: 1.75rem; filter: invert(1); margin-bottom: 1.5rem; }
.footer-brand-copy {
    font-family: 'Inter', sans-serif; font-weight: 300; font-size: 0.95rem;
    line-height: 1.7; color: rgba(255,255,255,0.55); max-width: 38ch;
}

.footer-bar {
    display: flex; flex-direction: column; gap: 1rem;
    padding-top: 2rem; border-top: 1px solid var(--hair-soft);
    font-family: 'Space Mono', monospace; font-size: 10px;
    letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.55);
}
@media (min-width: 768px) { .footer-bar { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-bgtext {
    position: absolute; bottom: -5vw; left: -1vw; z-index: 0;
    font-family: 'Syne', sans-serif; font-weight: 700; font-size: 22vw;
    color: rgba(255,255,255,0.015); letter-spacing: -0.06em; line-height: 0.8;
    pointer-events: none; user-select: none; white-space: nowrap;
}

/* Touch: drop custom cursor */
@media (hover: none) {
    .cursor-wrapper { display: none !important; }
}

/* Reduced motion: pin reveals, stop ambient pulses */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
    .reticle .core { animation: none; }
    .cursor-wrapper { display: none !important; }
}
