/* ============================================================
   Cookie Tower Stack — Promo Site
   Warm baker's pantry palette · Fredoka + Nunito · soft shadows
   ============================================================ */

:root {
    /* Brand */
    --brand-sky: #5BC0EB;
    --brand-sun: #FFC93C;
    --brand-brick: #E94F37;
    --brand-cocoa: #5B3A1B;
    --brand-cream: #FFF4D6;
    --brand-honey: #F2A541;

    /* Surface */
    --bg-primary: #FFF8E6;
    --bg-secondary: #FFEBC1;
    --surface-card: #FFFFFF;
    --surface-elev: #FFFDF6;
    --divider: #E9D8B8;

    /* Text */
    --text-primary: #3D2814;
    --text-secondary: #7A5A3A;
    --text-tertiary: #A0876A;
    --text-on-accent: #3D2814;

    /* Gradients */
    --grad-sun: linear-gradient(135deg, #FFC93C 0%, #F2A541 100%);
    --grad-legendary: linear-gradient(135deg, #FFD86B 0%, #E94F37 100%);
    --grad-pantry: linear-gradient(180deg, #FFF8E6 0%, #FFEBC1 100%);
    --grad-cocoa: linear-gradient(135deg, #5B3A1B 0%, #3D2814 100%);

    /* Shadow */
    --shadow-card: 0 2px 6px rgba(91, 58, 27, 0.10);
    --shadow-elev: 0 8px 24px rgba(91, 58, 27, 0.18);
    --shadow-sticker: 0 3px 0 rgba(0, 0, 0, 0.15);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle pantry texture — repeating soft dots */
body {
    background-image:
        radial-gradient(circle at 1px 1px, rgba(91, 58, 27, 0.06) 1px, transparent 0);
    background-size: 24px 24px;
}

/* Typography helpers */
.font-display { font-family: 'Fredoka', 'Nunito', sans-serif; }
.font-script { font-family: 'Pacifico', cursive; }

/* === Headline treatments === */
.h-mega {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw + 1rem, 5rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.h-mega .accent {
    background: var(--grad-sun);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.h-mega .script {
    font-family: 'Pacifico', cursive;
    font-weight: 400;
    color: var(--brand-brick);
    font-size: 0.65em;
    display: block;
    margin-top: -0.2em;
    margin-bottom: 0.1em;
    transform: rotate(-3deg);
    transform-origin: left center;
}

.h-section {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 3.5vw + 0.5rem, 3rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.h-section .accent {
    color: var(--brand-brick);
    font-style: italic;
}

.eyebrow {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-honey);
}

/* === Header / Nav === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 248, 230, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--divider);
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 14px;
    transition: color 0.16s;
    padding: 6px 12px;
    border-radius: 8px;
}

.nav-link:hover { color: var(--brand-brick); background: rgba(233, 79, 55, 0.06); }

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 18px;
    letter-spacing: -0.01em;
}

.brand-mark img {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    box-shadow: var(--shadow-card);
}

/* === Hero === */
.hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0 80px;
    background: var(--grad-pantry);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('images/hero_bg.webp');
    background-size: cover;
    background-position: center top;
    opacity: 0.55;
    mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.85) 60%, rgba(0,0,0,0.2) 100%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.85) 60%, rgba(0,0,0,0.2) 100%);
}

.hero-veil {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 20%, transparent 0%, rgba(255, 248, 230, 0.4) 60%, var(--bg-primary) 100%);
}

/* Sticker chips floating in hero */
.hero-sticker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface-card);
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    box-shadow: var(--shadow-sticker);
    border: 2px solid rgba(0,0,0,0.08);
}

.hero-sticker .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-brick);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 0 22px;
    min-height: 54px;
    border-radius: 14px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
    line-height: 1;
}

.btn-primary {
    background: var(--grad-sun);
    color: var(--text-on-accent);
    box-shadow: var(--shadow-sticker), 0 6px 20px rgba(242, 165, 65, 0.4);
}

.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); opacity: 0.92; }

.btn-secondary {
    background: var(--surface-card);
    color: var(--text-primary);
    border: 2px solid var(--brand-cocoa);
    box-shadow: var(--shadow-sticker);
}

.btn-secondary:hover { transform: translateY(-2px); }

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--divider);
}

.btn-ghost:hover { background: var(--bg-secondary); }

/* === Cards === */
.card-soft {
    background: var(--surface-card);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--divider);
    transition: transform 0.18s, box-shadow 0.18s;
}

.card-soft:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elev);
}

.card-spotlight {
    background: var(--surface-card);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-elev);
    border: 1px solid var(--divider);
    position: relative;
    overflow: hidden;
}

.card-spotlight::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: var(--grad-sun);
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(20px);
}

/* Feature card icon halo */
.feature-icon {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    background: var(--bg-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sticker);
    overflow: hidden;
    padding: 8px;
}

.feature-icon img { width: 100%; height: 100%; object-fit: contain; }

/* === Phone frame === */
.phone-frame {
    position: relative;
    width: 280px;
    margin: 0 auto;
    border-radius: 44px;
    background: #1a1a1a;
    padding: 14px 12px;
    box-shadow: var(--shadow-elev), 0 30px 60px rgba(91, 58, 27, 0.25);
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 26px;
    background: #1a1a1a;
    border-radius: 0 0 16px 16px;
    z-index: 2;
}

.phone-screen {
    border-radius: 32px;
    overflow: hidden;
    background: var(--bg-primary);
    aspect-ratio: 420 / 912;
    width: 100%;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* === Steps timeline === */
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--grad-sun);
    color: var(--text-on-accent);
    border-radius: 14px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 20px;
    box-shadow: var(--shadow-sticker);
    flex-shrink: 0;
}

/* === Tier badges === */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tier-common { background: var(--brand-honey); color: var(--text-on-accent); }
.tier-rare { background: var(--brand-sky); color: var(--text-on-accent); }
.tier-legendary {
    background: var(--grad-legendary);
    color: white;
}

/* === Stat block === */
.stat {
    text-align: center;
}

.stat-num {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1;
    background: var(--grad-sun);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
}

.stat-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* === CTA === */
.cta {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    padding: 56px 32px;
    background: var(--grad-cocoa);
    color: var(--brand-cream);
}

.cta-bg {
    position: absolute;
    inset: 0;
    background-image: url('images/cta_bg.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    mix-blend-mode: screen;
}

.cta h2 { color: var(--brand-cream); }
.cta p { color: rgba(255, 244, 214, 0.85); }

/* === Footer === */
.site-footer {
    background: #2A1A0F;
    color: rgba(255, 244, 214, 0.85);
    padding: 56px 0 32px;
}

.site-footer a { color: var(--brand-sun); }
.site-footer a:hover { color: var(--brand-cream); }

.footer-link {
    color: rgba(255, 244, 214, 0.7);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.footer-link:hover { color: var(--brand-cream); }

/* === Doc pages (privacy/terms) === */
.doc-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 56px 24px 96px;
}

.doc-page h1 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.doc-page .doc-meta {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-bottom: 40px;
    font-weight: 600;
}

.doc-page h2 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 40px;
    margin-bottom: 12px;
    padding-left: 14px;
    border-left: 4px solid var(--brand-honey);
}

.doc-page h3 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 8px;
}

.doc-page p, .doc-page li {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 16px;
}

.doc-page ul, .doc-page ol {
    padding-left: 22px;
    margin-bottom: 16px;
}

.doc-page li { margin-bottom: 8px; }

.doc-page a {
    color: var(--brand-brick);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(233, 79, 55, 0.25);
}

.doc-page a:hover { border-bottom-color: var(--brand-brick); }

/* === Contact form === */
.contact-form {
    background: var(--surface-card);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-elev);
    border: 1px solid var(--divider);
}

.form-field { margin-bottom: 20px; }

.form-label {
    display: block;
    font-weight: 800;
    font-size: 13px;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 2px solid var(--divider);
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    color: var(--text-primary);
    transition: border-color 0.16s, background 0.16s;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--brand-honey);
    background: var(--surface-card);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
    font-family: 'Nunito', sans-serif;
}

.form-file-wrap {
    border: 2px dashed var(--divider);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    background: var(--bg-primary);
    cursor: pointer;
    transition: border-color 0.16s, background 0.16s;
}

.form-file-wrap:hover {
    border-color: var(--brand-honey);
    background: var(--surface-card);
}

.success-banner {
    background: #E0F2D8;
    border: 2px solid #4FA85C;
    color: #2D6638;
    padding: 18px 22px;
    border-radius: 14px;
    font-weight: 700;
    margin-bottom: 24px;
    display: none;
}

.success-banner.show { display: block; }

/* === Privacy acceptance button (Flutter integration) === */
.privacy-accept-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 24px 16px 24px;
    display: flex;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255, 248, 230, 0) 0%, rgba(255, 248, 230, 0.95) 30%, rgba(255, 248, 230, 1) 100%);
}

.privacy-accept-btn.hidden { display: none; }

.accept-btn {
    width: 100%;
    max-width: 480px;
    min-height: 56px;
    padding: 0 24px;
    background: var(--grad-sun);
    color: var(--text-on-accent);
    border: none;
    border-radius: 16px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 17px;
    cursor: pointer;
    box-shadow: var(--shadow-sticker), 0 8px 24px rgba(242, 165, 65, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s;
}

.accept-btn:hover { transform: translateY(-2px); }
.accept-btn:active { transform: translateY(0); opacity: 0.92; }

/* === Swiper overrides === */
.swiper-pagination-bullet {
    background: var(--text-tertiary);
    opacity: 0.4;
}

.swiper-pagination-bullet-active {
    background: var(--brand-brick);
    opacity: 1;
    width: 24px;
    border-radius: 4px;
    transition: width 0.18s;
}

.swiper-button-prev, .swiper-button-next {
    color: var(--brand-brick) !important;
    background: var(--surface-card);
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    box-shadow: var(--shadow-card);
}

.swiper-button-prev::after, .swiper-button-next::after {
    font-size: 18px !important;
    font-weight: 800;
}

@media (max-width: 768px) {
    .swiper-button-prev, .swiper-button-next { display: none !important; }
}

/* === Responsive tweaks === */
@media (max-width: 768px) {
    .hero { padding: 48px 0 64px; }
    .card-soft, .card-spotlight { padding: 24px; }
    .cta { padding: 40px 24px; border-radius: 24px; }
    .doc-page { padding: 40px 20px 80px; }
    .contact-form { padding: 24px; }
}

/* Animations */
@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.float { animation: float-y 4s ease-in-out infinite; }
.float-slow { animation: float-y 6s ease-in-out infinite; }
