/* graphers.net - Generative topographic cartography */

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

/* Palette:
   Deep Background:  #0a0e27
   Panel Surface:    #f0ece4
   Primary Text:     #e8dcc8
   Body Text:        #b8b0a0
   Accent Primary:   #2dd4bf
   Accent Secondary: #7b93db
   Highlight:        #e5a84b
   Panel Text:       #1c1f2e
*/

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0a0e27;
    color: #b8b0a0;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#contour-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-content.visible {
    opacity: 1;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 56px;
    color: #e8dcc8;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-shadow: 0 0 12px rgba(45, 212, 191, 0.3);
}

.hero-subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 18px;
    color: #b8b0a0;
    margin-top: 16px;
    letter-spacing: 0.05em;
}

/* Coordinate annotations */
.coord-annotation {
    position: absolute;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #7b93db;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    animation: coordFade 8s ease infinite;
}

.coord-annotation[data-delay="0"] { animation-delay: 0s; }
.coord-annotation[data-delay="1"] { animation-delay: 1.6s; }
.coord-annotation[data-delay="2"] { animation-delay: 3.2s; }
.coord-annotation[data-delay="4"] { animation-delay: 4.8s; }
.coord-annotation[data-delay="6"] { animation-delay: 6.4s; }

@keyframes coordFade {
    0%, 100% { opacity: 0; }
    15%, 85% { opacity: 0.2; }
}

/* Panels Container */
.panels-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    padding: 80px 40px 120px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Content Panels */
.panel {
    position: relative;
    z-index: 1;
    margin-bottom: -40px;
}

.panel-inner {
    background-color: rgba(240, 236, 228, 0.88);
    padding: 40px 36px;
    box-shadow: 0 4px 24px rgba(10, 14, 39, 0.4);
    position: relative;
}

.panel-odd .panel-inner {
    transform: rotate(-1.5deg);
}

.panel-even .panel-inner {
    transform: rotate(1.5deg);
}

/* Panel graph motifs */
.panel-graph {
    margin-bottom: 20px;
    opacity: 0.8;
}

.panel-graph svg {
    display: block;
}

/* Panel typography */
.panel-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 32px;
    color: #1c1f2e;
    letter-spacing: 0.03em;
    line-height: 1.2;
    margin-bottom: 20px;
}

.panel-inner p {
    color: #1c1f2e;
    margin-bottom: 16px;
    font-size: 17px;
    line-height: 1.7;
}

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

.panel-inner em {
    color: #1c1f2e;
    font-weight: 600;
}

.text-emphasis {
    color: #1c1f2e;
    font-weight: 600;
    font-size: 18px;
}

/* Slide reveal animation */
.slide-reveal {
    opacity: 0;
    transition: opacity 800ms cubic-bezier(0.22, 1, 0.36, 1), transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.panel-odd.slide-reveal {
    transform: translateX(-60px);
}

.panel-even.slide-reveal {
    transform: translateX(60px);
}

.slide-reveal.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Compass Navigation */
.compass {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    z-index: 100;
    cursor: pointer;
    transition: width 300ms ease, height 300ms ease;
}

.compass-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid #2dd4bf;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 14, 39, 0.85);
    position: relative;
    z-index: 2;
}

.compass-needle {
    transition: transform 600ms ease;
}

.compass-labels {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 300ms ease;
}

.compass:hover .compass-labels {
    opacity: 1;
    pointer-events: auto;
}

.compass:hover {
    width: 200px;
    height: 200px;
}

.compass:hover .compass-ring {
    width: 200px;
    height: 200px;
    border-color: rgba(45, 212, 191, 0.4);
}

.compass-label {
    position: absolute;
    top: 50%;
    left: 50%;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #e8dcc8;
    text-decoration: none;
    transform-origin: center;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-70px) rotate(calc(-1 * var(--angle)));
    transition: color 200ms ease;
}

.compass-label:hover {
    color: #2dd4bf;
}

/* Data labels */
.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.06em;
    color: #7b93db;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .panels-container {
        display: block;
        padding: 40px 20px 100px;
    }

    .panel {
        margin-bottom: -20px;
    }

    .panel-inner {
        transform: rotate(0deg);
        padding: 28px 24px;
    }

    .panel-odd .panel-inner,
    .panel-even .panel-inner {
        transform: rotate(0deg);
    }

    .panel-title {
        font-size: 24px;
    }

    .panel-odd.slide-reveal,
    .panel-even.slide-reveal {
        transform: translateY(30px);
    }

    .slide-reveal.revealed {
        transform: translateY(0);
    }

    .compass {
        bottom: 16px;
        right: 16px;
    }

    .coord-annotation {
        display: none;
    }
}
