:root {
  --paper: #f3ede2;
  --paper-2: #ece4d5;
  --ink: #17130e;
  --ink-soft: #3d352b;
  --muted: #6b5f52;
  --line: rgba(23, 19, 14, 0.14);
  --accent: #e39b3d;
  --accent-deep: #c47f22;
  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Hanken Grotesk", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(227, 155, 61, 0.18), transparent 65%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, transparent 0, transparent calc(50% - 0.5px), rgba(23, 19, 14, 0.06) 50%, transparent calc(50% + 0.5px), transparent 100%);
}

.stage {
  flex: 1;
  justify-content: center;
  width: min(640px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 7vh, 64px) 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.signal {
  width: 104px;
  height: 104px;
  margin: clamp(18px, 4vh, 34px) 0 clamp(6px, 1.5vh, 14px);
}
.signal svg { width: 100%; height: 100%; overflow: visible; }
.signal .dot { fill: var(--accent-deep); }
.signal .wave {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  opacity: 0.18;
}
.signal .w1 { animation: pulse 3.2s var(--ease) infinite; }
.signal .w2 { animation: pulse 3.2s var(--ease) 0.35s infinite; }
.signal .w3 { animation: pulse 3.2s var(--ease) 0.7s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 0.12; }
  45% { opacity: 0.62; }
}

.hola {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(6.4rem, 27vw, 12.5rem);
  line-height: 0.78;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.from {
  margin: clamp(14px, 2.4vh, 22px) 0 0;
  font-size: clamp(1rem, 3.6vw, 1.15rem);
  letter-spacing: 0.03em;
  color: var(--muted);
}
.from strong { color: var(--ink); font-weight: 600; }

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(22px, 4vh, 34px);
}

.btn {
  appearance: none;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 600 0.95rem/1 var(--font-body);
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease), color .2s var(--ease);
}
.btn:hover { border-color: rgba(23, 19, 14, 0.35); background: rgba(23, 19, 14, 0.04); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn:disabled { opacity: 0.55; cursor: progress; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  font-weight: 600;
}
.btn-primary:hover { background: #efaa52; border-color: #efaa52; }

.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); border-color: var(--line); background: transparent; }

.status {
  min-height: 1.2em;
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--muted);
  max-width: 460px;
}
.status.is-ok { color: #2f6b47; }
.status.is-bad { color: #a63a2b; }

.note {
  margin: 12px 0 0;
  max-width: 430px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}
.note strong { color: var(--ink-soft); }

.qr {
  margin: clamp(26px, 5vh, 42px) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.qr img {
  display: block;
  width: 132px;
  height: 132px;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.qr figcaption {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: min(640px, 100% - 48px);
  margin: 0 auto;
  padding: 14px 0 20px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot .mono { font-family: var(--font-mono); text-transform: none; letter-spacing: 0; }

.live-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 460px;
  text-align: left;
}

.live-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 0.42em;
  border-radius: 50%;
  background: #2f6b47;
  box-shadow: 0 0 0 4px rgba(47, 107, 71, 0.12);
}

.live-message {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  width: min(520px, calc(100% - 32px));
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 18px 50px rgba(23, 19, 14, 0.28);
  font-size: 1.05rem;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

@media (max-width: 420px) {
  .stage { padding-left: 18px; padding-right: 18px; }
  .btn { padding: 11px 18px; font-size: 0.9rem; }
  .live-message { bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
