/* ═══════════════════════════════════════════════════
   MOANA BIRTHDAY — Full Design System
   ═══════════════════════════════════════════════════ */

:root {
    --abyss:     #040a16;
    --deep-sea:  #071220;
    --ocean:     #0e2035;
    --lagoon:    #0ea5e9;
    --teal:      #14b8a6;
    --seafoam:   #5eead4;
    --te-fiti:   #10b981;
    --emerald:   #34d399;
    --sunset:    #f97316;
    --hibiscus:  #ec4899;
    --gold:      #fbbf24;
    --sand:      #fef3c7;
    --white:     #f8fafc;
    --muted:     #94a3b8;
    --glass:     rgba(255,255,255,0.04);
    --border:    rgba(255,255,255,0.08);

    --display:  'Dancing Script', cursive;
    --heading:  'Playfair Display', serif;
    --body:     'Montserrat', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--body);
    background: var(--abyss);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.75;
}
img { display: block; max-width: 100%; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Confetti ── */
#confetti-canvas {
    position: fixed; top:0; left:0;
    width:100%; height:100%;
    pointer-events: none;
    z-index: 9999;
}

/* ═══════════════════════════════════════════════════
   GLOBAL MOANA SILHOUETTE (parallax, right side)
   ═══════════════════════════════════════════════════ */
.moana-silhouette-global {
    position: fixed;
    right: -30px;
    bottom: 80px;
    width: 160px;
    opacity: 0.07;
    color: var(--seafoam);
    pointer-events: none;
    z-index: 5;
    transition: transform 0.1s linear;
    filter: drop-shadow(0 0 20px rgba(94,234,212,0.3));
}

/* ═══════════════════════════════════════════════════
   FIXED OCEAN WAVES
   ═══════════════════════════════════════════════════ */
.ocean-fixed {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%; height: 70px;
    pointer-events: none;
    z-index: 100;
}
.wave {
    position: absolute; bottom:0; left:-10%;
    width:120%; height:100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath d='M0,40 C360,80 720,0 1080,40 C1260,60 1380,50 1440,40 L1440,100 L0,100Z' fill='%230ea5e9' fill-opacity='0.12'/%3E%3C/svg%3E") repeat-x;
    background-size: 1440px 100px;
}
.wave-1 { animation: waveRoll 9s linear infinite; }
.wave-2 { animation: waveRoll 14s linear infinite reverse; opacity:.6; bottom:-4px; }
.wave-3 { animation: waveRoll 18s linear infinite; opacity:.3; bottom:-8px; }
@keyframes waveRoll { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 80px 24px 140px;
    background:
        radial-gradient(ellipse at 15% 85%, rgba(14,165,233,0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 15%, rgba(236,72,153,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(16,185,129,0.06) 0%, transparent 65%),
        linear-gradient(180deg, #05111f 0%, #071a30 60%, #0a2040 100%);
}

/* Stars layer */
.stars {
    position: absolute; top:0; left:0;
    width:100%; height:100%;
    pointer-events:none; z-index:1;
}
.star {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    animation: starTwinkle var(--dur) ease-in-out infinite alternate;
}
@keyframes starTwinkle {
    0%  { opacity:.15; transform:scale(.7); }
    100%{ opacity:1;   transform:scale(1.3); }
}

/* Bioluminescent particles */
.bio-particles { position:absolute; inset:0; pointer-events:none; z-index:2; }
.bio-dot {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--seafoam) 0%, transparent 70%);
    animation: bioFloat var(--dur) ease-in-out infinite alternate;
}
@keyframes bioFloat {
    0%  { transform: translateY(0) scale(1); opacity:.6; }
    100%{ transform: translateY(-20px) scale(1.4); opacity:.15; }
}

/* Te Fiti spiraling background */
.te-fiti-bg {
    position: absolute;
    width: 500px; height: 500px;
    top:50%; left:50%;
    transform: translate(-50%,-50%);
    pointer-events:none; z-index:1;
    opacity: .04;
    animation: tefitiSpin 40s linear infinite;
    background:
        conic-gradient(from 0deg,
            transparent 0%, var(--te-fiti) 5%,
            transparent 10%, var(--seafoam) 15%,
            transparent 20%, var(--te-fiti) 25%,
            transparent 30%, var(--seafoam) 35%,
            transparent 40%, var(--te-fiti) 45%,
            transparent 55%, var(--seafoam) 60%,
            transparent 70%, var(--te-fiti) 75%,
            transparent 85%, var(--seafoam) 90%,
            transparent 100%);
    border-radius: 50%;
    mask: radial-gradient(ellipse at center, transparent 30%, black 60%, transparent 75%);
    -webkit-mask: radial-gradient(ellipse at center, transparent 30%, black 60%, transparent 75%);
}
@keyframes tefitiSpin { to{ transform:translate(-50%,-50%) rotate(360deg); } }

/* Tropical leaves */
.hero-bg-moana { position:absolute; inset:0; pointer-events:none; z-index:2; }
.bg-leaf { position:absolute; }
.bg-leaf-1 { left:-30px; top:-20px; width:180px; animation:leafSway 8s ease-in-out infinite alternate; transform-origin:bottom center; }
.bg-leaf-2 { right:-30px; top:-10px; width:140px; transform:scaleX(-1); animation:leafSway 10s ease-in-out infinite alternate; transform-origin:bottom center; }
.bg-leaf-3 { right:60px; top:30px; width:100px; transform:scaleX(-1) rotate(20deg); animation:leafSway 6s ease-in-out infinite alternate-reverse; transform-origin:bottom center; }
@keyframes leafSway {
    0%  { transform:rotate(0deg); }
    100%{ transform:rotate(5deg); }
}
.bg-leaf-2 { animation-name: leafSwayR; }
.bg-leaf-3 { animation-name: leafSwayR; }
@keyframes leafSwayR {
    0%  { transform:scaleX(-1) rotate(0deg); }
    100%{ transform:scaleX(-1) rotate(5deg); }
}

/* Hero text */
.hero-content { position:relative; z-index:10; }

.birthday-badge {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 12px;
    animation: hibiscusPulse 2.5s ease-in-out infinite;
}
@keyframes hibiscusPulse {
    0%,100%{ transform:scale(1) rotate(0deg); }
    50%    { transform:scale(1.2) rotate(8deg); }
}

.hero-title {
    font-family: var(--heading);
    font-size: clamp(2.2rem, 7vw, 4.2rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.highlight {
    font-family: var(--display);
    font-size: clamp(2.8rem, 9vw, 5.2rem);
    display: block;
    background: linear-gradient(135deg, var(--seafoam) 0%, var(--lagoon) 40%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 25px rgba(94,234,212,0.25));
    animation: shimmer 4s ease-in-out infinite alternate;
}
@keyframes shimmer {
    0%  { filter:drop-shadow(0 0 15px rgba(94,234,212,0.2)); }
    100%{ filter:drop-shadow(0 0 35px rgba(94,234,212,0.5)); }
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--muted);
    font-style: italic;
    max-width: 480px;
    margin: 0 auto;
}

.wave-sep { margin-top:36px; }
.wave-sep svg { width:220px; }

.scroll-cue {
    position:absolute;
    bottom: 100px;
    left:50%;
    transform:translateX(-50%);
    z-index:10;
}
.scroll-dot {
    width:10px; height:10px;
    border-radius:50%;
    background: var(--seafoam);
    opacity:.5;
    animation: scrollPop 2s ease-in-out infinite;
}
@keyframes scrollPop {
    0%,100%{ transform:translateY(0); opacity:.3; }
    50%    { transform:translateY(12px); opacity:.8; }
}

/* ═══════════════════════════════════════════════════
   TAURUS CONSTELLATION SECTION
   ═══════════════════════════════════════════════════ */
.taurus-section {
    padding: 120px 0;
    background: linear-gradient(180deg, #0a1e35 0%, var(--deep-sea) 100%);
    position: relative;
    overflow: hidden;
}

.section-moana-wave {
    position:absolute; bottom:0; left:0;
    width:100%; pointer-events:none;
}

.taurus-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.zodiac-badge {
    font-size: 3.5rem;
    margin-bottom: 16px;
    display: block;
    animation: zodiacGlow 3s ease-in-out infinite alternate;
}
@keyframes zodiacGlow {
    0%  { text-shadow:0 0 10px rgba(251,191,36,0.3); }
    100%{ text-shadow:0 0 30px rgba(251,191,36,0.8), 0 0 60px rgba(251,191,36,0.3); }
}

.taurus-text h2 {
    font-family: var(--heading);
    font-size: 2.8rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--gold), var(--sand));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.taurus-date {
    color: var(--seafoam);
    font-size: .9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.taurus-desc {
    color: rgba(255,255,255,.75);
    font-size: 1.05rem;
    margin-bottom: 28px;
    line-height: 1.9;
}

.taurus-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.trait {
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: .9rem;
    backdrop-filter: blur(10px);
}

/* Constellation canvas */
.constellation-wrap {
    position: relative;
    text-align: center;
    width: 100%;
}
.constellation-title {
    font-family: var(--display);
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

/* CRITICAL: canvas must not be sized via CSS width/height — JS handles resize */
#taurus-canvas {
    border-radius: 50%;
    background: radial-gradient(ellipse at center,
        rgba(14,165,233,0.1) 0%,
        rgba(14,165,233,0.04) 50%,
        rgba(4,10,22,0.8) 100%);
    border: 1px solid rgba(251,191,36,0.2);
    display: block;
    margin: 0 auto;
    /* width/height set by JS to match container */
}

.constellation-glow {
    position: absolute;
    top:50%; left:50%;
    transform:translate(-50%,-50%);
    width:300px; height:300px;
    border-radius:50%;
    background: radial-gradient(ellipse, rgba(251,191,36,0.04) 0%, transparent 70%);
    pointer-events:none;
    animation: constGlow 4s ease-in-out infinite alternate;
}
@keyframes constGlow {
    0%  { transform:translate(-50%,-50%) scale(.9); opacity:.5; }
    100%{ transform:translate(-50%,-50%) scale(1.1); opacity:1; }
}

/* ═══════════════════════════════════════════════════
   LETTER SECTION
   ═══════════════════════════════════════════════════ */
.letter-section {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--deep-sea) 0%, var(--ocean) 100%);
    position: relative;
    overflow: hidden;
}

.moana-ocean-silhouette {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    pointer-events: none;
    opacity: .9;
}

.letter-card {
    max-width: 680px;
    margin: 0 auto;
    background: var(--glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    padding: 60px 52px;
    position: relative;
    overflow: hidden;
}
.letter-card::before {
    content:'';
    position:absolute; top:-1px; left:15%; right:15%; height:2px;
    background:linear-gradient(90deg, transparent, var(--seafoam), transparent);
}
.letter-card::after {
    content:'';
    position:absolute; inset:0;
    background:radial-gradient(ellipse at 80% 20%, rgba(14,165,233,0.04) 0%, transparent 60%);
    pointer-events:none;
}

.hibiscus-corner {
    position:absolute;
    font-size:2rem;
    opacity:.35;
}
.top-left  { top:16px; left:18px; }
.top-right { top:16px; right:18px; }
.bottom-left{ bottom:16px; left:18px; }

.letter-greeting {
    font-family: var(--display);
    font-size: 2rem;
    color: var(--seafoam);
    margin-bottom: 22px;
}
.letter-card p {
    color: rgba(255,255,255,.8);
    font-size: 1.05rem;
    font-weight: 300;
    margin-bottom: 18px;
    line-height: 2;
}
.letter-sign {
    font-family: var(--display);
    font-size: 1.5rem !important;
    color: var(--gold) !important;
    text-align: right;
    margin-top: 28px !important;
}

/* ═══════════════════════════════════════════════════
   VOYAGE — PHOTOS
   ═══════════════════════════════════════════════════ */
.voyage-section {
    padding: 120px 0 160px;
    background: var(--deep-sea);
    position: relative;
    overflow: hidden;
}

.moana-row-bg {
    position: absolute;
    top: 40px; left: 50%;
    transform: translateX(-50%);
    width: 700px;
    pointer-events:none;
}

.section-heading {
    font-family: var(--heading);
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 80px;
}
.heading-icon { display:block; font-size:2rem; margin-bottom:10px; }

/* Chapter */
.voyage-chapter { margin-bottom: 90px; }

.chapter-label {
    font-family: var(--display);
    font-size: 1.9rem;
    color: var(--seafoam);
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.chapter-wave { width:50px; color:var(--seafoam); }

/* Photo rows */
.photo-row {
    display:flex;
    gap:24px;
    justify-content:center;
    flex-wrap:wrap;
}
.portrait-row {}

.photo-card { width:280px; text-align:center; }
.photo-card.portrait { width:240px; }

.card-img {
    width:100%; height:340px;
    overflow:hidden;
    border-radius:16px;
    border:2px solid var(--border);
    box-shadow:0 20px 50px rgba(0,0,0,.45);
    transition:all .5s cubic-bezier(.19,1,.22,1);
}
.photo-card.portrait .card-img {
    height:380px;
    border-radius:140px 140px 20px 20px;
}
.card-img:hover {
    transform:translateY(-12px) scale(1.02);
    border-color:rgba(94,234,212,.35);
    box-shadow:0 30px 70px rgba(0,0,0,.55), 0 0 40px rgba(94,234,212,.12);
}
.card-img img {
    width:100%; height:100%; object-fit:cover;
    transition:transform .6s ease;
}
.card-img:hover img { transform:scale(1.07); }
.photo-card > p {
    margin-top:14px;
    font-family:var(--display);
    font-size:1.1rem;
    color:var(--muted);
}

/* Mosaic */
.photo-mosaic {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
}
.mosaic-item {
    border-radius:12px;
    overflow:hidden;
    aspect-ratio:1;
    border:2px solid var(--border);
    box-shadow:0 8px 30px rgba(0,0,0,.35);
    transition:all .4s cubic-bezier(.19,1,.22,1);
}
.mosaic-item:hover {
    transform:scale(1.05);
    border-color:rgba(94,234,212,.2);
    z-index:5;
}
.mosaic-big {
    grid-column:span 2;
    grid-row:span 2;
    aspect-ratio:auto;
}
.mosaic-item img { width:100%; height:100%; object-fit:cover; }

/* Divider silhouette */
.moana-divider-silhouette {
    width:100%; margin-top:-20px;
}

/* ═══════════════════════════════════════════════════
   WISH SECTION
   ═══════════════════════════════════════════════════ */
.wish-section {
    padding: 120px 0 200px;
    background: linear-gradient(180deg, var(--deep-sea) 0%, var(--abyss) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.moana-stars-nav {
    position:absolute; top:0; left:50%;
    transform:translateX(-50%);
    width:800px;
    pointer-events:none;
}

.wish-card {
    max-width:540px;
    margin:0 auto;
    background: var(--glass);
    border:1px solid var(--border);
    backdrop-filter:blur(24px);
    -webkit-backdrop-filter:blur(24px);
    border-radius:24px;
    padding:60px 40px;
    position:relative;
}
.wish-card::before {
    content:'';
    position:absolute; top:-1px; left:20%; right:20%; height:2px;
    background:linear-gradient(90deg, transparent, var(--gold), transparent);
}

.candle-row {
    display:flex;
    justify-content:center;
    align-items:flex-end;
    gap:16px;
    margin-bottom:32px;
}
.candle {
    width:10px; height:50px;
    background:linear-gradient(to bottom, var(--gold) 0%, var(--sunset) 100%);
    border-radius:3px 3px 2px 2px;
    position:relative;
}
.candle.c-tall { height:70px; }

.flame {
    position:absolute;
    top:-16px; left:50%;
    transform:translateX(-50%);
    width:12px; height:18px;
    background:radial-gradient(ellipse at bottom, #fff 0%, var(--gold) 40%, var(--sunset) 80%, transparent 100%);
    border-radius:50% 50% 50% 50% / 60% 60% 40% 40%;
    animation:flameDance .25s ease-in-out infinite alternate;
    box-shadow:0 0 12px var(--gold), 0 0 25px rgba(249,115,22,.4);
    transition: opacity .4s ease;
}
.flame.blown { opacity:0 !important; animation:none !important; }

@keyframes flameDance {
    0%  { transform:translateX(-50%) scaleY(1) rotate(-3deg); }
    100%{ transform:translateX(-50%) scaleY(1.12) rotate(3deg); }
}

.wish-card h2 {
    font-family:var(--heading);
    font-size:2.2rem;
    margin-bottom:14px;
}
.wish-card > p {
    color:var(--muted);
    margin-bottom:28px;
    font-size:1rem;
}

.blow-btn {
    background:linear-gradient(135deg, var(--lagoon), var(--teal));
    color:#fff;
    border:none;
    padding:16px 44px;
    font-size:1.05rem;
    font-family:var(--body);
    font-weight:600;
    border-radius:50px;
    cursor:pointer;
    transition:all .4s ease;
    box-shadow:0 4px 20px rgba(14,165,233,.3);
}
.blow-btn:hover {
    transform:translateY(-3px);
    box-shadow:0 8px 30px rgba(14,165,233,.5);
}

.wish-revealed {
    display:none;
    margin-top:32px;
    animation:popIn .6s cubic-bezier(.34,1.56,.64,1);
}
.wish-revealed.show { display:block; }

.wish-stars { font-size:2rem; margin-bottom:12px; }
.wish-main {
    font-family:var(--display);
    font-size:2rem;
    color:var(--gold);
    margin-bottom:12px;
}
.wish-small {
    color:var(--muted);
    font-size:1rem;
    line-height:1.8;
}

@keyframes popIn {
    0%  { transform:scale(.4); opacity:0; }
    100%{ transform:scale(1);  opacity:1; }
}

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.birthday-footer {
    padding: 0 0 100px;
    text-align:center;
    background:var(--abyss);
    position:relative;
}
.footer-moana-scene {
    width:100%;
    margin-bottom:20px;
}
.footer-content {}
.footer-msg {
    font-family:var(--display);
    font-size:1.4rem;
    color:var(--seafoam);
    margin-bottom:6px;
}
.footer-year { color:var(--muted); font-size:.9rem; }

/* ═══════════════════════════════════════════════════
   REVEALS
   ═══════════════════════════════════════════════════ */
.reveal {
    opacity:0;
    transform:translateY(28px);
    transition:all .85s cubic-bezier(.19,1,.22,1);
}
.reveal.active { opacity:1; transform:translateY(0); }
.delay-1 { transition-delay:.15s; }
.delay-2 { transition-delay:.3s; }
.delay-3 { transition-delay:.45s; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE — Mobile First
   ═══════════════════════════════════════════════════ */

/* Tablets */
@media (max-width:900px) {
    .taurus-layout {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }
    .taurus-traits { justify-content: center; }
    .taurus-text h2 { font-size: 2.2rem; }
}

/* Phones (≤768px) */
@media (max-width:768px) {
    /* Global */
    .container { padding: 0 16px; }

    /* Hero */
    .hero { padding: 60px 16px 130px; }
    .hero-title { font-size: clamp(1.8rem, 7vw, 2.6rem); }
    .highlight  { font-size: clamp(2.4rem, 9vw, 3.2rem); }
    .hero-sub   { font-size: 0.95rem; }
    .bg-leaf-1  { width: 120px; }
    .bg-leaf-2  { width: 100px; }
    .bg-leaf-3  { display: none; }
    .moana-silhouette-global { width: 90px; right: -10px; opacity: 0.05; }

    /* Taurus */
    .taurus-section { padding: 80px 0; }
    .taurus-layout  { gap: 32px; }
    .taurus-desc    { font-size: 0.95rem; }

    /* Letter */
    .letter-section { padding: 80px 0; }
    .letter-card    { padding: 36px 20px; border-radius: 16px; }
    .letter-greeting{ font-size: 1.7rem; }
    .letter-card p  { font-size: 0.95rem; }

    /* Voyage */
    .voyage-section  { padding: 80px 0 120px; }
    .section-heading { font-size: 2rem; margin-bottom: 50px; }
    .voyage-chapter  { margin-bottom: 60px; }
    .photo-row       { flex-direction: column; align-items: center; gap: 20px; }
    .photo-card, .photo-card.portrait { width: min(85vw, 340px); }
    .card-img        { height: 260px; }
    .photo-card.portrait .card-img { height: 300px; border-radius: 100px 100px 16px 16px; }
    .photo-mosaic    { grid-template-columns: 1fr 1fr; gap: 10px; }
    .mosaic-big      { grid-column: span 2; aspect-ratio: 16/9; }
    .moana-row-bg    { display: none; }

    /* Wish */
    .wish-section { padding: 80px 0 160px; }
    .wish-card    { padding: 40px 20px; margin: 0 8px; }
    .wish-card h2 { font-size: 1.8rem; }
    .blow-btn     { padding: 14px 32px; font-size: 0.95rem; }
    .candle-row   { gap: 10px; }
    .moana-stars-nav { width: 100%; }

    /* Footer */
    .birthday-footer { padding: 0 0 80px; }
}

/* Small phones (≤430px) */
@media (max-width:430px) {
    .hero-title   { font-size: 1.6rem; }
    .highlight    { font-size: 2.1rem; }
    .photo-mosaic { grid-template-columns: 1fr; }
    .mosaic-big   { grid-column: span 1; aspect-ratio: 4/3; }
    .taurus-traits { gap: 8px; }
    .trait        { padding: 6px 14px; font-size: 0.82rem; }
    .wish-main    { font-size: 1.5rem; }
}
