:root {
  color-scheme: dark;
  --bg: #0e0e10;
  --surface: #17171a;
  --surface-2: #1d1d21;
  --border: rgba(255, 255, 255, 0.1);
  --text: #f2f2f3;
  --text-muted: #a1a1aa;
  --accent: #ff7a45;
  --accent-on: #2b0f04;
  --positive: #3dd68c;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.5;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* Header */

header.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(14, 14, 16, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.025em;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.brand-fire {
  color: var(--accent);
}

/* Igual que "Shield" en el logo hermano de FireShield: blanco, no un
   segundo color de acento. */
.brand-wand {
  color: var(--text);
}

nav.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

nav.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
}

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

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-on);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

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

/* Hero */

/* padding-top/bottom en vez del shorthand "padding: 96px 0" — este div
   combina las clases "wrap hero" en el mismo elemento, y el shorthand
   pisaba por completo el padding horizontal de .wrap (lo dejaba a 0). */
.hero {
  padding-top: 96px;
  padding-bottom: 96px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

/* Los hijos de un grid item por defecto no encogen por debajo del ancho de
   su contenido (min-width: auto) — sin esto, la tabla de .mock-grid empuja
   todo el grid (y con él, .wrap, y visualmente el resto de la página) más
   ancho que el viewport en pantallas estrechas, produciendo scroll
   horizontal y haciendo que el header parezca "pegado" a la izquierda. */
.hero > * {
  min-width: 0;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 20px;
  font-weight: 800;
}

.hero p.subtitle {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 28px;
}

/* Mock grid */

/* Réplica estática de la tabla de filas de la app (TableRows.tsx): cabecera
   con nombre + tipo por columna, fila de filtros, filas alternas y columna de
   selección — mismas medidas y tokens, sin Tailwind (la landing no tiene
   build step). */

.mock-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  overflow-x: auto;
}

.mock-inner {
  min-width: 406px;
}

.mock-row {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.mock-row:last-child {
  border-bottom: 0;
}

.mock-row:nth-child(even) {
  background: rgba(29, 29, 33, 0.3);
}

.mock-select {
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-check {
  width: 13px;
  height: 13px;
  border: 1px solid #6b6b73;
  border-radius: 3px;
}

.mock-check.checked {
  background: var(--accent);
  border-color: var(--accent);
}

.mock-cell {
  min-width: 0;
  padding: 10px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-cell.col-id {
  flex: 1 0 96px;
}

.mock-cell.col-title {
  flex: 1 0 140px;
}

.mock-cell.col-done {
  flex: 0 0 130px;
}

.mock-row.mock-head {
  background: var(--surface-2);
  border-bottom-color: var(--border);
}

.mock-head .mock-cell {
  padding: 12px;
}

.mock-col-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.mock-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-pk,
.mock-sort.active {
  color: var(--accent);
}

.mock-sort {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
}

.mock-col-type {
  color: var(--text-muted);
  font-size: 10px;
}

.mock-row.mock-filters {
  background: rgba(29, 29, 33, 0.6);
  border-bottom-color: var(--border);
}

.mock-filters .mock-cell {
  padding: 8px 12px;
}

.mock-input {
  display: block;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.mock-bool {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 10px;
}

.mock-switch {
  position: relative;
  width: 52px;
  height: 20px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* Posición central = "sin filtro", igual que BoolFilterSwitch por defecto. */
.mock-thumb {
  position: absolute;
  top: 2px;
  left: 18px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
}

/* Fila seleccionada — late suavemente para dar sensación de app viva. */
.mock-row-live {
  animation: row-pulse 1.6s ease-in-out infinite alternate;
}

@keyframes row-pulse {
  from {
    background: rgba(255, 122, 69, 0.06);
  }
  to {
    background: rgba(255, 122, 69, 0.16);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mock-row-live {
    animation: none;
    background: rgba(255, 122, 69, 0.1);
  }
}

/* Sections */

section {
  padding: 72px 0;
}

section h2 {
  text-align: center;
  font-size: 28px;
  margin: 0 0 40px;
}

/* Data Connect explainer */

#data-connect .lead {
  max-width: 760px;
  margin: 0 auto 16px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: center;
}

#data-connect .lead:last-child {
  margin-bottom: 0;
}

#data-connect code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.9em;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.card.highlight {
  border-color: rgba(255, 122, 69, 0.5);
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 17px;
}

.card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 15px;
}

.card.highlight li {
  color: var(--text);
}

.icon-yes {
  color: var(--positive);
}

.icon-no {
  color: var(--text-muted);
}

/* Security */

.security-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.security-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.security-item .icon-yes {
  flex-shrink: 0;
  font-size: 18px;
  margin-top: 2px;
}

.security-item strong {
  display: block;
  margin-bottom: 4px;
}

.security-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

.reviews-placeholder {
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 56px 24px;
  text-align: center;
  color: var(--text-muted);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.eyebrow {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 13px;
  margin: 0 0 8px;
}

.muted {
  color: var(--text-muted);
  margin: 8px 0 0;
}

.price {
  font-size: 40px;
  font-weight: 800;
  margin: 0;
}

.price-period {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-cta {
  text-align: center;
}

/* FAQ */

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: '+';
  float: right;
  color: var(--accent);
  font-weight: 700;
}

.faq-list details[open] summary::after {
  content: '−';
}

.faq-list details p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Promo cruzada de FireShield (producto hermano) — espejo de la tarjeta
   FireWandPromo de FireShield; misma tarjeta en la app (FireShieldPromo.tsx). */

.promo {
  padding-bottom: 40px;
}

.promo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.promo-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 8px;
}

.promo-body {
  flex: 1;
}

.promo-title {
  margin: 0;
  font-weight: 600;
}

.promo-text {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.promo-brand {
  font-weight: 600;
  color: var(--text);
}

.promo-brand .accent {
  color: var(--accent);
}

.promo-btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.promo-btn-shield {
  color: var(--text);
}

.promo-btn:hover {
  background: rgba(255, 122, 69, 0.1);
}

@media (min-width: 640px) {
  .promo-card {
    flex-direction: row;
    text-align: left;
  }
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-muted);
}

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

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (max-width: 860px) {
  .hero,
  .compare,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  nav.site-nav {
    display: none;
  }
  /* nav.site-nav es lo que lleva el margin-left:auto que empuja el botón a
     la derecha en escritorio — al ocultar el nav en móvil, ese auto-margin
     desaparece con él y el botón se queda pegado al logo. Se lo pasamos
     directamente al botón solo en este breakpoint. */
  .site-header .btn {
    margin-left: auto;
  }
  .hero h1 {
    font-size: 32px;
  }
}
