/* ============================================
   a6c.boo - Surreal Aquatic Nostalgia
   ============================================ */

/* --- Paper grain texture as inline SVG data URI --- */
:root {
    --midnight-trench: #0a1628;
    --weathered-teal: #1a3a4a;
    --abyssal-blue: #0d3b66;
    --seafoam-drift: #6fbeab;
    --coral-whisper: #e8927c;
    --bleached-shell: #f0ece2;
    --pearl-mist: #b8c4ca;
    --aged-vellum: #f5ecd7;
    --bioluminescent: #3dd6d0;

    --grain-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    --card-shadow: 0 8px 32px rgba(10, 22, 40, 0.2);
    --card-shadow-hover: 0 16px 48px rgba(10, 22, 40, 0.35);
    --ease-buoyant: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    color: var(--bleached-shell);
    background-color: var(--midnight-trench);
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* --- Title Screen --- */
#title-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--midnight-trench);
    z-index: 100;
    transition: opacity 1.2s ease, visibility 0s 1.2s;
}

#title-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#title-text {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 6vw, 5rem);
    letter-spacing: 0.04em;
    color: var(--bleached-shell);
    display: flex;
    gap: 0.02em;
}

.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
}

.letter.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 600ms var(--ease-buoyant), transform 600ms var(--ease-buoyant);
}

/* --- Background Surface Layer --- */
#bg-surface {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: var(--weathered-teal);
    background-image:
        linear-gradient(2deg, rgba(26, 58, 74, 0.3) 0%, transparent 50%),
        linear-gradient(178deg, rgba(13, 59, 102, 0.15) 0%, transparent 60%),
        linear-gradient(91deg, rgba(26, 58, 74, 0.2) 0%, transparent 40%);
    opacity: 0;
    transition: opacity 1.5s ease;
    will-change: transform;
}

#bg-surface.visible {
    opacity: 1;
}

/* --- Wave Layer --- */
#wave-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease 0.5s;
}

#wave-layer.visible {
    opacity: 1;
}

.wave-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.wave-1 { top: 10%; }
.wave-2 { top: 30%; }
.wave-3 { top: 50%; }
.wave-4 { top: 70%; }
.wave-5 { top: 90%; }

/* --- Card Layer --- */
#card-layer {
    position: relative;
    z-index: 2;
    padding-top: 100vh;
    opacity: 0;
    transition: opacity 1.2s ease;
}

#card-layer.visible {
    opacity: 1;
}

/* --- Scroll Sections --- */
.scroll-section {
    position: relative;
    padding: 60px 20px;
}

#surface {
    min-height: 100vh;
}

#tide-pool {
    min-height: 200vh;
}

#the-deep {
    min-height: 150vh;
}

#seafloor {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Card Grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* --- Base Card Styles --- */
.card {
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transform: rotate(var(--rot, 0deg));
    transition:
        transform 400ms var(--ease-buoyant),
        box-shadow 400ms var(--ease-buoyant);
}

.card:hover {
    transform: rotate(0deg) translateY(-8px) scale(1.02);
    z-index: 10;
}

/* --- Card Texture Overlay --- */
.card-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--grain-texture);
    background-repeat: repeat;
    background-size: 200px 200px;
    pointer-events: none;
    z-index: 1;
}

/* --- Card Spiral Backgrounds --- */
.card-spiral {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(184, 196, 202, 0.25);
    pointer-events: none;
    z-index: 0;
}

.spiral-1 {
    width: 180px; height: 180px;
    bottom: -40px; right: -40px;
}
.spiral-2 {
    width: 100px; height: 100px;
    bottom: -10px; right: -10px;
    border-style: dashed;
}
.spiral-3 {
    width: 220px; height: 220px;
    top: -60px; left: -60px;
}
.spiral-4 {
    width: 160px; height: 160px;
    top: -30px; right: -30px;
}
.spiral-5 {
    width: 140px; height: 140px;
    bottom: -20px; left: -20px;
    border-style: dotted;
}
.spiral-6 {
    width: 200px; height: 200px;
    top: -50px; left: 50%;
    transform: translateX(-50%);
}
.spiral-7 {
    width: 120px; height: 120px;
    bottom: 20px; right: 20px;
    border-style: dashed;
}

/* --- Postcard Large --- */
.postcard-large {
    grid-column: span 2;
    aspect-ratio: 3 / 2;
    background-color: var(--aged-vellum);
    box-shadow: var(--card-shadow), inset 0 0 40px rgba(26, 58, 74, 0.15);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.postcard-large:hover {
    box-shadow: var(--card-shadow-hover), inset 0 0 40px rgba(26, 58, 74, 0.15), 0 0 0 2px rgba(232, 146, 124, 0.25);
}

.card-heading {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    letter-spacing: 0.04em;
    color: var(--abyssal-blue);
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.card-body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.7;
    color: var(--abyssal-blue);
    position: relative;
    z-index: 2;
    opacity: 0.85;
}

/* --- Postcard Small --- */
.postcard-small {
    aspect-ratio: 4 / 3;
    background-color: var(--aged-vellum);
    box-shadow: var(--card-shadow), inset 0 0 30px rgba(26, 58, 74, 0.1);
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.postcard-small:hover {
    box-shadow: var(--card-shadow-hover), inset 0 0 30px rgba(26, 58, 74, 0.1), 0 0 0 2px rgba(232, 146, 124, 0.25);
}

.card-quote {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.7;
    color: var(--abyssal-blue);
    position: relative;
    z-index: 2;
}

.card-code {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 300;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pearl-mist);
    margin-top: 16px;
    position: relative;
    z-index: 2;
}

.card-wayfinding {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: 0.04em;
    color: var(--abyssal-blue);
    position: relative;
    z-index: 2;
}

/* --- Stamp Card --- */
.stamp-card {
    aspect-ratio: 1 / 1;
    background-color: var(--aged-vellum);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    -webkit-mask-image: radial-gradient(circle at 0px 0px, transparent 4px, black 4.5px),
                        radial-gradient(circle at 100% 0px, transparent 4px, black 4.5px),
                        radial-gradient(circle at 0px 100%, transparent 4px, black 4.5px),
                        radial-gradient(circle at 100% 100%, transparent 4px, black 4.5px),
                        repeating-linear-gradient(to right, transparent 0px, transparent 4px, black 4.5px, black 17px, transparent 17.5px, transparent 22px),
                        repeating-linear-gradient(to bottom, transparent 0px, transparent 4px, black 4.5px, black 17px, transparent 17.5px, transparent 22px);
    -webkit-mask-composite: source-in;
    mask-image: radial-gradient(circle at 0px 0px, transparent 4px, black 4.5px),
                radial-gradient(circle at 100% 0px, transparent 4px, black 4.5px),
                radial-gradient(circle at 0px 100%, transparent 4px, black 4.5px),
                radial-gradient(circle at 100% 100%, transparent 4px, black 4.5px),
                repeating-linear-gradient(to right, transparent 0px, transparent 4px, black 4.5px, black 17px, transparent 17.5px, transparent 22px),
                repeating-linear-gradient(to bottom, transparent 0px, transparent 4px, black 4.5px, black 17px, transparent 17.5px, transparent 22px);
    mask-composite: intersect;
    border: 3px solid var(--coral-whisper);
}

.stamp-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.stamp-icon {
    width: 56px;
    height: 56px;
    transition: transform 300ms var(--ease-buoyant);
}

.stamp-card:hover .stamp-icon {
    animation: stamp-pulse 300ms var(--ease-buoyant);
}

@keyframes stamp-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.stamp-label {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 300;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--abyssal-blue);
}

.stamp-monogram {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 300;
    font-size: 2rem;
    letter-spacing: 0.12em;
    color: var(--coral-whisper);
}

/* ============================================
   ILLUSTRATIONS
   ============================================ */

.illustration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* --- Lighthouse Scene --- */
.lighthouse-tower {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 100px;
    background: linear-gradient(to right, var(--coral-whisper), #d4806a);
    border-radius: 4px 4px 0 0;
}

.lighthouse-top {
    position: absolute;
    bottom: calc(30% + 100px);
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--aged-vellum);
    border: 2px solid var(--coral-whisper);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(232, 146, 124, 0.5);
}

.lighthouse-beam {
    position: absolute;
    bottom: calc(30% + 90px);
    left: calc(50% + 20px);
    width: 120px;
    height: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.beam-letter {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    color: var(--abyssal-blue);
    opacity: calc(0.8 - var(--i) * 0.08);
    transform: rotate(calc(var(--i) * 8deg - 20deg)) translateY(calc(var(--i) * 4px));
    display: inline-block;
    animation: letter-fall 4s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.3s);
}

@keyframes letter-fall {
    0%, 100% { transform: rotate(calc(var(--i) * 8deg - 20deg)) translateY(calc(var(--i) * 4px)); }
    50% { transform: rotate(calc(var(--i) * 8deg - 20deg)) translateY(calc(var(--i) * 4px + 10px)); opacity: 0.3; }
}

.lighthouse-waves {
    position: absolute;
    bottom: 15%;
    left: 0;
    width: 100%;
    height: 40px;
}

.lh-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: transparent;
    border-top: 2px solid var(--seafoam-drift);
    opacity: 0.5;
}

.lh-wave-1 {
    bottom: 10px;
    animation: wave-drift 3s ease-in-out infinite;
}

.lh-wave-2 {
    bottom: 0;
    width: 80%;
    left: 10%;
    animation: wave-drift 3s ease-in-out infinite 0.5s;
}

@keyframes wave-drift {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* --- Inverted Ocean Scene --- */
.inverted-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
}

.inv-wave {
    position: absolute;
    top: 0;
    width: 100%;
    height: 40px;
    background: var(--seafoam-drift);
    opacity: 0.15;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
}

.inv-wave-1 { top: 0; opacity: 0.2; }
.inv-wave-2 { top: 20px; opacity: 0.15; width: 90%; left: 5%; }
.inv-wave-3 { top: 40px; opacity: 0.1; width: 80%; left: 10%; }

.hanging-drops {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    height: 60%;
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
}

.drop {
    width: 8px;
    height: calc(30px + var(--d) * 20px);
    background: linear-gradient(to bottom, var(--seafoam-drift), transparent);
    border-radius: 50% / 0 0 50% 50%;
    opacity: 0.3;
    animation: drip 3.5s ease-in-out infinite;
    animation-delay: calc(var(--d) * 0.5s);
}

@keyframes drip {
    0%, 100% { opacity: 0.3; height: calc(30px + var(--d) * 20px); }
    50% { opacity: 0.15; height: calc(50px + var(--d) * 20px); }
}

/* --- Compass of Emotions Scene --- */
.compass-emotions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.compass-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px solid var(--abyssal-blue);
    opacity: 0.3;
}

.compass-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--coral-whisper);
    opacity: 0.7;
}

.compass-dir {
    position: absolute;
    font-family: 'Comfortaa', sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--abyssal-blue);
    opacity: 0.7;
}

.compass-n { top: calc(50% - 90px); left: 50%; transform: translateX(-50%); }
.compass-e { top: 50%; right: calc(50% - 100px); transform: translateY(-50%); }
.compass-s { bottom: calc(50% - 90px); left: 50%; transform: translateX(-50%); }
.compass-w { top: 50%; left: calc(50% - 100px); transform: translateY(-50%); }

.compass-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, var(--coral-whisper), var(--seafoam-drift));
    transform-origin: top center;
    transform: translate(-50%, 0) rotate(0deg);
    opacity: 0.6;
    animation: needle-waver 8s ease-in-out infinite;
}

@keyframes needle-waver {
    0%, 100% { transform: translate(-50%, 0) rotate(0deg); }
    25% { transform: translate(-50%, 0) rotate(15deg); }
    50% { transform: translate(-50%, 0) rotate(-10deg); }
    75% { transform: translate(-50%, 0) rotate(5deg); }
}

/* --- Bottles Scene --- */
.bottle-waves {
    position: absolute;
    bottom: 20%;
    left: 0;
    width: 100%;
    height: 50px;
}

.b-wave {
    position: absolute;
    width: 100%;
    height: 25px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: transparent;
    border-top: 2px solid var(--seafoam-drift);
    opacity: 0.4;
    animation: wave-drift 4s ease-in-out infinite;
}

.b-wave-1 { bottom: 15px; }
.b-wave-2 { bottom: 0; width: 85%; left: 7.5%; animation-delay: 0.8s; }

.bottles-row {
    position: absolute;
    bottom: 30%;
    left: 10%;
    width: 80%;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
}

.bottle {
    position: relative;
    animation: bottle-bob 3s ease-in-out infinite;
    animation-delay: calc(var(--b) * 0.6s);
}

@keyframes bottle-bob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}

.bottle-body {
    width: 20px;
    height: 30px;
    background: rgba(111, 190, 171, 0.25);
    border: 1.5px solid var(--seafoam-drift);
    border-radius: 4px 4px 8px 8px;
    position: relative;
}

.bottle-neck {
    width: 8px;
    height: 12px;
    background: rgba(111, 190, 171, 0.2);
    border: 1.5px solid var(--seafoam-drift);
    border-radius: 2px 2px 0 0;
    margin: 0 auto;
    position: relative;
    top: -1px;
}

.bottle-paper {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid var(--aged-vellum);
    opacity: 0.8;
}

/* --- Deep Section Cards --- */
.deep-card {
    background-color: #0d2a42;
}

.deep-card .card-heading {
    color: var(--bleached-shell);
}

.deep-card .card-body {
    color: var(--pearl-mist);
}

.deep-card .card-quote {
    color: var(--pearl-mist);
}

.deep-card .card-wayfinding {
    color: var(--pearl-mist);
}

/* --- Bioluminescence Scene --- */
.deep-glow {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61, 214, 208, 0.4) 0%, transparent 70%);
    animation: glow-pulse 4s ease-in-out infinite;
}

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

.deep-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--bioluminescent);
    opacity: 0.5;
    top: calc(20% + var(--p) * 10%);
    left: calc(15% + var(--p) * 11%);
    animation: particle-float 5s ease-in-out infinite;
    animation-delay: calc(var(--p) * 0.5s);
}

@keyframes particle-float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
    50% { transform: translateY(-15px) scale(1.2); opacity: 0.8; }
}

/* --- Abyss Scene --- */
.abyss-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.abyss-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid var(--bioluminescent);
    opacity: calc(0.4 - var(--r) * 0.07);
    width: calc(40px + var(--r) * 50px);
    height: calc(40px + var(--r) * 50px);
    transform: translate(-50%, -50%);
    animation: ring-expand 6s ease-in-out infinite;
    animation-delay: calc(var(--r) * 0.8s);
}

@keyframes ring-expand {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: calc(0.4 - var(--r) * 0.07); }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: calc(0.2 - var(--r) * 0.03); }
}

/* --- Final Card --- */
.seafloor-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    width: 100%;
    padding: 60px 20px;
}

.final-card {
    max-width: 600px;
    width: 100%;
    aspect-ratio: 3 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    text-align: center;
    background-color: var(--aged-vellum);
    box-shadow: var(--card-shadow), inset 0 0 60px rgba(26, 58, 74, 0.2);
}

.final-message {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    line-height: 1.8;
    color: var(--abyssal-blue);
    position: relative;
    z-index: 2;
}

/* ============================================
   COMPASS ROSE NAVIGATION
   ============================================ */

#compass-rose {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
    width: 80px;
    height: 80px;
    opacity: 0;
    transition: opacity 1s ease 2s;
}

#compass-rose.visible {
    opacity: 1;
}

#compass-svg {
    width: 80px;
    height: 80px;
    cursor: pointer;
}

#compass-needle-group {
    transform-origin: 60px 60px;
    animation: drift 12s linear infinite;
}

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

#compass-glow {
    animation: compass-glow-pulse 3s ease-in-out infinite;
}

@keyframes compass-glow-pulse {
    0%, 100% { r: 8; opacity: 0.3; }
    50% { r: 12; opacity: 0.6; }
}

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

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

.compass-label {
    position: absolute;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--bleached-shell);
    background: rgba(10, 22, 40, 0.8);
    border: 1px solid rgba(111, 190, 171, 0.3);
    border-radius: 12px;
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 200ms ease, border-color 200ms ease;
}

.compass-label:hover {
    background: rgba(13, 59, 102, 0.9);
    border-color: var(--coral-whisper);
}

.compass-label-n {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.compass-label-e {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.compass-label-s {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.compass-label-w {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* ============================================
   CARD ANIMATIONS (Scroll-triggered)
   ============================================ */

.card-anim {
    opacity: 0;
    transform: rotate(var(--rot, 0deg)) translateY(40px);
    transition:
        opacity 1000ms ease,
        transform 1000ms var(--ease-buoyant);
}

.card-anim.in-view {
    opacity: 1;
    transform: rotate(var(--rot, 0deg)) translateY(0);
}

.card-anim.in-view:hover {
    transform: rotate(0deg) translateY(-8px) scale(1.02);
}

/* ============================================
   DEEP SECTION STYLING
   ============================================ */

.deep-grid {
    gap: 60px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .postcard-large {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 16px;
    }

    .postcard-large {
        grid-column: span 1;
        aspect-ratio: auto;
        min-height: 300px;
    }

    .postcard-small {
        aspect-ratio: auto;
        min-height: 200px;
    }

    #compass-rose {
        bottom: 16px;
        right: 16px;
        width: 60px;
        height: 60px;
    }

    #compass-svg {
        width: 60px;
        height: 60px;
    }

    #compass-labels {
        width: 160px;
        height: 160px;
    }

    /* Disable parallax on mobile */
    #bg-surface,
    .wave-svg {
        transform: none !important;
    }
}
