/* =============================================
   PLOTGRAPHER.COM - Seapunk Asymmetric Charthouse
   ============================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #060C14;
    color: #6080A0;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* --- Grain Overlay Particulate --- */
#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* --- Sonar Ping Container --- */
#sonar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.sonar-ping {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(64, 112, 160, 0.3);
    animation: sonarExpand 3s ease-out forwards;
    pointer-events: none;
}

@keyframes sonarExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.6;
        transform: translate(-50%, -50%);
    }
    100% {
        width: 600px;
        height: 600px;
        opacity: 0;
        transform: translate(-50%, -50%);
    }
}

/* --- Typography --- */
.section-heading {
    font-family: 'Bebas Neue', cursive;
    font-weight: 400;
    font-size: clamp(2.4rem, 5.5vw, 4.5rem);
    color: #C0D0E8;
    letter-spacing: 0.08em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: 'Bebas Neue', cursive;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7rem);
    color: #C0D0E8;
    letter-spacing: 0.12em;
    line-height: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: heroTitleReveal 1.2s ease-out 0.3s forwards;
}

@keyframes heroTitleReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: #6080A0;
    margin-top: 1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.8s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    transform: translateY(20px);
}

/* Chart labels use Fira Code */
.chart-label,
.depth-label,
.spec-code,
.coord-label,
.coord-value {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    color: #4070A0;
}

/* --- Compass Rose Ornaments --- */
.compass-rose-ornament {
    position: absolute;
    z-index: 2;
}

.compass-tl {
    top: -20px;
    left: -20px;
}

.compass-br {
    bottom: -20px;
    right: -20px;
}

/* --- Hero Section --- */
.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 4rem;
    padding-left: 12vw;
    position: relative;
    overflow: hidden;
}

.hero-inner {
    position: relative;
    border: 2px dashed #2A4060;
    padding: 4rem 5rem;
    max-width: 900px;
}

.hero-chart-preview {
    margin-top: 3rem;
    opacity: 0;
    animation: sonarRevealAnim 1.5s ease-out 1.2s forwards;
}

@keyframes sonarRevealAnim {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }
    60% {
        opacity: 0.8;
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.sonar-chart {
    width: 100%;
    max-width: 600px;
}

/* Sonar ring animation */
.sonar-ring {
    opacity: 0;
    transform-origin: center;
}

.ring-1 {
    animation: ringPulse 2s ease-out 1.5s forwards;
}

.ring-2 {
    animation: ringPulse 2s ease-out 1.8s forwards;
}

.ring-3 {
    animation: ringPulse 2s ease-out 2.1s forwards;
}

@keyframes ringPulse {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0.3;
        transform: scale(1);
    }
}

/* Axis lines reveal */
.axis-line {
    stroke-dashoffset: 600;
    animation: drawLine 1.2s ease-out 1.6s forwards;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.axis-x {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}

.axis-y {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
}

/* Data points reveal */
.data-point {
    opacity: 0;
    transform-origin: center;
}

.dp-1 { animation: pointPop 0.4s ease-out 2.0s forwards; }
.dp-2 { animation: pointPop 0.4s ease-out 2.1s forwards; }
.dp-3 { animation: pointPop 0.4s ease-out 2.2s forwards; }
.dp-4 { animation: pointPop 0.4s ease-out 2.3s forwards; }
.dp-5 { animation: pointPop 0.4s ease-out 2.4s forwards; }
.dp-6 { animation: pointPop 0.4s ease-out 2.5s forwards; }
.dp-7 { animation: pointPop 0.4s ease-out 2.6s forwards; }

@keyframes pointPop {
    0% {
        opacity: 0;
        r: 0;
    }
    70% {
        opacity: 1;
        r: 6;
    }
    100% {
        opacity: 1;
        r: 4;
    }
}

/* Data line reveal */
.data-line {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawLine 1.5s ease-out 2.0s forwards;
}

/* Chart labels reveal */
.chart-label {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 2.5s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* --- Capabilities Section (Asymmetric) --- */
.section-capabilities {
    padding: 6rem 4rem;
    padding-left: 18vw;
    position: relative;
}

.nautical-border-frame {
    border: 2px dashed #2A4060;
    padding: 3rem 4rem;
    position: relative;
    max-width: 1000px;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
}

.capability-card {
    background-color: #0C1420;
    border: 1px dashed #2A4060;
    padding: 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s ease;
}

.capability-card.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.capability-card:hover {
    box-shadow: 0 0 30px rgba(64, 112, 160, 0.15);
    border-color: #4070A0;
}

.card-chart-icon {
    margin-bottom: 1.2rem;
    opacity: 0.85;
}

.card-title {
    font-family: 'Bebas Neue', cursive;
    font-weight: 400;
    font-size: 1.6rem;
    color: #C0D0E8;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.card-description {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: #6080A0;
    font-size: 0.92rem;
    line-height: 1.7;
}

/* --- Data Depth Section (Asymmetric) --- */
.section-data-depth {
    padding: 8rem 4rem;
    padding-left: 5vw;
    display: grid;
    grid-template-columns: 45% 50%;
    gap: 5%;
    align-items: center;
    position: relative;
}

.depth-content-left {
    padding-right: 2rem;
}

.depth-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: #6080A0;
    margin-bottom: 3rem;
    max-width: 500px;
}

.depth-metrics {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.metric {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.metric.revealed {
    opacity: 1;
    transform: translateY(0);
}

.metric-value {
    font-family: 'Bebas Neue', cursive;
    font-weight: 400;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: #D07050;
    display: inline;
}

.metric-unit {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 1rem;
    color: #4070A0;
    margin-left: 0.2rem;
    vertical-align: super;
}

.metric-label {
    display: block;
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: #4070A0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.3rem;
}

.depth-visual-right {
    position: relative;
}

.bathymetric-chart {
    border: 2px dashed #2A4060;
    padding: 1.5rem;
    background-color: rgba(12, 20, 32, 0.6);
    position: relative;
}

.bathymetric-chart svg {
    width: 100%;
    height: auto;
}

/* Contour line animations */
.contour {
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 1.5s ease-out;
}

.contour.revealed {
    stroke-dashoffset: 0;
}

.contour-1 { stroke-dasharray: 400; stroke-dashoffset: 400; }
.contour-2 { stroke-dasharray: 400; stroke-dashoffset: 400; }
.contour-3 { stroke-dasharray: 400; stroke-dashoffset: 400; }
.contour-4 { stroke-dasharray: 400; stroke-dashoffset: 400; }
.contour-5 { stroke-dasharray: 400; stroke-dashoffset: 400; }

/* Depth markers */
.depth-marker {
    opacity: 0;
    transition: opacity 0.5s ease-out, r 0.3s ease-out;
}

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

.depth-marker:hover {
    filter: drop-shadow(0 0 8px #D07050);
}

/* --- Specifications Section (Asymmetric) --- */
.section-specifications {
    padding: 6rem 4rem;
    padding-left: 25vw;
    position: relative;
}

.spec-container {
    max-width: 700px;
}

.spec-entries {
    margin-top: 2rem;
}

.spec-entry {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px dashed #2A4060;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.spec-entry.revealed {
    opacity: 1;
    transform: translateX(0);
}

.spec-timestamp {
    display: flex;
    align-items: flex-start;
    padding-top: 0.3rem;
}

.spec-code {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    color: #4070A0;
    white-space: nowrap;
}

.spec-title {
    font-family: 'Bebas Neue', cursive;
    font-weight: 400;
    font-size: 1.4rem;
    color: #C0D0E8;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.spec-detail {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: #6080A0;
    font-size: 0.92rem;
    line-height: 1.7;
}

/* --- Footer Section --- */
.section-footer {
    padding: 5rem 4rem 3rem;
    padding-left: 8vw;
    border-top: 2px dashed #2A4060;
    margin-top: 4rem;
    position: relative;
}

.footer-inner {
    max-width: 1100px;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col-heading {
    font-family: 'Bebas Neue', cursive;
    font-weight: 400;
    font-size: 1.2rem;
    color: #C0D0E8;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: #6080A0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background-color: #D07050;
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: #C0D0E8;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px dashed #2A4060;
}

.footer-coordinates,
.footer-depth-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.coord-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #4070A0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.coord-value {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #6080A0;
}

.footer-copyright {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #4070A0;
}

/* --- Sonar Reveal Animation Base --- */
.sonar-reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.sonar-reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .section-hero {
        padding-left: 5vw;
        padding-right: 5vw;
    }

    .hero-inner {
        padding: 2.5rem 2rem;
    }

    .section-capabilities {
        padding-left: 5vw;
        padding-right: 5vw;
    }

    .nautical-border-frame {
        padding: 2rem;
    }

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

    .section-data-depth {
        grid-template-columns: 1fr;
        padding-left: 5vw;
        padding-right: 5vw;
    }

    .depth-visual-right {
        margin-top: 3rem;
    }

    .section-specifications {
        padding-left: 5vw;
        padding-right: 5vw;
    }

    .spec-entry {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }

    .section-footer {
        padding-left: 5vw;
        padding-right: 5vw;
    }

    .footer-nav {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .hero-inner {
        padding: 2rem 1.5rem;
    }

    .depth-metrics {
        gap: 1.5rem;
    }

    .spec-entry {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}
