:root {
    /* Color Palette */
    --bg-abyss: #060c14;
    --bg-navy: #0a1624;
    --bg-teal: #0f293a;
    --parchment: #e4d4b4;
    --parchment-dim: #bba882;
    --blood-red: #8b1e24;
    --blood-bright: #c92a34;
    --gold-tarnished: #c59b27;
    --gold-bright: #f4d068;

    /* Typography */
    --font-display: 'Pirata One', cursive;
    --font-decorative: 'Cinzel Decorative', serif;
    --font-body: 'IM Fell English', serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    background-color: var(--bg-abyss);
    color: var(--parchment);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.15vw, 1.25rem);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Subtle Film Grain Overlay */
.film-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    opacity: 0.055;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Lightning Overlay */
.lightning-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, rgba(225, 240, 255, 0.85), rgba(15, 41, 58, 0.25));
    opacity: 0;
    pointer-events: none;
    z-index: 90;
    mix-blend-mode: screen;
}

/* Header Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem clamp(1.5rem, 5vw, 4rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(6, 12, 20, 0.9) 0%, rgba(6, 12, 20, 0) 100%);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-decorative);
    font-weight: 700;
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    color: var(--gold-tarnished);
    letter-spacing: 0.06em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.logo-icon {
    color: var(--blood-bright);
    filter: drop-shadow(0 0 8px rgba(201, 42, 52, 0.5));
}

.main-nav {
    display: flex;
    gap: clamp(1rem, 2.5vw, 2.5rem);
}

.main-nav a {
    color: var(--parchment);
    text-decoration: none;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: var(--gold-tarnished);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.main-nav a:hover {
    color: var(--gold-bright);
}

.main-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* =========================================
   SECTION 1: HERO
   ========================================= */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(ellipse at 50% 25%, #16364d 0%, #091726 55%, #050a11 100%);
}

#stormCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Blood Harvest Moon */
.hero-sky {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.blood-moon {
    position: absolute;
    top: 12%;
    right: 16%;
    width: clamp(110px, 14vw, 190px);
    height: clamp(110px, 14vw, 190px);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #f5dcb2 0%, #c97a63 55%, #6e1d22 100%);
    box-shadow:
        0 0 60px rgba(201, 42, 52, 0.35),
        0 0 120px rgba(212, 175, 55, 0.2);
    opacity: 0.85;
}

/* Ship & Tentacles */
.ship-wrapper {
    position: absolute;
    bottom: 14%;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(300px, 44vw, 560px);
    z-index: 5;
    pointer-events: none;
}

.ship-rocking {
    transform-origin: 50% 80%;
    animation: shipRock 7s ease-in-out infinite alternate;
}

.pirate-ship-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.95));
}

.lantern-glow {
    animation: lanternFlicker 2.2s infinite alternate;
    filter: drop-shadow(0 0 6px #ffb703);
}

.tentacle {
    transform-origin: bottom center;
    animation: tentacleSway 5.5s ease-in-out infinite alternate;
}

.tentacle.t-2 {
    animation-delay: -2.7s;
}

/* Layered Parallax Waves */
.wave-layer {
    position: absolute;
    left: -5%;
    width: 110%;
    line-height: 0;
    pointer-events: none;
}

.wave-layer svg {
    width: 100%;
    height: clamp(120px, 22vh, 250px);
}

.wave-back {
    bottom: 9%;
    z-index: 3;
    animation: waveSway 11s ease-in-out infinite alternate;
}

.wave-mid {
    bottom: 4%;
    z-index: 6;
    animation: waveSway 8s ease-in-out infinite alternate-reverse;
}

.wave-front {
    bottom: -2%;
    z-index: 8;
    animation: waveSway 6s ease-in-out infinite alternate;
}

/* Drifting Fog Layers */
.fog-container {
    position: absolute;
    left: 0;
    width: 200%;
    height: 35vh;
    pointer-events: none;
}

.fog-back {
    bottom: 15%;
    z-index: 4;
    opacity: 0.35;
    animation: fogDrift 38s linear infinite;
}

.fog-front {
    bottom: 2%;
    z-index: 7;
    opacity: 0.45;
    animation: fogDrift 26s linear infinite reverse;
}

.fog-layer {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(168, 195, 212, 0.28) 0%, transparent 60%),
        radial-gradient(ellipse at 60% 60%, rgba(130, 165, 185, 0.24) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 40%, rgba(168, 195, 212, 0.28) 0%, transparent 60%);
    filter: blur(18px);
}

/* Hero Foreground Content */
.hero-content {
    position: relative;
    z-index: 15;
    max-width: 880px;
    padding: 0 1.5rem;
    text-align: center;
    margin-top: -6vh;
}

.hero-eyebrow {
    font-family: var(--font-decorative);
    color: var(--gold-tarnished);
    font-size: clamp(0.75rem, 1vw, 0.95rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(3.4rem, 8.5vw, 7.2rem);
    line-height: 1.02;
    letter-spacing: 0.04em;
    color: var(--parchment);
    text-shadow:
        0 4px 0 #2b090c,
        0 8px 25px rgba(0, 0, 0, 0.95),
        0 0 40px rgba(139, 30, 36, 0.55);
    margin-bottom: 1.25rem;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(45px) rotateX(-65deg);
    transform-origin: 50% 100%;
}

.hero-subtitle {
    max-width: 680px;
    margin: 0 auto 2.25rem;
    font-size: clamp(1.05rem, 1.35vw, 1.3rem);
    color: var(--parchment-dim);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

/* Set Sail CTA Button with Glowing Hover Effect */
.btn-sail {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 2.4rem;
    font-family: var(--font-decorative);
    font-weight: 700;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--parchment);
    background: linear-gradient(145deg, #681319 0%, #3a090d 100%);
    border: 2px solid var(--gold-tarnished);
    border-radius: 3px;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.8),
        inset 0 0 15px rgba(212, 175, 55, 0.2);
    transition: all 0.35s ease;
    overflow: hidden;
}

.btn-sail::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg, transparent, rgba(244, 208, 104, 0.45), transparent);
    transform: translateX(-100%);
    transition: transform 0.65s ease;
}

.btn-sail:hover {
    color: #fff;
    border-color: var(--gold-bright);
    transform: translateY(-3px);
    box-shadow:
        0 0 25px rgba(201, 42, 52, 0.8),
        0 0 50px rgba(212, 175, 55, 0.45),
        inset 0 0 20px rgba(244, 208, 104, 0.35);
}

.btn-sail:hover::before {
    transform: translateX(100%);
}

.btn-sword {
    color: var(--gold-bright);
    transition: transform 0.35s ease;
}

.btn-sail:hover .btn-sword {
    transform: translate(4px, -4px) rotate(12deg);
}

/* Scroll-Down Compass Indicator */
.compass-scroll {
    position: absolute;
    bottom: 1.8rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    color: var(--gold-tarnished);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.compass-label {
    font-family: var(--font-decorative);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 2px 6px #000;
}

.compass-wheel svg {
    animation: compassSpin 18s linear infinite;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9));
}

.compass-scroll:hover {
    color: var(--gold-bright);
    transform: translateX(-50%) translateY(4px);
}

/* Temporary Stage 2 Anchor Styling */
.next-stage-anchor {
    min-height: 45vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    background: linear-gradient(to bottom, #060c14, #09131f);
    border-top: 1px solid rgba(197, 155, 39, 0.25);
}

.anchor-notice h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--gold-tarnished);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

/* =========================================
   KEYFRAME ANIMATIONS
   ========================================= */
@keyframes shipRock {
    0% {
        transform: rotate(-3.2deg) translateY(4px);
    }

    50% {
        transform: rotate(2.8deg) translateY(-6px);
    }

    100% {
        transform: rotate(-2.2deg) translateY(2px);
    }
}

@keyframes tentacleSway {
    0% {
        transform: rotate(-6deg) scaleY(0.96);
    }

    100% {
        transform: rotate(7deg) scaleY(1.04);
    }
}

@keyframes waveSway {
    0% {
        transform: translateX(-2.5%) translateY(0px);
    }

    100% {
        transform: translateX(2.5%) translateY(6px);
    }
}

@keyframes fogDrift {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes lanternFlicker {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.65;
        transform: scale(0.88);
    }
}

@keyframes compassSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .ship-wrapper {
        bottom: 18%;
        width: 82vw;
    }
}

/* =========================================
   SHARED SECTION HEADERS
   ========================================= */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.section-header {
    text-align: center;
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-eyebrow {
    font-family: var(--font-decorative);
    color: var(--gold-tarnished);
    font-size: clamp(0.75rem, 0.95vw, 0.9rem);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    color: var(--parchment);
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.9);
}

.section-subtitle {
    max-width: 660px;
    margin: 0.75rem auto 0;
    color: var(--parchment-dim);
    font-size: clamp(1rem, 1.2vw, 1.18rem);
}

/* =========================================
   SECTION 2: TREASURE MAP JOURNEY
   ========================================= */
.map-section {
    position: relative;
    background:
        radial-gradient(circle at 50% 50%, rgba(15, 41, 58, 0.45) 0%, rgba(6, 12, 20, 0.98) 80%),
        repeating-linear-gradient(90deg, #070e17 0px, #070e17 48px, #050a11 49px, #070e17 50px);
    border-top: 2px solid rgba(197, 155, 39, 0.3);
    border-bottom: 2px solid rgba(197, 155, 39, 0.3);
}

.map-pin-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4.5rem clamp(1rem, 4vw, 3.5rem) 2.5rem;
}

.map-header {
    margin-bottom: 1.5rem;
}

.map-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: clamp(1.5rem, 3vw, 2.75rem);
    align-items: center;
    max-width: 1360px;
    width: 100%;
    margin: 0 auto;
}

/* Captain's Log Sidebar */
.map-log-panel {
    position: relative;
    background: linear-gradient(160deg, #121e2b 0%, #08101a 100%);
    border: 1px solid var(--gold-tarnished);
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.85),
        inset 0 0 30px rgba(0, 0, 0, 0.7);
    padding: 2.2rem 1.75rem;
    border-radius: 4px;
}

.wax-seal {
    position: absolute;
    top: -22px;
    right: 22px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #b5242c, #5e0d12);
    border: 2px dashed rgba(244, 208, 104, 0.45);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-decorative);
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--gold-bright);
    transform: rotate(12deg);
}

.log-coords {
    font-family: var(--font-decorative);
    font-size: 0.8rem;
    color: var(--gold-tarnished);
    letter-spacing: 0.15em;
    margin-bottom: 0.4rem;
}

.log-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.85rem;
    color: var(--parchment);
    line-height: 1.15;
    margin-bottom: 0.85rem;
}

.log-desc {
    color: var(--parchment-dim);
    font-size: 1rem;
    min-height: 7.2em;
    margin-bottom: 1.4rem;
}

.log-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(197, 155, 39, 0.35);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.log-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--blood-red), var(--gold-bright));
    box-shadow: 0 0 10px var(--blood-bright);
}

.log-step-indicators {
    display: flex;
    justify-content: space-between;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(197, 155, 39, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-decorative);
    font-size: 0.78rem;
    color: var(--parchment-dim);
    transition: all 0.35s ease;
}

.step-dot.active {
    background: var(--blood-red);
    border-color: var(--gold-bright);
    color: #fff;
    box-shadow: 0 0 12px rgba(201, 42, 52, 0.75);
    transform: scale(1.12);
}

/* Aged Parchment Map Scroll */
.parchment-scroll {
    position: relative;
    width: 100%;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.95));
}

.scroll-roller {
    height: 16px;
    width: 102%;
    margin-left: -1%;
    background: linear-gradient(to bottom, #3b2311 0%, #633d20 45%, #241408 100%);
    border: 1px solid #967135;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.85);
}

.parchment-canvas {
    position: relative;
    background:
        radial-gradient(ellipse at center, #e6d3ad 0%, #cfb482 65%, #a1804f 100%);
    padding: clamp(0.75rem, 1.8vw, 1.5rem);
    border-left: 3px solid #6e522d;
    border-right: 3px solid #6e522d;
    box-shadow: inset 0 0 65px rgba(56, 33, 11, 0.75);
    /* Subtle jagged torn parchment edge illusion */
    clip-path: polygon(0% 1%, 4% 0%, 12% 1%, 22% 0%, 35% 1%, 48% 0%, 62% 1%, 77% 0%, 89% 1%, 100% 0%,
            100% 99%, 91% 100%, 78% 99%, 64% 100%, 49% 99%, 34% 100%, 19% 99%, 7% 100%, 0% 99%);
}

#treasureMapSvg {
    width: 100%;
    height: auto;
    max-height: 58vh;
    display: block;
}

.island-node {
    transform-box: fill-box;
    transform-origin: center;
}

.island-label {
    font-family: var(--font-display);
    font-size: 23px;
    fill: #2c1a0b;
    letter-spacing: 0.04em;
}

.island-label-final {
    fill: #7a1419;
    font-size: 26px;
}

/* =========================================
   SECTION 3: THE CREW (3D Tilt & Flip Cards)
   ========================================= */
.crew-section {
    position: relative;
    padding: clamp(5rem, 9vw, 8rem) 0;
    background: linear-gradient(180deg, #060c14 0%, #0b1826 50%, #060c14 100%);
}

.crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
    gap: 2.2rem;
}

.crew-card-wrap {
    perspective: 1300px;
    height: 490px;
}

.crew-card-tilt {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
}

.crew-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}

/* Flip on Hover or Active Tap */
.crew-card-wrap:hover .crew-card-inner,
.crew-card-wrap.is-flipped .crew-card-inner {
    transform: rotateY(180deg);
}

.crew-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 6px;
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border: 2px solid var(--gold-tarnished);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.85),
        inset 0 0 25px rgba(0, 0, 0, 0.8);
}

.crew-card-front {
    background:
        radial-gradient(circle at 50% 25%, #162c40 0%, #0a1420 75%);
    text-align: center;
}

.crew-card-back {
    background:
        radial-gradient(circle at 50% 50%, #2b1317 0%, #0d080c 85%);
    transform: rotateY(180deg);
    text-align: left;
    align-items: stretch;
}

/* Decorative Gold Corner Filigree */
.card-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--gold-bright);
    border-style: solid;
    pointer-events: none;
}

.card-corner.tl {
    top: 8px;
    left: 8px;
    border-width: 2px 0 0 2px;
}

.card-corner.tr {
    top: 8px;
    right: 8px;
    border-width: 2px 2px 0 0;
}

.card-corner.bl {
    bottom: 8px;
    left: 8px;
    border-width: 0 0 2px 2px;
}

.card-corner.br {
    bottom: 8px;
    right: 8px;
    border-width: 0 2px 2px 0;
}

.bounty-tag {
    font-family: var(--font-decorative);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-bright);
    background: rgba(139, 30, 36, 0.65);
    border: 1px solid rgba(244, 208, 104, 0.4);
    padding: 0.28rem 0.75rem;
    border-radius: 2px;
}

.portrait-frame {
    width: 155px;
    height: 165px;
    margin: 0.35rem 0;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.85));
}

.pirate-portrait {
    width: 100%;
    height: 100%;
}

.crew-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.85rem;
    color: var(--parchment);
    letter-spacing: 0.03em;
    line-height: 1.1;
}

.crew-role {
    font-family: var(--font-decorative);
    font-size: 0.78rem;
    color: var(--gold-tarnished);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: -0.25rem;
}

.crew-quote {
    font-style: italic;
    font-size: 0.98rem;
    color: var(--parchment-dim);
    line-height: 1.45;
}

.flip-hint {
    font-family: var(--font-decorative);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-bright);
    opacity: 0.8;
}

/* Card Back Details */
.back-title {
    font-family: var(--font-decorative);
    font-size: 1rem;
    color: var(--gold-bright);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(197, 155, 39, 0.35);
    padding-bottom: 0.5rem;
}

.back-story {
    font-size: 0.96rem;
    color: var(--parchment);
    line-height: 1.52;
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.skill-label {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-decorative);
    font-size: 0.74rem;
    color: var(--gold-tarnished);
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.skill-track {
    width: 100%;
    height: 7px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(197, 155, 39, 0.35);
    border-radius: 99px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blood-bright), var(--gold-bright));
}

.card-seal {
    align-self: flex-end;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--blood-bright);
    letter-spacing: 0.08em;
    border: 1px dashed var(--blood-bright);
    padding: 0.2rem 0.65rem;
    transform: rotate(-4deg);
}

@media (max-width: 992px) {
    .map-layout {
        grid-template-columns: 1fr;
    }

    .map-log-panel {
        order: 2;
    }

    .log-desc {
        min-height: auto;
    }
}

/* =========================================
   SECTION 4: THE SHIP (Horizontal Scroll Gallery)
   ========================================= */
.ship-section {
    position: relative;
    background:
        radial-gradient(circle at 50% 20%, #132a3e 0%, #071019 70%, #04080e 100%);
    border-top: 2px solid rgba(197, 155, 39, 0.3);
    border-bottom: 2px solid rgba(197, 155, 39, 0.3);
    overflow: hidden;
}

.ship-pin-wrap {
    height: 100vh;
    min-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 4.5rem;
}

.ship-gallery-header {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto 1.25rem;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}

.ship-header-text .section-title {
    text-align: left;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.ship-header-text .section-eyebrow {
    text-align: left;
}

.ship-deck-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
    min-width: 220px;
}

.deck-counter {
    font-family: var(--font-decorative);
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    color: var(--gold-bright);
    text-transform: uppercase;
}

.deck-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(197, 155, 39, 0.4);
    border-radius: 99px;
    overflow: hidden;
}

.deck-progress-bar {
    width: 25%;
    height: 100%;
    background: linear-gradient(90deg, var(--blood-bright), var(--gold-bright));
}

/* Horizontal Sliding Track */
.ship-horizontal-track {
    display: flex;
    width: 400vw;
    will-change: transform;
}

.ship-panel {
    width: 100vw;
    padding: 0 clamp(1.5rem, 5vw, 4.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-card {
    max-width: 1260px;
    width: 100%;
    min-height: 450px;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: linear-gradient(145deg, rgba(16, 30, 46, 0.92) 0%, rgba(7, 14, 22, 0.96) 100%);
    border: 2px solid var(--gold-tarnished);
    border-radius: 6px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.9),
        inset 0 0 35px rgba(0, 0, 0, 0.85);
    overflow: hidden;
}

.panel-visual {
    position: relative;
    background: radial-gradient(circle at 50% 50%, #18344a 0%, #08121c 85%);
    border-right: 1px solid rgba(197, 155, 39, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}

.parallax-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.layer-bg svg {
    width: 115%;
    height: 115%;
    opacity: 0.65;
}

.panel-hero-svg {
    width: 82%;
    max-width: 390px;
    height: auto;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.9));
}

.layer-fg {
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1.5rem;
}

.fg-badge {
    font-family: var(--font-decorative);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-bright);
    background: rgba(10, 20, 32, 0.9);
    border: 1px solid var(--gold-tarnished);
    padding: 0.45rem 0.95rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.85);
}

.panel-info {
    padding: clamp(1.75rem, 3.5vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel-number {
    font-family: var(--font-decorative);
    font-size: 0.8rem;
    color: var(--blood-bright);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.panel-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 3vw, 2.75rem);
    color: var(--parchment);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.panel-desc {
    color: var(--parchment-dim);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.panel-specs {
    list-style: none;
    border-top: 1px solid rgba(197, 155, 39, 0.25);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.95rem;
}

.panel-specs strong {
    font-family: var(--font-decorative);
    color: var(--gold-tarnished);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-right: 0.4rem;
}

/* =========================================
   SECTION 5: THE TREASURE (Chest & Counters)
   ========================================= */
.treasure-section {
    position: relative;
    padding: clamp(5rem, 9vw, 8.5rem) 0;
    background:
        radial-gradient(circle at 50% 42%, rgba(92, 58, 14, 0.22) 0%, rgba(6, 12, 20, 0.98) 70%),
        #060c14;
    overflow: hidden;
}

/* Shimmering Gold Effect for Text & Numbers */
.shimmer-gold-text {
    background: linear-gradient(110deg,
            #c59b27 0%,
            #f4d068 25%,
            #fff8db 50%,
            #f4d068 75%,
            #c59b27 100%);
    background-size: 220% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: goldShimmer 4.5s linear infinite;
}

@keyframes goldShimmer {
    to {
        background-position: 220% center;
    }
}

.chest-stage {
    position: relative;
    max-width: 660px;
    margin: 0 auto 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Rotating God Rays behind Chest */
.chest-godrays {
    position: absolute;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg,
            rgba(244, 208, 104, 0.22) 0deg 8deg,
            transparent 8deg 20deg);
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 15%, rgba(0, 0, 0, 0) 70%);
    -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 15%, rgba(0, 0, 0, 0) 70%);
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
    z-index: 1;
}

.chest-aura-glow {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 208, 104, 0.4) 0%, rgba(139, 30, 36, 0.15) 55%, transparent 75%);
    filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.treasure-chest-svg {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 25px 40px rgba(0, 0, 0, 0.95));
}

/* Plunder Counters Grid */
.spoils-counter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.75rem;
}

.spoil-card {
    position: relative;
    background: linear-gradient(160deg, rgba(19, 33, 48, 0.85) 0%, rgba(8, 15, 24, 0.95) 100%);
    border: 1px solid rgba(197, 155, 39, 0.45);
    border-radius: 6px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.8);
    transition: transform 0.35s ease, border-color 0.35s ease;
}

.spoil-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold-bright);
}

.spoil-icon {
    display: inline-block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 12px rgba(244, 208, 104, 0.45));
}

.spoil-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4.2vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: 0.03em;
    margin-bottom: 0.4rem;
}

.spoil-label {
    font-family: var(--font-decorative);
    font-size: 0.92rem;
    color: var(--parchment);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.spoil-note {
    font-size: 0.92rem;
    color: var(--parchment-dim);
    font-style: italic;
}

@media (max-width: 960px) {
    .panel-card {
        grid-template-columns: 1fr;
    }

    .panel-visual {
        min-height: 250px;
        border-right: none;
        border-bottom: 1px solid rgba(197, 155, 39, 0.3);
    }

    .ship-gallery-header {
        flex-direction: column;
        align-items: flex-start;
    }
}