/* quierocupones — estilos base, pensados primero para teléfono */
:root {
  --primary: #19B5AE;      /* turquesa del logo (se reemplaza por el color del host) */
  --accent:  #F7941D;      /* naranja de la flecha */
  --text:    #3C3C3C;      /* gris oscuro del texto */
  --muted:   #7A8486;
  --bg:      #F5FAFA;
  --card:    #FFFFFF;
  --line:    #E2ECEC;
  --danger:  #D64545;
  --radius:  16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--primary); }
[hidden] { display: none !important; }

/* Barra superior */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; text-decoration: none; color: var(--text); }
.brand img { height: 40px; width: auto; display: block; }
.brand span { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand span b { color: var(--primary); }
#topnav { display: flex; gap: 8px; }

main { flex: 1; width: 100%; max-width: 520px; margin: 0 auto; padding: 20px 16px 32px; }

.foot { text-align: center; font-size: .78rem; color: var(--muted); padding: 16px 16px calc(16px + var(--safe-bottom)); }

/* Portada */
.hero { text-align: center; padding: 18px 4px 8px; }
.hero .logo-big { width: min(300px, 80%); height: auto; margin: 8px auto 4px; display: block; }
.hero h1 { font-size: 1.7rem; line-height: 1.2; margin: 14px 0 8px; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p.lead { font-size: 1.02rem; color: var(--muted); margin: 0 auto 22px; max-width: 30ch; }
.tagline { color: var(--primary); font-weight: 700; font-size: 1.1rem; margin: 0; }

.steps { display: grid; gap: 10px; margin: 26px 0 8px; padding: 0; list-style: none; }
.steps li {
  display: flex; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; text-align: left;
}
.steps .n {
  flex: 0 0 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800;
  background: color-mix(in srgb, var(--primary) 14%, white); color: var(--primary);
}
.steps strong { display: block; }
.steps small { color: var(--muted); }

/* Tarjetas y formularios */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; box-shadow: 0 6px 24px rgba(25,181,174,.07);
}
.card h2 { margin: 0 0 4px; font-size: 1.35rem; }
.card .sub { margin: 0 0 18px; color: var(--muted); }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field input {
  width: 100%; font-size: 16px; /* 16px evita el zoom de iPhone */
  padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--text); outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--primary); }
.field.err input { border-color: var(--danger); }
.field .msg { color: var(--danger); font-size: .82rem; margin-top: 4px; min-height: 0; }
.field .hint { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.phone-wrap { display: flex; align-items: stretch; }
.phone-wrap .cc {
  display: grid; place-items: center; padding: 0 12px; font-weight: 600; color: var(--muted);
  border: 1.5px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; background: var(--bg);
}
.phone-wrap input { border-radius: 0 12px 12px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 50px; padding: 12px 18px;
  font-size: 1.02rem; font-weight: 700; text-decoration: none;
  border: 0; border-radius: 14px; cursor: pointer;
  background: var(--primary); color: #fff; transition: transform .06s, filter .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { filter: grayscale(.4) opacity(.7); cursor: default; }
.btn.accent { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn.small { width: auto; min-height: 38px; padding: 8px 14px; font-size: .9rem; border-radius: 10px; }
.stack { display: grid; gap: 10px; }
.alt { text-align: center; margin: 16px 0 0; font-size: .95rem; color: var(--muted); }

.banner {
  border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: .93rem;
  background: color-mix(in srgb, var(--accent) 14%, white); border: 1px solid color-mix(in srgb, var(--accent) 40%, white);
}
.banner.ok { background: color-mix(in srgb, var(--primary) 12%, white); border-color: color-mix(in srgb, var(--primary) 35%, white); }

.empty { text-align: center; padding: 28px 8px; color: var(--muted); }
.empty .ticket { font-size: 2.6rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: .85rem; }

#toast {
  position: fixed; left: 50%; bottom: calc(20px + var(--safe-bottom)); transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-size: .93rem; max-width: 90vw; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 50;
}

.spinner { width: 28px; height: 28px; margin: 40px auto; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 760px) {
  main { padding-top: 40px; }
  .hero h1 { font-size: 2.1rem; }
}
