/* ═══════════════════════════════════════
   eyes.team — Victorian Optical Workshop
   ═══════════════════════════════════════ */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0a0a0f;
    color: #f2e8d0;
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
}

/* --- Background Texture (Victorian wallpaper) --- */
.bg-texture {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            #1a1a24 20px,
            #1a1a24 21px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 20px,
            #1a1a24 20px,
            #1a1a24 21px
        );
    opacity: 0.04;
}

/* --- Chapters (full-viewport sections) --- */
.chapter {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: clamp(48px, 8vh, 120px) clamp(24px, 3vw, 48px);
    z-index: 1;
}

.chapter-content {
    max-width: 720px;
    width: 100%;
    text-align: center;
    position: relative;
}

/* --- Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 800ms ease, transform 800ms ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════
   FRONTISPIECE (Hero)
   ═══════════════════════════════════════ */
#frontispiece {
    position: relative;
    gap: clamp(24px, 3vw, 48px);
}

.hero-eye-watermark {
    position: absolute;
    width: clamp(300px, 50vw, 600px);
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 9vw, 8rem);
    letter-spacing: 0.04em;
    line-height: 1.0;
    color: #f2e8d0;
    text-shadow: 0 0 30px rgba(201, 168, 76, 0.15);
    z-index: 1;
    min-height: 1.2em;
}

.hero-title .letter {
    display: inline-block;
    opacity: 0;
    text-shadow: 0 0 40px rgba(201, 168, 76, 0.8);
    animation: letterReveal 400ms ease forwards;
}

@keyframes letterReveal {
    0% {
        opacity: 0;
        text-shadow: 0 0 60px rgba(201, 168, 76, 1);
    }
    50% {
        text-shadow: 0 0 40px rgba(201, 168, 76, 0.6);
    }
    100% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(201, 168, 76, 0.2);
    }
}

.hero-subtitle {
    font-family: 'Cormorant SC', serif;
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 1rem);
    letter-spacing: 0.18em;
    color: #a8a8b0;
    z-index: 1;
    min-height: 1.5em;
}

/* --- Ornamental Rules --- */
.ornamental-rule {
    width: clamp(200px, 50vw, 500px);
    height: auto;
    z-index: 1;
}

.reveal-line line,
.reveal-line path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 1200ms ease;
}

.reveal-line.drawn line,
.reveal-line.drawn path {
    stroke-dashoffset: 0;
}

/* ═══════════════════════════════════════
   THESIS
   ═══════════════════════════════════════ */
.thesis-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.04em;
    line-height: 1.1;
    color: #f2e8d0;
    margin-bottom: 1.5em;
}

.thesis-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.75;
    color: #a8a8b0;
    margin-bottom: 1.5em;
    text-align: left;
}

.thesis-text em {
    color: #c9a84c;
    font-style: italic;
}

/* --- Eye Divider --- */
.eye-divider {
    width: 80px;
    height: auto;
    margin: 2em auto;
    display: block;
}

/* ═══════════════════════════════════════
   CABINET OF CURIOSITIES
   ═══════════════════════════════════════ */
#cabinet {
    min-height: auto;
    background: radial-gradient(ellipse at 70% 50%, #4a1228 0%, transparent 60%);
    padding-top: clamp(80px, 12vh, 160px);
    padding-bottom: clamp(80px, 12vh, 160px);
}

.section-label {
    font-family: 'Cormorant SC', serif;
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 1rem);
    letter-spacing: 0.18em;
    color: #8b7335;
    text-transform: uppercase;
    margin-bottom: 3em;
}

.cabinet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(24px, 3vw, 48px);
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.cabinet-card {
    position: relative;
    background: #1e1e28;
    border: 1px solid #8b7335;
    aspect-ratio: 4 / 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px;
    transition: transform 300ms ease-out, box-shadow 300ms ease-out;
    cursor: default;
}

.cabinet-card:hover {
    transform: scale(1.04);
    box-shadow: 0 0 40px rgba(201, 168, 76, 0.5);
}

.cabinet-card:hover .corner-flourish path {
    stroke: #c9a84c;
}

.cabinet-card:hover .card-label {
    letter-spacing: 0.20em;
}

/* Corner Flourishes */
.corner-flourish {
    position: absolute;
    width: 40px;
    height: 40px;
    transition: all 400ms ease;
}

.corner-flourish.top-left { top: 8px; left: 8px; }
.corner-flourish.top-right { top: 8px; right: 8px; }
.corner-flourish.bottom-left { bottom: 8px; left: 8px; }
.corner-flourish.bottom-right { bottom: 8px; right: 8px; }

.corner-flourish path {
    transition: stroke 400ms ease;
}

/* Card Content */
.card-icon {
    width: 48px;
    height: 48px;
}

.card-label {
    font-family: 'Cormorant SC', serif;
    font-weight: 500;
    font-size: clamp(0.85rem, 1vw, 1rem);
    letter-spacing: 0.18em;
    color: #c9a84c;
    transition: letter-spacing 300ms ease;
}

.card-desc {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 0.875rem;
    color: #a8a8b0;
    line-height: 1.5;
}

/* --- Organic Blobs --- */
.organic-blob {
    position: absolute;
    width: clamp(300px, 40vw, 500px);
    height: auto;
    pointer-events: none;
    z-index: -1;
    animation: blobPulse 8s ease-in-out infinite alternate;
}

.blob-1 {
    top: 10%;
    right: -5%;
}

.blob-2 {
    bottom: 10%;
    left: -10%;
}

@keyframes blobPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.02); }
}

/* ═══════════════════════════════════════
   MANIFESTO
   ═══════════════════════════════════════ */
#manifesto {
    min-height: auto;
    padding-top: clamp(80px, 12vh, 160px);
    padding-bottom: clamp(80px, 12vh, 160px);
}

.manifesto-block {
    margin: 2em 0;
}

.manifesto-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #f2e8d0;
    text-align: left;
}

/* ═══════════════════════════════════════
   COLOPHON
   ═══════════════════════════════════════ */
#colophon {
    min-height: 50vh;
    background: #0a0a0f;
}

.colophon-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.04em;
    color: #f2e8d0;
    margin: 1em 0 0.25em;
}

.colophon-year {
    font-family: 'Cormorant SC', serif;
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 1rem);
    letter-spacing: 0.18em;
    color: #8b7335;
    margin-bottom: 1em;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .cabinet-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
    }
}

@media (max-width: 640px) {
    .corner-flourish {
        display: none;
    }

    .hero-title {
        word-break: break-all;
    }
}
