/* ========================================
   THE INVISIBLE GALLERY
   Color Palette from PRD
   ======================================== */

:root {
    /* Primary Colors (70% usage) */
    --ikb: #002FA7;              /* International Klein Blue */
    --ivory: #F4F1EC;            /* Soft Ivory / Bone White */

    /* Secondary Neutrals (20% usage) */
    --sand: #E6DCCB;             /* Warm Sand / Parchment */
    --charcoal: #16161D;         /* Eigengrau */
    --mist: #D9D9D6;             /* Mist Grey */

    /* Accent Colors (10% max) */
    --burgundy: #7A1F2B;         /* Deep Burgundy / Red Thread */
    --gold: #B8A46A;             /* Muted Gold / Aged Brass */

    /* Logo */
    --logo-beige: #e9d1ad;

    /* Typography */
    --font-primary: 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing Scale (8px base) */
    --space-xs: 0.5rem;    /* 8px */
    --space-sm: 1rem;      /* 16px */
    --space-md: 2rem;      /* 32px */
    --space-lg: 4rem;      /* 64px */
    --space-xl: 6rem;      /* 96px */
    --space-2xl: 8rem;     /* 128px */

    /* Layout */
    --max-width: 1200px;
    --text-width: 720px;
}

/* ========================================
   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;
}

body {
    font-family: var(--font-primary);
    background: var(--ivory);
    color: var(--charcoal);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 200;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 200;
    line-height: 1.2;
    letter-spacing: 0.01em;
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 300;
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

h4 {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
}

p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

/* ========================================
   NAVIGATION
   ======================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(244, 241, 236, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 47, 167, 0.1);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-sm) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ikb);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-logo:hover {
    color: var(--ikb);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--ikb);
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #F4F1EC;
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--ikb);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ========================================
   SECTIONS
   ======================================== */

section {
    min-height: 100vh;
    padding: var(--space-xl) var(--space-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ========================================
   CONSCIENTIA STAGE (Hero Section)
   ======================================== */

#conscientia-stage {
    position: relative;
    background: linear-gradient(180deg, #16161D 0%, #001431 100%);
    padding: 0;
    overflow: hidden;
}

#conscientiaCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.artwork-overlay {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--ivory);
    pointer-events: none;
    opacity: 0;
    animation: fadeInOut 12s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 60% { opacity: 1; }
    70% { opacity: 0; }
}

.artwork-title {
    letter-spacing: 0.2em;
    text-shadow: 0 0 60px rgba(0, 47, 167, 0.4);
    margin-bottom: var(--space-sm);
}

.artwork-tagline {
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

.evolution-indicator {
    position: absolute;
    bottom: var(--space-lg);
    right: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0.6;
    z-index: 10;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--burgundy);
    border-radius: 50%;
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.8); opacity: 0.3; }
}

.evolution-text {
    font-size: 0.75rem;
    color: var(--ivory);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 300;
}

.scroll-hint {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    animation: scrollHintFade 1s ease-out 10s forwards;
}

@keyframes scrollHintFade {
    to { opacity: 0.4; }
}

.scroll-line {
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--ivory), transparent);
    animation: scrollMove 2s ease-in-out infinite;
}

@keyframes scrollMove {
    0%, 100% { transform: translateY(0); opacity: 0; }
    50% { transform: translateY(20px); opacity: 1; }
}

/* ========================================
   THE WORK SECTION
   ======================================== */

#the-work {
    background: var(--ivory);
    text-align: center;
}

.concept-intro {
    margin-bottom: var(--space-xl);
}

.large-text {
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.6;
    color: var(--ikb);
    font-weight: 300;
    max-width: var(--text-width);
    margin: 0 auto;
}

/* Etymology */
.etymology {
    max-width: 600px;
    margin: var(--space-xl) auto;
    color: var(--ikb);
}

.etymology-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 200;
    margin-bottom: var(--space-sm);
}

.etymology-breakdown {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: var(--space-xs);
}

.etymology-meaning {
    font-size: 1.75rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: var(--space-md);
}

.etymology-detail p {
    font-size: 1.125rem;
    color: var(--charcoal);
    margin-bottom: var(--space-xs);
}

/* Philosophy */
.philosophy {
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--charcoal);
    border-left: 3px solid var(--burgundy);
    padding-left: var(--space-md);
    margin: var(--space-xl) auto;
    max-width: var(--text-width);
    text-align: left;
}

/* Principles Grid */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
    max-width: var(--max-width);
}

.principle {
    text-align: center;
    padding: var(--space-md);
}

.principle h4 {
    color: var(--ikb);
    font-weight: 400;
    margin-bottom: var(--space-sm);
}

.principle p {
    font-size: 1rem;
    color: var(--charcoal);
    opacity: 0.8;
}

/* Artwork Details */
.artwork-details {
    text-align: center;
    margin: var(--space-lg) 0;
}

.artwork-name {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 200;
    color: var(--ikb);
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.artwork-year {
    font-size: 1rem;
    color: var(--charcoal);
    opacity: 0.7;
    font-weight: 300;
    margin-bottom: var(--space-xs);
}

.artwork-medium {
    font-size: 1rem;
    color: var(--charcoal);
    opacity: 0.6;
    font-weight: 300;
    font-style: italic;
}

/* Curatorial Statement */
.statement {
    max-width: var(--text-width);
    margin: var(--space-xl) auto;
}

.statement p {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--charcoal);
    text-align: left;
    margin-bottom: var(--space-lg);
    font-weight: 300;
}

.statement p:last-child {
    margin-bottom: 0;
}

/* ========================================
   ABOUT SECTION
   ======================================== */

#about {
    background: var(--sand);
    text-align: center;
}

.artist-attribution {
    text-align: center;
    margin-bottom: var(--space-md);
}

.artist-active {
    font-size: 1rem;
    color: var(--charcoal);
    opacity: 0.7;
    font-weight: 300;
    font-style: italic;
}

.artist-statement {
    max-width: var(--text-width);
    margin: 0 auto;
}

.artist-statement p {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--charcoal);
    text-align: left;
    margin-bottom: var(--space-lg);
    font-weight: 300;
}

.artist-statement p:last-child {
    margin-bottom: 0;
}

/* ========================================
   CONNECT SECTION
   ======================================== */

#connect {
    background: var(--ivory);
    text-align: center;
}

.connect-intro {
    font-size: 1.125rem;
    color: var(--charcoal);
    margin-bottom: var(--space-xl);
    opacity: 0.8;
    font-weight: 300;
}

.email-link {
    display: inline-block;
    font-size: 1.125rem;
    color: var(--ikb);
    text-decoration: none;
    border: 2px solid var(--ikb);
    padding: var(--space-sm) var(--space-lg);
    margin-bottom: var(--space-xl);
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
    font-weight: 400;
}

.email-link:hover {
    background: var(--ikb);
    color: var(--ivory);
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.125rem;
    color: var(--ikb);
    text-decoration: none;
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--ikb);
    transition: all 0.3s ease;
    font-weight: 400;
}

.social-link svg {
    width: 20px;
    height: 20px;
    stroke: var(--ikb);
    transition: stroke 0.3s;
}

.social-link:hover {
    background: var(--ikb);
    color: var(--ivory);
    border-color: var(--ikb);
    transform: translateY(-2px);
}

.social-link:hover svg {
    stroke: var(--ivory);
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background: #16161D;
    color: var(--ivory);
    text-align: center;
    padding: var(--space-xl) var(--space-md);
}

.footer-content {
    max-width: var(--text-width);
    margin: 0 auto;
}

.footer-brand {
    font-size: 2rem;
    font-weight: 200;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-xs);
}

.footer-subtitle {
    font-size: 0.875rem;
    color: #F4F1EC;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}

.footer-tagline {
    font-size: 0.875rem;
    color: #F4F1EC;
    letter-spacing: 0.1em;
    margin: var(--space-md) 0;
}

.footer-contact {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--ivory);
    text-decoration: none;
    border: 1px solid #F4F1EC;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.contact-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--ivory);
    transition: stroke 0.3s;
}

.contact-icon:hover {
    border-color: var(--ivory);
    background: rgba(244, 241, 236, 0.1);
    transform: translateY(-2px);
}

.copyright {
    font-size: 0.75rem;
    color: #F4F1EC;
    margin-top: var(--space-md);
}

/* ========================================
   DIVIDERS
   ======================================== */

.divider {
    width: 80px;
    height: 2px;
    background: #F4F1EC;
    margin: var(--space-xl) auto;
}

.divider.small {
    width: 40px;
    margin: var(--space-lg) auto;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    :root {
        --space-xl: 4rem;
        --space-2xl: 5rem;
    }

    section {
        padding: var(--space-lg) var(--space-sm);
    }

    .nav-container {
        padding: var(--space-sm);
    }

    .nav-links {
        gap: var(--space-md);
    }

    .evolution-indicator {
        bottom: var(--space-md);
        right: var(--space-md);
    }

    .principles-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .translation-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-xs);
    }

    .translation-item .from {
        text-align: center;
    }

    .philosophy {
        text-align: center;
        border-left: none;
        border-top: 3px solid var(--burgundy);
        padding-left: 0;
        padding-top: var(--space-md);
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 0.65rem;
    }

    .nav-links a {
        font-size: 0.75rem;
    }

    .artwork-title {
        font-size: 2.5rem;
    }

    .email-link {
        font-size: 1.125rem;
        padding: var(--space-xs) var(--space-md);
    }
}
