/* ─── Header ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  color: var(--text);
}

.logo__mark {
  flex-shrink: 0;
  height: 36px;
  width: auto;
  border-radius: 8px;
  display: block;
}

.logo__mark--dark {
  background: var(--logo-mark-bg);
}

.logo__mark--light {
  background: transparent;
}

[data-theme='light'] .logo__mark--dark {
  display: none;
}

[data-theme='dark'] .logo__mark--light {
  display: none;
}

.logo__copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.1;
}

.logo__name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo__lead {
  color: var(--brand);
}

.logo__nube {
  color: var(--text);
}

.logo__tagline {
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.logo--compact .logo__copy {
  display: none;
}

.logo--compact .logo__mark {
  height: 32px;
}

@media (max-width: 480px) {
  .logo__tagline {
    display: none;
  }
}

.nav {
  display: none;
  gap: 1.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav a:hover {
  color: var(--brand);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle__icon--dark {
  display: none;
}

[data-theme='dark'] .theme-toggle__icon--light {
  display: none;
}

[data-theme='dark'] .theme-toggle__icon--dark {
  display: block;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
}

@media (max-width: 560px) {
  .header__actions .btn--ghost {
    padding-inline: 0.75rem;
    font-size: 0.875rem;
  }

  .header__actions .btn--primary {
    padding-inline: 0.875rem;
    font-size: 0.875rem;
  }
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(43, 140, 255, 0.35);
}

.btn--primary:hover {
  background: var(--brand-hover);
}

.btn--secondary {
  background: var(--bg-dark);
  color: #fff;
}

.btn--secondary:hover {
  background: #1e293b;
}

.btn--outline {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn--outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn--ghost:hover {
  color: var(--brand);
  background: var(--brand-light);
}

a.btn {
  text-decoration: none;
}

.btn--lg {
  padding: 0.9375rem 1.75rem;
  font-size: 1rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ─── Sections ─── */
.section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.section--soft {
  background: var(--bg-soft);
}

.section--muted {
  background: var(--bg-muted);
}

/* ─── Hero ─── */
.hero {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 6rem);
  background: linear-gradient(180deg, var(--brand-light) 0%, var(--bg) 55%);
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr 1.05fr;
  }
}

.hero__content .lead {
  margin-top: 1.25rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.trust-row span::before {
  content: '✓ ';
  color: var(--success);
  font-weight: 700;
}

/* Platform mockup */
.mock-platform {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mock-platform__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mock-platform__bar strong {
  color: var(--text);
}

.mock-platform__body {
  display: grid;
  grid-template-columns: 140px 1fr;
  min-height: 320px;
}

@media (max-width: 520px) {
  .mock-platform__body {
    grid-template-columns: 1fr;
  }

  .mock-platform__sidebar {
    display: none;
  }
}

.mock-platform__sidebar {
  border-right: 1px solid var(--border);
  padding: 0.75rem;
  background: var(--bg-soft);
}

.mock-conv {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 8px;
  margin-bottom: 0.25rem;
  font-size: 0.6875rem;
}

.mock-conv.is-active {
  background: var(--brand-light);
}

.mock-conv__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

.mock-conv__name {
  font-weight: 600;
  color: var(--text);
}

.mock-conv__preview {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

.mock-platform__main {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mock-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: var(--hot-bg);
  color: var(--hot);
  font-size: 0.75rem;
  font-weight: 700;
  width: fit-content;
}

.mock-bubble {
  max-width: 85%;
  padding: 0.625rem 0.875rem;
  border-radius: 14px;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.mock-bubble--in {
  align-self: flex-start;
  background: var(--bg-muted);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.mock-bubble--out {
  align-self: flex-end;
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.mock-ai-tip {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--ai-light);
  border: 1px solid var(--ai-border);
  font-size: 0.75rem;
  color: var(--ai);
}

.mock-ai-tip strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ai);
}

/* ─── Audience strip ─── */
.audience {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ─── Problem cards (CTW style) ─── */
.problem-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .problem-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.problem-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.problem-card h3 {
  margin-bottom: 0.625rem;
  font-size: 1.0625rem;
}

.problem-card p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.impact {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--impact-bg);
  color: var(--impact-text);
}

/* ─── Flow diagram ─── */
.flow-horizontal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.flow-horizontal__step {
  padding: 0.625rem 1.125rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

.flow-horizontal__step--ai {
  background: var(--ai-light);
  color: var(--ai);
  border-color: var(--ai-border);
}

.flow-horizontal__step--win {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success-border);
}

.flow-horizontal__arrow {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ─── Steps (3 columns) ─── */
.steps {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  text-align: center;
  padding: 0 0.5rem;
}

.step__num {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.125rem;
}

.step h3 {
  margin-bottom: 0.5rem;
}

.step p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Lead score tiers ─── */
.score-tiers {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .score-tiers {
    grid-template-columns: repeat(3, 1fr);
  }
}

.score-tier {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.score-tier--hot {
  border-color: var(--hot-border);
  background: var(--hot-bg);
}

.score-tier--warm {
  border-color: var(--warm-border);
  background: var(--warm-bg);
}

.score-tier--cold {
  background: var(--cold-bg);
}

.score-tier__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.score-tier--hot .score-tier__label {
  color: var(--hot);
}

.score-tier--warm .score-tier__label {
  color: var(--warm);
}

.score-tier--cold .score-tier__label {
  color: var(--cold);
}

.score-tier__range {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.score-tier p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ─── Feature split ─── */
.feature-split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .feature-split {
    grid-template-columns: 1fr 1fr;
  }

  .feature-split--reverse .feature-split__content {
    order: 2;
  }

  .feature-split--reverse .feature-split__visual {
    order: 1;
  }
}

.feature-list {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.625rem;
}

.feature-list li {
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* Channel chips */
.channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.channel {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid var(--brand-border);
}

/* Pipeline stages */
.pipeline-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.pipeline-bar span {
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.pipeline-bar span.is-active {
  background: var(--brand);
  color: #fff;
}

.pipeline-bar span.is-win {
  background: var(--success);
  color: #fff;
}

/* Dashboard stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 600px) {
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-box {
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-box__val {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.03em;
}

.stat-box__label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Widget box */
.widget-box {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--widget-bg);
  color: var(--cta-text);
  border: 1px solid var(--border);
}

.widget-box code {
  display: block;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--widget-code-bg);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--widget-accent);
}

.widget-box p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--widget-text);
  line-height: 1.6;
}

.widget-benefits {
  margin-top: 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--cta-text-muted);
}

.widget-benefits li::before {
  content: '→ ';
  color: var(--widget-accent);
}

/* ─── Pricing cards (CTW style) ─── */
.pricing-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.price-card {
  position: relative;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.price-card--featured {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

.price-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--brand);
  color: #fff;
  white-space: nowrap;
}

.price-card__name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.price-card__amount {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.price-card__amount small {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.price-card__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  min-height: 2.5rem;
}

.price-card ul {
  flex: 1;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: grid;
  gap: 0.5rem;
}

.price-card ul li::before {
  content: '✓ ';
  color: var(--success);
  font-weight: 700;
}

.price-card .btn {
  width: 100%;
}

/* ─── FAQ ─── */
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.faq summary {
  padding: 1.25rem 0;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--brand);
  font-size: 1.25rem;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: '−';
}

.faq p {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 640px;
}

/* ─── CTA band ─── */
.cta-band {
  padding: clamp(3.5rem, 7vw, 5rem) 0;
  background: var(--cta-bg);
  color: var(--cta-text);
  text-align: center;
}

.cta-band h2 {
  color: var(--cta-text);
  margin-bottom: 1rem;
}

.cta-band .lead {
  color: var(--cta-text-muted);
  margin: 0 auto 2rem;
  max-width: 520px;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.cta-band .btn--outline {
  background: transparent;
  border-color: var(--cta-outline-border);
  color: var(--cta-text);
}

.cta-band .trust-row {
  justify-content: center;
  margin-top: 1.5rem;
  color: var(--cta-text-muted);
}

/* ─── Footer ─── */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer__links a:hover {
  color: var(--brand);
}

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 1rem;
  background: var(--overlay);
  backdrop-filter: blur(4px);
}

.modal-overlay.is-open {
  display: grid;
}

.modal {
  width: min(100%, 440px);
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.modal__close {
  float: right;
  border: none;
  background: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal h2 {
  font-size: 1.375rem;
  margin-bottom: 0.5rem;
}

.modal__sub {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.form {
  display: grid;
  gap: 1rem;
}

.form label {
  display: grid;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.form input,
.form textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  background: var(--bg-muted);
}

.form input:focus,
.form textarea:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-light);
}

.form__error {
  color: #dc2626;
  font-size: 0.8125rem;
  margin: 0;
}

.form__fine {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

.form-panel {
  display: none;
}

.form-panel.is-active {
  display: block;
}

.form__success {
  text-align: center;
  display: grid;
  gap: 1rem;
}

.form__success p {
  margin: 0;
  color: var(--text-secondary);
}

.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}
