:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #061014;
  --bg-soft: #0a181d;
  --card: #102226;
  --card-hover: #153036;
  --line: rgba(184, 230, 214, 0.12);
  --text: #eef6f2;
  --muted: #93b0a6;
  --accent: #3dcea0;
  --accent-dim: rgba(61, 206, 160, 0.14);
  --gold: #d6b15c;
  --gold-dim: rgba(214, 177, 92, 0.14);
  --whatsapp: #25d366;
  --danger: #f0a3a3;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --header-bg: rgba(6, 16, 20, 0.78);
  --input-bg: #0b171b;
  --nav-mobile-bg: #0a181d;
  --ghost-bg: rgba(255, 255, 255, 0.03);
  --tooltip-bg: #0f2418;
  --tooltip-text: #d9ffe8;
  --sidebar-bg: #08161b;
  --radius: 22px;
  --max: 1140px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f7f5;
  --bg-soft: #e7efeb;
  --card: #ffffff;
  --card-hover: #f7fbf9;
  --line: rgba(16, 40, 36, 0.12);
  --text: #102226;
  --muted: #4d6860;
  --accent: #178a68;
  --accent-dim: rgba(23, 138, 104, 0.12);
  --gold: #8b6914;
  --gold-dim: rgba(139, 105, 20, 0.12);
  --danger: #b42318;
  --shadow: 0 18px 40px rgba(16, 34, 38, 0.08);
  --header-bg: rgba(243, 247, 245, 0.88);
  --input-bg: #f4f8f6;
  --nav-mobile-bg: #ffffff;
  --ghost-bg: rgba(16, 34, 38, 0.03);
  --tooltip-bg: #102226;
  --tooltip-text: #eef6f2;
  --sidebar-bg: #eef4f1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
}

h1,
h2,
h3 {
  font-family: "Sora", system-ui, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
}

h3 {
  font-size: 1.2rem;
}

.lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 62ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #06210f;
}

.btn-whatsapp:hover {
  background: #2fe575;
}

.btn-accent {
  background: var(--accent);
  color: #06210f;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: var(--ghost-bg);
}

.btn-ghost:hover {
  border-color: rgba(61, 206, 160, 0.4);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  min-height: 76px;
  gap: 12px;
  position: relative;
}

.prefs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  order: 3;
}

.pref {
  display: grid;
  gap: 0;
}

.pref select {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  order: 1;
}

.logo-mark {
  width: 36px;
  height: 36px;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
  margin-left: auto;
  order: 2;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  order: 4;
}

.hero {
  position: relative;
  padding: 88px 0 72px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% auto auto 40%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(61, 206, 160, 0.16), transparent 68%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero p.lead {
  margin: 22px 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-meta strong {
  display: block;
  color: var(--text);
  font-size: 1.2rem;
}

.stack {
  display: grid;
  gap: 14px;
}

.tile {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.tile small {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.section {
  padding: 88px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 40px;
}

.section-head p {
  margin-top: 14px;
}

.products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.product {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.product:hover {
  background: var(--card-hover);
}

.product-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}

.product-icon.enlaza {
  background: var(--accent-dim);
  color: var(--accent);
}

.product-icon.pingn {
  background: var(--gold-dim);
  color: var(--gold);
}

.product h3 {
  font-size: 1.7rem;
  margin-bottom: 10px;
}

.product p {
  color: var(--muted);
}

.product ul {
  margin: 22px 0 28px;
  padding-left: 18px;
  color: var(--text);
}

.product li + li {
  margin-top: 8px;
}

.product-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.corporate {
  background:
    radial-gradient(circle at 10% 20%, rgba(214, 177, 92, 0.08), transparent 28%),
    var(--bg-soft);
  border-block: 1px solid var(--line);
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin: 16px 0 10px;
  font-size: 1.45rem;
}

.card p {
  color: var(--muted);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  color: var(--muted);
}

.card .btn {
  margin-top: auto;
  padding-top: 0;
  align-self: flex-start;
}

.card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.step span {
  color: var(--accent);
  font-family: "Sora", sans-serif;
  font-weight: 700;
}

.step p {
  color: var(--muted);
  margin-top: 10px;
}

.cta {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 64px 24px;
}

.cta .lead {
  margin: 16px auto 28px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--muted);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #06210f;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(18, 140, 126, 0.45);
}

.wa-float::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.45);
  animation: pulse 2s infinite;
}

.wa-float span {
  position: absolute;
  right: 72px;
  white-space: nowrap;
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0;
  transform: translateX(8px);
  transition: 0.2s ease;
  pointer-events: none;
}

.wa-float:hover span,
.wa-float:focus-visible span {
  opacity: 1;
  transform: none;
}

.page {
  padding: 56px 0 88px;
}

.page-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field span {
  font-weight: 700;
  font-size: 0.92rem;
}

.field small {
  color: var(--muted);
}

.field input:not([type="radio"]):not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--input-bg);
}

input[type="radio"],
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}

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

.choices {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.choices label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.form-errors {
  display: none;
  margin-bottom: 16px;
  color: var(--danger);
}

.form-errors.show {
  display: block;
}

.form-success {
  display: none;
  text-align: center;
  padding: 28px 8px;
}

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

.form-success h3 {
  margin: 12px 0;
}

.auth-confirm {
  text-align: center;
}

.auth-confirm .logo {
  justify-content: center;
}

.auth-confirm h1,
.auth-confirm h3 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: -0.03em;
}

.auth-confirm .lead {
  max-width: 34ch;
  margin-left: auto;
  margin-right: auto;
}

.confirm-mark {
  width: 72px;
  height: 72px;
  margin: 22px auto 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: radial-gradient(circle at 30% 20%, var(--gold-dim), var(--accent-dim));
  border: 1px solid var(--line);
  box-shadow: 0 0 0 8px rgba(61, 206, 160, 0.05);
}

.auth-confirm-ok .confirm-mark {
  color: var(--gold);
}

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.price-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--input-bg);
  cursor: pointer;
}

.price-card:has(:checked) {
  border-color: var(--accent);
}

.price-card input {
  margin: 3px 4px 0 0;
}

.brand-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.brand-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--input-bg);
  cursor: pointer;
  text-align: center;
}

.brand-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.brand-card:has(:checked) {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.brand-card svg {
  width: 36px;
  height: 36px;
}

.brand-card em {
  font-style: normal;
  font-size: 0.86rem;
  font-weight: 700;
}

.brand-card small {
  color: var(--muted);
  font-size: 0.75rem;
}

.app-icons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--input-bg);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.app-icon svg {
  width: 32px;
  height: 32px;
}

.brand-choices.three {
  grid-template-columns: repeat(3, 1fr);
}

.price-card strong {
  display: block;
  font-size: 1.2rem;
  margin-top: 6px;
  grid-column: 1 / -1;
}

.price-card small {
  color: var(--muted);
  grid-column: 1 / -1;
}

.lookup-row {
  display: flex;
  gap: 8px;
  align-items: start;
}

.lookup-row input {
  flex: 1;
}

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.quote-summary {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 18px;
  background: var(--accent-dim);
}

.quote-summary p {
  margin: 6px 0 0;
}

.quote-summary .app-icons.compact {
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 8px 0 4px;
}

.quote-summary .app-icon {
  padding: 8px 2px;
  font-size: 0.68rem;
  border: 0;
  background: transparent;
}

.quote-summary .app-icon svg {
  width: 24px;
  height: 24px;
}

.form-continue {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

#owned-path,
#buy-path {
  border: 0;
  padding: 0;
  margin: 18px 0 0;
  min-width: 0;
}

.form-continue:not([disabled]) .continue-hint {
  display: none;
}

#lookup-status.warn {
  color: var(--gold);
}

#resale-btn {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .price-grid,
  .brand-choices,
  .brand-choices.three,
  .app-icons {
    grid-template-columns: 1fr 1fr;
  }

  .quote-summary .app-icons.compact {
    grid-template-columns: repeat(3, 1fr);
  }
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 8px;
  vertical-align: top;
}

@keyframes pulse {
  70% {
    transform: scale(1.18);
    opacity: 0;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 0.7s ease forwards;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: grid;
    place-items: center;
    order: 3;
  }

  .prefs {
    margin-left: auto;
    order: 2;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    margin-left: 0;
    background: var(--nav-mobile-bg);
    border-bottom: 1px solid var(--line);
    padding: 18px 20px 24px;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links.open {
    display: flex;
  }

  .hero,
  .section,
  .page {
    padding: 64px 0;
  }

  .hero-grid,
  .products,
  .cards,
  .steps,
  .page-grid {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    flex-direction: column;
    gap: 16px;
  }
}
