/* ===== Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #060817;
  --bg-alt: #060817;
  --card: rgba(15, 23, 42, 0.9);
  --border-subtle: rgba(148, 163, 184, 0.2);
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.2);
  --accent-gradient: linear-gradient(135deg, #4f46e5, #22c55e);
  --text: #e5e7eb;
  --text-soft: #bec2d1;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --shadow-soft: 0 22px 50px rgba(15, 23, 42, 0.6);
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    sans-serif;
  background: radial-gradient(circle at top, #060817 0, #060817 45%, #060817 100%);
  color: var(--text);
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4.5rem 0;
}

.section--alt {
  background: radial-gradient(circle at top left, #020617, #020617 45%);
}

.section__title {
  font-size: clamp(1.5rem, 2.4vw, 1.5rem);
  text-align: center;
  margin: 0 0 2rem;
}

.section__subtitle {
  text-align: center;
  margin: 0 0 2.5rem;
  color: var(--text-soft);
  font-size: 0.98rem;
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.9), transparent);
  border-bottom: 1px solid rgba(15, 23, 42, 0.8);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav__logo {
  height: 26px;
  width: auto;
}

.nav__brand-text {
  font-size: 1rem;
}

.nav__links {
  display: flex;
  gap: 1.4rem;
  font-size: 0.9rem;
}

.nav__links a {
  color: var(--text-soft);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width 0.18s ease-out;
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.nav__toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease,
    border-color 0.12s ease, color 0.12s ease;
}

.btn--primary {
  background-image: var(--accent-gradient);
  color: #f9fafb;
  box-shadow: 0 16px 35px rgba(88, 80, 236, 0.45);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(88, 80, 236, 0.65);
}

.btn--ghost {
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--border-subtle);
  color: var(--text-soft);
}

.btn--ghost:hover {
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--text);
}

.btn--full {
  width: 100%;
}

/* ===== Hero ===== */
.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.75rem;
  align-items: center;
}

.hero__content h1 {
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  margin: 0.6rem 0 0.75rem;
  letter-spacing: -0.03em;
}

.hero__subtitle {
  margin: 0 0 1.4rem;
  color: var(--text-soft);
  max-width: 28rem;
  font-size: 0.98rem;
}

.hero__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.hero__form input[type="email"] {
  flex: 1 1 180px;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 0.9rem;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  outline: none;
  font-size: 0.9rem;
}

.hero__form input::placeholder {
  color: #6b7280;
}

.hero__form input:focus {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.55);
}

.hero__note {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--accent-soft);
  background: rgba(15, 23, 42, 0.95);
  color: #a5b4fc;
  font-size: 0.75rem;
}

.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
}

/* Hero logos */
.hero__logos {
  margin-top: 1.8rem;
  font-size: 0.8rem;
}

.hero__logos-label {
  display: block;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}

.hero__logos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-size: 0.78rem;
  color: #9ca3af;
}

.hero__logos-row span {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.7);
}

/* Hero "code" card */
.hero__card {
  border-radius: var(--radius-2xl);
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.35), transparent 60%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.28), transparent 55%),
    var(--card);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero__card-header {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem 0.8rem;
  background: rgba(15, 23, 42, 0.85);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.dot--red {
  background: #f97373;
}

.dot--yellow {
  background: #facc15;
}

.dot--green {
  background: #4ade80;
}

.hero__card-body {
  padding: 1.25rem 1.3rem 1.1rem;
}

.hero__card-label {
  font-size: 0.75rem;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.hero__code {
  margin: 0;
  padding: 0.9rem 0.9rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(30, 64, 175, 0.7);
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  line-height: 1.4;
}

.hero__card-footnote {
  margin: 0.8rem 0 0;
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* ===== Grid / Cards ===== */
.grid {
  display: grid;
  gap: 1.35rem;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.14), transparent 55%),
    rgba(15, 23, 42, 0.96);
  padding: 1.35rem 1.25rem;
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* ===== Steps ===== */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  max-width: 640px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.step__index {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #c7d2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.step__content h3 {
  margin: 0 0 0.3rem;
  font-size: 0.98rem;
}

.step__content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* ===== Pricing ===== */
.pricing {
  display: flex;
  justify-content: center;
}

.pricing__card {
  max-width: 320px;
  text-align: left;
}

.pricing__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.5);
  background: rgba(21, 128, 61, 0.2);
  color: #bbf7d0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.pricing__price {
  margin: 0.35rem 0 0.1rem;
  font-size: 1.7rem;
  font-weight: 600;
}

.pricing__note {
  margin: 0 0 0.9rem;
  color: var(--text-soft);
  font-size: 0.85rem;
}

.pricing__list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.pricing__list li {
  margin-bottom: 0.3rem;
}

/* ===== CTA ===== */
.cta {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
}

.cta__inner h2 {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
}

.cta__inner p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
  padding: 1.4rem 0 2rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer__links {
  display: flex;
  gap: 0.8rem;
}

.footer__links a {
  color: var(--text-soft);
  text-decoration: none;
}

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

/* ===== Responsive ===== */
@media (max-width: 800px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__card {
    order: -1;
  }
}

@media (max-width: 720px) {
  .nav__links,
  .nav__actions {
    display: none;
  }

  .nav__toggle {
    display: inline-block;
  }

  .nav__links--open,
  .nav__actions--open {
    display: flex;
  }

  .nav__links--open {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    padding: 0.8rem 1.25rem;
    background: rgba(2, 6, 23, 0.98);
    border-bottom: 1px solid rgba(15, 23, 42, 0.9);
    flex-direction: column;
    gap: 0.8rem;
  }

  .nav__actions--open {
    position: absolute;
    top: 52px;
    right: 1.25rem;
    margin-top: 122px;
    flex-direction: column;
    align-items: stretch;
  }

  .cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 3.2rem;
  }

  .hero__form {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__form input[type="email"],
  .hero__form .btn {
    width: 100%;
  }
}

/* ===== Features page specific ===== */

.features-hero {
  padding-top: 4.2rem;
  text-align: left;
}

.features-hero__title {
  margin: 1.2rem 0 0.6rem;
  font-size: clamp(2rem, 3.2vw, 2.5rem);
  letter-spacing: -0.03em;
}

.features-hero__subtitle {
  margin: 0 0 1.8rem;
  max-width: 40rem;
  color: var(--text-soft);
  font-size: 0.98rem;
}

/* Tabs */
.feature-tabs {
  display: inline-flex;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  gap: 0.25rem;
}

.feature-tab {
  border: none;
  background: transparent;
  color: var(--text-soft);
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.feature-tab--active {
  background: var(--accent-gradient);
  color: #f9fafb;
  box-shadow: 0 16px 35px rgba(88, 80, 236, 0.45);
}

/* Sections controlled by tabs */
.feature-section {
  transition: opacity 0.15s ease;
}

.feature-section:not(.feature-section--active) {
  opacity: 0;
  pointer-events: none;
}

.image-row-code1 {
  display: flex;
  justify-content: center;
}

.image-row-code {
  display: flex;
  justify-content: center;
}

.image-row-code img {
  width: 90%;
  max-width: 800px;
  height: auto; 
  display: block;
}

.image-row-code1 img {
  width: 90%;
  max-width: 400px;
  height: 30%; 
  display: block;
}

.image-row-analytics {
  display: flex;
  gap: 20rem; /* space between images */
  justify-content: center;
}

.image-row-analytics img {
  width: 96%;
  max-width: 800px;
  height: auto;
  display: block;
}
