/* ================================================
   eyes.cash - Styles
   Palette: Warm Bone #F5F2ED, Obsidian #1A1A1A,
   Deep Charcoal #1E1E1E, Pale Ash #C8C4BC,
   Cerulean Focus #2B6CB0, Deep Cerulean #1E4D8C,
   Warm Gray #D9D5CE, Medium Gray #7A7A7A,
   Near Black #111111, Warm White #EDE9E1
   Fonts: Libre Franklin 300, Source Serif 4 400, Inter 400
   ================================================ */

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

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.75;
    color: #1A1A1A;
    background-color: #F5F2ED;
    overflow-x: hidden;
}

/* --- Sidebar --- */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: #1E1E1E;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
    z-index: 100;
}

#sidebar-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 300;
    font-size: 18px;
    letter-spacing: 0.08em;
    color: #C8C4BC;
    margin-bottom: 60px;
    user-select: none;
}

#sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    flex: 1;
}

.nav-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #C8C4BC;
    text-decoration: none;
    transition: color 200ms ease;
}

.nav-icon:hover {
    color: #1E4D8C;
}

.nav-icon.active {
    color: #2B6CB0;
}

.nav-icon svg {
    width: 28px;
    height: 28px;
}

.nav-label {
    position: absolute;
    left: 56px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: #C8C4BC;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-icon:hover .nav-label {
    opacity: 1;
}

/* --- Sidebar Pulse --- */
#sidebar-pulse {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    margin-bottom: 20px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #2B6CB0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid #2B6CB0;
    opacity: 0;
    transform: translate(-50%, -50%);
    animation: pulse-expand 1.8s ease-out infinite;
}

.pulse-ring-1 {
    animation-delay: 0s;
}

.pulse-ring-2 {
    animation-delay: 0.6s;
}

.pulse-ring-3 {
    animation-delay: 1.2s;
}

@keyframes pulse-expand {
    0% {
        width: 6px;
        height: 6px;
        opacity: 0.5;
    }
    100% {
        width: 60px;
        height: 60px;
        opacity: 0;
    }
}

/* --- Mobile Header --- */
#mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #1E1E1E;
    z-index: 100;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

#mobile-title {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.08em;
    color: #C8C4BC;
}

#mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #C8C4BC;
    padding: 4px;
    transition: color 200ms ease;
}

#mobile-menu-toggle:hover {
    color: #1E4D8C;
}

#mobile-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: #1E1E1E;
    padding: 20px;
    flex-direction: column;
    gap: 16px;
}

#mobile-nav.open {
    display: flex;
}

.mobile-nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: #C8C4BC;
    text-decoration: none;
    transition: color 200ms ease;
}

.mobile-nav-link:hover {
    color: #1E4D8C;
}

/* --- Main Content --- */
#content {
    margin-left: 280px;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

/* --- Panels --- */
.panel {
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.panel-light {
    background-color: #F5F2ED;
    color: #1A1A1A;
}

.panel-dark {
    background-color: #111111;
    color: #EDE9E1;
}

.panel-inner {
    width: 100%;
    max-width: 900px;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* --- Panel Typography --- */
.panel-headline {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin-bottom: 0;
    text-transform: none;
}

.panel-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.75;
    max-width: 65ch;
    color: inherit;
    margin-top: 24px;
}

.panel-dark .panel-body {
    color: #EDE9E1;
}

/* Caption style */
.panel-caption {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: #7A7A7A;
}

.panel-dark .panel-caption {
    color: #A0A0A0;
}

/* --- Panel Reveal Animations --- */
.panel-reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 500ms ease, transform 500ms ease;
}

/* Headlines: no vertical shift, longer duration */
h1.panel-reveal,
h2.panel-reveal {
    transform: translateY(0);
    transition: opacity 700ms ease;
}

/* When panel is visible, reveal content */
.panel.visible .panel-reveal {
    opacity: 1;
    transform: translateY(0);
}

.panel.visible h1.panel-reveal,
.panel.visible h2.panel-reveal {
    opacity: 1;
}

/* Panel fade: light panels 600ms, dark panels 500ms (100ms faster per design) */
.panel .panel-inner {
    opacity: 0;
    transition: opacity 600ms ease-in;
}

.panel.visible .panel-inner {
    opacity: 1;
}

.panel-dark .panel-inner {
    transition: opacity 500ms ease-in;
}

/* --- Panel Layouts --- */

/* Text + Icon side-by-side */
.panel-text-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 80px;
    max-width: 1000px;
    padding: 60px 60px;
    text-align: left;
    width: 100%;
}

.panel-text-zone {
    flex: 1;
    max-width: 680px;
}

.panel-icon-side {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Horizon line layout */
.panel-horizon-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    padding: 60px 40px;
    width: 100%;
    text-align: center;
}

.horizon-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 40px;
}

.horizon-top .panel-headline {
    margin-bottom: 0;
}

.horizon-top .panel-body {
    margin-top: 24px;
    max-width: 60ch;
}

.horizon-line {
    width: 100%;
    max-width: 600px;
    height: 1px;
    background-color: #D9D5CE;
}

.horizon-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 40px;
}

/* --- Hero Eye Icon --- */
.panel-icon-area {
    margin-bottom: 32px;
}

.hero-eye-icon {
    width: 200px;
    height: 120px;
}

/* Section icons */
.section-icon {
    display: block;
}

/* --- SVG Draw-In Animations --- */
.draw-path {
    stroke-dasharray: var(--path-length, 300);
    stroke-dashoffset: var(--path-length, 300);
    transition: stroke-dashoffset 1.2s ease-in-out;
}

/* Hero eye icon: 2s draw animation per design */
.hero-draw .draw-path {
    transition: stroke-dashoffset 2s ease-in-out;
}

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

/* Stagger icon draws in grid by 150ms each */
.icon-grid-item:nth-child(1) .draw-path { transition-delay: 0ms; }
.icon-grid-item:nth-child(2) .draw-path { transition-delay: 150ms; }
.icon-grid-item:nth-child(3) .draw-path { transition-delay: 300ms; }
.icon-grid-item:nth-child(4) .draw-path { transition-delay: 450ms; }
.icon-grid-item:nth-child(5) .draw-path { transition-delay: 600ms; }
.icon-grid-item:nth-child(6) .draw-path { transition-delay: 750ms; }
.icon-grid-item:nth-child(7) .draw-path { transition-delay: 900ms; }
.icon-grid-item:nth-child(8) .draw-path { transition-delay: 1050ms; }
.icon-grid-item:nth-child(9) .draw-path { transition-delay: 1200ms; }
.icon-grid-item:nth-child(10) .draw-path { transition-delay: 1350ms; }
.icon-grid-item:nth-child(11) .draw-path { transition-delay: 1500ms; }
.icon-grid-item:nth-child(12) .draw-path { transition-delay: 1650ms; }

/* --- Icon Grid (Panel 4) --- */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 48px;
    max-width: 400px;
}

.icon-grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-icon {
    width: 48px;
    height: 48px;
}

/* --- Closing Eye (Panel 7) --- */
.closing-eye-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Focal Point Motif */
.focal-point-motif {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    pointer-events: none;
}

.focal-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #2B6CB0;
    transform: translate(-50%, -50%);
}

.focal-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid #2B6CB0;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.panel.visible .focal-ring {
    animation: focal-expand 2s ease-out infinite;
}

.focal-ring-1 { animation-delay: 0s; }
.focal-ring-2 { animation-delay: 0.6s; }
.focal-ring-3 { animation-delay: 1.2s; }

@keyframes focal-expand {
    0% {
        width: 8px;
        height: 8px;
        opacity: 0.4;
    }
    100% {
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}

/* --- Links --- */
a {
    color: inherit;
    text-decoration: none;
    transition: color 200ms ease;
}

a:hover {
    color: #1E4D8C;
}

/* --- Selection --- */
::selection {
    background-color: #2B6CB0;
    color: #F5F2ED;
}

/* --- Scrollbar (subtle) --- */
#content::-webkit-scrollbar {
    width: 4px;
}

#content::-webkit-scrollbar-track {
    background: #F5F2ED;
}

#content::-webkit-scrollbar-thumb {
    background: #D9D5CE;
    border-radius: 2px;
}

#content::-webkit-scrollbar-thumb:hover {
    background: #C8C4BC;
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    #sidebar {
        display: none;
    }

    #mobile-header {
        display: flex;
    }

    #content {
        margin-left: 0;
        padding-top: 60px;
        height: auto;
        overflow-y: visible;
        scroll-snap-type: none;
    }

    html {
        scroll-snap-type: y mandatory;
    }

    .panel-text-layout {
        flex-direction: column;
        gap: 40px;
        padding: 40px 24px;
        text-align: center;
    }

    .panel-text-zone {
        max-width: 100%;
    }

    .panel-inner {
        padding: 40px 24px;
    }

    .panel-horizon-layout {
        padding: 40px 24px;
    }

    .icon-grid {
        gap: 24px;
        max-width: 280px;
    }

    .hero-eye-icon {
        width: 160px;
        height: 96px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .panel-body {
        font-size: 16px;
    }

    .icon-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        max-width: 220px;
    }

    .hero-eye-icon {
        width: 140px;
        height: 84px;
    }

    .panel-text-layout {
        gap: 32px;
    }

    .horizon-top .panel-body {
        max-width: 90vw;
    }
}
