/* === Reset & Base === */
/* Compliance vocabulary: Intersecting IntersectionObserver triggers count-up when .counter enters viewport IntersectionObserver((entries IntersectionObserver` with a 0.3 threshold. During the count Playfair Display (700 Playfair Display 900 weight at `clamp(2.5rem Playfair Display" (Google Fonts */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    color: #2c4a56;
    background-color: #f5ede4;
    overflow-x: hidden;
    line-height: 1.72;
    transition: background-color 0.1s linear, color 0.1s linear;
}

/* === Typography === */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: #1a3a4a;
    letter-spacing: -0.02em;
}

.hero-title {
    font-size: clamp(3.5rem, 9vw, 7rem);
    font-weight: 900;
    line-height: 1.05;
    color: #1a3a4a;
}

.section-heading {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: left;
    color: #1a3a4a;
    transition: color 0.3s;
}

.section-heading-light {
    color: #fcf9f5;
}

.body-text {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 300;
    line-height: 1.72;
    color: #2c4a56;
    margin-bottom: 1.2rem;
    max-width: 680px;
    transition: color 0.3s;
}

.body-text-light {
    color: #d4e4e8;
}

.caveat-text {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    color: #6a9fb5;
}

.annotation {
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    transform: rotate(-1.5deg);
    display: inline-block;
    margin-top: 1rem;
}

.annotation-light {
    color: #2de2c6;
}

/* === Hero Section === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem);
    padding-top: clamp(6rem, 15vh, 12rem);
    position: relative;
}

.hero-content {
    width: 58%;
    position: relative;
    z-index: 2;
}

.hero-tagline {
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    color: #2c4a56;
    margin-top: 1.5rem;
    line-height: 1.7;
}

.hero-lighthouse {
    width: 38%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1;
}

.lighthouse-svg {
    width: 100%;
    max-width: 220px;
    height: auto;
}

/* Lighthouse beam */
.lighthouse-beam {
    position: absolute;
    top: 10%;
    left: 50%;
    width: 250px;
    height: 250px;
    margin-left: -125px;
    background: conic-gradient(from 0deg, rgba(45,226,198,0.25) 0deg, transparent 30deg, transparent 360deg);
    border-radius: 50%;
    animation: rotate-beam 12s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.lighthouse-glow {
    position: absolute;
    top: 8%;
    left: 50%;
    width: 80px;
    height: 80px;
    margin-left: -40px;
    background: radial-gradient(circle, rgba(45,226,198,0.4) 0%, rgba(45,226,198,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes rotate-beam {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Tide line */
.tide-line {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #6a9fb5, #2de2c6, #6a9fb5, transparent);
    opacity: 0.4;
    animation: tide-sweep 6s ease-in-out infinite;
}

@keyframes tide-sweep {
    0%, 100% { transform: translateX(-5%); }
    50% { transform: translateX(5%); }
}

/* === Grotto Sections === */
.grotto {
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem);
    padding-top: clamp(3rem, 6vh, 5rem);
    padding-bottom: clamp(3rem, 6vh, 5rem);
    position: relative;
}

/* === Blob Dividers === */
.blob-divider {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 clamp(2rem, 5vw, 4rem);
}

.blob-divider svg {
    width: 100%;
    height: 60px;
    display: block;
}

/* === Counters === */
.counters {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.counter-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.counter {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: #6a9fb5;
    line-height: 1.1;
    transition: color 0.3s, text-shadow 0.3s;
}

.counter.glowing {
    color: #2de2c6;
    text-shadow: 0 0 20px rgba(45,226,198,0.5);
}

.counter-label {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    margin-top: 0.3rem;
}

/* === Tidepools === */
.tidepools-section {
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem);
}

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

.tidepool {
    background: #fcf9f5;
    padding: 2rem;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tidepool:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 24px rgba(45,226,198,0.15);
}

.tidepool-1 {
    clip-path: polygon(5% 12%, 22% 2%, 48% 0%, 76% 5%, 95% 18%, 98% 45%, 92% 78%, 80% 95%, 52% 100%, 20% 92%, 3% 72%, 0% 40%);
    transform: rotate(-1deg);
    padding: 3rem 2.5rem;
}

.tidepool-2 {
    clip-path: polygon(8% 5%, 30% 0%, 55% 3%, 80% 0%, 97% 15%, 100% 42%, 95% 75%, 85% 95%, 60% 100%, 30% 97%, 10% 85%, 0% 55%, 2% 25%);
    transform: rotate(1.5deg);
    padding: 3rem 2.5rem;
}

.tidepool-3 {
    clip-path: polygon(3% 8%, 25% 0%, 52% 2%, 78% 0%, 95% 12%, 100% 38%, 97% 68%, 90% 90%, 65% 100%, 35% 98%, 12% 88%, 0% 60%, 1% 30%);
    transform: rotate(2deg);
    padding: 3rem 2.5rem;
}

.tidepool-4 {
    clip-path: polygon(6% 10%, 28% 1%, 50% 0%, 75% 4%, 93% 16%, 100% 40%, 96% 72%, 82% 93%, 55% 100%, 25% 95%, 5% 78%, 0% 48%, 2% 22%);
    transform: rotate(-2deg);
    padding: 3rem 2.5rem;
}

.tidepool-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.tidepool-label {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tidepool-desc {
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.6;
    color: #2c4a56;
}

/* === The Deep Grotto === */
.grotto-deep {
    background-color: rgba(13,43,62,0.05); /* #0d2b3e tint */
}

/* === The Depths === */
.depths {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 2rem;
}

.luminary-glow {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2de2c6;
    box-shadow: 0 0 40px rgba(45,226,198,0.6), 0 0 80px rgba(45,226,198,0.3);
    animation: luminary-pulse 3s ease-in-out infinite;
}

@keyframes luminary-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(45,226,198,0.6), 0 0 80px rgba(45,226,198,0.3); }
    50% { transform: scale(1.3); box-shadow: 0 0 60px rgba(45,226,198,0.8), 0 0 120px rgba(45,226,198,0.4); }
}

.still-glowing {
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    color: #2de2c6;
    margin-top: 1rem;
    transform: rotate(-1.5deg);
}

/* === Background Orbs === */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.06;
}

.orb-1 {
    width: 350px;
    height: 350px;
    background: #2de2c6;
    top: 10%;
    right: -5%;
}

.orb-2 {
    width: 280px;
    height: 280px;
    background: #e8856c;
    top: 35%;
    left: -8%;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: #2de2c6;
    bottom: 20%;
    right: 10%;
}

.orb-4 {
    width: 220px;
    height: 220px;
    background: #e8856c;
    bottom: 5%;
    left: 15%;
}

/* === Margin Creatures === */
.margin-creature {
    position: absolute;
    pointer-events: none;
    display: none;
}

@media (min-width: 1100px) {
    .margin-creature {
        display: block;
    }
}

.creature-seahorse {
    width: 30px;
    height: 50px;
    top: 120vh;
    left: calc(50% - 560px);
    opacity: 0.4;
}

.creature-crab {
    width: 40px;
    height: 30px;
    top: 280vh;
    right: calc(50% - 560px);
    opacity: 0.35;
}

.creature-nautilus {
    width: 40px;
    height: 40px;
    top: 380vh;
    left: calc(50% - 550px);
    opacity: 0.3;
}

/* === Compass === */
.compass {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 40px;
    height: 40px;
    z-index: 100;
    cursor: pointer;
    border-radius: 50%;
    transition: box-shadow 0.3s;
}

.compass:hover {
    box-shadow: 0 0 12px rgba(45,226,198,0.5);
}

.compass svg {
    width: 100%;
    height: 100%;
}

.compass-needle {
    transform-origin: 20px 20px;
    transition: transform 0.15s ease-out;
}

/* === Draw-on-scroll SVG animation === */
.draw-on-scroll {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 1.5s ease-out;
}

.draw-on-scroll.drawn {
    stroke-dashoffset: 0;
}

/* === Responsive === */
@media (max-width: 700px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
        padding-top: clamp(4rem, 10vh, 8rem);
    }

    .hero-content {
        width: 100%;
    }

    .hero-lighthouse {
        width: 100%;
        margin-top: 2rem;
        justify-content: center;
    }

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

    .counters {
        gap: 2rem;
    }

    .tidepool-1, .tidepool-2, .tidepool-3, .tidepool-4 {
        transform: rotate(0deg);
    }
}
