/* gabs.reviews — candy-coated wonderland of opinion
   Design: organic-flow, bounce-enter, candy-bright, illustration */

:root {
    /* Candy palette (from DESIGN.md) */
    --bg-primary: #FBF0FF;       /* Lavender Cream */
    --bg-secondary: #FFFDE6;     /* Lemon Fizz */
    --pink: #FF6B9D;             /* Bubblegum Pink */
    --tangerine: #FF9A3C;        /* Tangerine Pop */
    --violet: #A855F7;           /* Electric Violet */
    --spearmint: #34D399;        /* Spearmint */
    --sky: #38BDF8;              /* Sky Taffy */
    --plum: #3B2340;             /* Deep Plum */
    --soft-violet: #9B6BA6;      /* Soft Violet */
    --coral: #FB7185;            /* Coral Squeeze */
    --lilac: #E5D4EB;            /* Pale Lilac */
    --edge: #F0E0FF;             /* Hero edge gradient */

    /* Springy easing */
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
    background: var(--bg-primary);
    color: var(--plum);
    font-family: "Nunito", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

body {
    position: relative;
    min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
    font-family: "Baloo 2", "Nunito", system-ui, sans-serif;
    line-height: 1.05;
    letter-spacing: 0.02em;
}

p { font-family: "Nunito", system-ui, sans-serif; }

/* Caveat handwritten */
.caveat, .caveat-inline {
    font-family: "Caveat", cursive;
    font-weight: 700;
    color: var(--pink);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    transform: rotate(-2deg);
    display: inline-block;
}

/* ============== SECTIONS BASE ============== */
.section {
    position: relative;
    width: 100%;
    padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 5vw, 5rem);
    overflow: hidden;
}

.section + .section { border-top: none; }

.section-bg-motif {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.10;
    z-index: 0;
}
.section-bg-motif svg { width: 100%; height: 100%; }
.motif-circles { opacity: 0.08; }
.motif-stars { opacity: 0.10; }
.motif-waves { opacity: 0.12; }
.motif-mixed { opacity: 0.10; }

.section-head {
    position: relative;
    z-index: 2;
    max-width: 920px;
    margin: 0 auto clamp(2rem, 5vw, 4rem);
    text-align: center;
}

.kicker, .eyebrow, .meta {
    font-family: "Nunito", system-ui, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    color: var(--soft-violet);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin: 0.6rem 0 0.8rem;
    color: var(--plum);
}
.section-title[data-color="violet"] { color: var(--violet); }
.section-title[data-color="tangerine"] { color: var(--tangerine); }
.section-title[data-color="pink"] { color: var(--pink); }
.section-title[data-color="spearmint"] { color: var(--spearmint); }

.section-lede {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: var(--plum);
    max-width: 640px;
    margin: 0 auto;
}
.section-lede .caveat-inline { color: var(--pink); }

/* ============== AMBIENT FLOATING SHAPES ============== */
.ambient-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.ambient {
    position: absolute;
    width: clamp(50px, 7vw, 110px);
    height: auto;
    opacity: 0.85;
    will-change: transform;
}
.ambient-1 { top: 12%; left: 6%; animation: float 9s ease-in-out infinite; }
.ambient-2 { top: 22%; right: 8%; animation: float 12s ease-in-out infinite; animation-delay: -2s; }
.ambient-3 { top: 48%; left: 4%; animation: float 14s ease-in-out infinite; animation-delay: -4s; }
.ambient-4 { top: 66%; right: 6%; animation: float 11s ease-in-out infinite; animation-delay: -6s; }
.ambient-5 { top: 78%; left: 10%; animation: float 16s ease-in-out infinite; animation-delay: -1s; }
.ambient-6 { top: 35%; right: 14%; animation: float 13s ease-in-out infinite; animation-delay: -3s; }
.ambient-7 { top: 86%; right: 18%; animation: float 18s ease-in-out infinite; animation-delay: -5s; }
.ambient-8 { top: 6%;  right: 30%; animation: float 20s ease-in-out infinite; animation-delay: -7s; }
.ambient-9 { top: 56%; left: 30%; animation: float 15s ease-in-out infinite; animation-delay: -8s; }
.ambient-10{ top: 92%; left: 44%; animation: float 10s ease-in-out infinite; animation-delay: -2.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%      { transform: translateY(-12px) rotate(2deg); }
}

/* ============== ENTRY ANIMATIONS ============== */
[data-anim="bounce"] {
    opacity: 0;
    transform: scale(0.3);
}
[data-anim="bounce"].in {
    animation: bounceIn 800ms var(--spring) forwards;
    animation-delay: calc(var(--i, 0) * 80ms);
}

@keyframes bounceIn {
    0%   { transform: scale(0.3); opacity: 0; }
    50%  { transform: scale(1.15); opacity: 1; }
    70%  { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

[data-anim="unfurl"] {
    clip-path: inset(0 0 100% 0);
    opacity: 0;
}
[data-anim="unfurl"].in {
    animation: unfurl 1100ms var(--spring) forwards;
    animation-delay: calc(var(--i, 0) * 200ms);
}
@keyframes unfurl {
    0%   { clip-path: inset(0 0 100% 0); opacity: 0; transform: translateY(20px); }
    60%  { clip-path: inset(0 0 0 0);    opacity: 1; transform: translateY(-8px); }
    100% { clip-path: inset(0 0 0 0);    opacity: 1; transform: translateY(0); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-8deg); }
    75%      { transform: rotate(8deg); }
}

/* ============== SECTION 0 — SPLASH ============== */
.section-splash {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, var(--bg-primary) 0%, var(--edge) 100%);
    text-align: center;
    padding-top: clamp(3rem, 8vw, 6rem);
    padding-bottom: clamp(3rem, 8vw, 6rem);
}
.splash-inner {
    position: relative;
    z-index: 3;
    max-width: 1100px;
}
.eyebrow {
    color: var(--soft-violet);
    margin-bottom: 1rem;
}
.logotype {
    font-family: "Baloo 2", system-ui, sans-serif;
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.0;
    margin: 0.4rem 0 1.2rem;
    display: inline-block;
}
.logotype .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(-40px) scale(0.3);
    will-change: transform, opacity;
}
.logotype.in .letter {
    animation: letterDrop 800ms var(--spring) forwards;
    animation-delay: calc(var(--i, 0) * 60ms);
}
.logotype .letter.dot { transform: translateY(-30px) scale(0.3); }

@keyframes letterDrop {
    0%   { opacity: 0; transform: translateY(-40px) scale(0.3); }
    50%  { opacity: 1; transform: translateY(8px) scale(1.15); }
    70%  { transform: translateY(-3px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.tagline {
    font-family: "Baloo 2", system-ui, sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--plum);
    margin-bottom: 0.6rem;
}
.tagline em {
    font-style: normal;
    color: var(--pink);
}
.splash-mascot {
    margin: 1.5rem auto 0;
    width: clamp(120px, 18vw, 200px);
}
.splash-mascot .mascot { animation: float 5s ease-in-out infinite; }

/* ============== SECTION 1 — GABFEST CARD MOSAIC ============== */
.section-gabfest {
    background: var(--bg-secondary);
}

.card-mosaic {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(40px, auto);
    gap: 1.5rem 1.25rem;
}

.gab-card {
    background: var(--bg-primary);
    border: 4px solid var(--border, var(--pink));
    border-radius: 2rem;
    padding: 1.6rem 1.8rem;
    color: var(--plum);
    transform: rotate(var(--tilt, 0deg));
    position: relative;
    z-index: 2;
    transition: transform 320ms var(--spring);
}
[data-anim="bounce"].gab-card { transform: scale(0.3) rotate(var(--tilt, 0deg)); }
[data-anim="bounce"].gab-card.in {
    animation: bounceInTilt 800ms var(--spring) forwards;
    animation-delay: calc(var(--i, 0) * 80ms);
}
@keyframes bounceInTilt {
    0%   { transform: scale(0.3) rotate(var(--tilt, 0deg)); opacity: 0; }
    50%  { transform: scale(1.15) rotate(var(--tilt, 0deg)); opacity: 1; }
    70%  { transform: scale(0.9) rotate(var(--tilt, 0deg)); }
    100% { transform: scale(1) rotate(var(--tilt, 0deg)); opacity: 1; }
}

.gab-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.gab-card .meta { margin-bottom: 0.4rem; }
.gab-card h3 {
    font-family: "Baloo 2", system-ui, sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--plum);
    margin-bottom: 0.6rem;
}
.gab-card p { color: var(--plum); margin-bottom: 0.6rem; }
.gab-card .byline {
    font-family: "Caveat", cursive;
    font-weight: 700;
    color: var(--pink);
    font-size: 1.2rem;
    transform: rotate(-2deg);
    display: inline-block;
}

.rating-row {
    display: flex;
    gap: 4px;
    margin: 0.4rem 0 0.6rem;
    font-family: "Baloo 2", system-ui, sans-serif;
    font-size: 1.4rem;
}
.star-mini { color: var(--lilac); }
.star-mini.filled { color: var(--tangerine); }

/* Organic-flow grid placement */
.gab-card:nth-child(1) { grid-column: 1 / span 5; grid-row: 1 / span 4; }
.gab-card:nth-child(2) { grid-column: 7 / span 6; grid-row: 1 / span 3; }
.gab-card:nth-child(3) { grid-column: 4 / span 5; grid-row: 4 / span 3; margin-top: -1.2rem; }
.gab-card:nth-child(4) { grid-column: 9 / span 4; grid-row: 4 / span 4; }
.gab-card:nth-child(5) { grid-column: 1 / span 4; grid-row: 6 / span 3; margin-top: 1rem; }
.gab-card:nth-child(6) { grid-column: 6 / span 4; grid-row: 7 / span 3; margin-top: -1rem; }

@media (max-width: 880px) {
    .card-mosaic { grid-template-columns: 1fr; }
    .gab-card { grid-column: 1 / -1 !important; grid-row: auto !important; margin-top: 0 !important; }
}

/* ============== SECTION 2 — RATING GARDEN ============== */
.section-garden {
    background: var(--bg-primary);
}

.garden-scroll {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 0 2rem;
    scrollbar-color: var(--violet) var(--lilac);
}

.garden-path {
    display: block;
    width: 100%;
    min-width: 1200px;
    height: clamp(200px, 26vw, 320px);
    margin-bottom: -120px;
    position: relative;
    z-index: 1;
}

.garden-row {
    position: relative;
    z-index: 2;
    display: flex;
    gap: clamp(1rem, 4vw, 3rem);
    min-width: 1200px;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 2rem 1rem;
}

.bloom {
    text-align: center;
    flex: 0 0 auto;
    width: clamp(120px, 14vw, 180px);
    transform-origin: bottom center;
}
.bloom .flower {
    width: 100%;
    height: auto;
    transition: transform 400ms var(--spring);
}
.bloom:hover .flower {
    animation: wiggle 600ms ease-in-out 1;
}
.bloom-label {
    font-family: "Baloo 2", system-ui, sans-serif;
    font-weight: 700;
    color: var(--plum);
    margin-top: 0.6rem;
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
}
.bloom[data-rating="5"] .bloom-label { color: var(--spearmint); }
.bloom[data-rating="4"] .bloom-label { color: var(--violet); }
.bloom[data-rating="3"] .bloom-label { color: var(--tangerine); }
.bloom[data-rating="2"] .bloom-label { color: var(--soft-violet); }
.bloom[data-rating="1"] .bloom-label { color: var(--coral); }

@media (max-width: 720px) {
    .garden-scroll { overflow-x: hidden; overflow-y: auto; }
    .garden-path { display: none; }
    .garden-row {
        flex-direction: column;
        min-width: 0;
        align-items: center;
        gap: 1.5rem;
    }
    .bloom { width: 200px; }
}

/* ============== SECTION 3 — SOAPBOX ============== */
.section-soapbox {
    background: var(--bg-secondary);
}

.scroll-card {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto 3rem;
    background: var(--bg-primary);
    border: 4px solid var(--violet);
    border-radius: 2rem;
    padding: 2.4rem 2rem 2.4rem;
}
.scroll-card:nth-of-type(2) { border-color: var(--pink); }

.scroll-card .scroll-cap {
    position: absolute;
    top: -18px;
    width: 70%;
    height: 36px;
    background: var(--violet);
    border-radius: 999px;
    border: 4px solid var(--plum);
}
.scroll-card .scroll-cap.left {
    left: 15%;
    top: -22px;
}
.scroll-card .scroll-cap.right {
    left: 15%;
    bottom: -22px;
    top: auto;
}
.scroll-card:nth-of-type(2) .scroll-cap { background: var(--pink); }

.scroll-body { position: relative; z-index: 2; }
.scroll-body .meta { margin-bottom: 0.6rem; color: var(--soft-violet); }
.scroll-body h3 {
    font-family: "Baloo 2", system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--plum);
    margin-bottom: 1rem;
}
.scroll-body p { margin-bottom: 1rem; color: var(--plum); }
.soapbox-aside {
    display: inline-block;
    color: var(--pink);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}

/* ============== SECTION 4 — FINALE ============== */
.section-finale {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--edge) 100%);
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.finale-stage {
    position: relative;
    width: 100%;
    max-width: 720px;
    z-index: 2;
    text-align: center;
    padding: clamp(2rem, 6vw, 5rem) 1rem;
}
.finale-logo {
    position: relative;
    z-index: 3;
    display: inline-block;
}
.finale-title {
    font-family: "Baloo 2", system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.4rem);
    color: var(--violet);
    margin: 1rem 0 0.4rem;
}
.finale-sub {
    color: var(--plum);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    margin-bottom: 0.6rem;
}
.finale-caveat { color: var(--pink); }

.mascot-finale {
    width: clamp(140px, 20vw, 220px);
    height: auto;
    animation: float 5s ease-in-out infinite;
}

/* Vortex bits — pure CSS animation */
.vortex {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.vortex .bit {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    transform: translate(-50%, -50%);
    opacity: 0;
}
.section-finale.in .vortex .bit {
    animation: vortexIn 2200ms var(--spring) forwards;
}

.vortex .b1  { background: var(--pink);      --x: -240px; --y: -160px; --r:  40deg; animation-delay:  0ms; }
.vortex .b2  { background: var(--tangerine); --x:  240px; --y: -160px; --r: -50deg; animation-delay: 100ms; }
.vortex .b3  { background: var(--violet);    --x: -260px; --y:  180px; --r:  60deg; animation-delay: 200ms; }
.vortex .b4  { background: var(--spearmint); --x:  260px; --y:  180px; --r: -70deg; animation-delay: 300ms; }
.vortex .b5  { background: var(--sky);       --x: -300px; --y:    0px; --r:  90deg; animation-delay: 400ms; }
.vortex .b6  { background: var(--coral);     --x:  300px; --y:    0px; --r: -90deg; animation-delay: 500ms; }
.vortex .b7  { background: var(--pink);      --x:    0px; --y: -220px; --r:  30deg; animation-delay: 600ms; }
.vortex .b8  { background: var(--tangerine); --x:    0px; --y:  220px; --r: -30deg; animation-delay: 700ms; }
.vortex .b9  { background: var(--violet);    --x: -180px; --y:  -90px; --r:  50deg; animation-delay: 800ms; }
.vortex .b10 { background: var(--spearmint); --x:  180px; --y:  -90px; --r: -50deg; animation-delay: 900ms; }
.vortex .b11 { background: var(--sky);       --x: -180px; --y:   90px; --r:  50deg; animation-delay: 1000ms; }
.vortex .b12 { background: var(--coral);     --x:  180px; --y:   90px; --r: -50deg; animation-delay: 1100ms; }

@keyframes vortexIn {
    0%   { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(0deg) scale(1); opacity: 1; }
    70%  { transform: translate(-50%, -50%) rotate(var(--r)) scale(0.6); opacity: 1; }
    100% { transform: translate(-50%, -50%) rotate(var(--r)) scale(0); opacity: 0; }
}

.page-footer {
    position: relative;
    z-index: 2;
    margin-top: 2rem;
    text-align: center;
    color: var(--soft-violet);
    font-size: 0.9rem;
    padding-bottom: 2rem;
}

/* ============== REDUCED MOTION ============== */
@media (prefers-reduced-motion: reduce) {
    .ambient { animation: none !important; }
    [data-anim="bounce"], [data-anim="unfurl"] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
    [data-anim="bounce"].in, [data-anim="unfurl"].in { animation: fadeIn 400ms ease forwards; }
    .logotype .letter { opacity: 1; transform: none; }
    .vortex .bit { display: none; }
    .splash-mascot .mascot, .mascot-finale { animation: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
