:root {
    color-scheme: dark;
    --bg: #07090d;
    --ink: #f4f1ea;
    --muted: #a7adb7;
    --line: rgba(244, 241, 234, .14);
    --gold: #d6b36a;
    --steel: #9fb0c4;
}

* { box-sizing: border-box; }

html {
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: 0;
}

body::before {
    position: fixed;
    inset: 0;
    content: "";
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-size: 72px 72px;
}

.page-home {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 18rem),
        radial-gradient(circle at 76% 12%, rgba(214, 179, 106, .16), transparent 26rem),
        radial-gradient(circle at 12% 42%, rgba(88, 111, 137, .14), transparent 28rem),
        var(--bg);
}

.page-home::before {
    z-index: 0;
    mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.page-home::after {
    position: fixed;
    inset: 0;
    z-index: 1;
    content: "";
    pointer-events: none;
    background: linear-gradient(90deg, rgba(7, 9, 13, .97), rgba(7, 9, 13, .8) 42%, rgba(7, 9, 13, .2));
}

.page-projects {
    background:
        radial-gradient(circle at 76% 8%, rgba(214, 179, 106, .16), transparent 30rem),
        radial-gradient(circle at 18% 80%, rgba(159, 176, 196, .12), transparent 30rem),
        var(--bg);
}

.page-contact {
    background:
        radial-gradient(circle at 82% 4%, rgba(214, 179, 106, .13), transparent 28rem),
        var(--bg);
}

.page-projects::before,
.page-contact::before { z-index: 0; }

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

.nav-shell {
    border-bottom: 1px solid var(--line);
    background: rgba(7, 9, 13, .84);
    backdrop-filter: blur(24px);
}

.nav-link {
    color: rgba(244, 241, 234, .72);
    transition: color 180ms ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] { color: var(--ink); }

.menu-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    place-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .03);
}

.menu-toggle-line {
    display: block;
    width: 18px;
    height: 1px;
    background: var(--ink);
    transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-of-type(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-of-type(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-of-type(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 9, 13, .98);
}

.mobile-nav[hidden] { display: none; }

.mobile-nav a {
    min-height: 54px;
    padding: 0 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    color: rgba(244, 241, 234, .78);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .16em;
}

.mobile-nav a[aria-current="page"] { color: var(--gold); }

@media (min-width: 768px) {
    .menu-toggle { display: none; }
}

.eyebrow {
    color: var(--gold);
    letter-spacing: .22em;
}

.hero {
    display: grid;
    min-height: calc(100svh - 7rem);
    align-items: center;
    padding-top: 7rem;
    padding-bottom: 2rem;
}

.hero-stats { position: relative; }

.hero-stats .mt-16 { margin-top: 3rem; }

.hero-title {
    max-width: 760px;
    font-size: 5rem;
    line-height: 1.02;
    text-wrap: balance;
}

.hero-copy {
    max-width: 650px;
    color: rgba(244, 241, 234, .78);
}

.stat { border-left: 1px solid rgba(214, 179, 106, .34); }

.glass {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(18, 23, 31, .78), rgba(9, 12, 17, .52));
    box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
    backdrop-filter: blur(20px);
}

.section {
    border-top: 1px solid var(--line);
    background: rgba(7, 9, 13, .46);
    backdrop-filter: blur(6px);
}

.premium-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(214, 179, 106, .58), transparent);
}

.process-item { border-top: 1px solid var(--line); }

#model-stage {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: .56;
    pointer-events: none;
}

#cad-canvas,
#realization-canvas,
#compressor-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.realization-layout {
    display: grid;
    max-width: 980px;
    gap: 1.5rem;
    padding: 2.5rem 0;
}

.realization-media {
    display: grid;
    gap: 1.5rem;
}

.viewer-shell {
    position: relative;
    aspect-ratio: 7 / 5;
    border: 1px solid var(--line);
    overflow: hidden;
    background: linear-gradient(145deg, rgba(18, 23, 31, .82), rgba(9, 12, 17, .58));
    box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
}

.viewer-shell canvas {
    cursor: grab;
    touch-action: pan-y;
}

.viewer-shell canvas:active { cursor: grabbing; }

.viewer-status {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(244, 241, 234, .58);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .16em;
    pointer-events: none;
}

.viewer-status[hidden] { display: none; }

.photo-shell {
    position: relative;
    aspect-ratio: 7 / 5;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0b0e13;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .3);
}

.photo-shell::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.realization-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.harley-photo { transform: scale(.86); }

.panel {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(18, 23, 31, .78), rgba(9, 12, 17, .52));
    box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

.contact-link {
    color: var(--ink);
    text-decoration: none;
}

.contact-link:hover { color: var(--gold); }

.form-field:focus-visible {
    border-color: var(--gold);
    outline: 2px solid rgba(214, 179, 106, .35);
    outline-offset: 2px;
}

@media (max-width: 1024px) {
    .hero-title { font-size: 4rem; }
}

@media (max-width: 760px) {
    .page-home::after {
        background: linear-gradient(180deg, rgba(7, 9, 13, .94), rgba(7, 9, 13, .82) 58%, rgba(7, 9, 13, .56));
    }

    #model-stage { display: none; }

    .hero {
        min-height: auto;
        padding-bottom: 3.5rem;
    }

    .hero-stats .mt-16 { margin-top: 0; }

    .hero-title {
        font-size: 3rem;
        line-height: 1.07;
    }
}

@media (max-width: 420px) {
    .hero-title { font-size: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
