/*
  Rex API — landing page stylesheet.

  Public-facing marketing surface. Pure HTML/CSS, no Vue. Keep the file
  small and self-contained so the landing page paints fast even on
  slow networks (it's our "first impression" surface). Tokens here
  match the dashboard's so brand stays consistent if a user clicks
  through.
*/

/* ─────────────── Reset ─────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

/* ─────────────── Tokens ─────────────── */
:root {
  --bg-0: #07090c;
  --bg-1: #0c1018;
  --bg-2: #101720;
  --bg-3: #131d28;

  --b-1: rgba(255, 255, 255, 0.06);
  --b-2: rgba(255, 255, 255, 0.10);
  --b-3: rgba(255, 255, 255, 0.16);

  --fg:     #e7e9ea;
  --fg-mu:  #9aa6b1;
  --fg-dim: #6c7682;

  --accent:      #1d9bf0;
  --accent-2:    #1a8cd8;
  --accent-soft: rgba(29, 155, 240, 0.12);

  --ok:   #22c55e;
  --warn: #f59e0b;
  --err:  #ef4444;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;

  --maxw: 1080px;
}

html, body {
  background: var(--bg-0);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

code, pre, .mono { font-family: var(--font-mono); }

/* ─────────────── Buttons ─────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r);
  background: var(--bg-3);
  color: var(--fg);
  border: 1px solid var(--b-1);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}
.btn:hover { background: var(--bg-2); border-color: var(--b-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.lg { padding: 13px 24px; font-size: 15px; }

/* ─────────────── Top nav ─────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 9, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--b-1);
}

.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
  font-size: 17px;
}
.brand-name { font-weight: 600; font-size: 15px; }
.brand-ver { color: var(--fg-dim); font-size: 12px; margin-left: 4px; }

.top-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.top-nav a {
  color: var(--fg-mu);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
}
.top-nav a:hover { background: var(--bg-2); color: var(--fg); text-decoration: none; }
.top-nav .btn { padding: 7px 14px; font-size: 13px; }

/* ─────────────── Sections ─────────────── */
section { padding: 64px 24px; }
.section-inner { max-width: var(--maxw); margin: 0 auto; }

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
}

/* ─────────────── Hero ─────────────── */
.hero {
  padding: 88px 24px 56px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #b6c4d2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent) 0%, #5dbcff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--fg-mu);
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
.hero-ctas {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-mu);
  background: var(--bg-2);
  border: 1px solid var(--b-1);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-pill .dot {
  width: 6px; height: 6px;
  background: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

/* ─────────────── Feature grid ─────────────── */
.features h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.features .lede {
  color: var(--fg-mu);
  margin-bottom: 32px;
  max-width: 600px;
}
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.feat {
  background: var(--bg-2);
  border: 1px solid var(--b-1);
  border-radius: var(--r-lg);
  padding: 22px;
  transition: border-color 120ms ease, transform 120ms ease;
}
.feat:hover { border-color: var(--b-2); transform: translateY(-2px); }
.feat-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  font-family: var(--font-mono);
}
.feat h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.feat p {
  color: var(--fg-mu);
  font-size: 14px;
  line-height: 1.55;
}
.feat .endpoints {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--b-1);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.feat .endpoints code {
  font-size: 11.5px;
  background: var(--bg-3);
  color: var(--fg-mu);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid var(--b-1);
}

/* ─────────────── Tier table ─────────────── */
.tiers {
  background:
    radial-gradient(circle at 50% 0%, rgba(29, 155, 240, 0.06), transparent 60%),
    var(--bg-0);
}
.tiers h2 {
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.tiers .lede {
  color: var(--fg-mu);
  text-align: center;
  margin-bottom: 36px;
}
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
.tier {
  background: var(--bg-2);
  border: 1px solid var(--b-1);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
}
.tier.recommended {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(29, 155, 240, 0.08) 0%, var(--bg-2) 60%);
}
.tier-badge {
  position: absolute;
  top: -10px;
  right: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tier h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-mu);
  margin-bottom: 10px;
}
.tier .quota {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.tier .quota .num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.tier .quota .unit { color: var(--fg-mu); font-size: 14px; }
.tier .desc { color: var(--fg-mu); font-size: 13.5px; margin-bottom: 16px; }
.tier ul { list-style: none; padding: 0; margin: 0 0 18px; }
.tier li {
  font-size: 13px;
  color: var(--fg-mu);
  padding: 6px 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.tier li::before {
  content: '✓';
  color: var(--ok);
  font-weight: 700;
}

/* ─────────────── Footer ─────────────── */
footer {
  border-top: 1px solid var(--b-1);
  padding: 28px 24px;
  text-align: center;
}
.foot-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.foot-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.foot-links a { color: var(--fg-mu); font-size: 13px; }
.foot-meta { color: var(--fg-dim); font-size: 12px; }

/* Mobile tweaks */
@media (max-width: 640px) {
  section { padding: 48px 20px; }
  .hero { padding: 56px 20px 40px; }
  .top-nav a { display: none; }
  .top-nav .btn { display: inline-flex; }
}
