/* bada.moe - Kawaii Ocean Fantasy */
/* Colors: #D4F1F9 #A8D8EA #FFD1DC #C5E8B7 #E8D5F5 #FFF3C4 #7EC8E3 #FFFFFF */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.8;
    background: linear-gradient(180deg, #D4F1F9 0%, #B8E6F0 30%, #A8D8EA 60%, #7EC8E3 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #4A4A6A;
}

/* ===== Floating Bubbles ===== */
#bubbles-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    box-shadow: inset 0 -4px 8px rgba(255,255,255,0.5), 0 0 12px rgba(168,216,234,0.2);
    animation: floatUp var(--float-dur, 12s) linear infinite;
    animation-delay: var(--float-del, 0s);
    bottom: -100px;
}

@keyframes floatUp {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 0.6; }
    25% { transform: translateY(-25vh) translateX(15px) scale(1.02); }
    50% { transform: translateY(-50vh) translateX(-10px) scale(0.98); opacity: 0.8; }
    75% { transform: translateY(-75vh) translateX(20px) scale(1.01); }
    100% { transform: translateY(-110vh) translateX(5px) scale(0.95); opacity: 0; }
}

/* ===== Star Sparkles ===== */
#sparkles-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    background: #FFFFFF;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: sparkleAnim var(--sparkle-dur, 2s) ease-in-out infinite;
    animation-delay: var(--sparkle-del, 0s);
}

.sparkle.yellow {
    background: #FFF3C4;
}

@keyframes sparkleAnim {
    0%, 100% { opacity: 0; transform: scale(0.8) rotate(0deg); }
    50% { opacity: 0.8; transform: scale(1.2) rotate(180deg); }
}

/* ===== Hero (Surface Splash) ===== */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    background: linear-gradient(180deg, #D4F1F9 0%, #B8E6F0 40%, #A8D8EA 100%);
    overflow: hidden;
}

.domain-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.05em;
    color: #FF9EB5;
    text-shadow: 0 2px 10px rgba(255,158,181,0.3), 0 0 40px rgba(232,213,245,0.3);
}

.domain-title .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s cubic-bezier(0.34,1.56,0.64,1), transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

.domain-title .letter.visible {
    opacity: 1;
    transform: translateY(0);
}

.domain-title .dot {
    margin: 0 2px;
}

.subtitle {
    font-family: 'Patrick Hand', cursive;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: #7EC8E3;
    margin-top: 1rem;
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 1s ease 0.5s;
    transform: rotate(-2deg);
}

.subtitle.visible {
    opacity: 1;
}

.wave-line {
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FFD1DC, #E8D5F5, #B8E6F0, transparent);
    border-radius: 2px;
    margin-top: 2rem;
    opacity: 0;
    transition: opacity 1s ease 0.8s;
}

.wave-line.visible {
    opacity: 1;
}

.scallop-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 40px;
}

/* ===== Ocean Sections ===== */
.ocean-section {
    position: relative;
    z-index: 3;
    padding: 4rem 2rem;
}

.section-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #E8D5F5;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 2px 8px rgba(232,213,245,0.5);
}

/* ===== Masonry Grid ===== */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== Creature Cards ===== */
.creature-card {
    border-radius: 24px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(168,216,234,0.3);
    border: 2px solid rgba(255,255,255,0.6);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.creature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.creature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(168,216,234,0.45);
}

.creature-card:hover .card-shimmer {
    animation: shimmerSweep 0.6s ease forwards;
}

.card-shimmer {
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, transparent 20%, rgba(255,255,255,0.4) 50%, transparent 80%);
    pointer-events: none;
    z-index: 10;
}

@keyframes shimmerSweep {
    from { left: -100%; }
    to { left: 100%; }
}

.card-pink { background: rgba(255,209,220,0.45); }
.card-blue { background: rgba(168,216,234,0.45); }
.card-lavender { background: rgba(232,213,245,0.45); }
.card-green { background: rgba(197,232,183,0.45); }
.card-yellow { background: rgba(255,243,196,0.45); }
.card-coral { background: rgba(255,209,220,0.4); }

.tall-card { min-height: 320px; }

.creature-icon { margin-bottom: 1rem; }

.card-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.4rem);
    color: #6A5A7A;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.card-desc {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    color: #7A7A9A;
    line-height: 1.6;
}

.kawaii-label {
    font-family: 'Patrick Hand', cursive;
    font-size: 0.85rem;
    color: #FF9EB5;
    opacity: 0.6;
    display: block;
    margin-top: 0.75rem;
    transform: rotate(-2deg);
}

/* ===== Tide Pool (Horizontal Scroll) ===== */
#tide-pool {
    padding: 4rem 0;
}

#tide-pool .section-title {
    padding: 0 2rem;
}

.tide-pool-track {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tide-pool-track::-webkit-scrollbar { display: none; }

.tide-card {
    min-width: 280px;
    max-width: 300px;
    height: 360px;
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    scroll-snap-align: center;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 0 8px 24px rgba(168,216,234,0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tide-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(168,216,234,0.45);
}

.tide-card:hover .card-shimmer {
    animation: shimmerSweep 0.6s ease forwards;
}

.tide-pink { background: rgba(255,209,220,0.5); }
.tide-lavender { background: rgba(232,213,245,0.5); }
.tide-mint { background: rgba(197,232,183,0.5); }
.tide-yellow { background: rgba(255,243,196,0.5); }

.tide-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #6A5A7A;
    letter-spacing: 0.02em;
}

.tide-desc {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    color: #7A7A9A;
    line-height: 1.6;
}

.tide-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
}

.tide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(232,213,245,0.4);
    transition: background 0.3s ease;
}

.tide-dot.active {
    background: #E8D5F5;
}

/* ===== Deep Sparkle (Footer) ===== */
#deep-sparkle {
    position: relative;
    z-index: 3;
    padding: 6rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, transparent, rgba(126,200,227,0.3));
}

.footer-domain {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #FFD1DC;
    text-shadow: 0 2px 10px rgba(255,209,220,0.3);
}

.footer-tagline {
    font-family: 'Patrick Hand', cursive;
    font-size: 1rem;
    color: #A8D8EA;
    margin-top: 0.5rem;
    letter-spacing: 0.08em;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .masonry-grid {
        grid-template-columns: 1fr;
    }

    .tall-card {
        min-height: auto;
    }

    .tide-card {
        min-width: 240px;
        height: 300px;
    }
}
