/* ============================================
   eyes.plus - Street-level visual culture portal
   Palette: muted, desaturated, urban patina
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --wall-base: #e8e4df;
    --deep-charcoal: #2e2e34;
    --dusty-iris: #8b7e9b;
    --fog-grey: #c8c4be;
    --cement-rose: #b09a8e;
    --slate-teal: #6a7d7e;
    --chalk-white: #f5f2ed;
    --deep-plum: #3a3340;
    --mid-grey: #7a7a82;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
    --font-mono: 'DM Mono', 'Courier New', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--wall-base);
    color: var(--deep-charcoal);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
}

/* ---------- Concrete Texture Overlay ---------- */
#texture-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* ---------- THE WALL (Hero Section) ---------- */
#the-wall {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--wall-base);
    overflow: hidden;
}

#eye-hero {
    opacity: 0;
    transform: scale(0);
    animation: eye-appear 500ms 2.2s ease-out forwards;
    margin-bottom: 2rem;
}

#eye-svg {
    width: clamp(100px, 15vw, 180px);
    height: auto;
}

#logotype {
    text-align: center;
    line-height: 1;
}

#logo-eyes {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.06em;
    color: var(--deep-charcoal);
    opacity: 0;
    display: inline-block;
    animation: fade-in 1200ms 0.3s ease-out forwards;
    background: radial-gradient(ellipse at 30% 40%, var(--dusty-iris) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 60%, var(--cement-rose) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 20%, var(--slate-teal) 0%, transparent 70%),
                var(--deep-charcoal);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#logo-plus {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.5rem, 3vw, 3rem);
    letter-spacing: 0.06em;
    color: var(--dusty-iris);
    opacity: 0;
    display: inline-block;
    transform: translateX(20px);
    animation: slide-in-right 800ms 1.7s ease-out forwards;
    vertical-align: super;
}

#wall-tagline {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    color: var(--mid-grey);
    letter-spacing: 0.1em;
    margin-top: 1.5rem;
    opacity: 0;
    animation: fade-in 1000ms 2.8s ease-out forwards;
}

/* ---------- Hero Animations ---------- */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes eye-appear {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}

/* ---------- MASONRY GRID ---------- */
#paste-up-zone,
#lower-paste-up {
    padding: 2rem clamp(1rem, 3vw, 3rem);
}

.masonry-grid {
    columns: 4;
    column-gap: 6px;
}

.masonry-block {
    break-inside: avoid;
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
    padding: clamp(1.25rem, 2vw, 2rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Wheat-paste irregular edges */
.masonry-block:nth-child(odd) {
    clip-path: polygon(1px 0, calc(100% - 2px) 1px, 100% calc(100% - 1px), 2px 100%);
}

.masonry-block:nth-child(even) {
    clip-path: polygon(0 2px, calc(100% - 1px) 0, 100% calc(100% - 2px), 1px calc(100% - 1px));
}

/* Block heights */
.block-tall { min-height: 440px; }
.block-medium { min-height: 320px; }
.block-short { min-height: 200px; }

/* ---------- Solid Block Colors ---------- */
.solid-fog { background-color: var(--fog-grey); }
.solid-plum { background-color: var(--deep-plum); }
.solid-rose { background-color: var(--cement-rose); }
.solid-wall { background-color: var(--wall-base); border: 1px solid var(--fog-grey); }

/* ---------- Gradient Mesh Blocks ---------- */
.mesh-1 {
    background:
        radial-gradient(ellipse at 30% 40%, var(--dusty-iris) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, var(--cement-rose) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 20%, var(--slate-teal) 0%, transparent 70%),
        var(--wall-base);
    background-size: 200% 200%;
    will-change: background-position;
    animation: mesh-shift 12s ease-in-out infinite alternate;
}

.mesh-2 {
    background:
        radial-gradient(ellipse at 60% 30%, var(--cement-rose) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 70%, var(--dusty-iris) 0%, transparent 65%),
        conic-gradient(from 45deg at 80% 50%, var(--fog-grey) 0%, transparent 30%),
        var(--chalk-white);
    background-size: 200% 200%;
    will-change: background-position;
    animation: mesh-shift 14s ease-in-out infinite alternate;
}

.mesh-3 {
    background:
        radial-gradient(ellipse at 40% 70%, var(--slate-teal) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, var(--dusty-iris) 0%, transparent 60%),
        radial-gradient(ellipse at 10% 30%, var(--cement-rose) 0%, transparent 55%),
        var(--wall-base);
    background-size: 200% 200%;
    will-change: background-position;
    animation: mesh-shift 10s ease-in-out infinite alternate;
}

.mesh-4 {
    background:
        radial-gradient(ellipse at 70% 40%, var(--cement-rose) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 80%, var(--slate-teal) 0%, transparent 60%),
        conic-gradient(from 180deg at 50% 50%, var(--dusty-iris) 0%, transparent 25%),
        var(--chalk-white);
    background-size: 200% 200%;
    will-change: background-position;
    animation: mesh-shift 16s ease-in-out infinite alternate;
}

.mesh-5 {
    background:
        radial-gradient(ellipse at 20% 50%, var(--dusty-iris) 0%, transparent 55%),
        radial-gradient(ellipse at 60% 80%, var(--fog-grey) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 20%, var(--cement-rose) 0%, transparent 65%),
        var(--wall-base);
    background-size: 200% 200%;
    will-change: background-position;
    animation: mesh-shift 11s ease-in-out infinite alternate;
}

.mesh-6 {
    background:
        radial-gradient(ellipse at 50% 50%, var(--slate-teal) 0%, transparent 45%),
        radial-gradient(ellipse at 80% 80%, var(--cement-rose) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 20%, var(--dusty-iris) 0%, transparent 50%),
        var(--fog-grey);
    background-size: 200% 200%;
    will-change: background-position;
    animation: mesh-shift 13s ease-in-out infinite alternate;
}

@keyframes mesh-shift {
    0% { background-position: 0% 0%; }
    50% { background-position: 5% 10%; }
    100% { background-position: 10% 5%; }
}

/* ---------- Block Content Typography ---------- */
.block-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mid-grey);
    display: block;
    margin-bottom: 0.75rem;
}

.light-label {
    color: var(--fog-grey);
}

.block-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    letter-spacing: 0.02em;
    color: var(--deep-charcoal);
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.light-title {
    color: var(--chalk-white);
}

.block-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.9rem, 1.2vw, 1.125rem);
    line-height: 1.65;
    color: var(--deep-charcoal);
}

.light-text {
    color: var(--chalk-white);
}

.block-quote {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-style: italic;
    line-height: 1.5;
    color: var(--deep-charcoal);
    margin-bottom: 0.5rem;
}

.block-attribution {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mid-grey);
}

/* ---------- Circuit Trace SVGs ---------- */
.circuit-trace {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.circuit-trace path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1.5s ease-out;
}

.circuit-trace circle {
    opacity: 0;
    transition: opacity 0.3s ease-out 1.5s;
}

.masonry-block.revealed .circuit-trace path {
    stroke-dashoffset: 0;
}

.masonry-block.revealed .circuit-trace circle {
    opacity: 1;
}

/* ---------- Eye Corner Decorations ---------- */
.eye-corner {
    position: absolute;
    bottom: 12px;
    right: 12px;
    opacity: 0.5;
}

.eye-corner-light {
    opacity: 0.4;
}

/* ---------- Stagger Reveal Animation ---------- */
.masonry-block {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.masonry-block.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- IRIS CORRIDOR ---------- */
#iris-corridor {
    width: 100%;
    padding: 4rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--wall-base);
}

.iris-circles {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 300px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.iris-circle {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: multiply;
    transform: scale(0.8);
    transition: transform 800ms ease-out;
}

.iris-circle.iris-revealed {
    transform: scale(1);
}

.circle-1 {
    width: 280px;
    height: 280px;
    background-color: var(--deep-plum);
    left: calc(50% - 240px);
    top: calc(50% - 140px);
}

.circle-2 {
    width: 240px;
    height: 240px;
    background-color: var(--dusty-iris);
    left: calc(50% - 160px);
    top: calc(50% - 120px);
}

.circle-3 {
    width: 220px;
    height: 220px;
    background-color: var(--fog-grey);
    left: calc(50% - 110px);
    top: calc(50% - 110px);
}

.circle-4 {
    width: 200px;
    height: 200px;
    background-color: var(--cement-rose);
    left: calc(50% - 40px);
    top: calc(50% - 100px);
}

.circle-5 {
    width: 180px;
    height: 180px;
    background-color: var(--chalk-white);
    left: calc(50% + 30px);
    top: calc(50% - 90px);
}

/* ---------- GROUND LEVEL (Footer) ---------- */
#ground-level {
    width: 100%;
    padding: 6rem 2rem;
    background-color: var(--deep-plum);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
}

#footer-statement {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--chalk-white);
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fade-in 1500ms ease-out forwards;
    animation-play-state: paused;
}

#footer-statement.visible {
    animation-play-state: running;
}

#footer-domain {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--mid-grey);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.4;
}

/* ---------- SCROLL-TO-TOP EYE ---------- */
#scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dusty-iris);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease-out, color 200ms ease-out;
    padding: 8px;
}

#scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#scroll-top:hover {
    color: var(--slate-teal);
}

#scroll-top svg {
    display: block;
    width: 40px;
    height: 20px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
    .masonry-grid {
        columns: 3;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        columns: 2;
    }

    .block-tall { min-height: 360px; }
    .block-medium { min-height: 260px; }
    .block-short { min-height: 180px; }

    .iris-circle {
        transform: scale(0.6);
    }

    .iris-circle.iris-revealed {
        transform: scale(0.75);
    }

    .circle-1 { width: 180px; height: 180px; left: calc(50% - 160px); top: calc(50% - 90px); }
    .circle-2 { width: 160px; height: 160px; left: calc(50% - 110px); top: calc(50% - 80px); }
    .circle-3 { width: 140px; height: 140px; left: calc(50% - 70px); top: calc(50% - 70px); }
    .circle-4 { width: 130px; height: 130px; left: calc(50% - 20px); top: calc(50% - 65px); }
    .circle-5 { width: 120px; height: 120px; left: calc(50% + 30px); top: calc(50% - 60px); }

    .iris-circles { height: 200px; }
}

@media (max-width: 480px) {
    .masonry-grid {
        columns: 1;
    }

    .block-tall { min-height: 300px; }
    .block-medium { min-height: 240px; }
    .block-short { min-height: 160px; }

    #paste-up-zone,
    #lower-paste-up {
        padding: 1rem;
    }
}
