/*
 * JiuHub Landing Page - Styles v2.0
 * Design: Bold Editorial / Sport-Tech
 * Fonts: Bebas Neue (display) + Sora (body)
 * Palette Light: White, Navy #1E40AF, Orange #FF6B35, Slate grays
 * Palette Dark:  Charcoal #1A1A1A, Sky Blue #60A5FA, Orange #FF6B35
 */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* ═══════════════════════════════════════════
   DESIGN TOKENS — LIGHT (default)
═══════════════════════════════════════════ */
:root,
[data-theme="light"] {
    /* Brand */
    --c-blue:        #1E40AF;
    --c-blue-hover:  #1a349a;
    --c-orange:      #FF6B35;
    --c-orange-hover:#e05520;

    /* Surfaces */
    --bg-page:       #F8F9FC;
    --bg-header:     rgba(255,255,255,0.92);
    --bg-card:       #FFFFFF;
    --bg-cta:        linear-gradient(135deg, #1E40AF 0%, #1a2d7f 100%);
    --bg-footer:     #111827;

    /* Text */
    --tx-heading:    #0F172A;
    --tx-body:       #334155;
    --tx-muted:      #64748B;
    --tx-on-dark:    #F1F5F9;

    /* Borders */
    --bd-card:       #E2E8F0;
    --bd-input:      #CBD5E1;

    /* Controls */
    --ctrl-bg:       #F1F5F9;
    --ctrl-bd:       #CBD5E1;
    --ctrl-tx:       #475569;

    /* Hero */
    --hero-grid:     rgba(30,64,175,0.06);
    --hero-glow-1:   rgba(30,64,175,0.18);
    --hero-glow-2:   rgba(255,107,53,0.14);

    /* Phone mockup */
    --phone-bg:      #FFFFFF;
    --phone-bd:      #1E3A5F;
    --phone-shadow:  rgba(15,23,42,0.25);

    /* Badge */
    --badge-bg:      rgba(30,64,175,0.1);
    --badge-bd:      rgba(30,64,175,0.3);
    --badge-tx:      #1E40AF;

    /* Feat icon */
    --feat-icon-bg:  rgba(255,107,53,0.12);
    --feat-icon-tx:  #FF6B35;

    /* Counter */
    --counter-bg:    rgba(30,64,175,0.07);
    --counter-bd:    rgba(30,64,175,0.2);
}

/* ═══════════════════════════════════════════
   DESIGN TOKENS — DARK
═══════════════════════════════════════════ */
[data-theme="dark"] {
    --c-blue:        #60A5FA;
    --c-blue-hover:  #93C5FD;
    --c-orange:      #FF6B35;
    --c-orange-hover:#FF8A5C;

    --bg-page:       #111827;
    --bg-header:     rgba(17,24,39,0.92);
    --bg-card:       #1E293B;
    --bg-cta:        linear-gradient(135deg, #1a2340 0%, #0c1220 100%);
    --bg-footer:     #0d1117;

    --tx-heading:    #F1F5F9;
    --tx-body:       #CBD5E1;
    --tx-muted:      #94A3B8;
    --tx-on-dark:    #F1F5F9;

    --bd-card:       #334155;
    --bd-input:      #475569;

    --ctrl-bg:       #1E293B;
    --ctrl-bd:       #334155;
    --ctrl-tx:       #94A3B8;

    --hero-grid:     rgba(96,165,250,0.05);
    --hero-glow-1:   rgba(96,165,250,0.12);
    --hero-glow-2:   rgba(255,107,53,0.10);

    --phone-bg:      #1E293B;
    --phone-bd:      #60A5FA;
    --phone-shadow:  rgba(0,0,0,0.5);

    --badge-bg:      rgba(96,165,250,0.12);
    --badge-bd:      rgba(96,165,250,0.3);
    --badge-tx:      #93C5FD;

    --feat-icon-bg:  rgba(255,107,53,0.15);
    --feat-icon-tx:  #FF6B35;

    --counter-bg:    rgba(96,165,250,0.08);
    --counter-bd:    rgba(96,165,250,0.2);
}

/* ═══════════════════════════════════════════
   GLOBAL TYPOGRAPHY
═══════════════════════════════════════════ */
body {
    font-family: 'Sora', -apple-system, sans-serif;
    background: var(--bg-page);
    color: var(--tx-body);
    line-height: 1.65;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Bebas Neue', 'Sora', sans-serif;
    line-height: 1.05;
    color: var(--tx-heading);
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

/* ═══════════════════════════════════════════
   CONTAINER
═══════════════════════════════════════════ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}
@media (min-width: 768px)  { .container { padding: 0 2rem; } }
@media (min-width: 1280px) { .container { padding: 0 2.5rem; } }

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--bg-header);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
header.scrolled {
    border-color: var(--bd-card);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

/* Logo */
.logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}
.logo-wordmark {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.05em;
    color: var(--c-blue);
    transition: color 0.3s;
}

/* Header controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ctrl-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.ctrl-icon {
    width: 15px;
    height: 15px;
    color: var(--tx-muted);
    flex-shrink: 0;
}
.ctrl-group select {
    background: var(--ctrl-bg);
    color: var(--ctrl-tx);
    border: 1px solid var(--ctrl-bd);
    border-radius: 0.5rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
}
.ctrl-group select:hover  { border-color: var(--c-blue); }
.ctrl-group select:focus  { outline: 2px solid var(--c-blue); outline-offset: 2px; }

@media (max-width: 480px) {
    .logo-wordmark { display: none; }
    .ctrl-group select { font-size: 0.72rem; padding: 0.25rem 0.4rem; }
}

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 8rem 0 5rem;
    overflow: hidden;
}

/* Grid background */
.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--hero-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* Glows */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.hero-glow-1 {
    width: 600px; height: 600px;
    background: var(--hero-glow-1);
    top: -150px; left: -100px;
}
.hero-glow-2 {
    width: 400px; height: 400px;
    background: var(--hero-glow-2);
    bottom: -100px; right: -50px;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}
@media (min-width: 900px) {
    .hero-inner { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* Hero text */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--badge-bg);
    border: 1px solid var(--badge-bd);
    color: var(--badge-tx);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}
.badge-dot {
    width: 7px; height: 7px;
    background: var(--c-orange);
    border-radius: 50%;
    animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.4); }
}

.hero-title {
    margin-bottom: 1.25rem;
}
.hero-title-brand {
    font-size: clamp(4rem, 10vw, 8rem);
    color: var(--c-blue);
    display: block;
    line-height: 1;
}
.hero-title-tagline {
    font-size: clamp(1.6rem, 4vw, 3rem);
    color: var(--tx-heading);
    display: block;
    line-height: 1.1;
    letter-spacing: 0.06em;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--tx-muted);
    line-height: 1.7;
    max-width: 540px;
    margin-bottom: 2rem;
}

/* ── Waitlist form ── */
.waitlist-form { width: 100%; }
.waitlist-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.waitlist-input {
    flex: 1 1 220px;
    padding: 0.85rem 1.1rem;
    border: 1.5px solid var(--bd-input);
    border-radius: 0.625rem;
    background: var(--bg-card);
    color: var(--tx-heading);
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.waitlist-input::placeholder { color: var(--tx-muted); }
.waitlist-input:focus {
    outline: none;
    border-color: var(--c-blue);
    box-shadow: 0 0 0 3px rgba(30,64,175,0.15);
}
[data-theme="dark"] .waitlist-input:focus {
    box-shadow: 0 0 0 3px rgba(96,165,250,0.18);
}

.waitlist-btn {
    padding: 0.85rem 1.5rem;
    background: var(--c-orange);
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    border: none;
    border-radius: 0.625rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(255,107,53,0.35);
}
.waitlist-btn:hover {
    background: var(--c-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,107,53,0.45);
}
.waitlist-btn:active  { transform: translateY(0); }
.waitlist-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Light variant (CTA section) */
.waitlist-btn--light {
    background: #fff;
    color: var(--c-blue);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.waitlist-btn--light:hover {
    background: #f0f4ff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Messages */
.waitlist-msg {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 1.4em;
    transition: opacity 0.3s;
}
.waitlist-msg--success { color: #22c55e; }
.waitlist-msg--error   { color: #ef4444; }

/* Counter */
.counter-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.25rem;
    background: var(--counter-bg);
    border: 1px solid var(--counter-bd);
    border-radius: 100px;
    padding: 0.45rem 1rem;
}
.counter-avatars {
    display: flex;
    gap: 2px;
    font-size: 0.95rem;
}
.counter-text {
    font-size: 0.82rem;
    color: var(--tx-muted);
}
.counter-text strong {
    color: var(--c-blue);
    font-weight: 700;
}

/* ── Phone mockup ── */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.phone {
    position: relative;
    width: 260px;
    border-radius: 40px;
    border: 3px solid var(--phone-bd);
    background: var(--phone-bg);
    box-shadow:
        0 30px 80px var(--phone-shadow),
        inset 0 0 0 1px rgba(255,255,255,0.1);
    overflow: hidden;
    transition: background 0.3s, border-color 0.3s;
    animation: float 4s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-12px); }
}

.phone-notch {
    width: 80px;
    height: 22px;
    background: var(--phone-bd);
    border-radius: 0 0 18px 18px;
    margin: 0 auto;
}

.phone-screen {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 420px;
}

.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.screen-logo {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: var(--c-blue);
}
.screen-logo-img {
    height: 20px;
    width: auto;
}
.screen-belt {
    width: 40px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #7C3AED, #4F46E5);
}

.screen-stats {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 0.4rem;
}
.stat-card {
    background: var(--bd-card);
    border-radius: 10px;
    padding: 0.5rem 0.3rem;
    text-align: center;
    border: 1px solid var(--bd-card);
}
[data-theme="dark"] .stat-card { background: rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.15); }
.stat-num {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: var(--c-orange);
}
.stat-lbl {
    display: block;
    font-size: 0.6rem;
    color: var(--tx-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.screen-feed { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.feed-item {
    border-radius: 10px;
    height: 56px;
    animation: shimmer 2s infinite linear;
    background-size: 200% 100%;
}
[data-theme="light"] .feed-item {
    background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
}
[data-theme="dark"] .feed-item {
    background: linear-gradient(90deg, #1E293B 25%, #334155 50%, #1E293B 75%);
}
.feed-item--1 { animation-delay: 0s; }
.feed-item--2 { animation-delay: 0.2s; height: 44px; }
.feed-item--3 { animation-delay: 0.4s; height: 36px; }
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.screen-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding-bottom: 0.5rem;
}
.nav-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bd-card); }
.nav-dot--active { background: var(--c-orange); width: 18px; border-radius: 3px; }

/* Floating badges */
.float-badge {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--bd-card);
    border-radius: 100px;
    padding: 0.4rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--tx-heading);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    white-space: nowrap;
}
.float-badge--belt   { top: 20%; right: -10px; animation: float 4s 1s ease-in-out infinite; }
.float-badge--global { bottom: 20%; left: -10px; animation: float 4s 2s ease-in-out infinite; }

@media (max-width: 899px) {
    .hero-visual { display: none; }
}

/* ═══════════════════════════════════════════
   FEATURES SECTION
═══════════════════════════════════════════ */
.features {
    padding: 6rem 0;
    background: var(--bg-page);
    transition: background 0.3s;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}
.section-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    color: var(--tx-heading);
    margin-bottom: 0.75rem;
}
.section-sub {
    font-size: 1.05rem;
    color: var(--tx-muted);
    max-width: 480px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feat-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--bd-card);
    border-radius: 1rem;
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.5s ease,
        transform 0.5s ease,
        border-color 0.25s,
        box-shadow 0.25s,
        background 0.3s;
}
.feat-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.feat-card:hover {
    border-color: var(--c-orange);
    box-shadow: 0 8px 32px rgba(255,107,53,0.1);
    transform: translateY(-3px);
}
/* Stagger delays */
.feat-card[data-index="0"] { transition-delay: 0.05s; }
.feat-card[data-index="1"] { transition-delay: 0.1s; }
.feat-card[data-index="2"] { transition-delay: 0.15s; }
.feat-card[data-index="3"] { transition-delay: 0.2s; }
.feat-card[data-index="4"] { transition-delay: 0.25s; }
.feat-card[data-index="5"] { transition-delay: 0.3s; }
.feat-card[data-index="6"] { transition-delay: 0.35s; }
.feat-card[data-index="7"] { transition-delay: 0.4s; }

.feat-icon {
    flex-shrink: 0;
    width: 48px; height: 48px;
    background: var(--feat-icon-bg);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--feat-icon-tx);
    transition: background 0.3s;
}
.feat-icon svg { width: 22px; height: 22px; }

.feat-body h3 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--tx-heading);
    margin-bottom: 0.35rem;
    transition: color 0.3s;
}
.feat-body p {
    font-size: 0.875rem;
    color: var(--tx-muted);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════
   CTA SECTION
═══════════════════════════════════════════ */
.cta-section {
    position: relative;
    background: var(--bg-cta);
    padding: 6rem 0;
    overflow: hidden;
    transition: background 0.3s;
}
.cta-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(255,107,53,0.25), transparent);
    pointer-events: none;
}
.cta-inner {
    position: relative;
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
}
.cta-title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    color: #fff;
    margin-bottom: 1rem;
}
.cta-desc {
    color: rgba(255,255,255,0.75);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}
.waitlist-form--cta .waitlist-input {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}
.waitlist-form--cta .waitlist-input::placeholder { color: rgba(255,255,255,0.5); }
.waitlist-form--cta .waitlist-input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
}
.waitlist-form--cta .waitlist-msg--success { color: #86efac; }
.waitlist-form--cta .waitlist-msg--error   { color: #fca5a5; }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
footer {
    background: var(--bg-footer);
    padding: 2.5rem 0;
    transition: background 0.3s;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-logo  { height: 28px; width: auto; }
.footer-wordmark {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.05em;
    color: #60A5FA;
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.07);
    color: #94A3B8;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.social-link:hover { background: var(--c-orange); color: #fff; }
.social-link svg { width: 18px; height: 18px; }

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-links a {
    color: #64748B;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: #60A5FA; }

.footer-copy {
    font-size: 0.8rem;
    color: #475569;
}

/* ═══════════════════════════════════════════
   RTL SUPPORT
═══════════════════════════════════════════ */
[dir="rtl"] .header-inner    { flex-direction: row-reverse; }
[dir="rtl"] .feat-card        { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .waitlist-row     { flex-direction: row-reverse; }
[dir="rtl"] .hero-text        { text-align: right; }
[dir="rtl"] .float-badge--belt   { right: auto; left: -10px; }
[dir="rtl"] .float-badge--global { left: auto; right: -10px; }
