/* eyes.team — Luxury Optical Atelier */
/* Colors: #0a0c0f, #121618, #8c4656, #5a6b5a, #3d5a80, #8c8578, #b8a88a, #e8e0d4, #c9a868 */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    background-color: #0a0c0f;
    color: #e8e0d4;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    cursor: none;
    overflow-x: hidden;
}

/* ── Custom Cursor Lens ── */

#cursor-lens {
    position: fixed;
    width: 120px;
    height: 120px;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    will-change: transform;
}

.lens-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(201, 168, 104, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: border-color 0.4s ease;
}

.lens-ring-outer {
    width: 100%;
    height: 100%;
    border-color: rgba(201, 168, 104, 0.15);
}

.lens-ring-mid {
    width: 66%;
    height: 66%;
    border-color: rgba(201, 168, 104, 0.25);
}

.lens-ring-inner {
    width: 33%;
    height: 33%;
    border-color: rgba(201, 168, 104, 0.5);
}

.lens-crosshair {
    position: absolute;
    background: rgba(201, 168, 104, 0.15);
}

.lens-crosshair-h {
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.lens-crosshair-v {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

#cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(201, 168, 104, 0.06) 0%,
        rgba(61, 90, 128, 0.03) 40%,
        transparent 70%
    );
    will-change: transform;
}

/* ── Viewport Sections ── */

.viewport-section {
    min-height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.section-grid {
    width: 100%;
    max-width: 1400px;
    padding: 80px 48px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0 48px;
    position: relative;
}

/* ── Typography ── */

.domain-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(72px, 10vw, 120px);
    letter-spacing: 0.04em;
    line-height: 1.0;
    color: #e8e0d4;
}

.title-dot {
    color: #c9a868;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(36px, 5vw, 64px);
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: #e8e0d4;
}

.mono-label {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8c8578;
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.75;
    color: #b8a88a;
    max-width: 520px;
}

.closing-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(40px, 6vw, 80px);
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: #e8e0d4;
}

.closing-accent {
    color: #c9a868;
}

/* ── Section 1: Observatory ── */

#observatory .section-grid {
    min-height: 100vh;
    align-content: center;
}

.observatory-title-block {
    grid-column: 1 / 6;
    grid-row: 1;
    z-index: 2;
}

.observatory-label {
    display: block;
    margin-bottom: 24px;
}

.observatory-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: #8c8578;
    margin-top: 24px;
    letter-spacing: 0.01em;
}

.observatory-iris {
    grid-column: 5 / 9;
    grid-row: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.observatory-iris .iris-svg {
    width: 100%;
    max-width: 420px;
    opacity: 0.85;
}

.observatory-meta {
    grid-column: 1 / 4;
    grid-row: 2;
    display: flex;
    gap: 32px;
    margin-top: 48px;
}

.scroll-cue {
    grid-column: 8 / 9;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 48px;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, #c9a868, transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ── Section 2: Perception ── */

#perception {
    background-color: #121618;
}

.perception-header {
    grid-column: 1 / 5;
    grid-row: 1;
}

.perception-header .mono-label {
    display: block;
    margin-bottom: 16px;
}

.perception-iris-grid {
    grid-column: 1 / 9;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-top: 64px;
}

.iris-specimen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.iris-specimen.visible {
    opacity: 1;
    transform: translateY(0);
}

.iris-small {
    width: 100%;
    max-width: 240px;
}

.specimen-label {
    text-align: center;
}

.perception-text {
    grid-column: 5 / 9;
    grid-row: 1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

/* ── Section 3: The Lens ── */

#the-lens {
    background-color: #0a0c0f;
}

.lens-header {
    grid-column: 1 / 5;
    grid-row: 1;
}

.lens-header .mono-label {
    display: block;
    margin-bottom: 16px;
}

.lens-canvas-area {
    grid-column: 1 / 9;
    grid-row: 2;
    position: relative;
    margin-top: 48px;
    height: 400px;
    overflow: hidden;
    border: 1px solid rgba(201, 168, 104, 0.1);
}

#particle-field {
    width: 100%;
    height: 100%;
    display: block;
}

.lens-overlay-text {
    position: absolute;
    bottom: 32px;
    left: 32px;
    max-width: 480px;
    z-index: 2;
}

.lens-data-readout {
    grid-column: 1 / 9;
    grid-row: 3;
    display: flex;
    gap: 64px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(140, 133, 120, 0.2);
}

.readout-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.readout-value {
    font-family: 'Space Mono', monospace;
    font-size: 24px;
    color: #c9a868;
    letter-spacing: 0.05em;
}

/* ── Section 4: Observation Log ── */

#observation-log {
    background-color: #121618;
}

.log-header {
    grid-column: 1 / 5;
    grid-row: 1;
}

.log-header .mono-label {
    display: block;
    margin-bottom: 16px;
}

.log-entries {
    grid-column: 1 / 6;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 48px;
}

.log-entry {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 8px 16px;
    align-items: center;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.log-entry.visible {
    opacity: 1;
    transform: translateX(0);
}

.log-number {
    grid-row: 1 / 3;
    color: #5a6b5a;
}

.log-bar {
    height: 3px;
    background: var(--bar-color, #3d5a80);
    width: 0;
    max-width: var(--bar-width, 50%);
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1px;
}

.log-entry.visible .log-bar {
    width: var(--bar-width, 50%);
}

.log-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: #8c8578;
    line-height: 1.4;
}

.log-visualization {
    grid-column: 6 / 9;
    grid-row: 1 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
}

.log-visualization .iris-svg {
    width: 100%;
    max-width: 320px;
    opacity: 0.7;
}

/* ── Section 5: Collective ── */

#collective {
    background-color: #0a0c0f;
}

.collective-content {
    grid-column: 2 / 8;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.closing-iris-row {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
}

.iris-tiny {
    width: 80px;
    height: 80px;
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

.iris-tiny:hover {
    opacity: 1;
}

.closing-domain {
    margin-top: 24px;
    font-size: 13px;
    color: #5a6b5a;
}

/* ── SVG Iris Styles ── */

.iris-svg circle,
.iris-svg path {
    fill: none;
    transition: stroke-opacity 0.3s ease;
}

/* ── Scroll Reveal ── */

.viewport-section {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.viewport-section.in-view {
    opacity: 1;
}

#observatory {
    opacity: 1;
}

/* ── Responsive ── */

@media (max-width: 1024px) {
    .section-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0 32px;
        padding: 60px 32px;
    }

    .observatory-title-block {
        grid-column: 1 / 5;
    }

    .observatory-iris {
        grid-column: 1 / 5;
        grid-row: 2;
        margin-top: 40px;
    }

    .observatory-iris .iris-svg {
        max-width: 300px;
    }

    .observatory-meta {
        grid-column: 1 / 3;
        grid-row: 3;
    }

    .scroll-cue {
        grid-column: 4 / 5;
        grid-row: 3;
    }

    .perception-header {
        grid-column: 1 / 5;
    }

    .perception-text {
        grid-column: 1 / 5;
        grid-row: 3;
        margin-top: 32px;
    }

    .perception-iris-grid {
        grid-column: 1 / 5;
    }

    .lens-header {
        grid-column: 1 / 5;
    }

    .lens-canvas-area {
        grid-column: 1 / 5;
    }

    .lens-data-readout {
        grid-column: 1 / 5;
        flex-wrap: wrap;
        gap: 32px;
    }

    .log-header {
        grid-column: 1 / 5;
    }

    .log-entries {
        grid-column: 1 / 5;
    }

    .log-visualization {
        grid-column: 1 / 5;
        grid-row: 3;
        margin-top: 40px;
    }

    .collective-content {
        grid-column: 1 / 5;
    }
}

@media (max-width: 640px) {
    .section-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 48px 24px;
    }

    .observatory-title-block,
    .observatory-iris,
    .observatory-meta,
    .scroll-cue,
    .perception-header,
    .perception-text,
    .perception-iris-grid,
    .lens-header,
    .lens-canvas-area,
    .lens-data-readout,
    .log-header,
    .log-entries,
    .log-visualization,
    .collective-content {
        grid-column: 1 / -1;
    }

    .perception-iris-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .closing-iris-row {
        flex-wrap: wrap;
        gap: 16px;
    }

    .iris-tiny {
        width: 56px;
        height: 56px;
    }

    .lens-data-readout {
        flex-direction: column;
        gap: 16px;
    }

    .lens-canvas-area {
        height: 280px;
    }
}
