/* =========================================================================
   HERO SECTION — Immersive entry with liquid blobs, breathing glow,
   text clip-reveal, and scroll-driven parallax.
   Derived from: AnimatedLiquidBackground, GlowingOrbImagePicker, GradientScaffold
   ========================================================================= */

section#hero {
    background: var(--clr-bg-light);
    overflow: hidden;
    position: relative;
    padding-bottom: clamp(2rem, 5vh, 4rem);
}

section#hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 70%;
    background: radial-gradient(circle at top right, rgba(244, 123, 37, 0.08), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ── Liquid Blob Background (from AnimatedLiquidBackground) ──────── */
/* 3 blobs matching the exact Flutter colors + opacities */

.hero-blob-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
}

/* Blob 1 — Amber F59E0B @ 6% opacity (matches Flutter light mode blob1) */
.hero-blob--1 {
    width: clamp(300px, 45vw, 600px);
    height: clamp(300px, 45vw, 600px);
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
    top: -10%;
    right: -5%;
    animation: orbitBlob1 15s ease-in-out infinite;
}

/* Blob 2 — Primary F47B25 @ 5% opacity (matches Flutter light mode blob2) */
.hero-blob--2 {
    width: clamp(350px, 50vw, 650px);
    height: clamp(350px, 50vw, 650px);
    background: radial-gradient(circle, rgba(244, 123, 37, 0.05) 0%, transparent 70%);
    bottom: -15%;
    left: -10%;
    animation: orbitBlob2 15s ease-in-out infinite;
}

/* Blob 3 — Rose E11D48 @ 4% opacity (matches Flutter light mode blob3) */
.hero-blob--3 {
    width: clamp(250px, 38vw, 500px);
    height: clamp(250px, 38vw, 500px);
    background: radial-gradient(circle, rgba(225, 29, 72, 0.04) 0%, transparent 70%);
    top: 30%;
    right: 20%;
    animation: orbitBlob3 15s ease-in-out infinite;
}

/* ── Nav bar ─────────────────────────────────────────────────────── */

.hero-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 5vw, 3rem);
    position: relative;
    z-index: 2;
}

.hero-nav .logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--clr-text-dark);
}

.hero-nav .logo span {
    color: var(--clr-primary);
}

.hero-nav .nav-pill {
    border-radius: var(--radius-pill);
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--clr-text-dark);
    font-weight: 500;
    transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth);
}

.hero-nav .nav-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(244, 123, 37, 0.15);
}

/* ── Layout ──────────────────────────────────────────────────────── */

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding-block: clamp(2rem, 5vh, 4rem);
    position: relative;
    z-index: 2;
}

/* ── Text Column ─────────────────────────────────────────────────── */

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    color: var(--clr-primary);
    font-weight: 600;
}

h1.hero-headline {
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1.1;
    max-width: 16ch;
    color: var(--clr-text-dark);
    margin: 0;
}

em.accent {
    font-style: normal;
    color: var(--clr-primary);
    text-shadow: 0 0 20px var(--shadow-orange-glow);
}

.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    max-width: 48ch;
    color: var(--clr-text-dark);
    opacity: 0.7;
    margin: 0;
    line-height: 1.6;
}

/* ── CTA Buttons ─────────────────────────────────────────────────── */

.hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-primary, 'Space Grotesk', sans-serif);
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--clr-primary);
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth), background 0.3s var(--ease-smooth);
    will-change: transform;
    position: relative;
}

.btn-cta:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-orange-glow);
}

/* Magnetic button effect — JS will set --mx, --my */
.btn-cta.is-magnetic {
    transform: translate(
        calc(var(--mx, 0) * 1px),
        calc(var(--my, 0) * 1px)
    ) scale(1.02);
}

.btn-cta svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-cta--play {
    background: transparent;
    border: 2px solid var(--clr-primary);
    color: var(--clr-primary);
}

.btn-cta--play:hover {
    background: var(--clr-primary);
    color: #fff;
}

.hero-coming-soon {
    align-self: center;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--clr-text-dark);
    opacity: 0.55;
    font-weight: 500;
}

/* ── Visual Column ───────────────────────────────────────────────── */

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Scroll-driven parallax on the phone mockup */
@supports (animation-timeline: scroll()) {
    .hero-visual {
        animation: heroParallax linear both;
        animation-timeline: scroll();
        animation-range: 0% 40%;
    }
}

@keyframes heroParallax {
    from { transform: translateY(0); }
    to { transform: translateY(60px); }
}

/* ── Breathing Glow Orb (from GlowingOrbImagePicker) ────────────── */

.hero-glow-orb {
    position: absolute;
    width: clamp(280px, 40vw, 520px);
    height: clamp(280px, 40vw, 520px);
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(244, 123, 37, 0.18) 0%,
        rgba(45, 212, 191, 0.12) 40%,
        rgba(167, 139, 250, 0.10) 70%,
        transparent 100%
    );
    filter: blur(48px);
    z-index: 0;
    animation: breathe 4s ease-in-out infinite;
}

/* ── Phone Mockup ────────────────────────────────────────────────── */

@keyframes phoneFloat {
    0% { transform: translateY(0) rotateY(0deg); }
    50% { transform: translateY(-12px) rotateY(2deg); }
    100% { transform: translateY(0) rotateY(0deg); }
}

.phone-mockup {
    position: relative;
    z-index: 1;
    width: clamp(220px, 28vw, 300px);
    aspect-ratio: 9 / 19;
    background: var(--clr-bg-dark, #0f172a);
    border-radius: 36px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.45),
        0 0 0 6px rgba(255, 255, 255, 0.04),
        0 0 60px rgba(244, 123, 37, 0.1);
    animation: phoneFloat 5s ease-in-out infinite;
    overflow: hidden;
    transform-style: preserve-3d;
}

/* Phone screen reflective shimmer */
.phone-mockup::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.12);
    z-index: 10;
}

/* Subtle screen glow overlay */
.phone-mockup::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 34px;
    background: linear-gradient(
        135deg,
        rgba(244, 123, 37, 0.05) 0%,
        transparent 50%,
        rgba(167, 139, 250, 0.03) 100%
    );
    pointer-events: none;
    z-index: 5;
}

.phone-screen {
    width: 100%;
    height: 100%;
    padding: 1rem;
    padding-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-sizing: border-box;
    background: var(--clr-bg-dark);
}

/* ── Phone Screen Skeleton Elements ──────────────────────────────── */

.mock-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mock-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--clr-primary);
    flex-shrink: 0;
    animation: breatheSlow 3s ease-in-out infinite;
}

.mock-title-skeletons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.mock-skel-line {
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* Skeleton shimmer animation */
.mock-skel-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

.mock-title-skeletons .mock-skel-line:first-child { width: 60%; }
.mock-title-skeletons .mock-skel-line:last-child { width: 40%; }

.mock-pet-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.4s ease;
}

.mock-pet-card:hover {
    border-color: rgba(244, 123, 37, 0.2);
}

.mock-pet-card .mock-skel-line { width: 50%; height: 12px; }

.mock-synergy-chip {
    font-size: 0.75rem;
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
}

.mock-synergy-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.mock-synergy-delta {
    font-size: 0.6rem;
    color: rgba(45, 212, 191, 0.95);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.mock-activity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
    border-radius: 12px;
    transition: background 0.3s ease, transform 0.3s var(--ease-smooth);
}

.mock-activity-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.mock-activity-item .mock-skel-line { background: rgba(255, 255, 255, 0.1); }

.mock-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mock-activity-item:hover .mock-dot {
    transform: scale(1.3);
}

.mock-dot.teal {
    background: var(--clr-accent-teal, #2dd4bf);
    box-shadow: 0 0 0 rgba(45, 212, 191, 0);
}

.mock-activity-item:hover .mock-dot.teal {
    box-shadow: 0 0 8px rgba(45, 212, 191, 0.5);
}

.mock-dot.pink {
    background: var(--clr-accent-pink, #f472b6);
}

.mock-activity-item:hover .mock-dot.pink {
    box-shadow: 0 0 8px rgba(244, 114, 182, 0.5);
}

.mock-dot.purple {
    background: var(--clr-accent-violet, #a78bfa);
}

.mock-activity-item:hover .mock-dot.purple {
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.5);
}

.mock-activity-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.mock-activity-lines .mock-skel-line:first-child { width: 80%; }
.mock-activity-lines .mock-skel-line:last-child { width: 50%; }

/* ── Mobile Responsive ───────────────────────────────────────────── */

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-text {
        align-items: center;
    }

    .hero-sub {
        margin: 0 auto;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-blob--1,
    .hero-blob--2,
    .hero-blob--3 {
        filter: blur(60px);
    }
}