/* =========================================================
   NEXORA design system
   Think globally. Expand intelligently.
   ========================================================= */
:root {
  --white: #ffffff;
  --ivory: #faf8f5;
  --ember: #f26a21;
  --ember-deep: #d9561a;
  --ember-soft: #fdebdd;
  --violet: #7b61ff;
  --violet-soft: #eeeafe;
  --ink: #1e1e24;
  --slate: #6b6b76;
  --mist: #eceae6;
  --good: #2e9e6b;
  --good-soft: #e3f4ec;
  --warn: #b97f00;
  --warn-soft: #fbf1d6;
  --none: #8a8a94;
  --none-soft: #f0eff2;
  --danger: #c8412f;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(30, 30, 36, .04), 0 8px 28px rgba(30, 30, 36, .06);
  --shadow-lift: 0 2px 6px rgba(30, 30, 36, .06), 0 18px 48px rgba(30, 30, 36, .10);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); letter-spacing: -.02em; margin: 0; line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--slate); }
.small { font-size: .875rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ember);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 4px var(--ember-soft); }
.container { width: min(var(--max), 100% - 48px); margin-inline: auto; }
.section { padding: clamp(80px, 12vw, 140px) 0; position: relative; }
.section.alt { background: var(--ivory); }
.center { text-align: center; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--slate); max-width: 640px; }
.center .lead { margin-inline: auto; }
.grad { background: linear-gradient(100deg, var(--ember) 10%, var(--violet) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .98rem/1 var(--body); cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, border-color .25s, color .25s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ember); color: #fff; box-shadow: 0 6px 20px rgba(242, 106, 33, .28); }
.btn-primary:hover { background: var(--ember-deep); box-shadow: 0 10px 28px rgba(242, 106, 33, .34); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--mist); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-text { background: none; border: 0; padding: 0 6px; min-height: 40px; color: var(--slate); }
.btn-text:hover { color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--mist); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: .6rem; font: 800 1.14rem/1 var(--head); letter-spacing: .16em; }
.logo-mark { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 2rem; font-size: .94rem; color: var(--slate); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: .6rem; }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.menu-btn span { display: block; width: 20px; height: 1.5px; background: var(--ink); margin: 5px auto; transition: transform .3s var(--ease), opacity .3s; }
.mobile-menu { display: none; }
@media (max-width: 860px) {
  .nav-links, .nav-cta .btn-text { display: none; }
  .menu-btn { display: block; }
  .mobile-menu.open {
    display: flex; flex-direction: column; gap: 4px; padding: 12px 24px 24px; border-top: 1px solid var(--mist); background: #fff;
  }
  .mobile-menu a { padding: 12px 0; font: 600 1.1rem var(--head); border-bottom: 1px solid var(--mist); }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 110px) 0 clamp(70px, 10vw, 120px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { margin: 22px 0 22px; }
.hero .lead { margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 26px; font-size: .86rem; color: var(--slate); display: flex; gap: 18px; flex-wrap: wrap; }
.hero-note span::before { content: "✓"; color: var(--ember); margin-right: 6px; font-weight: 700; }
.globe-wrap { position: relative; aspect-ratio: 1; width: 100%; max-width: 520px; justify-self: center; }
.globe-wrap canvas { width: 100%; height: 100%; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .globe-wrap { max-width: 380px; order: -1; margin-bottom: -10px; }
}

/* ---------- Travelling orb ---------- */
.orb {
  position: fixed; z-index: 40; width: 46px; height: 46px; pointer-events: none;
  left: 0; top: 0; transform: translate3d(-100px, -100px, 0); will-change: transform; opacity: 0;
  transition: opacity .6s var(--ease);
}
.orb.ready { opacity: 1; }
.orb .core {
  position: absolute; inset: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd2b4 0%, var(--ember) 45%, #c94a12 100%);
  box-shadow: 0 0 18px 4px rgba(242, 106, 33, .45), 0 0 44px 12px rgba(123, 97, 255, .22);
  animation: orbPulse 3.2s ease-in-out infinite;
}
.orb .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(123, 97, 255, .45); transform: rotateX(68deg) rotateZ(0deg); animation: orbSpin 7s linear infinite; }
.orb .ring.r2 { inset: 4px; border-color: rgba(242, 106, 33, .45); animation-duration: 11s; animation-direction: reverse; transform: rotateY(64deg); }
.orb.busy .core { animation-duration: .9s; }
.orb.busy .ring { animation-duration: 1.8s; }
@keyframes orbPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes orbSpin { to { transform: rotateX(68deg) rotateZ(360deg); } }
.orb-trail { position: fixed; z-index: 39; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; background: var(--violet); opacity: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Cards / grids ---------- */
.card { background: #fff; border: 1px solid var(--mist); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.hover { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.card.hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: #e2ded8; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.icon-badge {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--ember-soft); color: var(--ember);
}
.icon-badge.v { background: var(--violet-soft); color: var(--violet); }
.icon-badge svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--slate); margin: 0; font-size: .96rem; }
.section-head { margin-bottom: 56px; }
.section-head h2 { margin: 16px 0 16px; }

/* ---------- Mini-check ---------- */
.minicheck { max-width: 880px; margin: 0 auto; padding: clamp(24px, 4vw, 44px); }
.mc-row { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: end; }
@media (max-width: 760px) { .mc-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .82rem; font-weight: 600; color: var(--slate); }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--mist); background: var(--ivory); outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
input.input, select.input { height: 50px; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--ember); background: #fff; box-shadow: 0 0 0 4px var(--ember-soft); }
.mc-result { margin-top: 28px; }
.mc-country { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--mist); }
.mc-rank { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 .95rem var(--head); background: var(--ember-soft); color: var(--ember); }

/* ---------- Steps ---------- */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.step { position: relative; padding-top: 58px; }
.step::before {
  counter-increment: s; content: "0" counter(s); position: absolute; top: 0; left: 0;
  font: 700 .85rem var(--head); color: var(--ember); width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--ember-soft); background: #fff;
}
.step::after { content: ""; position: absolute; top: 20px; left: 52px; right: -8px; height: 1px; background: linear-gradient(90deg, var(--ember-soft), transparent); }
.step:last-child::after { display: none; }
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--slate); font-size: .92rem; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } .step::after { display: none; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Audience strip ---------- */
.audience { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--mist); border-radius: var(--radius); overflow: hidden; background: #fff; }
.audience > div { padding: 28px; border-right: 1px solid var(--mist); }
.audience > div:last-child { border-right: 0; }
.audience strong { display: block; font: 700 1.05rem var(--head); margin-bottom: 4px; }
@media (max-width: 860px) { .audience { grid-template-columns: 1fr 1fr; } .audience > div:nth-child(2) { border-right: 0; } .audience > div:nth-child(-n+2) { border-bottom: 1px solid var(--mist); } }
@media (max-width: 520px) { .audience { grid-template-columns: 1fr; } .audience > div { border-right: 0; border-bottom: 1px solid var(--mist); } }

/* ---------- Pricing ---------- */
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--ember); box-shadow: 0 18px 50px rgba(242, 106, 33, .14); position: relative; }
.price-card.featured::before { content: "Most popular"; position: absolute; top: -12px; left: 28px; background: var(--ember); color: #fff; font: 600 .74rem var(--body); padding: 5px 12px; border-radius: 999px; }
.price { font: 700 2.4rem var(--head); margin: 14px 0 2px; letter-spacing: -.03em; }
.price small { font-size: .95rem; color: var(--slate); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 10px; font-size: .94rem; color: var(--slate); }
.price-card li::before { content: "—"; color: var(--ember); margin-right: 10px; }
.price-card .btn { margin-top: auto; }
.beta-note { margin: 0 auto 40px; max-width: 620px; padding: 14px 20px; border-radius: 999px; background: var(--violet-soft); color: #4b3bb0; font-size: .92rem; text-align: center; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--mist); padding: 22px 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; font: 600 1.08rem var(--head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ember); font-size: 1.4rem; line-height: 1; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 14px 0 0; color: var(--slate); }

/* ---------- CTA + footer ---------- */
.cta { text-align: center; padding: clamp(56px, 8vw, 96px) 24px; border-radius: 28px; background: radial-gradient(120% 140% at 50% 0%, #fff4ec 0%, #fff 55%), #fff; border: 1px solid var(--mist); position: relative; overflow: hidden; }
.cta h2 { margin: 0 auto 16px; max-width: 700px; }
.site-footer { border-top: 1px solid var(--mist); padding: 56px 0 40px; color: var(--slate); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font: 600 .82rem var(--body); color: var(--ink); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid a { display: block; padding: 4px 0; }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--mist); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Simple pages ---------- */
.page-hero { padding: clamp(60px, 9vw, 110px) 0 40px; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 18px 0 18px; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin: 2.2em 0 .6em; }
.prose p, .prose li { color: #3b3b44; }
.prose ul { padding-left: 1.2em; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 40px 20px; background: var(--ivory); }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 2rem; margin-bottom: 8px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--ivory); border-radius: 999px; margin: 24px 0; border: 1px solid var(--mist); }
.tabs button { flex: 1; border: 0; background: none; min-height: 40px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--slate); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.form { display: grid; gap: 16px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .92rem; }
.alert.err { background: #fbe9e6; color: var(--danger); }
.alert.ok { background: var(--good-soft); color: #1f7a52; }
.alert.info { background: var(--violet-soft); color: #4b3bb0; }

/* ---------- Status labels (honesty system) ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; font: 600 .7rem/1 var(--body); padding: 4px 8px; border-radius: 999px; white-space: nowrap; letter-spacing: .02em; vertical-align: middle; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.verified { background: var(--good-soft); color: var(--good); }
.tag.unverified { background: var(--warn-soft); color: var(--warn); }
.tag.no_data { background: var(--none-soft); color: var(--none); }
.tag.estimate { background: var(--violet-soft); color: var(--violet); }

/* ---------- Loading ---------- */
.thinking { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 48px 20px; text-align: center; color: var(--slate); }
.thinking .mini-orb { width: 64px; height: 64px; position: relative; }
.thinking .mini-orb .core { position: absolute; inset: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd2b4, var(--ember) 45%, #c94a12); box-shadow: 0 0 24px 6px rgba(242, 106, 33, .4), 0 0 50px 16px rgba(123, 97, 255, .2); animation: orbPulse .9s ease-in-out infinite; }
.thinking .mini-orb .ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(123, 97, 255, .5); animation: orbSpin 1.6s linear infinite; transform: rotateX(68deg); }
.thinking .mini-orb .ring.r2 { inset: 6px; border-color: rgba(242, 106, 33, .5); animation-direction: reverse; animation-duration: 2.4s; }
.thinking .msg { font-weight: 500; color: var(--ink); min-height: 1.6em; transition: opacity .4s; }

.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }
