/* ========================================
   eyes.plus — Frutiger Aero Vision Wellness
   ======================================== */

:root {
    --aurora-green: #78dcb4;
    --aurora-teal: #4fb8a6;
    --aurora-violet: #9b7ed8;
    --aurora-pink: #e8a0c8;
    --sky-white: #f0f8ff;
    --deep-atmosphere: #0d1b2a;
    --frost: #ffffff;
    --meadow-mist: #d4eee0;
    --deep-teal: #1a3a4a;
    --mid-teal: #2a5a5a;
    --text-dark: #1a2a3a;
    --text-light: #e8f4f0;
    --hue-shift: 0deg;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--text-dark);
    background: var(--deep-atmosphere);
    overflow-x: hidden;
}

/* ========================================
   Hero Zone
   ======================================== */

#hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d1b2a 0%, #1a3a4a 25%, #2a5a5a 50%, #78dcb4 75%, #9b7ed8 100%);
    filter: hue-rotate(var(--hue-shift));
    overflow: hidden;
}

.light-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    transform: translate(-50%, -50%);
    background: conic-gradient(from 0deg, rgba(120,220,180,0.06) 0deg, transparent 30deg, rgba(155,126,216,0.04) 60deg, transparent 90deg, rgba(120,220,180,0.06) 120deg, transparent 150deg, rgba(232,160,200,0.04) 180deg, transparent 210deg, rgba(120,220,180,0.06) 240deg, transparent 270deg, rgba(155,126,216,0.04) 300deg, transparent 330deg, rgba(120,220,180,0.06) 360deg);
    border-radius: 50%;
    animation: rotateSlow 60s linear infinite;
    pointer-events: none;
}

@keyframes rotateSlow {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.dew-drops {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.dew {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8) 0%, rgba(120,220,180,0.2) 60%, transparent 100%);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    z-index: 2;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
    color: #ffffff;
    text-shadow: 0 0 40px rgba(120, 220, 180, 0.4);
    user-select: none;
}

#hero-eye {
    overflow: visible;
}

.eye-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    animation: bounce 2s ease-in-out infinite;
    cursor: pointer;
    z-index: 2;
    opacity: 0.7;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ========================================
   Bento Grid Zone
   ======================================== */

#bento-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.bento-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px) saturate(1.6);
    -webkit-backdrop-filter: blur(16px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(13, 27, 42, 0.15);
    padding: 28px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, border-color;
    color: var(--text-light);
}

.bento-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.bento-card:hover {
    border-color: rgba(120, 220, 180, 0.4);
}

.card-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--aurora-pink);
    display: block;
    margin-bottom: 10px;
}

.card-heading {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--aurora-teal);
    margin-bottom: 12px;
}

.card-text {
    color: var(--text-light);
    opacity: 0.85;
    font-size: 0.92rem;
}

.card-svg {
    display: block;
    margin: 12px auto;
    overflow: visible;
}

.draw-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 1.2s ease;
}

.visible .draw-path {
    stroke-dashoffset: 0;
}

/* Card spans */
.card-how-we-see { grid-column: span 2; grid-row: span 2; }
.card-color { grid-column: span 2; }
.card-anatomy { grid-row: span 2; }
.card-2020 { }
.card-night { }
.card-blink { grid-column: span 2; }
.card-uv { }
.card-focus { }

/* How We See card */
.card-how-we-see .card-text {
    max-width: 90%;
}

/* Color Perception card */
.spectrum-bar {
    height: 32px;
    border-radius: 16px;
    background: linear-gradient(90deg, #ff0000, #ff8800, #ffff00, #00ff00, #0088ff, #8800ff, #ff00ff);
    margin: 16px 0;
    opacity: 0.85;
    transition: opacity 0.3s;
}

.spectrum-bar:hover {
    opacity: 1;
}

/* 20/20 Vision card */
.vision-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 3.5rem;
    line-height: 1;
    color: #ffffff;
}

.vision-slash {
    font-size: 2rem;
    color: var(--aurora-green);
    margin: 2px 0;
}

.vision-bottom {
    transition: opacity 0.3s;
}

/* Night Vision card */
.card-night {
    background: rgba(13, 27, 42, 0.85);
}

.night-heading {
    color: #00ff41;
    text-shadow: 0 0 10px rgba(0,255,65,0.5);
}

.night-text {
    color: rgba(0, 255, 65, 0.7);
}

.scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,255,65,0.03) 3px, rgba(0,255,65,0.03) 4px);
    pointer-events: none;
    border-radius: 20px;
}

/* Blink Rate card */
.blink-display {
    display: flex;
    align-items: center;
    gap: 16px;
}

.blink-count {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    color: #ffffff;
}

.blink-unit {
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--aurora-green);
}

.blink-eye {
    overflow: visible;
}

@keyframes blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.05); }
}

.blink-eye {
    animation: blink 4s ease-in-out infinite;
    transform-origin: center;
}

/* UV card */
.card-uv {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-uv .card-heading {
    margin-top: 8px;
    margin-bottom: 0;
}

/* Focus Exercise card */
.focus-area {
    position: relative;
    width: 100%;
    height: 80px;
    margin: 10px 0;
}

.focus-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--aurora-green);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(120,220,180,0.6);
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    transition: none;
}

/* ========================================
   Focal Point Zone
   ======================================== */

#focal-zone {
    min-height: 100vh;
    background: var(--deep-atmosphere);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    position: relative;
}

.focal-content {
    position: relative;
    width: 100%;
    max-width: 700px;
}

#cross-section-eye {
    width: 100%;
    height: auto;
    overflow: visible;
}

.focal-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 1.5s ease;
}

.focal-path.drawn {
    stroke-dashoffset: 0;
}

.focal-labels {
    position: absolute;
    inset: 0;
}

.focal-label {
    position: absolute;
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--aurora-green);
    opacity: 0;
    transition: opacity 0.8s ease;
}

.focal-label.shown {
    opacity: 1;
}

/* ========================================
   Closing Lens
   ======================================== */

#closing-lens {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    position: relative;
}

.closing-content {
    text-align: center;
}

.closing-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    color: #ffffff;
    text-shadow: 0 0 40px rgba(120, 220, 180, 0.4);
}

#viewport-wrapper {
    clip-path: ellipse(100% 100% at 50% 50%);
    transition: clip-path 0.1s linear;
}

/* ========================================
   Scroll Progress
   ======================================== */

#scroll-progress {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

#progress-pupil {
    transform-origin: 24px 24px;
    transform: scale(0.3);
    transition: transform 0.2s ease;
}

/* ========================================
   Leaf Silhouettes
   ======================================== */

.leaf {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    opacity: 0.15;
}

.leaf-1 {
    top: 40%;
    left: -20px;
    width: 80px;
    height: 160px;
    background: var(--aurora-green);
    clip-path: polygon(50% 0%, 100% 30%, 80% 100%, 20% 100%, 0% 30%);
}

.leaf-2 {
    bottom: 20%;
    right: -10px;
    width: 60px;
    height: 120px;
    background: var(--aurora-green);
    clip-path: polygon(50% 0%, 90% 40%, 70% 100%, 30% 100%, 10% 40%);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    #bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #bento-grid {
        grid-template-columns: 1fr;
    }

    .card-how-we-see,
    .card-color,
    .card-blink {
        grid-column: span 1;
    }

    .card-anatomy {
        grid-row: span 1;
    }

    .hero-title {
        font-size: clamp(3rem, 14vw, 6rem);
    }
}
