/* eyes.plus — Anti-design aesthetic, pastoral vision */
/* IntersectionObserver threshold: 0.15 — gentle calligraphic influence, literary quality, warmth */
/* Colors: #4E342E #A0522D #3E2723 #8B4513 #EDE0CC #F4E8D0 #C27A4F #D4956B #D4A04A #8D6E63 */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #F4E8D0;
    color: #3E2723;
    font-family: 'Lora', Georgia, serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    cursor: none;
}

/* ===== BOKEH BACKGROUND FIELD ===== */
#bokeh-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, #D4956B 0%, #C27A4F 30%, transparent 70%);
    pointer-events: none;
    animation: bokeh-drift 20s ease-in-out infinite alternate;
}

.bokeh-circle:nth-child(odd) {
    animation-duration: 25s;
    animation-direction: alternate-reverse;
}

.bokeh-circle:nth-child(3n) {
    background: radial-gradient(circle, #D4A04A 0%, #A0522D 30%, transparent 70%);
    animation-duration: 30s;
}

.bokeh-circle:nth-child(5n) {
    background: radial-gradient(circle, #8D6E63 0%, #4E342E 35%, transparent 70%);
}

@keyframes bokeh-drift {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(10px, -15px) scale(1.05); }
    50% { transform: translate(-8px, 12px) scale(0.95); }
    75% { transform: translate(15px, 8px) scale(1.02); }
    100% { transform: translate(-5px, -10px) scale(1); }
}

/* ===== IRIS MOTIF ===== */
#iris-motif {
    position: fixed;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
    animation: iris-rotate 120s linear infinite;
}

#iris-motif svg {
    width: 100%;
    height: 100%;
}

@keyframes iris-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== PAGE CONTAINER ===== */
#page-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 120px;
}

/* ===== MODULAR BLOCKS ===== */
.mod-block {
    position: relative;
    margin-bottom: 48px;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.block-inner {
    background: rgba(244, 232, 208, 0.75);
    backdrop-filter: blur(2px);
    padding: 36px 40px;
    position: relative;
    overflow: hidden;
}

/* Mixed border styles per block — anti-design principle */
.mod-block:nth-child(odd) .block-inner {
    border: 1px solid #A0522D;
    border-left: 3px solid #8B4513;
}

.mod-block:nth-child(even) .block-inner {
    border: 1px dashed #8D6E63;
    border-bottom: 2px solid #4E342E;
}

.mod-block:nth-child(3n) .block-inner {
    border: 1px dotted #C27A4F;
    border-top: 2px double #A0522D;
}

/* Block size variants */
.block-wide {
    width: 85%;
}

.block-narrow {
    width: 55%;
}

.block-medium {
    width: 70%;
}

/* Deliberate alternating alignment */
.mod-block:nth-child(odd) {
    margin-left: 0;
}

.mod-block:nth-child(even) {
    margin-left: auto;
}

.mod-block:nth-child(3n) {
    margin-left: 8%;
}

.mod-block:nth-child(4n) {
    margin-left: auto;
    margin-right: 5%;
}

/* ===== HERO BLOCK ===== */
#hero-block {
    width: 90%;
    margin-bottom: 80px;
    padding-top: 60px;
}

#hero-block .block-inner {
    background: transparent;
    border: none;
    padding: 0;
    backdrop-filter: none;
}

.domain-title {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: clamp(48px, 8vw, 96px);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #3E2723;
    line-height: 1;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(14px, 2vw, 20px);
    text-transform: lowercase;
    letter-spacing: 0.3em;
    color: #A0522D;
    margin-bottom: 32px;
}

.hero-line {
    width: 120px;
    height: 1px;
    background: linear-gradient(to right, #A0522D, #D4956B, transparent);
    margin-bottom: 32px;
}

.hero-epigraph {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: clamp(16px, 2.2vw, 22px);
    line-height: 1.8;
    color: #4E342E;
    max-width: 480px;
}

/* ===== BLOCK ELEMENTS ===== */
.block-number {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #8D6E63;
    display: block;
    margin-bottom: 8px;
    opacity: 0.7;
}

.block-title {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: clamp(28px, 5vw, 64px);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #3E2723;
    line-height: 1.1;
    margin-bottom: 16px;
}

/* Block rules with different styles */
.block-rule {
    width: 80px;
    height: 0;
    margin-bottom: 20px;
}

.block-rule.dashed {
    border-top: 1px dashed #A0522D;
}

.block-rule.dotted {
    border-top: 2px dotted #8D6E63;
}

.block-rule.solid {
    border-top: 1px solid #8B4513;
}

.block-rule.double {
    border-top: 3px double #C27A4F;
}

.block-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.4rem; /* clamp fallback: clamp(15px, 1.8vw, 18px) */
    line-height: 1.75;
    color: #4E342E;
    max-width: 600px;
}

.block-text em {
    color: #A0522D;
    font-style: italic;
}

.block-annotation {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: #8D6E63;
    margin-top: 20px;
    opacity: 0.7;
    font-style: italic;
}

/* ===== SPECIAL ELEMENTS ===== */
.lens-distortion-overlay {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 40%, rgba(212, 149, 107, 0.08) 70%, transparent 100%);
    pointer-events: none;
}

.afterimage-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, #D4A04A 0%, #C27A4F 40%, transparent 70%);
    opacity: 0.15;
    margin-top: 24px;
    animation: afterimage-pulse 4s ease-in-out infinite;
}

@keyframes afterimage-pulse {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.08; transform: scale(1.1); }
}

.color-swatches {
    display: flex;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.swatch {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 2px;
    border: 1px solid rgba(62, 39, 35, 0.15);
    transition: transform 0.3s ease;
}

.swatch:hover {
    transform: scale(1.3) rotate(5deg);
}

/* ===== FOOTER ===== */
#footer-block {
    width: 60%;
    margin-top: 80px;
    margin-left: auto;
    margin-right: auto;
}

#footer-block .block-inner {
    background: transparent;
    border: none;
    text-align: center;
    backdrop-filter: none;
}

.footer-domain {
    font-family: 'Share Tech Mono', monospace;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #8D6E63;
    margin-bottom: 16px;
}

.footer-line {
    width: 60px;
    height: 1px;
    background: #A0522D;
    margin: 0 auto 16px;
    opacity: 0.5;
}

.footer-text {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 14px;
    line-height: 1.7;
    color: #8D6E63;
}

.footer-glyph {
    font-size: 32px;
    color: #A0522D;
    opacity: 0.4;
    margin-top: 24px;
}

/* ===== LENS CURSOR ===== */
#lens-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

body:hover #lens-cursor {
    opacity: 1;
}

/* ===== BLOCK HOVER / INTERACTION ===== */
.mod-block .block-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(212, 149, 107, 0.06) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mod-block:hover .block-inner::after {
    opacity: 1;
}

.mod-block:hover .block-inner {
    background: rgba(244, 232, 208, 0.9);
}

/* ===== SCROLL REVEAL ===== */
.mod-block {
    opacity: 0;
    transform: translateY(20px);
}

.mod-block.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

#hero-block {
    opacity: 1;
    transform: none;
}

#hero-block.revealed {
    opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #page-container {
        padding: 40px 16px 80px;
    }

    .block-wide,
    .block-narrow,
    .block-medium {
        width: 95%;
    }

    .mod-block:nth-child(even) {
        margin-left: 2%;
    }

    .mod-block:nth-child(3n) {
        margin-left: 2%;
    }

    .mod-block:nth-child(4n) {
        margin-right: 0;
    }

    .block-inner {
        padding: 24px 20px;
    }

    #hero-block {
        width: 95%;
        padding-top: 30px;
    }

    #footer-block {
        width: 90%;
    }

    #iris-motif {
        width: 300px;
        height: 300px;
        top: -60px;
        right: -60px;
    }

    body {
        cursor: auto;
    }

    #lens-cursor {
        display: none;
    }
}

@media (max-width: 480px) {
    .domain-title {
        letter-spacing: 0.08em;
    }

    .block-title {
        letter-spacing: 0.08em;
    }
}