/* annual.quest - Bathymetric Data Almanac */
/* Colors: #122638, #1A3330, #060D14, #1C1A17, #0E1B2A, #2B4A3E, #E8A84C, #F2EAD9, #3A9B8F, #D4C9A8 */
/* Fonts: Roboto Slab (headings), Source Sans 3 (body), IBM Plex Mono (data) */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    background: #060D14;
    color: #D4C9A8;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========== DEPTH INDICATOR SIDEBAR ========== */
.depth-indicator {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    height: 300px;
}

.depth-line {
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(58, 155, 143, 0.2);
    z-index: 0;
}

.depth-progress {
    position: absolute;
    left: 4px;
    top: 0;
    width: 2px;
    height: 0%;
    background: #3A9B8F;
    z-index: 1;
    transition: height 0.3s ease;
}

.depth-marker {
    position: relative;
    padding-left: 20px;
    margin-bottom: 48px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    cursor: pointer;
    z-index: 2;
}

.depth-marker::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #3A9B8F;
    background: #060D14;
    transition: background 0.3s ease;
}

.depth-marker.active {
    opacity: 1;
}

.depth-marker.active::before {
    background: #3A9B8F;
}

.depth-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #3A9B8F;
    display: block;
    letter-spacing: 0.05em;
}

.depth-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: #D4C9A8;
    opacity: 0.6;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ========== PARTICLE CANVAS ========== */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========== ZONE BASE STYLES ========== */
.zone {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    padding: 80px 20px;
}

.zone-content {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}

.zone-transition {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    pointer-events: none;
}

/* ========== SURFACE ZONE ========== */
.zone-surface {
    background: linear-gradient(180deg, #122638 0%, #0E1B2A 60%, #1A3330 100%);
    min-height: 100vh;
    justify-content: center;
}

.zone-surface .zone-transition {
    background: linear-gradient(180deg, transparent 0%, #0E1B2A 100%);
}

.surface-header {
    text-align: center;
    position: relative;
    padding: 60px 0;
}

/* Sonar Rings */
.sonar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(58, 155, 143, 0.15);
    pointer-events: none;
}

.sonar-ring-1 {
    width: 200px;
    height: 200px;
    animation: sonarPulse 4s ease-out infinite;
}

.sonar-ring-2 {
    width: 350px;
    height: 350px;
    animation: sonarPulse 4s ease-out infinite 1.3s;
}

.sonar-ring-3 {
    width: 500px;
    height: 500px;
    animation: sonarPulse 4s ease-out infinite 2.6s;
}

@keyframes sonarPulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; border-color: rgba(58, 155, 143, 0.4); }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; border-color: rgba(58, 155, 143, 0); }
}

.site-title {
    font-family: 'Roboto Slab', serif;
    font-size: 56px;
    font-weight: 700;
    color: #F2EAD9;
    letter-spacing: 0.01em;
    position: relative;
    z-index: 2;
    margin-bottom: 12px;
}

.site-subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 18px;
    color: #D4C9A8;
    opacity: 0.7;
    position: relative;
    z-index: 2;
    letter-spacing: 0.02em;
}

.scroll-prompt {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    animation: bobDown 2s ease-in-out infinite;
}

.scroll-prompt span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #3A9B8F;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

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

/* Mini Gauges */
.surface-data-preview {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 60px;
}

.mini-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.gauge-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(#E8A84C 0deg, #E8A84C calc(var(--gauge-deg, 0) * 1deg), rgba(232, 168, 76, 0.15) calc(var(--gauge-deg, 0) * 1deg));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gauge-ring::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0E1B2A;
}

.gauge-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #D4C9A8;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gauge-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: #E8A84C;
}

/* ========== EPIPELAGIC ZONE ========== */
.zone-epipelagic {
    background: linear-gradient(180deg, #0E1B2A 0%, #122638 30%, #1A3330 100%);
}

.zone-epipelagic .zone-transition {
    background: linear-gradient(180deg, transparent 0%, #1A3330 100%);
}

/* ========== MESOPELAGIC ZONE ========== */
.zone-mesopelagic {
    background: linear-gradient(180deg, #1A3330 0%, #0E1B2A 50%, #060D14 100%);
}

.zone-mesopelagic .zone-transition {
    background: linear-gradient(180deg, transparent 0%, #060D14 100%);
}

/* ========== BATHYPELAGIC ZONE ========== */
.zone-bathypelagic {
    background: linear-gradient(180deg, #060D14 0%, #1C1A17 50%, #060D14 100%);
}

.zone-bathypelagic .zone-transition {
    background: linear-gradient(180deg, transparent 0%, #060D14 100%);
}

/* ========== ABYSSOPELAGIC ZONE ========== */
.zone-abyssopelagic {
    background: linear-gradient(180deg, #060D14 0%, #0E1B2A 100%);
}

/* ========== ZONE HEADERS ========== */
.zone-header {
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(58, 155, 143, 0.2);
}

.zone-depth-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #3A9B8F;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 8px;
}

.zone-title {
    font-family: 'Roboto Slab', serif;
    font-size: 36px;
    font-weight: 700;
    color: #F2EAD9;
    letter-spacing: 0.01em;
    margin-bottom: 12px;
}

.zone-bathypelagic .zone-title,
.zone-abyssopelagic .zone-title {
    font-weight: 400;
}

.zone-description {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    color: #D4C9A8;
    opacity: 0.7;
    line-height: 1.6;
}

/* ========== DATA PANELS ========== */
.data-panel {
    background: rgba(18, 38, 56, 0.6);
    border: 1px solid rgba(58, 155, 143, 0.15);
    border-radius: 4px;
    padding: 32px;
    margin-bottom: 32px;
    position: relative;
    backdrop-filter: blur(8px);
}

.data-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3A9B8F 0%, transparent 100%);
}

.panel-title {
    font-family: 'Roboto Slab', serif;
    font-size: 16px;
    font-weight: 700;
    color: #E8A84C;
    letter-spacing: 0.01em;
    margin-bottom: 24px;
    text-transform: uppercase;
}

/* ========== REVEAL ANIMATION ========== */
.reveal-panel {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-panel[data-reveal="left"] {
    transform: translateX(-40px);
}

.reveal-panel[data-reveal="right"] {
    transform: translateX(40px);
}

.reveal-panel[data-reveal="up"] {
    transform: translateY(40px);
}

.reveal-panel.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* ========== PROGRESS RINGS ========== */
.progress-rings {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.ring-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.progress-ring {
    width: 120px;
    height: 120px;
}

.ring-bg {
    fill: none;
    stroke: rgba(232, 168, 76, 0.15);
    stroke-width: 8;
}

.ring-fill {
    fill: none;
    stroke: #C4633A;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 1.5s ease;
}

.ring-label {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 22px;
    font-weight: 500;
    color: #F2EAD9;
    display: block;
}

.ring-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: #D4C9A8;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-top: 2px;
}

/* ========== BAR CHART ========== */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bar-row {
    display: grid;
    grid-template-columns: 120px 1fr 40px;
    align-items: center;
    gap: 12px;
}

.bar-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #D4C9A8;
    opacity: 0.8;
}

.bar-track {
    height: 24px;
    background: rgba(58, 155, 143, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3A9B8F, #2B4A3E);
    border-radius: 2px;
    transition: width 1.2s ease;
}

.bar-row:nth-child(even) .bar-fill {
    background: linear-gradient(90deg, #E8A84C, #D4C9A8);
}

.bar-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: #3A9B8F;
    text-align: right;
}

/* ========== NARRATIVE PANEL ========== */
.narrative-panel {
    background: rgba(26, 51, 48, 0.4);
    border-color: rgba(58, 155, 143, 0.1);
}

.narrative-panel::before {
    background: linear-gradient(90deg, #E8A84C 0%, transparent 100%);
}

.narrative-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #D4C9A8;
}

.narrative-text strong {
    color: #E8A84C;
    font-weight: 600;
}

/* ========== STACKED BARS ========== */
.stacked-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.stacked-row {
    display: grid;
    grid-template-columns: 120px 1fr 50px;
    align-items: center;
    gap: 12px;
}

.stacked-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #D4C9A8;
    opacity: 0.8;
}

.stacked-track {
    height: 20px;
    display: flex;
    border-radius: 2px;
    overflow: hidden;
    background: rgba(58, 155, 143, 0.05);
}

.stacked-segment {
    height: 100%;
    transition: width 1.2s ease;
}

.stacked-total {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    color: #3A9B8F;
    text-align: right;
}

.stacked-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #D4C9A8;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: inline-block;
}

/* ========== DATA TABLE ========== */
.data-table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
}

.data-table thead th {
    text-align: left;
    padding: 10px 12px;
    color: #3A9B8F;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 10px;
    font-weight: 500;
    border-bottom: 1px solid rgba(58, 155, 143, 0.3);
}

.data-table tbody td {
    padding: 8px 12px;
    color: #D4C9A8;
    border-bottom: 1px solid rgba(58, 155, 143, 0.08);
}

.data-table tbody tr:hover {
    background: rgba(58, 155, 143, 0.08);
}

/* ========== SPARKLINE GRID ========== */
.sparkline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sparkline-card {
    background: rgba(14, 27, 42, 0.6);
    border: 1px solid rgba(58, 155, 143, 0.1);
    border-radius: 4px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sparkline-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #D4C9A8;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sparkline-canvas {
    width: 100%;
    height: 40px;
}

.sparkline-trend {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 500;
}

.trend-up { color: #3A9B8F; }
.trend-down { color: #E8A84C; }
.trend-stable { color: #D4C9A8; opacity: 0.6; }

/* ========== BIG NUMBERS ========== */
.big-numbers {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 24px;
}

.big-number-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.big-num {
    font-family: 'Roboto Slab', serif;
    font-size: 48px;
    font-weight: 700;
    color: #F2EAD9;
    letter-spacing: -0.01em;
}

.big-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #3A9B8F;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ========== SUMMARY RING ========== */
.summary-ring-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
}

.summary-ring {
    width: 200px;
    height: 200px;
}

.summary-ring-bg {
    fill: none;
    stroke: rgba(232, 168, 76, 0.12);
    stroke-width: 10;
}

.summary-ring-fill {
    fill: none;
    stroke: #E8A84C;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 534.07;
    stroke-dashoffset: 534.07;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 2s ease;
}

.summary-ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.summary-percent {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 36px;
    font-weight: 500;
    color: #F2EAD9;
    display: block;
}

.summary-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #D4C9A8;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-top: 4px;
}

/* ========== BENCHMARK LIST ========== */
.benchmark-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.benchmark-item {
    display: grid;
    grid-template-columns: 180px 1fr 50px;
    align-items: center;
    gap: 12px;
}

.benchmark-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #D4C9A8;
    opacity: 0.8;
}

.benchmark-bar-track {
    height: 16px;
    background: rgba(58, 155, 143, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.benchmark-bar {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 1.2s ease;
    background: #3A9B8F;
}

.benchmark-item:nth-child(even) .benchmark-bar {
    background: #E8A84C;
}

.benchmark-val {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    color: #3A9B8F;
    text-align: right;
}

.benchmark-item:nth-child(even) .benchmark-val {
    color: #E8A84C;
}

/* ========== FOOTER ========== */
.site-footer {
    margin-top: 80px;
    padding-top: 32px;
    text-align: center;
}

.footer-line {
    width: 60px;
    height: 1px;
    background: rgba(58, 155, 143, 0.3);
    margin: 0 auto 24px;
}

.footer-text {
    font-family: 'Roboto Slab', serif;
    font-size: 14px;
    color: #D4C9A8;
    opacity: 0.6;
    margin-bottom: 8px;
}

.footer-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #D4C9A8;
    opacity: 0.4;
    margin-bottom: 16px;
}

.footer-coordinates {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-coordinates span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: #3A9B8F;
    opacity: 0.5;
    letter-spacing: 0.1em;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .depth-indicator { display: none; }
    .site-title { font-size: 36px; }
    .zone-title { font-size: 28px; }
    .zone { padding: 60px 16px; }
    .zone-content { max-width: 100%; }
    .data-panel { padding: 20px; }
    .progress-rings { flex-direction: column; }
    .bar-row { grid-template-columns: 90px 1fr 35px; }
    .stacked-row { grid-template-columns: 90px 1fr 40px; }
    .sparkline-grid { grid-template-columns: 1fr; }
    .benchmark-item { grid-template-columns: 140px 1fr 40px; }
    .big-num { font-size: 36px; }
    .surface-data-preview { gap: 24px; }
    .sonar-ring-2 { width: 250px; height: 250px; }
    .sonar-ring-3 { width: 350px; height: 350px; }
}


/* Sunken Terracotta accent */
.data-panel::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: #C4633A;
}

/* Seafoam light text for contrast elements */
.zone-depth-tag::after {
    color: #F0F4F2;
}
