:root {
  --orange: #FF6B35;
  --orange-dark: #E55A2B;
  --purple: #7C3AED;
  --purple-dark: #5B21B6;
  --purple-soft: #F5F3FF;
  --grad: linear-gradient(135deg, #FF6B35 0%, #F97316 35%, #A855F7 70%, #7C3AED 100%);
  --grad-btn: linear-gradient(135deg, #FF6B35 0%, #7C3AED 100%);
  --ink: #1A202C;
  --slate: #2D3748;
  --muted: #718096;
  --line: #E2E8F0;
  --bg: #F8F7FC;
  --white: #FFFFFF;
  --green: #38A169;
  --accent: var(--purple);
  --accent-soft: var(--purple-soft);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--purple); text-decoration: none; }
.wrap { width: min(1120px, 92%); margin: 0 auto; }

/* NAV */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .75rem 0;
}
.brand {
  font-weight: 800; font-size: 1.15rem; color: var(--ink);
  display: flex; align-items: center; gap: .55rem;
}
.brand img.logo {
  height: 42px; width: auto; max-width: 160px; object-fit: contain; display: block;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad);
  display: grid; place-items: center; color: #fff; font-size: .9rem; font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--purple); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-btn); color: #fff !important; border: 0;
  padding: .7rem 1.15rem; border-radius: 10px; font-weight: 700;
  cursor: pointer; transition: .15s ease; box-shadow: 0 8px 20px rgba(124,58,237,.22);
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn.ghost {
  background: transparent; color: var(--ink) !important;
  border: 1px solid var(--line); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--purple); color: var(--purple) !important; }
.btn.block { width: 100%; }

/* HERO */
.hero {
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(900px 420px at 90% 0%, rgba(124,58,237,.18), transparent 55%),
    radial-gradient(700px 380px at 0% 40%, rgba(255,107,53,.16), transparent 50%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}
.hero-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .nav-links .hide-sm { display: none; }
}
.eyebrow {
  display: inline-block;
  background: linear-gradient(90deg, #FFF5F0, #F5F3FF);
  color: var(--purple-dark);
  padding: .35rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
  margin-bottom: 1rem; border: 1px solid #E9D5FF;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.35rem);
  line-height: 1.08; margin: 0 0 1rem; letter-spacing: -.02em;
}
.hero h1 span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy p { color: var(--muted); font-size: 1.08rem; max-width: 36rem; margin: 0 0 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 1.25rem; box-shadow: 0 18px 40px rgba(91,33,182,.08);
}
.hero-card h3 { margin: 0 0 .75rem; font-size: 1rem; }
.hero-logo {
  display: flex; justify-content: center; margin-bottom: 1rem;
}
.hero-logo img {
  height: 72px; width: auto; max-width: 100%; object-fit: contain;
}
.mini-stat { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.mini-stat:last-child { border-bottom: 0; }
.mini-stat span { color: var(--muted); }
.mini-stat strong { color: var(--ink); }

/* SECTIONS */
.section { padding: 3.5rem 0; }
.section.alt { background: #fff; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2rem; }
.section-head h2 { margin: 0 0 .5rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { margin: 0; color: var(--muted); }

/* CALCULATOR */
.calc {
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  padding: 1.5rem; box-shadow: 0 12px 30px rgba(91,33,182,.06);
  display: grid; gap: 1.25rem; grid-template-columns: 1.2fr .8fr;
}
@media (max-width: 800px) { .calc { grid-template-columns: 1fr; } }
.calc label { display: block; font-weight: 600; margin-bottom: .5rem; }
input[type=range] { width: 100%; accent-color: var(--purple); }
.calc-out {
  background: var(--grad);
  color: #fff; border-radius: 18px; padding: 1.25rem;
}
.calc-out .big { font-size: 2rem; font-weight: 800; margin: .2rem 0 .6rem; }
.calc-meta { display: flex; justify-content: space-between; opacity: .95; font-size: .92rem; }

/* FEATURES */
.features {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem;
}
.feature .icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #FFF5F0, #F5F3FF); color: var(--purple); font-weight: 800; margin-bottom: .8rem;
}
.feature h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

/* STATS */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem;
}
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat {
  text-align: center;
  background: linear-gradient(180deg, #FFF7F2, #F5F3FF);
  border-radius: 16px; padding: 1.1rem; border: 1px solid #EDE9FE;
}
.stat strong {
  display: block; font-size: 1.7rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--muted); font-size: .9rem; }

/* PRICING */
.plans {
  display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem;
  position: relative;
}
.plan.popular {
  border-color: transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--grad) border-box;
  border: 2px solid transparent;
  box-shadow: 0 16px 36px rgba(124,58,237,.16);
  transform: translateY(-4px);
}
.badge {
  position: absolute; top: -10px; right: 16px;
  background: var(--grad); color: #fff; font-size: .72rem; font-weight: 700;
  padding: .25rem .55rem; border-radius: 999px;
}
.plan h3 { margin: 0; }
.plan .tag { color: var(--muted); font-size: .9rem; margin: .25rem 0 1rem; }
.price { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; }
.price small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.plan li {
  padding: .45rem 0 .45rem 1.3rem; position: relative; color: var(--slate); font-size: .94rem;
}
.plan li::before {
  content: "✓"; position: absolute; left: 0; color: var(--purple); font-weight: 800;
}

/* CTA */
.cta {
  background: linear-gradient(135deg, #5B21B6 0%, #7C3AED 45%, #FF6B35 100%);
  color: #fff; border-radius: 24px; padding: 2.2rem; text-align: center;
}
.cta h2 { margin: 0 0 .5rem; }
.cta p { margin: 0 0 1.2rem; color: rgba(255,255,255,.9); }
.cta .btn { background: #fff; color: var(--purple-dark) !important; box-shadow: none; }

/* FOOTER */
.footer {
  padding: 2rem 0 2.5rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 1rem;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: .75rem; }
.footer-brand img { height: 36px; width: auto; }

/* AUTH / APP (shared) */
.auth-body {
  min-height: 100vh; display: grid; place-items: center; padding: 2rem;
  background:
    radial-gradient(700px 360px at 95% 0%, rgba(124,58,237,.18), transparent 55%),
    radial-gradient(600px 320px at 0% 100%, rgba(255,107,53,.14), transparent 50%),
    var(--bg);
}
.auth-body .card, .card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.35rem;
  box-shadow: 0 12px 28px rgba(91,33,182,.07);
}
.auth-body .card { width: min(460px, 100%); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 1rem; }
.auth-logo img { height: 56px; width: auto; object-fit: contain; }
label { display: block; margin: .75rem 0; color: var(--muted); font-size: .92rem; font-weight: 600; }
input, textarea, select {
  width: 100%; margin-top: .35rem; padding: .75rem .85rem; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(124,58,237,.25); border-color: var(--purple);
}
.alert { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; }
.alert.error { background: #FFF5F5; color: #C53030; }
.alert.success { background: #F0FFF4; color: #276749; }
.muted { color: var(--muted); }
.pre {
  background: #1A202C; color: #E2E8F0; border-radius: 12px;
  padding: 1rem; overflow: auto; font-size: .85rem;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .65rem .4rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.25rem 0; }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }
code { background: #EDE9FE; padding: .1rem .35rem; border-radius: 6px; color: var(--purple-dark); }

/* API DOCS (texin-style) */
.docs-hero {
  padding: 3rem 0 2.5rem;
  background: var(--grad);
  color: #fff;
}
.docs-hero h1 { margin: .5rem 0 0.75rem; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.docs-hero p { margin: 0; max-width: 44rem; color: rgba(255,255,255,.92); }
.docs-hero .eyebrow {
  background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.25);
}
.docs-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.docs-hero .btn.ghost {
  border-color: rgba(255,255,255,.45); color: #fff !important; background: transparent;
}
.docs-hero .btn.ghost:hover { background: rgba(255,255,255,.12); color: #fff !important; }
.docs-layout {
  display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem;
  padding: 2rem 0 3rem; align-items: start;
}
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-side { position: static !important; }
}
.docs-side { position: sticky; top: 80px; display: grid; gap: 1rem; }
.docs-side-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem;
  display: grid; gap: .45rem;
}
.docs-side-card a { color: var(--muted); font-size: .92rem; }
.docs-side-card a:hover { color: var(--purple); }
.api-key-box {
  display: block; word-break: break-all; background: #1A202C; color: #E9D5FF;
  padding: .7rem; border-radius: 10px; font-size: .78rem; margin-top: .4rem;
}
.docs-main { display: grid; gap: 1rem; }
.docs-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.35rem 1.4rem;
  box-shadow: 0 8px 22px rgba(91,33,182,.05);
}
.docs-card h2 { margin: 0 0 .75rem; font-size: 1.35rem; }
.docs-card h3 { margin: 1.2rem 0 .55rem; font-size: 1.02rem; }
.docs-card p { color: var(--slate); }
.tip {
  background: linear-gradient(90deg, #FFF7F2, #F5F3FF);
  border-left: 4px solid var(--purple);
  padding: .85rem 1rem; border-radius: 0 12px 12px 0; margin-top: .85rem;
}
.endpoint-title { display: flex; align-items: center; gap: .6rem; margin: .75rem 0 1rem; }
.method-post {
  background: #10b981; color: #fff; font-weight: 800; font-size: .75rem;
  padding: .28rem .55rem; border-radius: 6px; letter-spacing: .03em;
}
.endpoint-list { display: grid; gap: .55rem; }
.endpoint-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center;
  padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 12px; color: inherit;
}
.endpoint-row:hover { border-color: #C4B5FD; background: #FAF5FF; }
.endpoint-row span:last-child { color: var(--muted); font-size: .9rem; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.param-table { margin: 0; }
.param-table th {
  background: #F8F7FC; font-weight: 700; padding: .7rem .75rem; border-bottom: 1px solid var(--line);
}
.param-table td { padding: .7rem .75rem; vertical-align: top; }
.req { color: #DC2626; font-weight: 700; }
.opt { color: var(--muted); }
.faq-item { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { margin: 0 0 .35rem; font-size: 1rem; }
.faq-item p { margin: 0; }

