:root {
  --bg: #f6f3ea;
  --card: #ffffff;
  --ink: #14251a;
  --muted: #5b6b60;
  --line: #dfe6dc;
  --green: #1e8e3e;
  --green-dark: #166b2f;
  --green-soft: #e6f4e9;
  --red: #b42318;
  --red-soft: #fdecea;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { max-width: 480px; margin: 0 auto; padding-bottom: 32px; }

.hero { position: relative; }
.hero img { display: block; width: 100%; height: auto; }
.hero-fade {
  position: absolute; inset: auto 0 0 0; height: 180px;
  background: linear-gradient(to top, var(--bg) 15%, rgba(246, 243, 234, 0));
  pointer-events: none;
}

.card {
  position: relative; z-index: 1;
  margin: -150px 16px 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(20, 37, 26, 0.10);
  padding: 22px 18px;
}
.card-head { text-align: center; margin-bottom: 18px; }
.card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--green-dark); }
.muted { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 0; }
.small { font-size: 13px; }
.pill {
  display: inline-block; margin-top: 12px;
  background: var(--green-soft); color: var(--green-dark);
  font-size: 12px; font-weight: 600; border-radius: 999px; padding: 6px 12px;
}

form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 13px; font-weight: 600; }
.field input {
  width: 100%; height: 50px; padding: 0 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: #fbfcfa; border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(30, 142, 62, 0.15); }
.field input[aria-invalid="true"] { border-color: var(--red); }
#codigo { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }
#codigo[readonly] { background: var(--green-soft); color: var(--green-dark); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.4; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); flex-shrink: 0; }

.alert {
  background: var(--red-soft); color: var(--red);
  border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.4;
}
.alert a { color: var(--red); font-weight: 700; }
.form-error { margin: 0; color: var(--red); font-size: 14px; text-align: center; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px; border: 0; border-radius: 14px;
  background: var(--green); color: #fff; font: inherit; font-size: 16px; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--green-dark); }
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-outline { background: transparent; color: var(--green-dark); border: 1.5px solid var(--green); }
.btn-outline:hover { background: var(--green-soft); }
.btn-ig { background: #14251a; margin-top: 10px; }
.btn-ig:hover { background: #000; }

.success { text-align: center; }
.check-icon {
  width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--green-soft); color: var(--green); display: grid; place-items: center;
}
.ticket {
  margin: 18px 0 14px; padding: 16px; border-radius: 14px;
  background: var(--green); color: #fff; display: grid; gap: 4px;
}
.ticket-label { font-size: 12px; font-weight: 600; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.ticket-code { font-size: 30px; font-weight: 800; letter-spacing: 0.14em; }
.success .muted.small { margin-bottom: 10px; }
.success .btn-outline { margin-top: 8px; }

.foot { text-align: center; padding: 28px 16px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.foot img { width: 72px; height: auto; opacity: .9; }
.foot p { margin: 6px 0 0; }
.foot a { color: var(--green-dark); }
