:root {
  --bg: #f5f7fb;
  --bg-2: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f0f4fa;
  --line: #d9e2ef;
  --text: #152038;
  --muted: #5b6b86;
  --brand: #1b64f6;
  --brand-2: #4f7cff;
  --accent: #12b886;
  --danger: #e03140;
  --ok: #0ca678;
  --shadow: 0 18px 50px rgba(21, 32, 56, 0.08);
  --radius: 18px;
  --font: "Sora", "Segoe UI", sans-serif;
  --display: "Outfit", "Sora", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(27, 100, 246, 0.12), transparent 55%),
    radial-gradient(900px 480px at 92% 0%, rgba(18, 184, 134, 0.08), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 35%, var(--bg-2) 100%);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1140px, calc(100% - 2rem)); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.brand { display: flex; align-items: center; gap: .75rem; font-weight: 700; }
.brand img { height: 36px; width: auto; }
.nav-links { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: .92rem; }
.nav-links a:hover { color: var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 0; border-radius: 999px; padding: .78rem 1.2rem;
  font-weight: 600; font-family: inherit; cursor: pointer;
  transition: transform .2s ease, opacity .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white; box-shadow: 0 10px 28px rgba(27, 100, 246, .28);
}
.btn-ghost {
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
}
.btn-accent { background: var(--accent); color: #fff; }

.hero {
  padding: 4.5rem 0 3.5rem;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-kicker {
  display: inline-flex; gap: .5rem; align-items: center;
  color: var(--brand); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase;
  font-weight: 600;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.05; margin: .7rem 0 1rem; letter-spacing: -.03em;
  color: var(--text);
}
.hero p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 52ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-visual {
  position: relative; border-radius: 28px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  background: #e8eef8;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; min-height: 340px; }
.hero-badge {
  position: absolute; left: 1rem; bottom: 1rem;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--line);
  color: var(--text);
  padding: .7rem 1rem; border-radius: 14px; backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin: 1.5rem 0 3rem;
}
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem 1.3rem;
  box-shadow: 0 8px 24px rgba(21, 32, 56, 0.04);
}
.stat strong { display: block; font-size: 1.7rem; font-family: var(--display); color: var(--brand); }
.stat span { color: var(--muted); font-size: .9rem; }

.section { padding: 3.2rem 0; }
.section-head { margin-bottom: 1.6rem; max-width: 60ch; }
.section-head h2 {
  font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin: 0 0 .6rem; letter-spacing: -.02em;
}
.section-head p { color: var(--muted); margin: 0; line-height: 1.6; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem;
  box-shadow: 0 8px 24px rgba(21, 32, 56, 0.04);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  border-color: rgba(27, 100, 246, .35);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(27, 100, 246, 0.1);
}
.card h3 { margin: .2rem 0 .55rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); line-height: 1.6; font-size: .95rem; }
.card .price { margin-top: 1rem; font-weight: 700; color: var(--brand); }

.page-hero { padding: 3rem 0 1.5rem; }
.page-hero h1 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0 0 .6rem; }
.page-hero p { color: var(--muted); max-width: 60ch; }

.prose { color: var(--muted); line-height: 1.75; }
.prose h2, .prose h3 { color: var(--text); }
.content-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(21, 32, 56, 0.04);
}

.site-footer {
  margin-top: 4rem; border-top: 1px solid var(--line);
  padding: 2.5rem 0 2rem; color: var(--muted);
  background: #fff;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem;
}
.site-footer strong { color: var(--text); }
.site-footer a:hover { color: var(--brand); }
.footer-bottom { margin-top: 2rem; font-size: .85rem; opacity: .85; }

.flash {
  border-radius: 12px; padding: .85rem 1rem; margin: 1rem 0;
  border: 1px solid var(--line);
}
.flash-success { background: #e6fcf5; color: #087f5b; border-color: #96f2d7; }
.flash-error { background: #fff5f5; color: #c92a2a; border-color: #ffc9c9; }

.form { display: grid; gap: .9rem; max-width: 520px; }
.form label { display: grid; gap: .35rem; font-size: .9rem; color: var(--muted); }
.form input, .form textarea, .form select {
  width: 100%; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--text);
  padding: .85rem 1rem; font: inherit;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: 2px solid rgba(27, 100, 246, .25);
  border-color: var(--brand-2);
}
.form textarea { min-height: 120px; resize: vertical; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); text-align: left; font-size: .92rem; }
th { color: var(--muted); font-weight: 600; background: var(--surface-2); }
.badge {
  display: inline-flex; padding: .2rem .55rem; border-radius: 999px;
  font-size: .75rem; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text);
}
.badge-ok { color: #087f5b; background: #e6fcf5; border-color: #96f2d7; }
.badge-warn { color: #e67700; background: #fff9db; border-color: #ffe066; }

.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: var(--bg); }
.sidebar {
  border-right: 1px solid var(--line); background: #fff;
  padding: 1.4rem 1rem; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { margin-bottom: 1.5rem; padding: 0 .4rem; }
.sidebar nav { display: grid; gap: .35rem; }
.sidebar a {
  padding: .7rem .85rem; border-radius: 12px; color: var(--muted);
}
.sidebar a:hover, .sidebar a.active { background: var(--surface-2); color: var(--brand); }
.app-main { padding: 1.5rem; }
.app-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.4rem; gap: 1rem;
}
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
}
.auth-card {
  width: min(440px, 100%);
  background: #fff; border: 1px solid var(--line);
  border-radius: 24px; padding: 2rem; box-shadow: var(--shadow);
}
.auth-card h1 { font-family: var(--display); margin: .5rem 0 1rem; font-size: 1.7rem; }

/* Nav dropdowns */
.nav-item { position: relative; }
.nav-item > a { display: inline-flex; align-items: center; }
.nav-sub {
  display: none; position: absolute; top: calc(100% + .55rem); left: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: .45rem; box-shadow: var(--shadow); z-index: 60;
}
.nav-sub a {
  display: block; padding: .65rem .8rem; border-radius: 10px; color: var(--muted); font-size: .9rem;
}
.nav-sub a:hover { background: var(--surface-2); color: var(--brand); }
.nav-item:hover .nav-sub { display: block; }

/* Ecosystem tabs */
.eco-tabs { margin-top: .5rem; }
.eco-tablist {
  display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.2rem;
}
.eco-tab {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: .65rem 1.05rem; font: inherit; font-weight: 600; cursor: pointer;
}
.eco-tab.is-active, .eco-tab:hover {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; border-color: transparent;
}
.eco-panel { display: none; }
.eco-panel.is-active { display: block; }

.testimonial { max-width: 760px; }
.quote {
  font-size: 1.15rem; line-height: 1.7; color: var(--text); margin: 0 0 1.2rem;
}
.quote-meta { display: grid; gap: .15rem; }
.quote-meta span { color: var(--muted); font-size: .9rem; }

.client-row, .tech-row {
  display: flex; flex-wrap: wrap; gap: .7rem;
}
.client-chip, .tech-chip {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .65rem 1rem; color: var(--muted); font-weight: 600; font-size: .9rem;
}

@media (max-width: 900px) {
  .hero, .grid-3, .grid-2, .footer-grid, .stats, .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .nav { flex-wrap: wrap; min-height: auto; padding: .65rem 0; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    gap: .2rem; padding: .5rem 0 .75rem; border-top: 1px solid var(--line);
  }
  .nav-links.is-open { display: flex; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
    background: #fff; cursor: pointer; margin-left: auto;
  }
  .nav-item:hover .nav-sub { display: none; }
  .nav-item.is-open .nav-sub { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 .75rem; }
  .container { width: min(1140px, calc(100% - 1.25rem)); }
  .auth-card { padding: 1.4rem; border-radius: 18px; }
  .btn { width: auto; }
  .page-hero { padding: 1.5rem 0 1rem; }
  .page-hero h1 { font-size: 1.6rem; }
  .page-hero form { flex-direction: column !important; max-width: 100% !important; }
  .page-hero form .btn { width: 100%; }
  .card .btn { width: 100%; }
  #shop-suggest { right: 0 !important; }
}
@media (min-width: 901px) {
  .nav-toggle { display: none; }
}
