.halide-hero-wrapper {
    --bg: transparent;
    --silver: #e0e0e0;
    --accent: #ff3c00;
    --grain-opacity: 0.15;
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    color: var(--silver);
}

.halide-hero-wrapper * {
    box-sizing: border-box;
}

.halide-hero-wrapper .halide-body {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Grain overlay */
.halide-hero-wrapper .halide-grain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: var(--grain-opacity);
    background: transparent;
    filter: url(#grain);
}

/* SVG filter is hidden */
.halide-hero-wrapper .grain-svg {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Perspective viewport */
.halide-hero-wrapper .viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    perspective: 2000px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Main 3D canvas */
.halide-hero-wrapper .canvas-3d {
    position: relative;
    width: min(800px, 72vw);
    height: min(500px, 50vh);
    min-width: 420px;
    min-height: 280px;
    transform-style: preserve-3d;
    opacity: 0;
    transform: rotateX(90deg) rotateZ(0deg) scale(0.8);
    will-change: transform, opacity;
}

/* Image layers */
.halide-hero-wrapper .layer {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(224, 224, 224, 0.1);
    background-size: cover;
    background-position: center;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    will-change: transform;
}

.halide-hero-wrapper .layer-1 {
    background-image: url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1600&q=85");
    filter: grayscale(1) contrast(1.2) brightness(0.5);
}

.halide-hero-wrapper .layer-2 {
    background-image: url("https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=1600&q=85");
    filter: grayscale(1) contrast(1.1) brightness(0.7);
    opacity: 0.6;
    mix-blend-mode: screen;
}

.halide-hero-wrapper .layer-3 {
    background-image: url("https://images.unsplash.com/photo-1511497584788-876760111969?auto=format&fit=crop&w=1600&q=85");
    filter: grayscale(1) contrast(1.3) brightness(0.8);
    opacity: 0.4;
    mix-blend-mode: overlay;
}

/* Topographical contour lines */
.halide-hero-wrapper .contours {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    transform: translateZ(120px);
    pointer-events: none;
}

/* Interface overlay */
.halide-hero-wrapper .interface-grid {
    position: absolute;
    inset: 0;
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    z-index: 10;
    pointer-events: none;
}

.halide-hero-wrapper .interface-brand {
    font-weight: 700;
    letter-spacing: 0.04em;
}

.halide-hero-wrapper .coordinates {
    text-align: right;
    font-family: monospace;
    color: var(--accent);
    font-size: 0.7rem;
    line-height: 1.6;
}

/* Hero title */
.halide-hero-wrapper .hero-title {
    grid-column: 1 / -1;
    align-self: center;
    margin: 0;
    font-size: clamp(3rem, 10vw, 10rem);
    line-height: 0.85;
    letter-spacing: -0.04em;
    font-weight: 500;
    mix-blend-mode: difference;
    user-select: none;
    color: #e0e0e0;
}

/* Bottom information */
.halide-hero-wrapper .bottom-interface {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}

.halide-hero-wrapper .archive {
    font-family: monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    letter-spacing: 0.03em;
}

.halide-hero-wrapper .archive p {
    margin: 0 0 0.35rem;
}

/* CTA */
.halide-hero-wrapper .cta-button {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    padding: 1rem 2rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 85% 100%, 0 100%);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.halide-hero-wrapper .cta-button:hover {
    transform: translateY(-5px);
}

/* Scroll animation */
.halide-hero-wrapper .scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    width: 1px;
    height: 60px;
    animation: flow 2s infinite ease-in-out;
    z-index: 20;
}

@keyframes flow {

    0%,
    100% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }
}

/* Subtle cursor glow */
.halide-hero-wrapper .cursor-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Tablet */
@media (max-width: 900px) {
    .halide-hero-wrapper .interface-grid {
        padding: 2rem;
    }

    .halide-hero-wrapper .canvas-3d {
        width: 70vw;
        height: 45vh;
    }

    .halide-hero-wrapper .hero-title {
        font-size: clamp(3.5rem, 12vw, 7rem);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .halide-hero-wrapper {
        min-height: 100svh;
    }

    .halide-hero-wrapper .interface-grid {
        padding: 1.25rem;
        grid-template-rows: auto 1fr auto;
    }

    .halide-hero-wrapper .coordinates {
        font-size: 0.55rem;
    }

    .halide-hero-wrapper .hero-title {
        font-size: clamp(3rem, 17vw, 5rem);
        line-height: 0.88;
    }

    .halide-hero-wrapper .bottom-interface {
        align-items: flex-end;
        gap: 1rem;
    }

    .halide-hero-wrapper .archive {
        font-size: 0.6rem;
        max-width: 45%;
    }

    .halide-hero-wrapper .cta-button {
        min-width: 140px;
        padding: 0.8rem 1rem;
        font-size: 0.65rem;
    }

    .halide-hero-wrapper .canvas-3d {
        width: 88vw;
        height: 45vh;
        min-width: 0;
        min-height: 240px;
    }

    .halide-hero-wrapper .scroll-hint {
        bottom: 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    .halide-hero-wrapper .canvas-3d,
    .halide-hero-wrapper .layer,
    .halide-hero-wrapper .cta-button,
    .halide-hero-wrapper .scroll-hint {
        transition: none;
        animation: none;
    }
}