/* ============================================================
   Geo Guesser - shared styles
   Deep navy base, emerald / sky / amber accents, Nunito.
   ============================================================ */

:root {
    --bg:        #0B1220;
    --bg-raise:  #101A2E;
    --panel:     rgba(255, 255, 255, 0.04);
    --panel-2:   rgba(255, 255, 255, 0.07);
    --line:      rgba(255, 255, 255, 0.09);
    --text:      #E7EDF6;
    --muted:     #97A5BB;
    --emerald:   #10B981;
    --sky:       #3B82F6;
    --amber:     #F59E0B;
    --radius:    18px;
    --font:      'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { max-width: 100%; }

a { color: var(--sky); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--emerald);
    color: #06281d;
    padding: 0.5rem 1rem;
    border-radius: 0 0 10px 0;
    font-weight: 700;
    z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Nav ---------- */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 18, 32, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 900;
    font-size: 1.15rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.brand-pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(59, 130, 246, 0.25));
    border: 1px solid var(--line);
}

.nav-links { display: flex; gap: 1.4rem; }

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.15s ease;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* ---------- Shared building blocks ---------- */

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 5rem 0; }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }

.section-head h2 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.section-head p { color: var(--muted); margin-top: 0.75rem; font-size: 1.05rem; }

.grad {
    background: linear-gradient(100deg, var(--emerald) 10%, var(--sky) 55%, var(--amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--emerald);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.18);
    background: var(--panel-2);
}

/* App Store "coming soon" badge */

.appstore-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 0.6rem 1.15rem;
    color: #fff;
    text-align: left;
    cursor: default;
}

.appstore-badge .apple { font-size: 1.7rem; line-height: 1; }

.appstore-badge .lines { display: flex; flex-direction: column; line-height: 1.2; }

.appstore-badge .small { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; opacity: 0.85; }

.appstore-badge .big { font-size: 1.05rem; font-weight: 800; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    text-align: center;
    padding: 6.5rem 1.5rem 4rem;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    pointer-events: none;
}

.hero-glow.g1 { width: 480px; height: 480px; background: var(--emerald); top: -220px; left: -140px; }
.hero-glow.g2 { width: 420px; height: 420px; background: var(--sky); top: -120px; right: -160px; }
.hero-glow.g3 { width: 300px; height: 300px; background: var(--amber); bottom: -220px; left: 45%; opacity: 0.18; }

.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }

.hero h1 {
    margin-top: 1.4rem;
    font-size: clamp(2.5rem, 7vw, 4.3rem);
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -0.03em;
}

.hero .sub {
    color: var(--muted);
    font-size: clamp(1.05rem, 2.4vw, 1.25rem);
    max-width: 560px;
    margin: 1.4rem auto 0;
}

.hero-cta {
    margin-top: 2.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.hero-cta .hint { color: var(--muted); font-size: 0.85rem; font-weight: 600; }

/* ---------- Globe teaser ---------- */

.teaser { position: relative; }

.globe-card {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(16, 26, 46, 0.9), rgba(11, 18, 32, 0.95));
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 2.5rem 1.5rem;
    overflow: hidden;
}

.globe-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
}

.globe {
    position: relative;
    width: min(300px, 68vw);
    height: min(300px, 68vw);
    margin: 0 auto;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.18), transparent 42%),
        radial-gradient(circle at 50% 50%, #14532d 0%, transparent 34%),
        radial-gradient(circle at 74% 62%, #166534 0%, transparent 26%),
        radial-gradient(circle at 24% 66%, #15803d 0%, transparent 22%),
        radial-gradient(circle at 60% 22%, #16a34a 0%, transparent 20%),
        radial-gradient(circle at 50% 45%, #1d4ed8 0%, #1e3a8a 62%, #172554 100%);
    box-shadow:
        inset -22px -18px 50px rgba(2, 6, 23, 0.75),
        0 0 60px rgba(59, 130, 246, 0.25),
        0 24px 60px rgba(2, 6, 23, 0.6);
}

/* latitude / longitude lines */
.globe::before,
.globe::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}

.globe::before {
    background:
        linear-gradient(transparent 24%, rgba(255, 255, 255, 0.10) 24.6%, transparent 25.2%),
        linear-gradient(transparent 49%, rgba(255, 255, 255, 0.12) 49.6%, transparent 50.2%),
        linear-gradient(transparent 74%, rgba(255, 255, 255, 0.10) 74.6%, transparent 75.2%);
}

.globe::after {
    background:
        radial-gradient(ellipse 34% 50% at 50% 50%, transparent 96%, rgba(255, 255, 255, 0.12) 97%, transparent 99%),
        radial-gradient(ellipse 68% 50% at 50% 50%, transparent 96%, rgba(255, 255, 255, 0.10) 97%, transparent 99%);
}

/* floating pins on the globe */
.pin {
    position: absolute;
    font-size: 1.45rem;
    line-height: 1;
    transform: translate(-50%, -100%);
    animation: pin-bob 3.2s ease-in-out infinite;
    filter: drop-shadow(0 4px 6px rgba(2, 6, 23, 0.6));
    z-index: 2;
}

.pin .ring {
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 26px;
    height: 10px;
    transform: translateX(-50%);
    border-radius: 50%;
    border: 2px solid rgba(245, 158, 11, 0.65);
    animation: pin-ring 2.6s ease-out infinite;
}

.pin.p1 { top: 30%; left: 30%; }
.pin.p2 { top: 46%; left: 68%; animation-delay: 0.7s; }
.pin.p2 .ring { border-color: rgba(16, 185, 129, 0.65); animation-delay: 0.7s; }
.pin.p3 { top: 68%; left: 44%; animation-delay: 1.4s; }
.pin.p3 .ring { border-color: rgba(59, 130, 246, 0.7); animation-delay: 1.4s; }

@keyframes pin-bob {
    0%, 100% { transform: translate(-50%, -100%); }
    50%      { transform: translate(-50%, calc(-100% - 9px)); }
}

@keyframes pin-ring {
    0%   { opacity: 0.9; transform: translateX(-50%) scale(0.4); }
    100% { opacity: 0;   transform: translateX(-50%) scale(1.6); }
}

.globe-stats {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 2.2rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    font-weight: 800;
    font-size: 0.9rem;
}

.chip b { font-weight: 900; }
.chip.c-em b { color: var(--emerald); }
.chip.c-sky b { color: var(--sky); }
.chip.c-am b { color: var(--amber); }

/* ---------- Landmark flip cards (pure CSS, checkbox hack) ---------- */

.flip-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    max-width: 860px;
    margin: 2.5rem auto 0;
}

.flip { perspective: 900px; }

.flip input { position: absolute; opacity: 0; pointer-events: none; }

.flip label {
    position: relative;
    display: block;
    height: 170px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.flip input:checked + label { transform: rotateY(180deg); }

.flip input:focus-visible + label { outline: 2px solid var(--sky); outline-offset: 4px; border-radius: var(--radius); }

.flip .face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    padding: 1rem;
    text-align: center;
}

.flip .front { background: var(--panel-2); }

.flip .front .emoji { font-size: 2.6rem; line-height: 1; }

.flip .front .q { font-weight: 800; color: var(--muted); font-size: 0.9rem; }

.flip .back {
    transform: rotateY(180deg);
    background: linear-gradient(150deg, rgba(16, 185, 129, 0.16), rgba(59, 130, 246, 0.16));
}

.flip .back .place { font-weight: 900; font-size: 1.1rem; }

.flip .back .pts { color: var(--amber); font-weight: 800; font-size: 0.9rem; }

/* ---------- Features grid ---------- */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.feature .ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 1.6rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(59, 130, 246, 0.18));
    border: 1px solid var(--line);
}

.feature h3 { margin: 1rem 0 0.4rem; font-size: 1.15rem; font-weight: 800; }

.feature p { color: var(--muted); font-size: 0.97rem; }

/* ---------- How it works ---------- */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    counter-reset: step;
}

.step { position: relative; padding-top: 2.2rem; }

.step .num {
    position: absolute;
    top: -22px;
    left: 1.6rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 900;
    font-size: 1.15rem;
    color: #06281d;
    background: linear-gradient(135deg, var(--emerald), var(--sky));
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

.step:nth-child(2) .num { background: linear-gradient(135deg, var(--sky), var(--emerald)); color: #0b1a3a; }
.step:nth-child(3) .num { background: linear-gradient(135deg, var(--amber), var(--emerald)); color: #3a2503; }

.step h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 0.4rem; }

.step p { color: var(--muted); font-size: 0.97rem; }

/* ---------- CTA band ---------- */

.cta-band {
    text-align: center;
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.12));
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 3.5rem 1.5rem;
}

.cta-band h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 900; letter-spacing: -0.02em; }

.cta-band p { color: var(--muted); margin: 0.7rem auto 1.8rem; max-width: 480px; }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* Without JS the observer never fires: keep everything visible. */
@media (scripting: none) {
    .reveal { opacity: 1; transform: none; }
}

/* ---------- FAQ accordion (native details) ---------- */

.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 0.8rem; }

.faq {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq[open] { border-color: rgba(16, 185, 129, 0.4); }

.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 1.1rem 1.3rem;
    font-weight: 800;
    font-size: 1.02rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "+";
    flex: none;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--emerald);
    font-weight: 900;
    transition: transform 0.25s ease;
}

.faq[open] summary::after { content: "\2212"; transform: rotate(180deg); }

.faq .faq-body { padding: 0 1.3rem 1.2rem; color: var(--muted); font-size: 0.98rem; }

.faq .faq-body a { color: var(--emerald); }

/* ---------- Forms ---------- */

.form-card { max-width: 640px; margin: 0 auto; }

.form-grid { display: grid; gap: 1rem; }

.form-row-2 { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }

@media (max-width: 560px) { .form-row-2 { grid-template-columns: 1fr; } }

.field label { display: block; font-weight: 800; font-size: 0.9rem; margin-bottom: 0.35rem; }

.field input,
.field textarea {
    width: 100%;
    font-family: var(--font);
    font-size: 1rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.field textarea { min-height: 140px; resize: vertical; }

/* honeypot: hide from humans, keep in the accessibility-invisible DOM for bots */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.7rem;
    border-radius: 12px;
    border: none;
    font-family: var(--font);
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
    color: #04241a;
    background: linear-gradient(135deg, var(--emerald), var(--sky));
    box-shadow: 0 10px 26px rgba(16, 185, 129, 0.3);
}

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

.btn-primary[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.btn-ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.form-status {
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.form-status.ok {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

.form-status.err {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

/* ---------- Legal / prose pages ---------- */

.page-head { text-align: center; padding: 4.5rem 1.5rem 1rem; }

.page-head h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.page-head .meta { color: var(--muted); margin-top: 0.6rem; font-weight: 600; }

.prose { max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem 5rem; }

.prose h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 2.2rem 0 0.7rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

.prose h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }

.prose p, .prose li { color: #C4CEDC; font-size: 1rem; }

.prose p { margin-bottom: 0.9rem; }

.prose ul { margin: 0 0 1rem 1.3rem; }

.prose li { margin-bottom: 0.4rem; }

.prose a { color: var(--emerald); }

.prose .lead { font-size: 1.1rem; color: var(--text); }

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    padding: 3rem 1.5rem 2rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.footer-brand { font-weight: 900; font-size: 1.05rem; }

.footer-tag { color: var(--muted); font-weight: 600; font-size: 0.9rem; margin-top: 0.3rem; }

.footer-links { display: flex; gap: 1.5rem; }

.footer-links a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.95rem; }

.footer-links a:hover { color: var(--text); }

.footer-copy {
    max-width: 1100px;
    margin: 2rem auto 0;
    color: #64748B;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .reveal { opacity: 1; transform: none; }
    .pin, .pin .ring { animation: none; }
    .pin .ring { opacity: 0.5; }
    [data-parallax] { transform: none !important; }
}

/* ==== Leaderboard ==== */
.lb-tabs { display: flex; gap: 0.6rem; justify-content: center; margin: 0 0 1.8rem; flex-wrap: wrap; }
.lb-tab { padding: 0.55rem 1.3rem; border-radius: 999px; background: var(--panel); color: var(--muted); text-decoration: none; font-weight: 800; border: 1.5px solid var(--line); transition: transform 0.15s ease, background 0.2s ease; }
.lb-tab:hover { transform: translateY(-2px); color: var(--text); }
.lb-tab.active { background: var(--emerald); color: #06281d; border-color: transparent; }
.lb-list { list-style: none; margin: 0 auto; padding: 0; max-width: 560px; display: flex; flex-direction: column; gap: 0.6rem; }
.lb-row { display: flex; align-items: center; gap: 0.9rem; background: var(--panel); border: 1.5px solid var(--line); border-radius: 16px; padding: 0.8rem 1.1rem; }
.lb-rank { min-width: 2.2rem; text-align: center; font-weight: 900; color: var(--muted); font-size: 1.1rem; }
.lb-avatar { font-size: 1.5rem; }
.lb-name { flex: 1; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-weight: 900; color: var(--amber); font-variant-numeric: tabular-nums; }
.lb-empty { max-width: 560px; margin: 0 auto; text-align: center; padding: 2.4rem 1.6rem; }
.lb-empty .ico { font-size: 2.2rem; display: block; margin-bottom: 0.6rem; }
