/* ============ RESET & TOKENS ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue: #2563EB;
    --blue-dark: #1D4ED8;
    --yellow: #FFFBEB;
    --yellow-deep: #FCD34D;
    --red: #EF4444;
    --red-dark: #DC2626;
    --ink: #1F2937;
    --gray: #6B7280;
    --white: #FFFFFF;
    --font-hand: 'Patrick Hand', cursive;
    --font-body: 'Poppins', system-ui, sans-serif;
    --shadow-sm: 0 2px 8px rgba(31, 41, 55, 0.08);
    --shadow-md: 0 8px 24px rgba(31, 41, 55, 0.12);
    --shadow-lg: 0 20px 50px rgba(31, 41, 55, 0.18);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--yellow);
    overflow-x: hidden;
    line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

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

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: var(--white);
    box-shadow: 0 6px 0 #b91c1c, var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 9px 0 #b91c1c, var(--shadow-lg); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #b91c1c; }

.btn-ghost {
    background: var(--white);
    color: var(--blue);
    border: 2px solid var(--blue);
}
.btn-ghost:hover { background: var(--blue); color: var(--white); transform: translateY(-3px); }

.btn-large { padding: 16px 32px; font-size: 1.15rem; }
.btn-small { padding: 10px 20px; font-size: 0.95rem; }

/* ============ NAV ============ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255, 251, 235, 0.75);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(31, 41, 55, 0.06);
    transition: box-shadow 0.3s ease;
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-hand);
    font-size: 1.6rem;
    color: var(--blue);
    font-weight: 700;
}
.nav-logo { width: 36px; height: 36px; border-radius: 10px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    position: relative;
    padding: 4px 0;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 2px;
    background: var(--blue);
    transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }

@media (max-width: 720px) {
    .nav-links { display: none; }
}

/* ============ HERO ============ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(37,99,235,0.06) 0%, transparent 45%),
        radial-gradient(circle at 80% 30%, rgba(239,68,68,0.06) 0%, transparent 45%),
        var(--yellow);
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.hero-bg::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(#d1d5db 1.4px, transparent 1.4px);
    background-size: 26px 26px;
    opacity: 0.5;
}

.doodle {
    position: absolute;
    font-size: 2.2rem;
    color: var(--blue);
    opacity: 0.35;
    animation: float 6s ease-in-out infinite;
}
.doodle-1 { top: 14%; left: 8%; color: var(--yellow-deep); animation-delay: 0s; font-size: 2.8rem; }
.doodle-2 { top: 22%; right: 10%; color: var(--red); animation-delay: 1s; }
.doodle-3 { top: 65%; left: 6%; animation-delay: 2s; font-size: 2.6rem; }
.doodle-4 { top: 75%; right: 14%; color: var(--yellow-deep); animation-delay: 0.5s; }
.doodle-5 { top: 45%; left: 14%; color: var(--red); animation-delay: 1.5s; font-size: 1.4rem; }
.doodle-6 { top: 12%; left: 45%; animation-delay: 2.5s; font-size: 1.6rem; }
.doodle-7 { top: 85%; left: 40%; color: var(--blue); animation-delay: 3s; }
.doodle-8 { top: 35%; right: 6%; color: var(--yellow-deep); animation-delay: 1.8s; font-size: 1.2rem; }

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

.hero-line { position: absolute; left: 0; right: 0; height: 1px; background: #e5e7eb; }
.hero-line-1 { top: 30%; }
.hero-line-2 { top: 50%; }
.hero-line-3 { top: 70%; }

.hero-content { position: relative; z-index: 2; max-width: 720px; display: flex; flex-direction: column; align-items: center; }

.hero-badge {
    display: inline-block;
    background: var(--white);
    border: 1px solid rgba(37,99,235,0.2);
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--blue-dark);
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
}

.hero-icon {
    width: 260px;
    height: 260px;
    margin-bottom: 8px;
    animation: heroIconPop 0.8s cubic-bezier(.34,1.56,.64,1) both, bob 4s ease-in-out 0.8s infinite;
}
@keyframes heroIconPop {
    0% { transform: scale(0) rotate(-20deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-title-text {
    font-family: var(--font-hand);
    font-size: clamp(1.8rem, 4.2vw, 2.6rem);
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 16px;
    transform: rotate(-1deg);
}

.hero-tagline {
    font-size: clamp(1.1rem, 2.4vw, 1.4rem);
    color: var(--gray);
    margin-bottom: 36px;
    font-weight: 500;
}
.hero-tagline strong { color: var(--ink); }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }

.hero-sub { font-size: 0.9rem; color: var(--gray); }

.hero-scroll-cue {
    position: absolute;
    bottom: 32px; left: 50%;
    transform: translateX(-50%);
    width: 26px; height: 42px;
    border: 2px solid var(--blue);
    border-radius: 999px;
    z-index: 2;
}
.hero-scroll-cue span {
    display: block;
    width: 5px; height: 5px;
    background: var(--blue);
    border-radius: 50%;
    margin: 7px auto 0;
    animation: scrollCue 1.6s ease-in-out infinite;
}
@keyframes scrollCue {
    0% { transform: translateY(0); opacity: 1; }
    70% { transform: translateY(16px); opacity: 0; }
    100% { opacity: 0; }
}

@media (max-width: 720px) {
    .hero-scroll-cue { display: none; }
    .br-desktop { display: none; }
}

/* ============ SECTIONS GENERIC ============ */
.section { padding: 100px 0; position: relative; }
.section-title {
    font-family: var(--font-hand);
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    color: var(--blue);
    text-align: center;
    margin-bottom: 12px;
    transform: rotate(-1deg);
}
.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto 56px;
}

/* ============ HOW TO PLAY ============ */
.how-to { background: var(--white); }
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.step {
    background: var(--yellow);
    border: 2px solid #f3e8c8;
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.step:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: var(--shadow-md); }
.step-num {
    position: absolute;
    top: -16px; left: 50%;
    transform: translateX(-50%);
    width: 34px; height: 34px;
    background: var(--red);
    color: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}
.step-icon { font-size: 2.6rem; margin: 12px 0 14px; }
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--gray); font-size: 0.92rem; }

@media (max-width: 900px) {
    .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .steps { grid-template-columns: 1fr; }
}

/* ============ SCREENSHOTS ============ */
.screenshots { background: var(--yellow); }
.phones {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.phone { width: 210px; text-align: center; }
.phone-featured { width: 250px; }
.phone-frame {
    background: #111827;
    border-radius: 32px;
    padding: 10px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.4s cubic-bezier(.34,1.56,.64,1);
    overflow: hidden;
}
.phone:nth-child(odd) .phone-frame { transform: rotate(-3deg); }
.phone:nth-child(even) .phone-frame { transform: rotate(3deg); }
.phone-featured .phone-frame { transform: rotate(0deg) scale(1.05); }
.phone:hover .phone-frame { transform: rotate(0deg) scale(1.06); }
.phone-frame img { border-radius: 22px; width: 100%; display: block; }
.phone-label {
    margin-top: 14px;
    font-weight: 600;
    color: var(--blue-dark);
    font-size: 0.95rem;
}

@media (max-width: 720px) {
    .phone { width: 42%; }
    .phone-featured { width: 58%; order: -1; }
}

/* ============ FEATURES ============ */
.features { background: var(--white); }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.feature-card {
    padding: 32px 22px;
    border-radius: 20px;
    background: var(--yellow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.feature-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--gray); font-size: 0.9rem; }

@media (max-width: 900px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .feature-grid { grid-template-columns: 1fr; }
}

/* ============ FINAL CTA ============ */
.final-cta { padding-bottom: 120px; }
.cta-card {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    border-radius: 32px;
    padding: 64px 32px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.cta-card::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.12) 1.4px, transparent 1.4px);
    background-size: 24px 24px;
}
.cta-icon {
    width: 84px; height: 84px;
    border-radius: 20px;
    margin: 0 auto 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.cta-card h2 {
    font-family: var(--font-hand);
    font-size: clamp(2rem, 5vw, 2.8rem);
    position: relative;
    margin-bottom: 10px;
}
.cta-card p { position: relative; opacity: 0.9; margin-bottom: 28px; }
.cta-card .btn-primary { box-shadow: 0 6px 0 #991b1b, var(--shadow-md); position: relative; }

/* ============ FOOTER ============ */
.footer { background: #111827; color: #9ca3af; padding: 40px 0; }
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 600; }
.footer-brand img { width: 28px; height: 28px; border-radius: 8px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--white); }
.footer-copy { width: 100%; text-align: center; font-size: 0.85rem; margin-top: 12px; }

@media (min-width: 640px) {
    .footer-copy { width: auto; margin-top: 0; }
}

/* ============ SCROLL REVEAL ============ */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.16,1,.3,1);
    transition-delay: calc(var(--d, 0) * 0.12s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
