/* ============================================
   completengine.net - Maximalist Tropical Watercolor
   Jewel-Tone Horizontal Scroll Experience
   ============================================ */

/* --- Color Palette ---
   Deep Sapphire:     #0B3D6B
   Imperial Amethyst: #7B2D8E
   Emerald Reef:      #0B8457
   Ruby Coral:        #D4175B
   Topaz Sun:         #E6A020
   Midnight Abyss:    #1A0A3E
   Conch Shell:       #F5E6D0
   Seafoam Tint:      #B8E6D4
   --- */

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
    height: 100vh;
}

body {
    height: 100vh;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.65;
    color: #1A0A3E;
    background: #0B3D6B;
    cursor: default;
}

/* === TYPOGRAPHY === */
.display-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(2.5rem, 8vw, 7rem);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.1;
    text-shadow: 2px 2px 8px rgba(123,45,142,0.15);
}

.subtitle-accent {
    font-family: 'Lilita One', cursive;
    font-size: clamp(1.2rem, 3vw, 2.4rem);
    line-height: 1.3;
}

.body-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.65;
}

.caveat-text {
    font-family: 'Caveat', cursive;
    font-size: clamp(0.9rem, 2vw, 1.3rem);
}

.card-title {
    font-family: 'Lilita One', cursive;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    margin-bottom: 0.5em;
}

.card-body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    line-height: 1.65;
}

.block-heading {
    font-family: 'Righteous', cursive;
    font-size: clamp(1.3rem, 3vw, 2.2rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.4em;
}

/* === SCROLL CONTAINER === */
#scroll-container {
    display: flex;
    flex-wrap: nowrap;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#scroll-container::-webkit-scrollbar {
    display: none;
}

/* === PANELS (shared) === */
.panel {
    flex-shrink: 0;
    height: 100vh;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
}

.panel-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5vh 6vw;
}

/* === WATERCOLOR WASH OVERLAYS === */
.watercolor-wash {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

.watercolor-wash::before {
    content: '';
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(184,230,212,0.6) 0%, rgba(245,230,208,0.3) 50%, transparent 80%),
        radial-gradient(ellipse at 70% 60%, rgba(123,45,142,0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 80%, rgba(11,132,87,0.15) 0%, transparent 50%);
    filter: blur(40px);
    animation: watercolor-bleed 8s ease-in-out infinite alternate;
}

.wash-warm::before {
    background:
        radial-gradient(ellipse at 25% 35%, rgba(230,160,32,0.4) 0%, transparent 55%),
        radial-gradient(ellipse at 65% 70%, rgba(212,23,91,0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(245,230,208,0.5) 0%, transparent 60%);
}

.wash-seafoam::before {
    background:
        radial-gradient(ellipse at 40% 30%, rgba(184,230,212,0.5) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 60%, rgba(11,61,107,0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(245,230,208,0.4) 0%, transparent 60%);
}

.wash-sunset::before {
    background:
        radial-gradient(ellipse at 30% 50%, rgba(212,23,91,0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 40%, rgba(230,160,32,0.35) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 70%, rgba(11,132,87,0.2) 0%, transparent 45%);
}

@keyframes watercolor-bleed {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* Paper grain texture overlay on all panels */
.panel::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%23000' opacity='0.3'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23fff' opacity='0.4'/%3E%3Crect x='3' y='0' width='1' height='1' fill='%23fff' opacity='0.2'/%3E%3Crect x='0' y='3' width='1' height='1' fill='%23fff' opacity='0.3'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* === PANEL 1: OPENING REEF === */
.panel-reef {
    background: linear-gradient(135deg, #0B3D6B 0%, #7B2D8E 50%, #1A0A3E 100%);
}

.reef-content {
    max-width: 50%;
    padding-left: 8vw;
}

.reef-content .display-title {
    color: #F5E6D0;
    margin-bottom: 0.3em;
}

.reef-content .subtitle-accent {
    color: #E6A020;
    margin-bottom: 0.8em;
}

.reef-content .reef-body {
    color: #B8E6D4;
    max-width: 500px;
    margin-bottom: 1.5em;
}

.reef-content .handwritten-note {
    color: #E6A020;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    opacity: 0.8;
}

.tilted {
    transform: perspective(600px) rotateZ(-2deg) rotateY(2deg);
    display: inline-block;
}

/* Reef illustration elements */
.reef-illustration {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 60%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.coral-element {
    position: absolute;
    border-radius: 50% 50% 20% 20%;
    filter: url(#watercolor-filter);
}

.coral-1 {
    width: 180px; height: 220px;
    background: radial-gradient(ellipse at 50% 80%, #D4175B, #7B2D8E);
    bottom: 0; right: 15%;
    border-radius: 40% 60% 15% 10%;
}

.coral-2 {
    width: 140px; height: 180px;
    background: radial-gradient(ellipse at 40% 70%, #E6A020, #D4175B);
    bottom: 0; right: 35%;
    border-radius: 55% 45% 10% 20%;
}

.coral-3 {
    width: 200px; height: 260px;
    background: radial-gradient(ellipse at 60% 75%, #0B8457, #0B3D6B);
    bottom: 0; right: 55%;
    border-radius: 30% 70% 15% 5%;
}

.coral-4 {
    width: 100px; height: 150px;
    background: radial-gradient(ellipse at 50% 60%, #7B2D8E, #1A0A3E);
    bottom: 0; right: 5%;
    border-radius: 50% 50% 10% 15%;
}

.coral-5 {
    width: 160px; height: 200px;
    background: radial-gradient(ellipse at 45% 65%, #B8E6D4, #0B8457);
    bottom: 0; right: 75%;
    border-radius: 45% 55% 20% 10%;
}

.seaweed {
    position: absolute;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to top, #0B8457, transparent);
    border-radius: 50% 50% 0 0;
    animation: seaweed-sway 4s ease-in-out infinite alternate;
    transform-origin: bottom center;
}

.seaweed-1 { height: 180px; right: 25%; animation-delay: 0s; }
.seaweed-2 { height: 140px; right: 45%; animation-delay: -1.5s; width: 15px; }
.seaweed-3 { height: 200px; right: 65%; animation-delay: -0.8s; width: 18px; }

@keyframes seaweed-sway {
    0% { transform: rotateZ(-5deg); }
    100% { transform: rotateZ(5deg); }
}

/* Bubbles */
.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(184,230,212,0.4), rgba(184,230,212,0.1));
    border: 1px solid rgba(184,230,212,0.3);
    animation: bubble-rise linear infinite;
    z-index: 3;
}

.bubble-1 { width: 20px; height: 20px; left: 60%; bottom: -20px; animation-duration: 12s; animation-delay: 0s; }
.bubble-2 { width: 14px; height: 14px; left: 70%; bottom: -14px; animation-duration: 15s; animation-delay: -3s; }
.bubble-3 { width: 10px; height: 10px; left: 80%; bottom: -10px; animation-duration: 18s; animation-delay: -7s; }
.bubble-4 { width: 16px; height: 16px; left: 55%; bottom: -16px; animation-duration: 14s; animation-delay: -5s; }
.bubble-5 { width: 8px; height: 8px; left: 75%; bottom: -8px; animation-duration: 20s; animation-delay: -10s; }

@keyframes bubble-rise {
    0% { transform: translateY(0) translateX(0); opacity: 0.8; }
    25% { transform: translateY(-25vh) translateX(10px); opacity: 0.6; }
    50% { transform: translateY(-50vh) translateX(-5px); opacity: 0.5; }
    75% { transform: translateY(-75vh) translateX(8px); opacity: 0.3; }
    100% { transform: translateY(-110vh) translateX(-3px); opacity: 0; }
}

/* === PANEL 2: SCRAPBOOK SPREAD === */
.panel-scrapbook {
    background: #F5E6D0;
}

.scrapbook-cards {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 5vh 4vw;
    gap: 3vw;
    position: relative;
    z-index: 2;
}

.scrapbook-card {
    flex-shrink: 0;
    width: clamp(280px, 22vw, 400px);
    background: #fff;
    padding: 2rem 1.8rem;
    transform: rotate(var(--rotation, 0deg)) translateY(var(--offset-y, 0));
    box-shadow: 8px 8px 0 #7B2D8E;
    clip-path: polygon(2% 0%, 98% 1%, 100% 97%, 1% 99%);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.03, 0.98, 0.52, 0.99);
    transform-style: preserve-3d;
    perspective: 800px;
}

.scrapbook-card .card-title {
    color: #D4175B;
}

.scrapbook-card .card-body {
    color: #1A0A3E;
}

.card-annotation {
    display: block;
    margin-top: 0.8em;
    color: #7B2D8E;
    opacity: 0.7;
}

/* Washi tape */
.washi-tape {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 80px;
    height: 24px;
    opacity: 0.55;
    border-radius: 2px;
    z-index: 3;
}

.tape-pink { background: #D4175B; }
.tape-gold { background: #E6A020; }
.tape-purple { background: #7B2D8E; }

/* Paper clip */
.paper-clip {
    position: absolute;
    top: -8px;
    right: 20px;
    width: 20px;
    height: 50px;
    border: 3px solid #E6A020;
    border-radius: 10px 10px 0 0;
    border-bottom: none;
    z-index: 3;
    transform: rotate(5deg);
}

.paper-clip::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 3px;
    width: 10px;
    height: 30px;
    border: 3px solid #E6A020;
    border-radius: 0 0 8px 8px;
    border-top: none;
}

/* Stamp decoration */
.stamp-decoration {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 50px;
    height: 60px;
    border: 3px dashed #D4175B;
    border-radius: 4px;
    background: rgba(212,23,91,0.08);
}

.stamp-decoration::after {
    content: '3\00A2';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Righteous', cursive;
    font-size: 1.1rem;
    color: #D4175B;
    opacity: 0.6;
}

/* Polaroid */
.polaroid-frame {
    background: #fff;
    padding: 10px 10px 40px 10px;
    box-shadow: 3px 3px 10px rgba(26,10,62,0.15);
    transform: rotate(1deg);
}

.polaroid-image {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #0B3D6B, #0B8457, #B8E6D4);
    filter: url(#watercolor-filter);
}

.polaroid-caption {
    display: block;
    text-align: center;
    margin-top: -30px;
    position: relative;
    color: #1A0A3E;
}

/* Shell list */
.shell-list {
    list-style: none;
    padding: 0;
}

.shell-list li {
    padding: 0.3em 0;
    color: #1A0A3E;
    font-family: 'Nunito', sans-serif;
}

.shell-icon {
    margin-right: 0.5em;
}

/* Tide wave decoration */
.tide-wave-decoration {
    margin-top: 1em;
    height: 30px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10px,
        rgba(11,132,87,0.15) 10px,
        rgba(11,132,87,0.15) 20px
    );
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    position: relative;
    overflow: hidden;
}

.tide-wave-decoration::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(11,61,107,0.2), transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(184,230,212,0.3), transparent 60%);
}

/* === PANEL 3: AQUARIUM WINDOW === */
.panel-aquarium {
    background: linear-gradient(180deg, #0B3D6B 0%, #1A0A3E 100%);
}

.deep-water-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(11,132,87,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(123,45,142,0.1) 0%, transparent 50%);
    z-index: 0;
}

.caustic-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            rgba(184,230,212,0.03) 0deg 10deg,
            transparent 10deg 20deg
        );
    animation: caustic-shift 6s linear infinite;
    filter: blur(20px);
    opacity: 0.6;
}

@keyframes caustic-shift {
    0% { transform: scale(1.2) rotate(0deg); }
    100% { transform: scale(1.2) rotate(360deg); }
}

.aquarium-content {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 3vw;
    padding: 8vh 6vw;
}

.specimen-card {
    background: rgba(245,230,208,0.08);
    border: 1px solid rgba(184,230,212,0.2);
    padding: 2.5rem 2rem;
    max-width: 340px;
    backdrop-filter: blur(5px);
    transform-style: preserve-3d;
    perspective: 800px;
    transition: transform 0.3s cubic-bezier(0.03, 0.98, 0.52, 0.99);
}

.specimen-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(184,230,212,0.05), transparent 70%);
    pointer-events: none;
    transition: background 0.3s ease;
}

.specimen-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    color: #E6A020;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.2em;
}

.specimen-label {
    color: #B8E6D4;
    display: block;
    margin-bottom: 0.8em;
    font-style: italic;
}

.specimen-description {
    color: #F5E6D0;
    font-family: 'Nunito', sans-serif;
    line-height: 1.65;
    opacity: 0.85;
}

/* Light rays */
.light-ray {
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    background: linear-gradient(180deg, rgba(184,230,212,0.08) 0%, transparent 70%);
    transform: skewX(-15deg);
    z-index: 1;
    pointer-events: none;
    animation: ray-pulse 5s ease-in-out infinite alternate;
}

.light-ray-1 { left: 15%; animation-delay: 0s; }
.light-ray-2 { left: 45%; width: 80px; animation-delay: -2s; opacity: 0.6; }
.light-ray-3 { left: 75%; width: 100px; animation-delay: -3.5s; opacity: 0.5; }

@keyframes ray-pulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* === PANEL 4: POSTCARD GRID === */
.panel-postcards {
    background: #B8E6D4;
}

.postcard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2vw;
    height: 100%;
    padding: 4vh 4vw;
    position: relative;
    z-index: 2;
}

.postcard {
    background: #F5E6D0;
    aspect-ratio: 3/2;
    position: relative;
    box-shadow: 5px 5px 0 rgba(123,45,142,0.4);
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 800px;
    transition: transform 0.3s cubic-bezier(0.03, 0.98, 0.52, 0.99);
    display: flex;
    flex-direction: column;
}

.postcard-image {
    flex: 1;
    filter: url(#watercolor-filter);
}

/* Postcard watercolor scenes */
.pc-sunset { background: linear-gradient(135deg, #D4175B, #E6A020, #F5E6D0); }
.pc-motel { background: linear-gradient(180deg, #7B2D8E, #D4175B, #E6A020); }
.pc-palms { background: linear-gradient(135deg, #0B8457, #B8E6D4, #E6A020); }
.pc-pool { background: linear-gradient(180deg, #0B3D6B, #B8E6D4, #0B8457); }
.pc-fish { background: linear-gradient(135deg, #E6A020, #D4175B, #0B3D6B); }
.pc-shells { background: linear-gradient(180deg, #F5E6D0, #E6A020, #D4175B); }
.pc-night { background: linear-gradient(135deg, #1A0A3E, #0B3D6B, #7B2D8E); }
.pc-coral { background: linear-gradient(180deg, #D4175B, #7B2D8E, #0B3D6B); }
.pc-wave { background: linear-gradient(135deg, #0B3D6B, #0B8457, #B8E6D4); }
.pc-sign { background: linear-gradient(180deg, #E6A020, #D4175B, #7B2D8E); }
.pc-jellyfish { background: linear-gradient(135deg, #7B2D8E, #B8E6D4, #F5E6D0); }
.pc-starfish { background: linear-gradient(180deg, #E6A020, #D4175B, #0B8457); }

/* Postcard stamp */
.postcard-stamp {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 35px;
    height: 42px;
    border: 2px dashed #D4175B;
    border-radius: 3px;
    background: rgba(245,230,208,0.6);
    z-index: 2;
}

.postcard-stamp::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: #D4175B;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    opacity: 0.5;
}

.postcard-caption {
    display: block;
    padding: 0.5em 0.8em;
    color: #1A0A3E;
    background: rgba(245,230,208,0.8);
}

/* === PANEL 5: SUNSET STRIP === */
.panel-sunset {
    background: linear-gradient(90deg, #D4175B 0%, #E6A020 40%, #0B8457 100%);
}

.sunset-gradient-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #D4175B 0%, #E6A020 40%, #0B8457 100%);
    z-index: 0;
}

.sunset-content {
    max-width: 80%;
    margin: 0 auto;
    align-items: center;
    text-align: center;
}

.sunset-title {
    color: #F5E6D0;
    text-shadow: 3px 3px 12px rgba(26,10,62,0.3);
}

.sunset-sub {
    color: #1A0A3E;
    margin-bottom: 2em;
    opacity: 0.8;
}

.sunset-text-blocks {
    display: flex;
    gap: 3vw;
    flex-wrap: wrap;
    justify-content: center;
}

.sunset-block {
    background: rgba(245,230,208,0.85);
    padding: 2rem 1.8rem;
    max-width: 360px;
    box-shadow: 6px 6px 0 rgba(26,10,62,0.3);
    clip-path: polygon(1% 0%, 99% 2%, 98% 98%, 0% 97%);
    transform-style: preserve-3d;
    perspective: 800px;
    transition: transform 0.3s cubic-bezier(0.03, 0.98, 0.52, 0.99);
}

.sunset-block .block-heading {
    color: #D4175B;
}

.sunset-block .card-body {
    color: #1A0A3E;
}

.sunset-note {
    display: block;
    margin-top: 2em;
    color: #F5E6D0;
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    opacity: 0.7;
}

/* === PANEL 6: CLOSING TIDE POOL === */
.panel-tidepool {
    background: linear-gradient(135deg, #1A0A3E 0%, #0B3D6B 50%, #7B2D8E 100%);
}

.tidepool-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 70%, rgba(11,132,87,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(184,230,212,0.1) 0%, transparent 50%);
    z-index: 0;
}

.tidepool-content {
    align-items: center;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.tidepool-title {
    color: #B8E6D4;
    margin-bottom: 0.3em;
}

.tidepool-sub {
    color: #E6A020;
    margin-bottom: 1.5em;
}

.tidepool-body {
    color: #F5E6D0;
    max-width: 550px;
    margin-bottom: 1.5em;
    opacity: 0.9;
}

.tidepool-note {
    display: block;
    color: #E6A020;
    opacity: 0.6;
    margin-bottom: 2em;
}

.starfish-group {
    display: flex;
    gap: 1em;
}

.starfish {
    font-size: 2.5rem;
    color: #E6A020;
    text-shadow: 2px 2px 4px rgba(26,10,62,0.3);
    animation: starfish-pulse 3s ease-in-out infinite alternate;
}

.star-1 { animation-delay: 0s; }
.star-2 { animation-delay: -0.6s; }
.star-3 { animation-delay: -1.2s; }
.star-4 { animation-delay: -1.8s; }
.star-5 { animation-delay: -2.4s; }

@keyframes starfish-pulse {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.15) rotate(10deg); }
}

.tidepool-coral-1 {
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 150px;
    height: 200px;
    background: radial-gradient(ellipse at 50% 80%, #7B2D8E, #1A0A3E);
    border-radius: 40% 60% 10% 15%;
    z-index: 1;
    filter: url(#watercolor-filter);
}

.tidepool-coral-2 {
    position: absolute;
    bottom: 0;
    right: 8%;
    width: 120px;
    height: 170px;
    background: radial-gradient(ellipse at 45% 75%, #0B8457, #0B3D6B);
    border-radius: 55% 45% 15% 10%;
    z-index: 1;
    filter: url(#watercolor-filter);
}

/* === DRIFTING FISH === */
#fish-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.drifting-fish {
    position: absolute;
    opacity: 0.7;
}

.fish-1 {
    width: 100px;
    top: 15%;
    left: -120px;
    animation: fish-drift-1 25s linear infinite, fish-bob-1 4s ease-in-out infinite;
}

.fish-2 {
    width: 75px;
    top: 65%;
    left: -100px;
    animation: fish-drift-2 35s linear infinite, fish-bob-2 5s ease-in-out infinite;
    animation-delay: -8s, 0s;
}

.fish-3 {
    width: 60px;
    top: 35%;
    left: -80px;
    animation: fish-drift-3 30s linear infinite, fish-bob-3 3.5s ease-in-out infinite;
    animation-delay: -15s, 0s;
}

.fish-4 {
    width: 90px;
    top: 80%;
    left: -110px;
    animation: fish-drift-4 40s linear infinite, fish-bob-4 4.5s ease-in-out infinite;
    animation-delay: -5s, 0s;
}

.fish-5 {
    width: 55px;
    top: 25%;
    left: -70px;
    animation: fish-drift-5 28s linear infinite, fish-bob-5 3s ease-in-out infinite;
    animation-delay: -20s, 0s;
}

.fish-6 {
    width: 70px;
    top: 50%;
    left: -90px;
    animation: fish-drift-6 32s linear infinite, fish-bob-6 5.5s ease-in-out infinite;
    animation-delay: -12s, 0s;
}

.fish-7 {
    width: 50px;
    top: 10%;
    left: -65px;
    animation: fish-drift-7 22s linear infinite, fish-bob-7 4.2s ease-in-out infinite;
    animation-delay: -18s, 0s;
}

.fish-8 {
    width: 80px;
    top: 72%;
    left: -100px;
    animation: fish-drift-8 38s linear infinite, fish-bob-8 3.8s ease-in-out infinite;
    animation-delay: -3s, 0s;
}

/* Fish drift keyframes - each unique path */
@keyframes fish-drift-1 {
    0% { transform: translateX(-120px); }
    100% { transform: translateX(calc(100vw + 120px)); }
}
@keyframes fish-drift-2 {
    0% { transform: translateX(-100px) scaleX(-1); }
    100% { transform: translateX(calc(100vw + 100px)) scaleX(-1); }
}
@keyframes fish-drift-3 {
    0% { transform: translateX(-80px); }
    100% { transform: translateX(calc(100vw + 80px)); }
}
@keyframes fish-drift-4 {
    0% { transform: translateX(-110px) scaleX(-1); }
    100% { transform: translateX(calc(100vw + 110px)) scaleX(-1); }
}
@keyframes fish-drift-5 {
    0% { transform: translateX(-70px); }
    100% { transform: translateX(calc(100vw + 70px)); }
}
@keyframes fish-drift-6 {
    0% { transform: translateX(-90px) scaleX(-1); }
    100% { transform: translateX(calc(100vw + 90px)) scaleX(-1); }
}
@keyframes fish-drift-7 {
    0% { transform: translateX(-65px); }
    100% { transform: translateX(calc(100vw + 65px)); }
}
@keyframes fish-drift-8 {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(calc(100vw + 100px)); }
}

/* Fish bob keyframes - vertical sine wave */
@keyframes fish-bob-1 { 0%, 100% { top: 15%; } 50% { top: 18%; } }
@keyframes fish-bob-2 { 0%, 100% { top: 65%; } 50% { top: 62%; } }
@keyframes fish-bob-3 { 0%, 100% { top: 35%; } 50% { top: 38%; } }
@keyframes fish-bob-4 { 0%, 100% { top: 80%; } 50% { top: 76%; } }
@keyframes fish-bob-5 { 0%, 100% { top: 25%; } 50% { top: 22%; } }
@keyframes fish-bob-6 { 0%, 100% { top: 50%; } 50% { top: 53%; } }
@keyframes fish-bob-7 { 0%, 100% { top: 10%; } 50% { top: 14%; } }
@keyframes fish-bob-8 { 0%, 100% { top: 72%; } 50% { top: 68%; } }

/* === PROGRESS BAR === */
#progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(26,10,62,0.2);
    z-index: 200;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0B3D6B, #7B2D8E, #D4175B);
    transition: width 0.1s linear;
}

/* === TILT-3D LIGHT REFLECTION === */
.tilt-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.12), transparent 70%);
    pointer-events: none;
    transition: background 0.3s ease;
    z-index: 5;
}

/* === PANEL ENTRANCE ANIMATIONS === */
.panel-content > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.panel-content.in-view > * {
    opacity: 1;
    transform: translateY(0);
}

.panel-content.in-view > *:nth-child(1) { transition-delay: 0.1s; }
.panel-content.in-view > *:nth-child(2) { transition-delay: 0.2s; }
.panel-content.in-view > *:nth-child(3) { transition-delay: 0.3s; }
.panel-content.in-view > *:nth-child(4) { transition-delay: 0.4s; }
.panel-content.in-view > *:nth-child(5) { transition-delay: 0.5s; }
.panel-content.in-view > *:nth-child(6) { transition-delay: 0.6s; }

/* Scrapbook cards entrance */
.scrapbook-cards > .scrapbook-card {
    opacity: 0;
    transform: rotate(var(--rotation, 0deg)) translateY(calc(var(--offset-y, 0) + 40px));
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scrapbook-cards.in-view > .scrapbook-card {
    opacity: 1;
    transform: rotate(var(--rotation, 0deg)) translateY(var(--offset-y, 0));
}

.scrapbook-cards.in-view > .scrapbook-card:nth-child(1) { transition-delay: 0.1s; }
.scrapbook-cards.in-view > .scrapbook-card:nth-child(2) { transition-delay: 0.2s; }
.scrapbook-cards.in-view > .scrapbook-card:nth-child(3) { transition-delay: 0.3s; }
.scrapbook-cards.in-view > .scrapbook-card:nth-child(4) { transition-delay: 0.4s; }
.scrapbook-cards.in-view > .scrapbook-card:nth-child(5) { transition-delay: 0.5s; }

/* Postcard grid entrance */
.postcard-grid > .postcard {
    opacity: 0;
    transform: translateY(25px) scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.postcard-grid.in-view > .postcard {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.postcard-grid.in-view > .postcard:nth-child(1) { transition-delay: 0.05s; }
.postcard-grid.in-view > .postcard:nth-child(2) { transition-delay: 0.1s; }
.postcard-grid.in-view > .postcard:nth-child(3) { transition-delay: 0.15s; }
.postcard-grid.in-view > .postcard:nth-child(4) { transition-delay: 0.2s; }
.postcard-grid.in-view > .postcard:nth-child(5) { transition-delay: 0.25s; }
.postcard-grid.in-view > .postcard:nth-child(6) { transition-delay: 0.3s; }
.postcard-grid.in-view > .postcard:nth-child(7) { transition-delay: 0.35s; }
.postcard-grid.in-view > .postcard:nth-child(8) { transition-delay: 0.4s; }
.postcard-grid.in-view > .postcard:nth-child(9) { transition-delay: 0.45s; }
.postcard-grid.in-view > .postcard:nth-child(10) { transition-delay: 0.5s; }
.postcard-grid.in-view > .postcard:nth-child(11) { transition-delay: 0.55s; }
.postcard-grid.in-view > .postcard:nth-child(12) { transition-delay: 0.6s; }

/* Sunset blocks entrance */
.sunset-text-blocks > .sunset-block {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.sunset-content.in-view .sunset-text-blocks > .sunset-block {
    opacity: 1;
    transform: translateY(0);
}

.sunset-content.in-view .sunset-text-blocks > .sunset-block:nth-child(1) { transition-delay: 0.3s; }
.sunset-content.in-view .sunset-text-blocks > .sunset-block:nth-child(2) { transition-delay: 0.45s; }
.sunset-content.in-view .sunset-text-blocks > .sunset-block:nth-child(3) { transition-delay: 0.6s; }

/* === HOVER WARMTH EFFECT === */
.tilt-card {
    position: relative;
}

.tilt-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(212,23,91,0);
    mix-blend-mode: color;
    transition: background 0.4s ease;
    pointer-events: none;
    z-index: 4;
}

.tilt-card:hover::before {
    background: rgba(212,23,91,0.06);
}

/* === MOBILE ADAPTATION === */
@media (max-width: 768px) {
    html {
        overflow: auto;
        height: auto;
    }

    body {
        height: auto;
        overflow: auto;
    }

    #scroll-container {
        flex-direction: column;
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
        scroll-snap-type: y mandatory;
    }

    .panel {
        width: 100vw !important;
        min-height: 100vh;
        height: auto;
        scroll-snap-align: start;
    }

    .reef-content {
        max-width: 90%;
        padding-left: 5vw;
    }

    .reef-illustration {
        width: 100%;
        opacity: 0.4;
    }

    .scrapbook-cards {
        flex-direction: column;
        padding: 4vh 5vw;
        gap: 3vh;
    }

    .scrapbook-card {
        width: 90%;
    }

    .aquarium-content {
        flex-direction: column;
        padding: 4vh 5vw;
    }

    .specimen-card {
        max-width: 90%;
    }

    .postcard-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        padding: 3vh 4vw;
        gap: 3vw;
    }

    .sunset-text-blocks {
        flex-direction: column;
        align-items: center;
    }

    .sunset-block {
        max-width: 90%;
    }

    /* Reduce fish on mobile */
    .fish-5, .fish-6, .fish-7, .fish-8 {
        display: none;
    }

    .display-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .tilted {
        transform: perspective(600px) rotateZ(-1deg);
    }
}
