/* ============================================================
   eyes.plus — Styles
   Optical clarity meets meditative stillness
   ============================================================ */

/* --- Custom Properties --- */
:root {
    --bg-primary: #0A0A0B;
    --bg-sidebar: #18181B;
    --text-primary: #FAFAFA;
    --text-secondary: #A1A1AA;
    --text-tertiary: #71717A;
    --accent-active: #67E8F9;
    --accent-hover: #FCD34D;
    --structural-line: #27272A;
    --grid-dot: #3F3F46;
    --sidebar-indicator: #52525B;

    --sidebar-width: 280px;
    --content-margin-left: 60px;
    --content-max-width: 680px;

    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'DM Sans', sans-serif;
    --font-tertiary: 'Cormorant', serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.8;
    letter-spacing: 0.01em;
    font-feature-settings: "kern" 1, "liga" 1;
    overflow-x: hidden;
}

/* --- Dot Grid Substrate (fixed background) --- */
.dot-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, var(--grid-dot) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.3;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-sidebar);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Progress line container */
.sidebar-progress {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background-color: var(--structural-line);
}

.sidebar-progress-fill {
    width: 100%;
    height: 0%;
    background-color: #E4E4E7;
    transform-origin: top;
    transition: height 100ms linear;
}

/* Section indicators */
.sidebar-indicators {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.sidebar-indicator {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--sidebar-indicator);
    transition: background-color 400ms ease-out;
}

.sidebar-indicator.active {
    background-color: var(--text-primary);
}

/* Rotated wordmark at bottom-left */
.sidebar-wordmark {
    position: absolute;
    bottom: 40px;
    left: 16px;
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--text-tertiary);
    transform: rotate(-90deg);
    transform-origin: left bottom;
    white-space: nowrap;
}

/* Mobile icon (hidden by default) */
.sidebar-mobile-icon {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.sidebar-mobile-icon span {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--text-tertiary);
}

/* --- Main Content --- */
.content {
    margin-left: calc(var(--sidebar-width) + var(--content-margin-left));
    max-width: var(--content-max-width);
    position: relative;
    z-index: 1;
}

/* --- Prologue / Epilogue --- */
.prologue {
    height: 50vh;
}

.epilogue {
    height: 50vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding-bottom: 40px;
}

.epilogue-text {
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* --- Section Voids (100vh empty space) --- */
.section-void {
    height: 100vh;
}

/* --- Sections --- */
.section {
    position: relative;
    padding: 80px 0;
}

/* --- Fade-Reveal System --- */
.reveal {
    opacity: 0;
    transition: opacity 800ms ease-out;
}

.reveal.visible {
    opacity: 1;
}

/* --- Crosshair Dividers --- */
.crosshair-divider {
    display: flex;
    justify-content: flex-start;
    padding: 40px 0;
    opacity: 0;
    transition: opacity 800ms ease-out;
}

.crosshair-divider.visible {
    opacity: 0.4;
}

/* --- Snellen Watermarks --- */
.snellen-watermark {
    font-family: var(--font-primary);
    font-weight: 100;
    font-size: 30vw;
    color: var(--bg-sidebar);
    position: relative;
    line-height: 1;
    text-align: center;
    pointer-events: none;
    user-select: none;
    padding: 10vh 0;
    margin-left: -60px;
}

.snellen-watermark-inline {
    position: absolute;
    top: -10vh;
    right: -20vw;
    font-family: var(--font-primary);
    font-weight: 100;
    font-size: 30vw;
    color: var(--bg-sidebar);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: -1;
}

/* --- Hero Section --- */
.section-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
}

/* Concentric Rings */
.concentric-rings {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 80px auto;
}

.rings-svg {
    width: 100%;
    height: auto;
    display: block;
}

.ring {
    fill: none;
    stroke: var(--structural-line);
}

.ring-1 {
    stroke-width: 2px;
    animation: breathe 8s ease-in-out infinite;
    animation-delay: 0s;
}

.ring-2 {
    stroke-width: 1.6px;
    animation: breathe 8s ease-in-out infinite;
    animation-delay: 0.4s;
}

.ring-3 {
    stroke-width: 1.2px;
    animation: breathe 8s ease-in-out infinite;
    animation-delay: 0.8s;
}

.ring-4 {
    stroke-width: 0.8px;
    animation: breathe 8s ease-in-out infinite;
    animation-delay: 1.2s;
}

.ring-5 {
    stroke-width: 0.5px;
    animation: breathe 8s ease-in-out infinite;
    animation-delay: 1.6s;
}

@keyframes breathe {
    0%, 100% {
        opacity: 0.15;
    }
    50% {
        opacity: 0.25;
    }
}

/* Tagline inside innermost ring */
.rings-tagline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Hero Content */
.hero-content {
    width: 100%;
}

.hero-heading {
    font-family: var(--font-primary);
    font-weight: 200;
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 32px;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

.hero-subtext {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 520px;
}

/* --- Pull Quotes --- */
.pull-quote {
    text-align: center;
    padding: 40px 0;
}

.pull-quote p {
    font-family: var(--font-tertiary);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    line-height: 1.5;
    color: var(--text-tertiary);
}

/* --- Section Headings --- */
.section-heading {
    font-family: var(--font-primary);
    font-weight: 200;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 60px;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* --- Calibration Section --- */
.calibration-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px 48px;
}

.calibration-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.calibration-icon {
    color: var(--text-tertiary);
    width: 32px;
    height: 32px;
    transition: color 300ms ease-out, transform 300ms ease-out;
}

.calibration-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.calibration-item:hover .calibration-icon {
    color: var(--accent-active);
    transform: scale(1.08);
}

.calibration-label {
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.calibration-text {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* --- Philosophy Section --- */
.philosophy-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.philosophy-text {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* --- Clarity Section --- */
.clarity-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.clarity-statement {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.clarity-icon {
    color: var(--text-tertiary);
    transition: color 300ms ease-out;
}

.clarity-icon:hover {
    color: var(--accent-hover);
}

.clarity-coda {
    font-family: var(--font-secondary);
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding-top: 20px;
    border-top: 1px solid var(--structural-line);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transition: none;
    }

    .crosshair-divider {
        opacity: 0.4;
        transition: none;
    }

    .ring {
        animation: none;
        opacity: 0.2;
    }

    .calibration-icon {
        transition: none;
    }

    .clarity-icon {
        transition: none;
    }
}

/* --- Responsive: Tablet and below --- */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 280px;
        --content-margin-left: 40px;
    }
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 48px;
        --content-margin-left: 24px;
    }

    .sidebar {
        width: 48px;
    }

    .sidebar-indicators {
        display: none;
    }

    .sidebar-wordmark {
        display: none;
    }

    .sidebar-mobile-icon {
        display: flex;
    }

    .content {
        margin-left: calc(48px + 24px);
        padding-right: 24px;
    }

    .calibration-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .snellen-watermark {
        font-size: 50vw;
        margin-left: -24px;
    }

    .snellen-watermark-inline {
        font-size: 50vw;
        right: -10vw;
    }

    .concentric-rings {
        max-width: 320px;
    }

    .hero-heading {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .pull-quote p {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
    }
}

/* --- Hover states for interactive elements (links, if any) --- */
a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 300ms ease-out;
}

a:hover {
    color: var(--accent-hover);
}

/* --- Selection --- */
::selection {
    background-color: var(--accent-active);
    color: var(--bg-primary);
}

/* --- Scrollbar Styling (Webkit) --- */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--structural-line);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}
