/* ============================================
   DelreyWallet-Tester — style.css
   Diseño: tema oscuro con acento indigo
   Referencia visual: delreydigital.cl
   Mobile-first (sin media query = móvil)
   ============================================ */

/* --- Variables --- */
:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: rgba(255, 255, 255, 0.04);
  --fg: #e5e5e5;
  --fg-muted: #a3a3a3;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(99, 102, 241, 0.3);
  --success: #22c55e;
  --error: #ef4444;
  --radius: 12px;
  --radius-full: 9999px;
  --font: 'Inter', sans-serif;
  --font-display: 'Bricolage Grotesque', sans-serif;
  --max-width: 1152px;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* --- Layout --- */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 3rem 0;
}

/* --- Typography --- */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 0.75rem;
  text-align: center;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}

.lead {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--fg-muted);
  margin-top: 1rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.sec-head {
  text-align: center;
  margin-bottom: 2rem;
}

.sec-head h2 {
  margin-bottom: 0.5rem;
}

.sec-head p {
  color: var(--fg-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 24px var(--accent-glow);
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  border-color: var(--fg-muted);
  background: rgba(255, 255, 255, 0.04);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.btn-block {
  width: 100%;
}

/* --- Nav --- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--fg-muted);
}

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

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile menu open */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 4rem;
  inset-inline: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  gap: 1rem;
}

/* --- Hero ---
   Discreto a proposito: el foco de la pagina es el probador de abajo,
   no el hero. Centrado en movil (columna unica); a la izquierda desde
   el desktop breakpoint, donde queda junto a la tarjeta de vista previa. */
.hero {
  padding: 7rem 0 2.5rem;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

/* Preview card (simula una notificación real, no JSON) */
.preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(8px);
  max-width: 360px;
  margin: 0 auto;
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.preview-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--success);
  background: rgba(34, 197, 94, 0.12);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
}

.preview-card-title {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.preview-card-body {
  padding: 1.25rem 1rem;
}

.preview-name {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.preview-msg {
  color: var(--fg-muted);
  font-size: 0.9375rem;
  font-style: italic;
}

/* --- Role badge --- */
.role-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 auto 2rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  max-width: fit-content;
  font-size: 0.8125rem;
  color: var(--fg-muted);
  transition: border-color 0.3s ease;
}

.role-badge svg {
  flex-shrink: 0;
  color: var(--accent);
  transition: color 0.3s ease;
}

.role-badge strong {
  color: var(--fg);
  font-weight: 600;
}

.role-badge.is-owner {
  border-color: var(--border-accent);
}

.role-badge.is-owner svg {
  color: var(--success);
}

/* --- Tabs (Lead / Reserva) --- */
.tester-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  max-width: 420px;
  margin: 0 auto;
}

.tab-btn {
  flex: 1;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab-btn:hover:not(.active) {
  color: var(--fg);
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
}

.tab-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tab-hint {
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.875rem;
  margin: 1rem auto 1.5rem;
  max-width: 480px;
}

/* --- Form Fields --- */
.form-fields {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-muted);
}

.field input,
.field select,
.field textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.9375rem;
  transition: border-color 0.2s ease;
  outline: none;
  width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field textarea {
  resize: vertical;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* El icono nativo del <input type="date"> es oscuro por defecto y se pierde
   contra el fondo oscuro del campo — se invierte para que se vea claro. */
.field input[type="date"] {
  cursor: pointer;
}

.field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1);
  opacity: 0.75;
}

.field input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--error);
  font-weight: 500;
}

.form-success {
  color: var(--success);
  font-size: 0.8125rem;
  margin-top: 0.5rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: 0.25rem;
}

.opt {
  color: var(--fg-muted);
  font-weight: 400;
}

/* --- Telefono con prefijo fijo --- */
.phone-input {
  display: flex;
  gap: 0.5rem;
}

.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg-muted);
  font-size: 0.9375rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.phone-input input {
  flex: 1;
  min-width: 0;
}

/* --- Horas disponibles (chips) --- */
.hora-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.hora-hint {
  grid-column: 1 / -1;
  font-size: 0.8125rem;
  color: var(--fg-muted);
}

.hora-chip {
  padding: 0.625rem 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hora-chip:hover {
  border-color: var(--border-accent);
}

.hora-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- Steps (Cómo funciona) --- */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 640px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-num {
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.step-content p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* --- Tarjeta de éxito --- */
.success-card {
  max-width: 560px;
  margin: 2rem auto 0;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  animation: successReveal 0.5s ease;
}

@keyframes successReveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--success);
}

.success-card h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.success-card p {
  color: var(--fg-muted);
  font-size: 0.9375rem;
  margin-top: 0.5rem;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.success-note {
  margin-top: 1.25rem;
  font-size: 0.8125rem;
}

@media (min-width: 640px) {
  .success-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* --- CTA Band --- */
.cta-band {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.cta-band .kicker {
  margin-bottom: 0.5rem;
  text-align: center;
}

.cta-band h2 {
  margin-bottom: 0.5rem;
}

.cta-sub {
  font-size: 0.9375rem;
  color: var(--fg-muted);
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* --- Footer --- */
footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9375rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--fg-muted);
}

.footer-copy a {
  color: var(--accent);
  text-decoration: underline;
}

.footer-copy a:hover {
  color: var(--accent-hover);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--fg-muted);
}

.footer-links a:hover {
  color: var(--fg);
}

/* --- Utility --- */
.hidden {
  display: none !important;
}

.form-section {
  max-width: 480px;
  margin: 1.5rem auto 0;
}

/* ============================================
   Mobile-first: min-width media queries
   ============================================ */

/* Tablet+ */
@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    padding: 8rem 0 3rem;
  }

  .step {
    padding: 1.5rem;
  }

  .hero-grid {
    gap: 4rem;
  }

  .hora-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Desktop+ */
@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .hero {
    padding: 9rem 0 3.5rem;
  }

  /* Junto a la tarjeta de vista previa, el texto se alinea a la
     izquierda de su columna en vez de centrarse en ella. */
  .hero .eyebrow,
  .hero h1,
  .hero .lead {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .section {
    padding: 5rem 0;
  }

  .steps {
    flex-direction: row;
    gap: 1.5rem;
  }

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

  .footer-wrap {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}