/* ============================================================
   GGIGGL.com — Cottagecore meets translucent frost
   Palette: #f0f4f8 #dfe6e9 #a29bfe #fdcb6e #55efc4 #fd79a8 #2d3436
   Fonts:   Baloo 2 (heads), Nunito (body), Caveat (accent), Lato (fallback)
   Reveal spec: Intersection Observer with threshold: 0.15. Elements translate upward 40px and fade from 0 to 1 over 600ms with ease-out timing. Stagger child elements by 100ms each.
   Source: Planned seed from assignment (not frequency-derived)
   ============================================================ */

:root {
    --meadow-mist: #f0f4f8;
    --thistle-blush: #dfe6e9;
    --bramble-ink: #2d3436;
    --buttercup: #fdcb6e;
    --lavender: #a29bfe;
    --clover: #55efc4;
    --peony: #fd79a8;
    --frost-white: rgba(255, 255, 255, 0.6);
    --frost-edge: rgba(255, 255, 255, 0.25);
    --scroll: 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Nunito", "Lato", sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--bramble-ink);
    background: radial-gradient(ellipse at 50% 30%, var(--meadow-mist) 0%, var(--thistle-blush) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 1px 1px, var(--thistle-blush) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.3;
    z-index: 0;
}

/* ------------------- Navigation pill ------------------- */

.nav-pill {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    background: var(--frost-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--frost-edge);
    border-radius: 999px;
    padding: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.nav-toggle {
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.4s ease;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--bramble-ink);
    border-radius: 2px;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.nav-toggle.open {
    transform: rotate(90deg);
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.radial-menu {
    position: fixed;
    top: 5.5rem;
    right: 1.5rem;
    z-index: 99;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.6) translateY(-20px);
    transform-origin: top right;
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.radial-menu.open {
    pointer-events: auto;
    opacity: 1;
    transform: scale(1) translateY(0);
}

.radial-menu ul {
    list-style: none;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--frost-edge);
    border-radius: 24px;
    padding: 1rem 1.25rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
    min-width: 180px;
}

.radial-menu li {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: calc(var(--i) * 60ms);
}

.radial-menu.open li {
    opacity: 1;
    transform: translateY(0);
}

.radial-menu a {
    display: block;
    padding: 0.4rem 0.6rem;
    color: var(--bramble-ink);
    text-decoration: none;
    font-family: "Caveat", "Nunito", cursive;
    font-size: 1.4rem;
    border-radius: 12px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.radial-menu a:hover {
    background: rgba(253, 203, 110, 0.25);
    color: var(--lavender);
    transform: translateX(4px);
}

/* ------------------- Sparkle particles ------------------- */

.sparkle-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--buttercup);
    opacity: 0.6;
    box-shadow: 0 0 8px rgba(253, 203, 110, 0.6);
    animation: drift-up linear infinite;
}

@keyframes drift-up {
    0% {
        transform: translateY(100vh) translateX(0) scale(0.4);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-10vh) translateX(var(--wobble, 30px)) scale(1);
        opacity: 0;
    }
}

/* ------------------- Hero ------------------- */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 45%, var(--meadow-mist) 0%, var(--thistle-blush) 100%);
    z-index: -1;
}

.hero-hills {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 50%;
    z-index: 1;
    will-change: transform;
}

.hero-hills.layer-far {
    transform: translateY(calc(var(--scroll) * -0.05px));
    height: 40%;
    bottom: 5%;
    opacity: 0.9;
}

.hero-hills.layer-mid {
    transform: translateY(calc(var(--scroll) * -0.1px));
    height: 45%;
    bottom: 0;
}

.hero-hills.layer-near {
    transform: translateY(calc(var(--scroll) * -0.18px));
    height: 40%;
    bottom: 0;
}

.blob {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    filter: blur(8px);
    mix-blend-mode: multiply;
    z-index: 2;
    will-change: border-radius, transform;
}

.blob-a {
    width: 420px;
    height: 420px;
    background: rgba(85, 239, 196, 0.1);
    top: 15%;
    left: -8%;
    animation: morph-a 18s ease-in-out infinite alternate,
               drift-a 24s ease-in-out infinite alternate;
}

.blob-b {
    width: 520px;
    height: 520px;
    background: rgba(253, 203, 110, 0.1);
    top: 8%;
    right: -12%;
    animation: morph-b 20s ease-in-out infinite alternate,
               drift-b 28s ease-in-out infinite alternate;
}

.blob-c {
    width: 360px;
    height: 360px;
    background: rgba(162, 155, 254, 0.12);
    bottom: 18%;
    left: 55%;
    animation: morph-c 16s ease-in-out infinite alternate,
               drift-c 22s ease-in-out infinite alternate;
}

@keyframes morph-a {
    0%   { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    33%  { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    66%  { border-radius: 50% 50% 70% 30% / 40% 60% 40% 60%; }
    100% { border-radius: 40% 60% 30% 70% / 60% 40% 60% 40%; }
}

@keyframes morph-b {
    0%   { border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%; }
    33%  { border-radius: 30% 70% 70% 30% / 70% 30% 70% 30%; }
    66%  { border-radius: 70% 30% 50% 50% / 30% 70% 30% 70%; }
    100% { border-radius: 40% 60% 60% 40% / 50% 40% 60% 50%; }
}

@keyframes morph-c {
    0%   { border-radius: 50% 50% 60% 40% / 60% 40% 60% 40%; }
    33%  { border-radius: 70% 30% 40% 60% / 30% 70% 30% 70%; }
    66%  { border-radius: 40% 60% 70% 30% / 50% 50% 50% 50%; }
    100% { border-radius: 60% 40% 30% 70% / 70% 30% 70% 30%; }
}

@keyframes drift-a {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(60px, -40px) rotate(20deg); }
}
@keyframes drift-b {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-80px, 60px) rotate(-15deg); }
}
@keyframes drift-c {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-50px, -60px) rotate(12deg); }
}

.hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 2rem;
}

.doodle-top {
    margin: 0 auto 1.2rem;
    opacity: 0.9;
    animation: gentle-spin 30s linear infinite;
}

@keyframes gentle-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-title {
    font-family: "Baloo 2", "Nunito", sans-serif;
    font-weight: 800;
    font-size: clamp(3.5rem, 12vw, 10rem);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--bramble-ink);
    text-shadow:
        0 4px 24px rgba(162, 155, 254, 0.35),
        0 2px 0 rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    display: inline-flex;
}

.hero-title .letter {
    display: inline-block;
    animation: bob 3s ease-in-out infinite;
    animation-delay: calc(var(--d) * 0.12s);
}

@keyframes bob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-8px) rotate(-1.5deg); }
}

.hero-tagline {
    font-family: "Caveat", "Nunito", cursive;
    font-size: 1.75rem;
    color: var(--lavender);
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
    opacity: 0.9;
}

.chevron {
    position: absolute;
    bottom: -14vh;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce-chevron 2.2s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes bounce-chevron {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 10px); }
}

/* ------------------- Wave dividers ------------------- */

.wave-divider {
    display: block;
    width: 100%;
    height: 90px;
    position: relative;
    z-index: 3;
    margin-top: -1px;
    margin-bottom: -1px;
}

.wave-divider.flip {
    transform: scaleY(-1);
}

/* ------------------- Whisper section ------------------- */

.whisper {
    position: relative;
    z-index: 4;
    padding: 6rem 1.5rem 5rem;
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
}

.doodle-inline {
    margin: 0 auto 1.25rem;
    opacity: 0.9;
}

.whisper-text {
    font-family: "Baloo 2", "Nunito", sans-serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 3.2vw, 2.4rem);
    line-height: 1.4;
    color: var(--bramble-ink);
}

.annotation {
    display: inline-block;
    font-family: "Caveat", cursive;
    font-size: 1.35rem;
    color: var(--lavender);
    margin-top: 1rem;
    opacity: 0.85;
}

.annotation.center {
    display: block;
    text-align: center;
    margin-bottom: 2.5rem;
}

/* ------------------- Cards section ------------------- */

.cards-section {
    position: relative;
    z-index: 4;
    padding: 5rem 1.5rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: "Baloo 2", "Nunito", sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    color: var(--bramble-ink);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.card {
    position: relative;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    padding: 2rem 1.75rem 2.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2), box-shadow 0.5s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(162, 155, 254, 0.18);
}

.card-shape {
    width: 110px;
    height: 110px;
    margin: 0 auto 1.25rem;
}

.card h3 {
    font-family: "Baloo 2", "Nunito", sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--bramble-ink);
}

.card p {
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.65;
    color: #3a4245;
    margin-bottom: 1.25rem;
}

.tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--frost-edge);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--lavender);
    font-family: "Caveat", cursive;
    font-size: 1.1rem;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
}

.pulse {
    animation: pulse-breath 2.4s ease-in-out infinite;
    animation-delay: calc(var(--stagger) * 0.4s);
}

@keyframes pulse-breath {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04),
                    0 0 0 0 rgba(253, 121, 168, 0);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04),
                    0 0 40px 6px rgba(253, 121, 168, 0.18);
        transform: scale(1.015);
    }
}

/* ------------------- Horizon section ------------------- */

.horizon {
    position: relative;
    z-index: 4;
    padding: 5rem 0 6rem;
    text-align: center;
}

.horizon .section-title,
.horizon .annotation {
    padding: 0 1.5rem;
}

.horizon-scene {
    width: 100%;
    margin-top: 2.5rem;
    overflow: hidden;
}

.horizon-scene svg {
    width: 100%;
    height: auto;
    display: block;
}

.h-layer {
    transition: transform 0.2s ease-out;
}

.h-flowers circle {
    animation: flower-twinkle 3.5s ease-in-out infinite;
}
.h-flowers circle:nth-child(odd) {
    animation-delay: 1.2s;
}

@keyframes flower-twinkle {
    0%, 100% { opacity: 0.55; transform: scale(1); transform-origin: center; }
    50%      { opacity: 0.9;  transform: scale(1.3); transform-origin: center; }
}

.horizon-quote {
    font-family: "Caveat", cursive;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--lavender);
    margin-top: 2.5rem;
    padding: 0 1.5rem;
}

/* ------------------- Farewell ------------------- */

.farewell {
    position: relative;
    z-index: 4;
    padding: 5rem 1.5rem 8rem;
    text-align: center;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.8) 60%, #ffffff 100%);
}

.farewell-text {
    font-family: "Caveat", cursive;
    font-size: clamp(2rem, 5vw, 3.25rem);
    color: var(--bramble-ink);
    opacity: 0.8;
}

/* ------------------- Reveal animations ------------------- */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: calc(var(--stagger, 0) * 100ms);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------- Responsive ------------------- */

@media (max-width: 720px) {
    .whisper-text {
        font-size: 1.5rem;
    }
    .blob-a, .blob-b, .blob-c {
        width: 260px;
        height: 260px;
    }
    .hero-title {
        font-size: clamp(3rem, 18vw, 6rem);
    }
    .card-grid {
        gap: 1.5rem;
    }
}

/* ------------------- Reduced motion ------------------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001s !important;
    }
    .sparkle-field { display: none; }
    .blob { display: none; }
}
