/* ─── Design Tokens ─── */
:root {
  --bg: #0a0a0f;
  --bg-surface: #141420;
  --bg-card: #1a1a2e;
  --border: #1e1e30;
  --border-light: #2a2a40;
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --text-dim: #555570;
  --accent: oklch(0.65 0.18 255);
  --accent-hover: oklch(0.72 0.18 255);
  --accent-cyan: oklch(0.7 0.15 200);
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1100px;
  --section-gap: 6rem;
  color-scheme: dark;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* ─── Layout ─── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.section__label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section__subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.6;
}

/* ─── Nav ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__brand:hover { color: var(--text); }

.nav__brand-icon {
  width: 28px;
  height: 28px;
  background: var(--gradient);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.nav__links {
  display: none;
  list-style: none;
  gap: 2rem;
}

.nav__link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav__link:hover { color: var(--text); }

.nav__cta {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nav__cta:hover { opacity: 0.9; color: #fff; }

@media (min-width: 768px) {
  .nav__links { display: flex; }
}

/* ─── Hero ─── */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, oklch(0.35 0.12 255 / 0.3), transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero__title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero__title-accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--gradient);
  color: #fff;
}

.btn--primary:hover { opacity: 0.9; color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Problem ─── */
.problems {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.problem-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.problem-card__icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.problem-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.problem-card__text {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .problems { grid-template-columns: repeat(3, 1fr); }
}

/* ─── How It Works ─── */
.steps {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

.step {
  text-align: center;
  padding: 2rem 1.5rem;
}

.step__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.step__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.step__text {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Screenshots / Demo ─── */
.demo-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.browser-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.browser-frame__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.browser-frame__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-light);
}

.browser-frame__url {
  margin-left: 12px;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: monospace;
}

.browser-frame__img {
  display: block;
  width: 100%;
}

.browser-frame__caption {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .demo-grid { grid-template-columns: repeat(2, 1fr); }
  .demo-grid .browser-frame:first-child { grid-column: 1 / -1; }
}

/* ─── Pricing / Tiers ─── */
.tiers {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.tier {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.tier--featured {
  border-color: var(--accent);
  position: relative;
}

.tier--featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 2rem;
  background: var(--gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.tier__name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tier__price {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.tier__price-note {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.tier__desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.tier__features {
  list-style: none;
  margin-bottom: 2rem;
  flex: 1;
}

.tier__feature {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.375rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.tier__feature::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.tier__cta {
  width: 100%;
  text-align: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .tiers { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Audience ─── */
.audience-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.audience-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.audience-item__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.audience-item__title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.audience-item__text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .audience-list { grid-template-columns: repeat(2, 1fr); }
}

/* ─── About ─── */
.about__content {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.about__text {
  color: var(--text-muted);
  line-height: 1.7;
}

.about__text p + p { margin-top: 1rem; }

.about__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  text-align: center;
}

.stat__number {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

@media (min-width: 768px) {
  .about__content { grid-template-columns: 1.5fr 1fr; align-items: start; }
  .about__stats { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Contact ─── */
.contact-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.contact__inner {
  display: grid;
  gap: 3rem;
  margin-top: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.375rem; }

.form-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea { min-height: 120px; resize: vertical; }

.form-group select option { background: var(--bg); }

.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }

.contact-info__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.contact-info__icon { font-size: 1.25rem; }

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success--visible { display: block; }

.form-success__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-success__text {
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .contact__inner { grid-template-columns: 1.5fr 1fr; }
}

/* ─── Footer ─── */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* ─── Page Header (non-home pages) ─── */
.page-header {
  padding-top: calc(64px + var(--section-gap));
  padding-bottom: var(--section-gap);
  text-align: center;
}

.page-header .section__title {
  margin-left: auto;
  margin-right: auto;
}

.page-header .section__subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ─── Nav Active State ─── */
.nav__link--active {
  color: var(--text);
  position: relative;
}

.nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
}

/* ─── Solution Cards ─── */
.solutions-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.solution-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.solution-card__icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.solution-card__name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.solution-card__text {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  flex: 1;
}

.solution-card__link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.solution-card__badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--border-light);
  color: var(--text-muted);
  margin-left: 0.5rem;
  vertical-align: middle;
}

@media (min-width: 768px) {
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Open Source Grid ─── */
.oss-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.oss-header__stat {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.oss-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.oss-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color 0.2s;
}

.oss-card:hover {
  border-color: var(--accent);
}

.oss-card__info { flex: 1; min-width: 0; }

.oss-card__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.oss-card__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.oss-card__stars {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-cyan);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .oss-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .oss-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ─── FAQ ─── */
.faq-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem 2rem;
}

.faq-item__q {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.faq-item__a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ─── Pricing Detail Additions ─── */
.pricing-intro {
  max-width: 640px;
  margin: 2rem auto 0;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── Explore Cards (Home page bottom) ─── */
.explore-cards {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.explore-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-decoration: none;
  transition: border-color 0.2s;
  display: block;
}

.explore-card:hover {
  border-color: var(--accent);
}

.explore-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.explore-card__text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (min-width: 768px) {
  .explore-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Contact Page Layout ─── */
.contact-page {
  display: grid;
  gap: 3rem;
  margin-top: 2rem;
}

.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-sidebar__about h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.contact-sidebar__about p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.contact-sidebar__about p + p { margin-top: 0.75rem; }

@media (min-width: 768px) {
  .contact-page { grid-template-columns: 1.5fr 1fr; }
}

/* ─── CTA Banner ─── */
.cta-banner {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 2.5rem;
}

.cta-banner__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta-banner__text {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Utilities ─── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
