/* ============================================================
   Komikloe — Landing Page Stylesheet
   Premium comic-inspired design with light/dark mode
   ============================================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
    --bg: #e8f7ff;
    --bg2: #d0eefa;
    --panel: #ffffff;
    --ink: #0f172a;
    --sky: #00d2ff;
    --sky-light: #5ce1ff;
    --sky-dark: #00a8cc;
    --yellow: #fdd835;
    --yellow-d: #f9a825;
    --white: #ffffff;
    --muted: #475569;
    --shadow: #00a8cc;
    --badge-bg: #00d2ff;
    --badge-fg: #0f172a;
    --bubble-bg: #00d2ff;
    --star: #fdd835;
    --onoma: #00d2ff;
    --border-r: 999px;
    --cta-glow: rgba(0, 210, 255, 0.4);
}

[data-theme="dark"] {
    --bg: #0b0f19;
    --bg2: #111827;
    --panel: #1f2937;
    --ink: #f8fafc;
    --sky: #00d2ff;
    --sky-light: #5ce1ff;
    --sky-dark: #00a8cc;
    --yellow: #fdd835;
    --yellow-d: #f9a825;
    --white: #ffffff;
    --muted: #94a3b8;
    --shadow: #00d2ff;
    --badge-bg: #00d2ff;
    --badge-fg: #0b0f19;
    --bubble-bg: #00d2ff;
    --star: #fdd835;
    --onoma: #5ce1ff;
    --cta-glow: rgba(0, 210, 255, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    transition: background-color .35s, color .35s;
    overflow-x: hidden;
}

/* ---------- BACKGROUND DECORATIONS ---------- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 40% at 15% 20%, var(--sky-light) 0%, transparent 70%),
        radial-gradient(ellipse 50% 35% at 85% 75%, var(--yellow) 0%, transparent 65%);
    opacity: .18;
    transition: opacity .35s;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, var(--sky) 1.1px, transparent 1.1px);
    background-size: 22px 22px;
    opacity: .05;
}

/* ---------- PAGE CONTAINER ---------- */
.page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1.25rem 2rem;
    min-height: 100vh;
}

/* ---------- LOGO ---------- */
.logo-wrap {
    text-align: center;
    cursor: default;
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

.logo-wrap:hover {
    transform: scale(1.06) rotate(-2deg);
}

.logo-img {
    max-width: 320px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(41, 182, 246, .35));
    transition: filter .35s;
}

[data-theme="dark"] .logo-img {
    filter: drop-shadow(0 4px 12px rgba(253, 216, 53, .25));
}

/* ---------- TAGLINE BUBBLE ---------- */
.bubble {
    position: relative;
    display: inline-block;
    background: var(--bubble-bg);
    color: #fff;
    border-radius: 999px;
    padding: .45rem 1.4rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: .83rem;
    letter-spacing: .01em;
    box-shadow: 0 4px 0 var(--sky-dark), 0 6px 16px rgba(41, 182, 246, .3);
    transition: background .35s, box-shadow .35s;
}

.bubble::before {
    content: '';
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--bubble-bg);
    transition: border-bottom-color .35s;
}

/* ---------- CTA BUTTON (PRIMARY) ---------- */
.cta-section {
    width: 100%;
    max-width: 32rem;
}

.link-btn {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.4rem 1.2rem 1.1rem;
    background: var(--panel);
    border-radius: 999px;
    box-shadow:
        0 5px 0 var(--shadow),
        0 8px 24px rgba(41, 182, 246, .15),
        0 0 0 3px var(--sky-light);
    text-decoration: none;
    color: var(--ink);
    transition:
        transform .18s cubic-bezier(.34, 1.56, .64, 1),
        box-shadow .18s, background .35s;
    cursor: pointer;
}

.link-btn:hover {
    transform: translateY(-5px);
    box-shadow:
        0 10px 0 var(--shadow),
        0 16px 32px rgba(41, 182, 246, .25),
        0 0 0 3px var(--sky),
        0 0 30px var(--cta-glow);
}

.link-btn:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 var(--shadow),
        0 4px 10px rgba(41, 182, 246, .1),
        0 0 0 3px var(--sky-light);
}

.link-btn:focus-visible {
    outline: 3px dashed var(--sky);
    outline-offset: 4px;
}

/* Shimmer effect */
.link-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .45s ease;
}

.link-btn:hover::before {
    transform: translateX(100%);
}

/* Pulse ring animation */
.link-btn::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid var(--sky);
    opacity: 0;
    animation: pulse-ring 2.5s ease-out infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: .6; }
    70% { transform: scale(1.04); opacity: 0; }
    100% { transform: scale(1.04); opacity: 0; }
}

.btn-icon {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 0 rgba(0, 0, 0, .15);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--sky), var(--sky-dark));
    color: #fff;
}

.link-btn:hover .btn-icon {
    transform: rotate(-12deg) scale(1.15);
}

.btn-text {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.btn-label {
    font-family: 'Fredoka One', Impact, sans-serif;
    font-size: 1.4rem;
    letter-spacing: .03em;
    line-height: 1;
    color: var(--ink);
    transition: color .35s;
}

.btn-desc {
    font-size: .78rem;
    font-weight: 700;
    margin-top: 4px;
    color: var(--muted);
    transition: color .35s;
    position: relative;
    z-index: 1;
}

.btn-badge {
    flex-shrink: 0;
    background: var(--badge-bg);
    color: var(--badge-fg);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    padding: .3rem .8rem;
    box-shadow: 0 3px 0 rgba(0, 0, 0, .15);
    white-space: nowrap;
    transition: background .35s, color .35s, transform .2s;
    position: relative;
    z-index: 1;
    animation: badge-bounce 2s ease-in-out infinite;
}

@keyframes badge-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.btn-arrow {
    flex-shrink: 0;
    margin-left: .3rem;
    color: var(--sky);
    transition: transform .2s, color .35s;
    position: relative;
    z-index: 1;
}

.link-btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* ---------- THEME TOGGLE ---------- */
#theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    width: 50px;
    height: 50px;
    background: var(--panel);
    border-radius: 50%;
    box-shadow: 0 4px 0 var(--shadow), 0 6px 16px rgba(41, 182, 246, .2);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .35s, box-shadow .35s, transform .2s;
    color: var(--ink);
}

#theme-toggle:hover {
    transform: rotate(25deg) scale(1.1);
}

#theme-toggle:active {
    transform: scale(.92);
}

.icon-moon,
.icon-sun {
    position: absolute;
    transition: opacity .25s, transform .25s;
}

.icon-moon {
    opacity: 1;
    transform: rotate(0);
}

.icon-sun {
    opacity: 0;
    transform: rotate(80deg);
}

[data-theme="dark"] .icon-moon {
    opacity: 0;
    transform: rotate(-80deg);
}

[data-theme="dark"] .icon-sun {
    opacity: 1;
    transform: rotate(0);
}

/* ---------- DECORATIVE ELEMENTS ---------- */
.deco-star {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    color: var(--star);
    opacity: .7;
    animation: starwobble 3.2s ease-in-out infinite;
    transition: color .35s;
    font-size: 1.8rem;
    text-shadow: 0 2px 8px rgba(253, 216, 53, .5);
}

@keyframes starwobble {
    0%, 100% { transform: rotate(-12deg) scale(1); }
    50% { transform: rotate(12deg) scale(1.18); }
}

.onoma {
    font-family: 'Fredoka One', Impact, sans-serif;
    color: var(--onoma);
    opacity: .07;
    position: fixed;
    pointer-events: none;
    z-index: 0;
    user-select: none;
    line-height: 1;
    transition: color .35s;
}

.cloud {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    background: var(--sky-light);
    opacity: .12;
    transition: background .35s;
    filter: blur(40px);
}

/* ---------- SEO SECTIONS ---------- */
.section-card {
    background: var(--panel);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    box-shadow: 0 5px 0 var(--shadow), 0 8px 24px rgba(41, 182, 246, .12);
    transition: background .35s, box-shadow .35s;
    width: 100%;
}

.section-title {
    font-family: 'Fredoka One', Impact, sans-serif;
    font-size: 1.5rem;
    letter-spacing: .02em;
    color: var(--ink);
    margin-bottom: .75rem;
    transition: color .35s;
}

.section-text {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.7;
    color: var(--muted);
    transition: color .35s;
}

.section-text p + p {
    margin-top: .6rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    text-align: center;
}

.stat-item {
    background: var(--bg2);
    border-radius: 16px;
    padding: .8rem .5rem;
    transition: background .35s, transform .15s;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-family: 'Fredoka One', Impact, sans-serif;
    font-size: 1.6rem;
    color: var(--sky);
    line-height: 1;
}

.stat-label {
    font-size: .7rem;
    font-weight: 800;
    color: var(--muted);
    margin-top: .25rem;
    transition: color .35s;
}

/* Genre Chips */
.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.genre-chip {
    display: inline-block;
    background: var(--bg2);
    color: var(--ink);
    border-radius: 999px;
    padding: .35rem 1rem;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
    transition: background .2s, transform .15s, color .35s;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .06);
}

.genre-chip:hover {
    background: var(--sky);
    color: #fff;
    transform: translateY(-2px);
}

/* FAQ */
.faq-item {
    border-bottom: 2px solid var(--bg2);
    padding: 1rem 0;
    transition: border-color .35s;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-q {
    font-family: 'Fredoka One', Impact, sans-serif;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    color: var(--ink);
    transition: color .35s;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 0;
}

.faq-q::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--sky);
    flex-shrink: 0;
    transition: transform .25s;
}

.faq-item.open .faq-q::after {
    transform: rotate(45deg);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s;
    font-size: .85rem;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.65;
}

.faq-item.open .faq-a {
    max-height: 200px;
    padding-top: .6rem;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.feature-item {
    background: var(--bg2);
    border-radius: 16px;
    padding: 1rem .8rem;
    text-align: center;
    transition: background .35s, transform .15s;
}

.feature-item:hover {
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.6rem;
    margin-bottom: .4rem;
}

.feature-title {
    font-family: 'Fredoka One', Impact, sans-serif;
    font-size: .85rem;
    color: var(--ink);
    transition: color .35s;
}

.feature-desc {
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
    margin-top: .2rem;
    transition: color .35s;
}

/* ---------- FOOTER ---------- */
.footer {
    margin-top: 2rem;
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: .75rem;
    font-weight: 700;
    color: var(--muted);
    transition: color .35s;
}

.footer a {
    color: var(--sky);
    text-decoration: none;
    font-weight: 900;
    transition: color .2s;
}

.footer a:hover {
    color: var(--sky-dark);
    text-decoration: underline;
}

/* ---------- UTILITY ---------- */
.w-full { width: 100%; }
.max-w-lg { max-width: 32rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.text-center { text-align: center; }
.gap-3 { gap: .75rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-7 { margin-bottom: 1.75rem; }

/* ---------- ANIMATIONS ---------- */
@keyframes popin {
    0% { opacity: 0; transform: scale(.6) rotate(-6deg); }
    65% { transform: scale(1.08) rotate(2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes slidein {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.anim-pop { animation: popin .6s cubic-bezier(.34, 1.56, .64, 1) both; }
.anim-slide { animation: slidein .45s ease both; }
.anim-float { animation: float 3s ease-in-out infinite; }

.d0 { animation-delay: .0s; }
.d1 { animation-delay: .08s; }
.d2 { animation-delay: .16s; }
.d3 { animation-delay: .26s; }
.d4 { animation-delay: .36s; }
.d5 { animation-delay: .46s; }
.d6 { animation-delay: .56s; }
.d7 { animation-delay: .64s; }
.d8 { animation-delay: .72s; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
    .logo-img {
        max-width: 250px;
    }

    .btn-label {
        font-size: 1.15rem;
    }

    .btn-icon {
        width: 46px;
        height: 46px;
        font-size: 1.3rem;
    }

    .onoma {
        display: none;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: .5rem;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
    }

    .page {
        padding: 2rem 1rem 1.5rem;
    }
}

@media (max-width: 360px) {
    .logo-img {
        max-width: 200px;
    }

    .bubble {
        font-size: .75rem;
        padding: .4rem 1.1rem;
    }

    .link-btn {
        padding: 1rem 1.1rem 1rem .9rem;
        gap: .8rem;
    }
}
