/* ============================================
   senggack.xyz — Neomorphic Coastal Control Station
   ============================================ */

/* CSS Custom Properties */
:root {
    --bg-substrate: #dde4e8;
    --shadow-light: #f0f5f8;
    --shadow-dark: #b8c4cb;
    --text-primary: #3d5a6e;
    --text-secondary: #4a6572;
    --accent-warm: #7ab5a0;
    --accent-cool: #5a8f7b;
    --inset-surface: #ced8de;
    --data-highlight: #c8956a;
    --deep-anchor: #2c4a5a;
    --label-color: #7a9bab;
    --white: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-substrate);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    line-height: 1.85;
    color: var(--text-secondary);
    overflow-x: hidden;
}

/* Grid-Line Background Pattern */
#main-content {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

#main-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 39px, #c8d4da22 39px, #c8d4da22 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, #c8d4da22 39px, #c8d4da22 40px);
    z-index: -1;
    pointer-events: none;
}

/* ============================================
   Navigation Pill
   ============================================ */
#nav-pill {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    border-radius: 50px;
    padding: 0;
}

#nav-toggle {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--bg-substrate);
    border-radius: 50%;
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    font-family: 'Share Tech Mono', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
}

#nav-toggle:active,
#nav-toggle.active {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

#nav-menu {
    list-style: none;
    position: absolute;
    top: 60px;
    right: 0;
    background: var(--bg-substrate);
    border-radius: 16px;
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    padding: 1rem 1.5rem;
    min-width: 180px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#nav-menu.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

#nav-menu li {
    margin: 0.5rem 0;
}

#nav-menu a {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--label-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

#nav-menu a:hover {
    color: var(--accent-warm);
}

/* ============================================
   Neomorphic Base Classes
   ============================================ */
.neo-panel {
    background: var(--bg-substrate);
    border-radius: 24px;
    position: relative;
}

.neo-panel--hero {
    box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
    border-radius: 24px;
}

.neo-panel--secondary {
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    border-radius: 16px;
}

.neo-panel--benthic {
    box-shadow: 16px 16px 32px var(--shadow-dark), -16px -16px 32px var(--shadow-light);
    border-radius: 24px;
}

.neo-inset {
    background: var(--inset-surface);
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
}

.neo-convex {
    background: var(--bg-substrate);
}

.neo-concave {
    background: var(--bg-substrate);
}

/* ============================================
   Indicator Lights
   ============================================ */
.indicator-light {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, var(--accent-warm), #5a8f7b);
    box-shadow: 0 0 6px rgba(122, 181, 160, 0.4);
    animation: pulse 6s ease-in-out infinite;
}

.indicator-light--tl { top: 16px; left: 16px; }
.indicator-light--tr { top: 16px; right: 16px; }
.indicator-light--bl { bottom: 16px; left: 16px; }
.indicator-light--br { bottom: 16px; right: 16px; }

@keyframes pulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 0.7; }
}

/* ============================================
   Tidal Zones
   ============================================ */
.tidal-zone {
    padding: 0;
}

#surface {
    margin-bottom: 0;
}

#midwater {
    padding: 0;
}

#benthic {
    padding: 0;
}

/* ============================================
   Hero Panel (Section 1 - Surface)
   ============================================ */
#hero-panel {
    min-height: 60vh;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 2rem;
}

.hero-title {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(2.4rem, 5vw, 4rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    word-spacing: 0.3em;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 1rem;
    color: var(--label-color);
    letter-spacing: 0.05em;
}

/* Ambient Tidal Ripple Animation */
.hero-ambient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.tidal-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 0;
}

.tidal-ripple--1 {
    background: radial-gradient(circle, rgba(122, 181, 160, 0.08) 0%, transparent 70%);
    animation: tidalPulse1 12s ease-in-out infinite;
}

.tidal-ripple--2 {
    background: radial-gradient(circle, rgba(122, 181, 160, 0.06) 0%, transparent 60%);
    animation: tidalPulse2 18s ease-in-out infinite;
}

.tidal-ripple--3 {
    background: radial-gradient(circle, rgba(122, 181, 160, 0.05) 0%, transparent 50%);
    animation: tidalPulse3 24s ease-in-out infinite;
}

@keyframes tidalPulse1 {
    0%, 100% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes tidalPulse2 {
    0%, 100% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

@keyframes tidalPulse3 {
    0%, 100% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* ============================================
   Tidal Wave Dividers
   ============================================ */
.tidal-divider {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
}

.tidal-divider svg {
    width: 100%;
    height: 40px;
}

.tidal-path {
    stroke-dashoffset: 0;
    animation: flow 20s linear infinite;
}

@keyframes flow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -120; }
}

/* ============================================
   Panel Grid (Section 2 - Mid-Water)
   ============================================ */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.neo-panel--secondary {
    grid-column: span 2;
    padding: 2.5rem;
}

.neo-panel--secondary:nth-child(even) {
    margin-top: 40px;
}

.panel-inner {
    position: relative;
    z-index: 2;
}

.panel-icon {
    margin-bottom: 1rem;
}

.iso-icon {
    display: block;
}

.panel-divider-line {
    width: 0%;
    height: 1px;
    background: var(--inset-surface);
    margin: 1rem 0;
    transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.panel-divider-line.animated {
    width: 100%;
}

.panel-heading {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    word-spacing: 0.3em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.panel-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 1rem);
    line-height: 1.85;
    color: var(--text-secondary);
}

/* ============================================
   Slide-Reveal Animations
   ============================================ */
.slide-reveal {
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.6s ease;
}

.slide-left {
    transform: translateX(-40px);
}

.slide-right {
    transform: translateX(40px);
}

.slide-up {
    transform: translateY(40px);
}

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

/* ============================================
   Benthic Panel (Section 3)
   ============================================ */
#benthic-panel {
    padding: 3rem;
}

.section-label {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--label-color);
    margin-bottom: 2rem;
    text-align: center;
}

/* Ring Chart */
.ring-chart-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.ring-chart {
    width: 260px;
    height: 260px;
}

/* Readout Strips */
.readout-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.readout-strip {
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.readout-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--label-color);
}

.readout-value {
    font-family: 'Space Mono', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--data-highlight);
    line-height: 1.2;
}

.readout-value small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--label-color);
    margin-left: 0.15em;
}

/* Station Info */
.station-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--inset-surface);
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.info-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--label-color);
}

.info-value {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--deep-anchor);
}

.info-value--active {
    color: var(--accent-warm);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .panel-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .neo-panel--secondary {
        grid-column: span 1;
    }

    .neo-panel--secondary:nth-child(even) {
        margin-top: 0;
    }

    .readout-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #hero-panel {
        min-height: 50vh;
        padding: 3rem;
    }
}

@media (max-width: 640px) {
    #main-content {
        padding: 1rem;
    }

    .panel-grid {
        grid-template-columns: 1fr;
    }

    .neo-panel--secondary:nth-child(even) {
        margin-top: 0;
    }

    .readout-grid {
        grid-template-columns: 1fr;
    }

    .station-info {
        grid-template-columns: 1fr;
    }

    #hero-panel {
        min-height: 40vh;
        padding: 2rem;
    }

    .hero-title {
        letter-spacing: 0.08em;
    }

    #nav-pill {
        top: 1rem;
        right: 1rem;
    }

    #benthic-panel {
        padding: 2rem;
    }

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