/* ================================================
   OmGly — Landing Page + Registration Form CSS
   Mobile-first → Desktop landing
   ================================================ */

:root {
    --orange:      #f07030;
    --orange-d:    #c85a20;
    --orange-l:    #ff8f50;
    --bg:          #0d0d0d;
    --bg2:         #141414;
    --bg3:         #1c1c1c;
    --card:        #1e1e1e;
    --border:      #2a2a2a;
    --text:        #ffffff;
    --text2:       #cccccc;
    --text3:       #888888;
    --gold:        #f5a623;
    --red:         #e53935;
    --radius:      16px;
    --shadow:      0 8px 40px rgba(0,0,0,0.6);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Utilities ────────────────────────────────── */
.text-orange { color: var(--orange); }
button { cursor: pointer; border: none; font-family: inherit; }
a { text-decoration: none; }

/* ── Loading overlay ──────────────────────────── */
.loading-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 14px; z-index: 9999; color: white;
}
.spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   NAV
══════════════════════════════════════════════ */
.lp-nav {
    position: fixed; top: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    height: 64px;
    background: rgba(13,13,13,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    z-index: 200;
}
.lp-logo {
    display: flex; align-items: center; gap: 10px;
    color: var(--text);
}
.lp-logo-text {
    font-size: 1.3rem; font-weight: 900;
    background: linear-gradient(90deg, var(--orange), var(--orange-l));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.lp-nav-links {
    display: flex; align-items: center; gap: 24px;
}
.lp-nav-link {
    color: var(--text3); font-size: .9rem; font-weight: 500;
    transition: color .15s;
}
.lp-nav-link:hover { color: var(--text); }
.lp-btn-nav {
    background: var(--orange);
    color: white; font-size: .88rem; font-weight: 700;
    padding: 9px 20px; border-radius: 50px;
    transition: all .15s;
    box-shadow: 0 2px 12px rgba(240,112,48,.4);
}
.lp-btn-nav:hover { background: var(--orange-l); transform: translateY(-1px); }

.lp-hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; padding: 6px;
}
.lp-hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--text2); border-radius: 2px;
    transition: .2s;
}
.lp-mobile-menu {
    display: none; position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg2); border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 0;
    z-index: 199;
}
.lp-mobile-menu.open { display: flex; }
.lp-mobile-menu a, .lp-mobile-menu button {
    padding: 16px 24px; font-size: .95rem;
    color: var(--text2); text-align: left;
    border-bottom: 1px solid var(--border);
    background: none;
}
.lp-mobile-menu button {
    color: var(--orange); font-weight: 700;
}

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
.landing-wrap { min-height: 100vh; }

.lp-hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: space-between;
    padding: 100px 80px 60px;
    gap: 60px;
    background:
        radial-gradient(ellipse 60% 50% at 30% 50%, rgba(240,112,48,.12) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 60%, rgba(240,112,48,.06) 0%, transparent 70%),
        var(--bg);
}

.lp-hero-content {
    flex: 1; max-width: 560px;
}

.lp-hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(240,112,48,.12);
    border: 1px solid rgba(240,112,48,.3);
    color: var(--orange); font-size: .82rem; font-weight: 700;
    padding: 6px 14px; border-radius: 50px;
    margin-bottom: 20px;
    animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(240,112,48,.2); }
    50%      { box-shadow: 0 0 0 6px rgba(240,112,48,0); }
}

.lp-hero-title {
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 900;
    line-height: 1.12;
    margin-bottom: 20px;
    letter-spacing: -.03em;
}

.lp-hero-sub {
    font-size: 1.05rem; line-height: 1.65;
    color: var(--text3); margin-bottom: 32px;
}

.lp-hero-actions { display: flex; flex-direction: column; gap: 14px; }

.lp-btn-primary {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--orange);
    color: white; font-size: 1.05rem; font-weight: 800;
    padding: 18px 32px; border-radius: 50px;
    box-shadow: 0 6px 28px rgba(240,112,48,.45);
    transition: all .18s;
    align-self: flex-start;
}
.lp-btn-primary:hover { background: var(--orange-l); transform: translateY(-2px); box-shadow: 0 10px 36px rgba(240,112,48,.5); }
.lp-btn-primary:active { transform: scale(.97); }
.lp-btn-large { font-size: 1.1rem; padding: 20px 40px; }

.lp-hero-trust {
    display: flex; gap: 16px; flex-wrap: wrap;
}
.lp-hero-trust span {
    font-size: .82rem; color: var(--text3);
    display: flex; align-items: center; gap: 4px;
}

/* ── Phone mockup ─────────────────────────────── */
.lp-hero-phone {
    flex-shrink: 0;
    display: flex; justify-content: center;
}
.phone-frame {
    width: 260px;
    background: #1a1a1a;
    border-radius: 36px;
    padding: 14px 10px 20px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,.08),
        0 0 0 8px rgba(255,255,255,.03),
        0 30px 80px rgba(0,0,0,.7),
        inset 0 1px 0 rgba(255,255,255,.1);
    position: relative;
}
.phone-notch {
    width: 90px; height: 24px;
    background: #0d0d0d;
    border-radius: 0 0 16px 16px;
    margin: 0 auto 10px;
}
.phone-screen {
    background: #0a0a0a;
    border-radius: 24px;
    overflow: hidden;
    height: 440px;
}
.phone-preview-inner {
    height: 100%;
    display: flex; flex-direction: column;
    background:
        radial-gradient(ellipse 80% 60% at 50% 50%, rgba(120,60,20,.5) 0%, transparent 70%),
        #0a0a0a;
}
.phone-top-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 14px 0;
}
.phone-online {
    font-size: 1.2rem; font-weight: 800; color: white;
}
.phone-coin-btn {
    background: #f5a623; color: white;
    font-size: .7rem; font-weight: 800;
    padding: 5px 10px; border-radius: 50px;
}
.phone-tap-area {
    flex: 1; display: flex; align-items: center; justify-content: center;
    position: relative;
}
.phone-ring {
    position: absolute; border-radius: 50%;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.phone-ring-1 { width: 160px; height: 160px; background: rgba(100,45,15,.45); animation: phonePulse 2.5s ease-in-out infinite; }
.phone-ring-2 { width: 120px; height: 120px; background: rgba(140,65,25,.6);  animation: phonePulse 2.5s ease-in-out infinite .4s; }
.phone-ring-3 { width: 80px;  height: 80px;  background: rgba(190,95,40,.75); animation: phonePulse 2.5s ease-in-out infinite .8s; }
@keyframes phonePulse {
    0%,100% { transform: translate(-50%,-50%) scale(1); opacity: .9; }
    50%      { transform: translate(-50%,-50%) scale(1.06); opacity: .7; }
}
.phone-tap-label {
    position: relative; z-index: 1;
    font-size: .75rem; font-weight: 700; color: white;
    text-align: center; line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.phone-filter-bar {
    text-align: center; padding: 8px;
    font-size: .65rem; color: #666;
}
.phone-bottom-nav {
    display: flex; justify-content: space-around; align-items: center;
    padding: 10px 0 14px;
    background: rgba(20,20,20,.95);
    border-top: 1px solid #222;
    font-size: 1rem;
}
.pbn-active { color: var(--orange); }
.phone-home-bar {
    width: 80px; height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 2px; margin: 10px auto 0;
}

/* ══════════════════════════════════════════════
   STATS
══════════════════════════════════════════════ */
.lp-stats {
    display: flex; justify-content: center; gap: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg2);
}
.lp-stat {
    flex: 1; text-align: center; padding: 28px 20px;
    border-right: 1px solid var(--border);
}
.lp-stat:last-child { border-right: none; }
.stat-n {
    font-size: 1.8rem; font-weight: 900;
    color: var(--orange); margin-bottom: 4px;
}
.stat-l { font-size: .8rem; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* ══════════════════════════════════════════════
   SECTION COMMONS
══════════════════════════════════════════════ */
.lp-section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900; text-align: center;
    margin-bottom: 10px; letter-spacing: -.02em;
}
.lp-section-sub {
    text-align: center; color: var(--text3);
    font-size: .95rem; margin-bottom: 50px;
}

/* ══════════════════════════════════════════════
   FEATURES
══════════════════════════════════════════════ */
.lp-features {
    padding: 100px 80px;
    background: var(--bg);
}
.lp-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px; margin: 0 auto;
}
.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: all .2s;
}
.feature-card:hover {
    border-color: rgba(240,112,48,.35);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.feature-icon { font-size: 2rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 8px; }
.feature-card p { font-size: .85rem; color: var(--text3); line-height: 1.6; }

/* ══════════════════════════════════════════════
   HOW IT WORKS
══════════════════════════════════════════════ */
.lp-how {
    padding: 80px;
    background: var(--bg2);
}
.lp-steps {
    display: flex; align-items: flex-start;
    justify-content: center; gap: 0;
    max-width: 1000px; margin: 0 auto;
    flex-wrap: wrap;
}
.lp-step {
    flex: 1; min-width: 160px; max-width: 200px;
    text-align: center; padding: 0 12px;
}
.step-num {
    width: 48px; height: 48px;
    background: var(--orange);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 900; color: white;
    margin: 0 auto 14px;
    box-shadow: 0 4px 16px rgba(240,112,48,.4);
}
.lp-step h4 { font-size: .95rem; font-weight: 800; margin-bottom: 6px; }
.lp-step p  { font-size: .8rem; color: var(--text3); line-height: 1.5; }
.lp-step-arrow {
    font-size: 1.5rem; color: var(--border);
    margin-top: 12px; flex-shrink: 0;
    align-self: flex-start; padding-top: 14px;
}

/* ══════════════════════════════════════════════
   FAQ
══════════════════════════════════════════════ */
.lp-faq {
    padding: 100px 80px;
    background: var(--bg);
}
.faq-list {
    max-width: 700px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 10px;
}
.faq-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .2s;
}
.faq-item.open { border-color: rgba(240,112,48,.4); }
.faq-q {
    width: 100%; padding: 18px 20px;
    background: none;
    color: var(--text); font-size: .95rem; font-weight: 700;
    text-align: left; display: flex; justify-content: space-between; align-items: center;
    transition: color .15s;
}
.faq-q:hover { color: var(--orange); }
.faq-arrow {
    font-size: .7rem; color: var(--text3);
    transition: transform .2s;
}
.faq-item.open .faq-arrow { transform: rotate(90deg); }
.faq-a {
    display: none;
    padding: 0 20px 18px;
    font-size: .88rem; color: var(--text3); line-height: 1.65;
}
.faq-item.open .faq-a { display: block; }

/* ══════════════════════════════════════════════
   CTA FINAL
══════════════════════════════════════════════ */
.lp-cta {
    padding: 100px 24px;
    text-align: center;
    background:
        radial-gradient(ellipse 60% 80% at 50% 50%, rgba(240,112,48,.1) 0%, transparent 70%),
        var(--bg2);
    border-top: 1px solid var(--border);
}
.lp-cta h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 900; margin-bottom: 12px; }
.lp-cta p  { color: var(--text3); font-size: 1rem; margin-bottom: 32px; }
.lp-cta .lp-btn-primary { margin: 0 auto; }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.lp-footer {
    background: var(--bg); border-top: 1px solid var(--border);
    padding: 32px 24px;
}
.lp-footer-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
}
.lp-footer-logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.1rem; font-weight: 800; color: var(--text);
}
.lp-footer-links { display: flex; gap: 20px; }
.lp-footer-links a { font-size: .85rem; color: var(--text3); transition: color .15s; }
.lp-footer-links a:hover { color: var(--orange); }
.lp-footer-copy { font-size: .78rem; color: var(--text3); }

/* ══════════════════════════════════════════════
   MODAL: PHONE FRAME REGISTRATION
══════════════════════════════════════════════ */
.form-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0);
    z-index: 300;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
    transition: background .25s;
}
.form-overlay.active {
    background: rgba(0,0,0,.7);
    pointer-events: all;
    backdrop-filter: blur(4px);
}
.form-modal {
    transform: scale(.88) translateY(30px);
    opacity: 0;
    transition: all .3s cubic-bezier(.34,1.56,.64,1);
}
.form-overlay.active .form-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Desktop: phone frame around form */
.modal-phone-frame {
    width: 340px;
    background: #1a1a1a;
    border-radius: 44px;
    padding: 16px 12px 24px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,.1),
        0 0 0 10px rgba(255,255,255,.03),
        0 40px 100px rgba(0,0,0,.8),
        inset 0 1px 0 rgba(255,255,255,.12);
    position: relative;
}
.modal-phone-notch {
    width: 100px; height: 28px;
    background: #0d0d0d;
    border-radius: 0 0 18px 18px;
    margin: 0 auto 12px;
}
.modal-phone-screen {
    background: #ffffff;
    border-radius: 28px;
    overflow: hidden;
    min-height: 560px;
    position: relative;
}
.modal-phone-home {
    width: 90px; height: 5px;
    background: rgba(255,255,255,.2);
    border-radius: 3px; margin: 12px auto 0;
}
.modal-close-btn {
    position: absolute; top: 12px; right: 14px;
    background: rgba(0,0,0,.06);
    border-radius: 50%; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; color: #555;
    transition: background .15s; z-index: 10;
}
.modal-close-btn:hover { background: rgba(0,0,0,.12); }

/* ── Registration inner ─────────────────────── */
.reg-inner {
    padding: 18px 20px 24px;
    display: flex; flex-direction: column;
    align-items: center; gap: 0;
    background: #ffffff;
    min-height: 560px;
}
.reg-logo {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 14px;
}
.reg-logo-name {
    font-size: 1.3rem; font-weight: 900;
    background: linear-gradient(90deg, var(--orange), var(--orange-l));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.reg-label-top {
    font-size: .7rem; font-weight: 700;
    color: var(--orange); letter-spacing: .08em;
    text-transform: uppercase; margin-bottom: 4px;
}
.reg-username-row {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 20px;
}
.reg-username {
    font-size: 1.35rem; font-weight: 900;
    color: var(--orange);
}
.reg-dice-btn {
    background: none; border: none; padding: 2px;
    transition: transform .15s;
}
.reg-dice-btn:active { transform: scale(.88) rotate(-20deg); }

.reg-gender-title {
    font-size: 1rem; font-weight: 800; color: var(--orange);
    margin-bottom: 14px; text-align: center;
}
.reg-gender-row {
    display: flex; gap: 20px;
    margin-bottom: 20px;
}
.reg-gender-btn {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: none; padding: 8px;
    border: 2px solid transparent; border-radius: 50%;
    transition: all .15s;
}
.reg-gender-avatar-img {
    width: 90px; height: 90px;
    border-radius: 50%;
    display: block;
    transition: transform .15s, box-shadow .15s;
}
.reg-gender-btn span {
    font-size: .8rem; font-weight: 600; color: #aaa;
    transition: color .15s;
}
.reg-gender-btn.active .reg-gender-avatar-img {
    transform: scale(1.06);
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.reg-gender-btn.active span { color: var(--orange); font-weight: 800; }

/* Terms */
.reg-terms-label {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: .78rem; color: #666; cursor: pointer;
    margin-bottom: 6px; line-height: 1.45;
}
.reg-terms-cb { display: none; }
.reg-terms-box {
    width: 20px; height: 20px; min-width: 20px;
    border: 2px solid #ccc; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    margin-top: 1px; transition: all .15s;
}
.reg-terms-cb:checked + .reg-terms-box {
    background: var(--red); border-color: var(--red);
}
.reg-terms-cb:checked + .reg-terms-box::after {
    content: '✓'; color: white; font-size: 12px; font-weight: 800;
}
.reg-terms-links {
    display: flex; gap: 6px; align-items: center;
    font-size: .74rem; padding-left: 28px; margin-bottom: 18px;
}
.reg-terms-links a { color: var(--orange); text-decoration: underline; }
.reg-terms-links span { color: #bbb; }

/* Login button */
.reg-login-btn {
    width: 100%;
    background: var(--orange); color: white;
    font-size: .95rem; font-weight: 800;
    padding: 15px; border-radius: 50px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .15s;
    box-shadow: 0 4px 16px rgba(240,112,48,.4);
    margin-bottom: 8px;
}
.reg-login-btn:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; }
.reg-login-btn:not(:disabled):active { transform: scale(.97); }
.reg-hint { font-size: .74rem; color: #aaa; text-align: center; }

/* ══════════════════════════════════════════════
   RESPONSIVE — TABLET
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .lp-hero { padding: 90px 40px 60px; gap: 40px; }
    .lp-features { padding: 80px 40px; }
    .lp-features-grid { grid-template-columns: repeat(2, 1fr); }
    .lp-how { padding: 60px 40px; }
    .lp-faq { padding: 80px 40px; }
}

@media (max-width: 860px) {
    .lp-hero { flex-direction: column; text-align: center; padding: 90px 24px 60px; min-height: auto; }
    .lp-hero-content { max-width: 100%; }
    .lp-btn-primary { align-self: center; }
    .lp-hero-trust { justify-content: center; }
    .lp-hero-phone { order: -1; }
    .phone-frame { width: 230px; }
    .phone-screen { height: 380px; }
    .lp-steps { gap: 10px; }
    .lp-step-arrow { display: none; }
    .lp-step { min-width: 140px; }
    .lp-features-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .lp-footer-inner { flex-direction: column; text-align: center; }
}

/* ══════════════════════════════════════════════
   MOBILE — full screen onboarding (≤ 640px)
══════════════════════════════════════════════ */
@media (max-width: 640px) {
    /* Hide desktop landing sections on mobile */
    .lp-hero,
    .lp-stats,
    .lp-features,
    .lp-how,
    .lp-faq,
    .lp-cta,
    .lp-footer,
    .lp-nav { display: none !important; }

    /* Full screen form on mobile */
    .form-overlay {
        position: static;
        background: none;
        pointer-events: all;
        display: block;
        height: 100vh;
        overflow-y: auto;
    }
    .form-overlay.active {
        background: none;
        backdrop-filter: none;
    }
    .form-modal {
        transform: none;
        opacity: 1;
        height: 100%;
    }
    .modal-phone-frame {
        width: 100%; min-height: 100vh;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        background: #ffffff;
    }
    .modal-phone-notch,
    .modal-phone-home { display: none; }
    .modal-phone-screen {
        border-radius: 0;
        min-height: 100vh;
        background: #ffffff;
    }
    .modal-close-btn { display: none; }
    .reg-inner {
        padding: 40px 24px 40px;
        min-height: 100vh;
    }
    .reg-username { font-size: 1.7rem; }
}

/* ══════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lp-hero-badge    { animation: fadeInUp .5s ease both; }
.lp-hero-title    { animation: fadeInUp .5s ease .1s both; }
.lp-hero-sub      { animation: fadeInUp .5s ease .2s both; }
.lp-hero-actions  { animation: fadeInUp .5s ease .3s both; }
.lp-hero-phone    { animation: fadeInUp .6s ease .2s both; }
