/* eyes.team — Diurnal Optic palette and typography */
:root {
    --cobalt-sky: #3D6FB6;
    --dawn-wash: #A9C4E6;
    --apricot-dusk: #E8B47A;
    --saffron-engraving: #E89F2C;
    --iris-cream: #F4ECD8;
    --optic-black: #1A1B22;
    --sentinel-teal: #3F8A82;
    --pearl-mist: #D8DDE0;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--cobalt-sky);
    color: var(--optic-black);
    font-family: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
    font-size: 18px;
    line-height: 1.78;
    overflow-x: hidden;
    cursor: none;
}

body {
    position: relative;
    min-height: 100vh;
}

/* ===== Sky-Plate (parallax background) ===== */
.sky-plate-wrap {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.sky-plate {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 100vw;
    height: 540vh;
    min-width: 1440px;
    will-change: transform;
}

/* ===== Arrival Overlay ===== */
.arrival-overlay {
    position: fixed;
    inset: 0;
    background: var(--optic-black);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 800ms ease-out;
    pointer-events: none;
}

.arrival-overlay.fade-out {
    opacity: 0;
}

.arrival-iris {
    overflow: visible;
}

/* ===== Compass Navigation ===== */
.compass {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 80;
}

.compass-plate {
    position: absolute;
    width: 84px;
    height: 22px;
    background: var(--iris-cream);
    border: 0.4px solid var(--optic-black);
    color: var(--optic-black);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 600ms ease, font-weight 380ms ease;
    box-shadow: 0 1px 0 rgba(26, 27, 34, 0.18);
}

.compass-plate.appear {
    opacity: 1;
}

.compass-plate:hover {
    font-weight: 500;
}

.compass-plate:hover .compass-cross {
    width: 14px;
    height: 14px;
}

.compass-cross {
    position: relative;
    width: 8px;
    height: 8px;
    transition: width 320ms ease, height 320ms ease;
    flex: 0 0 auto;
}

.compass-cross::before,
.compass-cross::after {
    content: "";
    position: absolute;
    background: var(--saffron-engraving);
}

.compass-cross::before {
    left: 50%;
    top: 0;
    width: 0.6px;
    height: 100%;
    transform: translateX(-50%);
}

.compass-cross::after {
    top: 50%;
    left: 0;
    height: 0.6px;
    width: 100%;
    transform: translateY(-50%);
}

.compass-word {
    font-variant: small-caps;
    transform: translateY(0.5px);
}

.compass-n { top: 18px; left: 50%; transform: translateX(-50%); }
.compass-s { bottom: 18px; left: 50%; transform: translateX(-50%); }
.compass-e { right: 18px; top: 50%; transform: translateY(-50%); }
.compass-w { left: 18px; top: 50%; transform: translateY(-50%); }

/* ===== Reticles (fixed) ===== */
.reticles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 70;
}

.reticle {
    position: absolute;
    pointer-events: auto;
    opacity: 0;
    transform: scale(0.04);
    transition: opacity 240ms ease, transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reticle.opened {
    opacity: 1;
    transform: scale(1);
}

.reticle-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.reticle-svg .crosshair {
    transform-origin: 100px 100px;
    transition: transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reticle-oval .reticle-svg .crosshair {
    transform-origin: 80px 120px;
}

.reticle:hover .reticle-svg .crosshair {
    transform: rotate(11deg);
}

.reticle:hover .reticle-svg .crosshair line {
    stroke: var(--sentinel-teal);
}

.reticle .reticle-shape circle:first-child,
.reticle .reticle-shape polygon:first-child,
.reticle .reticle-shape ellipse:first-child {
    transition: stroke 320ms ease;
}

.reticle:hover .reticle-shape circle:first-child,
.reticle:hover .reticle-shape polygon:first-child,
.reticle:hover .reticle-shape ellipse:first-child {
    stroke: var(--sentinel-teal);
}

.reticle.active .hairline {
    animation: hairline-pulse var(--pulse-duration, 1.6s) ease-in-out infinite;
}

@keyframes hairline-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.reticle-label {
    font-family: "DM Mono", "JetBrains Mono", "Courier New", monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    fill: var(--saffron-engraving);
    opacity: 0.78;
    text-transform: uppercase;
}

.reticle-masthead {
    font-family: "Fraunces", "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: 24px;
    fill: var(--iris-cream);
    font-variation-settings: "opsz" 144, "SOFT" 100, "YEAR" 1800;
    letter-spacing: 0.01em;
}

.reticle-masthead-sub {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-size: 9px;
    fill: var(--iris-cream);
    opacity: 0.62;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* Reticle outer-ring tint when over text passage */
.reticle.containing .reticle-shape > *:first-child {
    stroke-width: 1.8;
}

.focus-lock {
    position: fixed;
    pointer-events: none;
    font-family: "DM Mono", "Courier New", monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    color: var(--saffron-engraving);
    background: rgba(244, 236, 216, 0.74);
    padding: 3px 7px;
    opacity: 0;
    transform: translate(8px, 8px);
    transition: opacity 240ms ease;
    border: 0.4px solid rgba(232, 159, 44, 0.6);
}

.focus-lock.show {
    opacity: 1;
}

/* ===== Iris Strip (right edge) ===== */
.iris-strip {
    position: fixed;
    top: 0;
    right: 28px;
    width: 16px;
    height: 100vh;
    pointer-events: none;
    z-index: 75;
}

.iris-hairline {
    position: absolute;
    top: 12%;
    bottom: 12%;
    left: 50%;
    width: 1px;
    background: var(--saffron-engraving);
    opacity: 0.62;
    transform: translateX(-50%);
}

.iris-list {
    position: absolute;
    top: 12%;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 16px;
}

.iris-list li {
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iris-list li svg {
    width: 12px;
    height: 12px;
    overflow: visible;
}

.iris-list li svg circle {
    transition: r 280ms ease, fill 280ms ease;
}

.iris-list li.active svg circle {
    r: 5;
    fill: var(--sentinel-teal);
}

.iris-list li.hovered svg circle {
    r: 7;
}

/* ===== Blink Counter ===== */
.blink-counter {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 85;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto auto;
    gap: 4px 10px;
    align-items: center;
    font-family: "DM Mono", "Courier New", monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    color: var(--iris-cream);
    text-shadow: 0 0 6px rgba(26, 27, 34, 0.36);
    pointer-events: none;
}

.blink-line {
    grid-column: 1 / span 2;
    width: 92px;
    height: 1px;
    background: var(--saffron-engraving);
    transform-origin: left center;
    transition: transform 200ms ease;
}

.blink-line.contract {
    transform: scaleY(0.2);
}

.blink-numeral {
    grid-column: 1 / span 1;
    grid-row: 2 / span 1;
    font-family: "Major Mono Display", "DM Mono", "Courier New", monospace;
    font-size: 64px;
    line-height: 1;
    color: var(--saffron-engraving);
    text-shadow: 0 0 14px rgba(232, 159, 44, 0.42), 0 0 2px rgba(232, 159, 44, 0.6);
    letter-spacing: 0.02em;
}

.blink-iris {
    grid-column: 2 / span 1;
    grid-row: 2 / span 1;
    width: 18px;
    height: 18px;
    align-self: end;
    opacity: 0;
    transition: opacity 320ms ease;
}

.blink-iris.show {
    opacity: 1;
    animation: blink-iris-blink 600ms ease;
}

@keyframes blink-iris-blink {
    0%, 100% { transform: scaleY(1); }
    40%, 60% { transform: scaleY(0.08); }
}

.blink-caption {
    grid-column: 1 / span 2;
    grid-row: 3 / span 1;
    text-transform: uppercase;
    color: var(--iris-cream);
    opacity: 0.74;
}

/* ===== Coordinate Readout ===== */
.coord-readout {
    position: fixed;
    top: 18px;
    right: 56px;
    z-index: 85;
    display: grid;
    grid-template-columns: auto auto auto auto auto auto;
    column-gap: 6px;
    row-gap: 2px;
    font-family: "DM Mono", "Courier New", monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    color: var(--iris-cream);
    pointer-events: none;
    text-shadow: 0 0 5px rgba(26, 27, 34, 0.36);
}

.coord-tag {
    color: var(--saffron-engraving);
    opacity: 0.86;
}

.coord-val {
    opacity: 0.84;
}

/* ===== Cursor Trail ===== */
.cursor-trail {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
}

.cursor-dot {
    position: absolute;
    width: 22px;
    height: 22px;
    margin-left: -11px;
    margin-top: -11px;
    pointer-events: none;
    transition: opacity 320ms ease;
}

.cursor-dot::before,
.cursor-dot::after {
    content: "";
    position: absolute;
    background: var(--saffron-engraving);
}

.cursor-dot::before {
    left: 50%;
    top: 0;
    width: 0.8px;
    height: 100%;
    transform: translateX(-50%);
}

.cursor-dot::after {
    top: 50%;
    left: 0;
    height: 0.8px;
    width: 100%;
    transform: translateY(-50%);
}

.cursor-dot.head {
    opacity: 1;
}

/* ===== Narrative Column ===== */
.narrative {
    position: relative;
    z-index: 40;
    width: 620px;
    max-width: 90%;
    margin: 32vh auto 32vh;
    padding: 0;
    color: var(--iris-cream);
}

.entry {
    margin: 0 0 26vh 0;
    padding: 22px 28px 26px 28px;
    background: rgba(26, 27, 34, 0.42);
    border-left: 1px solid rgba(232, 159, 44, 0.46);
    backdrop-filter: blur(0.6px);
    -webkit-backdrop-filter: blur(0.6px);
    transition: background-color 600ms ease, filter 320ms ease, color 320ms ease;
}

.entry.observed {
    background: rgba(244, 236, 216, 0.92);
    color: var(--optic-black);
    box-shadow: 0 1px 0 rgba(232, 159, 44, 0.26);
}

.entry.observed .entry-meta,
.entry.observed .entry-opener {
    color: var(--optic-black);
}

.entry-meta {
    font-family: "DM Mono", "Courier New", monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--saffron-engraving);
    margin: 0 0 10px 0;
    opacity: 0.82;
}

.entry-opener {
    font-family: "Fraunces", "Cormorant Garamond", Georgia, serif;
    font-weight: 500;
    font-style: italic;
    font-variation-settings: "opsz" 144, "SOFT" 100, "YEAR" 1800;
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: 1.04;
    letter-spacing: -0.005em;
    margin: 0 0 24px 0;
    color: var(--iris-cream);
}

.entry h1.entry-opener {
    font-size: clamp(2.6rem, 5.4vw, 4.8rem);
}

.entry p {
    margin: 0 0 18px 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 18px;
    line-height: 1.78;
    font-weight: 400;
}

.entry p em {
    font-style: italic;
    color: var(--saffron-engraving);
}

.entry.observed p em {
    color: var(--sentinel-teal);
}

.closing-mark {
    margin-top: 36px !important;
    font-family: "DM Mono", "Courier New", monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--saffron-engraving);
    opacity: 0.86;
}

/* ===== Iris Figures ===== */
.iris-figure {
    margin: 28px 0;
    text-align: center;
}

.iris-figure-right {
    text-align: right;
}

.iris-diagram {
    width: 240px;
    height: 240px;
    overflow: visible;
}

.iris-spec {
    font-family: "DM Mono", "Courier New", monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    fill: var(--saffron-engraving);
    text-transform: uppercase;
}

.iris-figure figcaption {
    margin-top: 8px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-size: 14px;
    line-height: 1.5;
    color: var(--iris-cream);
    opacity: 0.86;
}

.entry.observed .iris-figure figcaption {
    color: var(--optic-black);
}

/* ===== Lens Figures ===== */
.lens-figure {
    margin: 32px 0;
    text-align: center;
}

.lens-diagram {
    width: 100%;
    max-width: 720px;
    height: auto;
    overflow: visible;
}

.lens-tag {
    font-family: "DM Mono", "Courier New", monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    fill: var(--saffron-engraving);
    text-transform: uppercase;
}

.lens-figure figcaption {
    margin-top: 6px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-size: 14px;
    color: var(--iris-cream);
    opacity: 0.86;
}

.entry.observed .lens-figure figcaption,
.entry.observed .lens-tag {
    color: var(--optic-black);
}

.entry.observed .lens-tag {
    fill: var(--optic-black);
}

/* ===== Responsive ===== */
@media (max-width: 880px) {
    .narrative {
        width: 90%;
        margin: 24vh auto 24vh;
    }

    .compass-plate {
        width: 64px;
        height: 18px;
        font-size: 9px;
    }

    .iris-strip {
        right: 12px;
    }

    /* Consolidate to three reticles: primary, reading, rest */
    .reticle[data-role="guest"],
    .reticle[data-role="wide"],
    .reticle[data-role="night"],
    .reticle[data-role="team"],
    .reticle[data-role="focus"] {
        display: none !important;
    }

    .iris-list li[data-target="guest"],
    .iris-list li[data-target="wide"],
    .iris-list li[data-target="night"],
    .iris-list li[data-target="team"],
    .iris-list li[data-target="focus"] {
        display: none;
    }

    .reticle[data-role="primary"] {
        --override-rx: 0.5;
        --override-ry: 0.18;
        --override-size: min(70vw, 320px);
    }

    .reticle[data-role="reading"] {
        --override-rx: 0.5;
        --override-ry: 0.5;
        --override-size: min(70vw, 320px);
    }

    .reticle[data-role="rest"] {
        --override-rx: 0.5;
        --override-ry: 0.82;
        --override-size: min(70vw, 320px);
    }

    .blink-numeral {
        font-size: 44px;
    }

    .coord-readout {
        font-size: 8px;
        right: 36px;
    }
}

@media (max-width: 520px) {
    .narrative {
        width: 92%;
    }

    .entry {
        padding: 16px 18px;
    }

    .entry-opener {
        font-size: clamp(1.8rem, 8vw, 2.6rem);
    }

    .blink-counter {
        bottom: 14px;
        left: 14px;
    }

    .blink-line {
        width: 70px;
    }
}

/* ===== Reticle reduced motion guard ===== */
@media (prefers-reduced-motion: reduce) {
    .reticle.active .hairline {
        animation: none;
        opacity: 0.78;
    }
    .sky-plate {
        transition: none;
    }
}
