@import url("https://fonts.googleapis.com/css2?family=Vina+Sans&family=Work+Sans:wght@300;400;600;700;800;900&display=swap");

:root {
  --primary: #f04c31;
  --secondary: #566eb4;
  --tertiary: #e8b0d0;
  --neutral: #e9e5de;
  --neutral-web: #ece7e2;
  --ingredient-green: #5e874f;
  --ingredient-apple: #c1d080;
  --ingredient-sky: #83c8ef;
  --ink: #000000;
  --white: #ffffff;
  --line: rgba(0, 0, 0, 0.16);
  --muted: rgba(0, 0, 0, 0.62);
  --shadow: 0 22px 56px rgba(0, 0, 0, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Work Sans", "Red Hat Display", system-ui, sans-serif;
  background:
    linear-gradient(90deg, rgba(86, 110, 180, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(86, 110, 180, 0.08) 1px, transparent 1px),
    var(--neutral-web);
  background-size: 28px 28px;
}

a {
  color: var(--primary);
  font-weight: 800;
}

button,
input {
  font: inherit;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2,
.brand-mark,
.metric-grid strong {
  font-family: "Vina Sans", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 456px);
  gap: 24px;
  width: min(1240px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0;
  align-items: center;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 680px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--ingredient-apple);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, 0.48) 100%),
    linear-gradient(90deg, rgba(240, 76, 49, 0.2), rgba(86, 110, 180, 0.1));
  z-index: 1;
}

.hero::after {
  content: "vas a repetir";
  position: absolute;
  right: clamp(18px, 4vw, 48px);
  top: clamp(18px, 4vw, 42px);
  padding: 14px 22px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--tertiary);
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
  transform: rotate(6deg);
  z-index: 3;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(24px, 4.5vw, 50px);
  color: var(--white);
}

.brand-mark {
  width: fit-content;
  max-width: 100%;
  margin-bottom: auto;
  padding: 14px 20px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--neutral);
  color: var(--primary);
  font-size: clamp(40px, 6vw, 70px);
  line-height: 0.95;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 14px;
  padding: 7px 10px 6px;
  border: 1px solid var(--ink);
  background: var(--ingredient-apple);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

h1 {
  max-width: 680px;
  margin-bottom: 16px;
  color: inherit;
  font-size: clamp(68px, 11vw, 128px);
  line-height: 0.88;
}

.lead {
  max-width: 560px;
  margin-bottom: 0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.34;
  font-weight: 700;
  text-wrap: balance;
}

.panel {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.claim-panel {
  border-top: 10px solid var(--primary);
}

.scan-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.scan-meta strong {
  color: var(--secondary);
}

.form-stack {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 12px 13px;
  background: var(--neutral-web);
  color: var(--ink);
}

input::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

input:focus {
  outline: 4px solid rgba(131, 200, 239, 0.62);
  outline-offset: 1px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  line-height: 1.35;
}

.check-row input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  margin-top: 1px;
  accent-color: var(--primary);
}

.muted-check {
  color: var(--muted);
}

.primary-action,
.secondary-action,
.ghost-action,
.danger-action,
.redeem-button {
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 900;
}

.primary-action {
  background: var(--primary);
  color: var(--ink);
}

.secondary-action {
  background: var(--secondary);
  color: var(--white);
}

.ghost-action,
.redeem-button {
  background: var(--tertiary);
  color: var(--ink);
}

.danger-action {
  background: var(--primary);
  color: var(--ink);
}

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

button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.small-print {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.result {
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: var(--neutral-web);
  line-height: 1.45;
}

.result strong,
.result span,
.result small {
  display: block;
}

.result code {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 12px 0;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  border-radius: 0;
  background: var(--ink);
  color: var(--white);
  font-weight: 900;
}

.result.winner {
  background: var(--ingredient-apple);
}

.result.consolation {
  background: var(--ingredient-sky);
}

.result.error {
  background: #fff0ee;
  color: #9a1f16;
}

.admin-shell,
.legal-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 22px;
  padding: 24px;
  border: 2px solid var(--ink);
  background: var(--neutral);
}

.admin-header h1,
.legal-shell h1 {
  margin-bottom: 0;
  font-size: clamp(56px, 8vw, 92px);
  line-height: 0.9;
}

.admin-login {
  display: flex;
  gap: 10px;
  align-items: end;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-grid article {
  min-height: 124px;
  padding: 18px;
  border-radius: 8px;
  background: var(--white);
  border: 2px solid var(--ink);
}

.metric-grid article:nth-child(1) {
  background: var(--tertiary);
}

.metric-grid article:nth-child(2) {
  background: var(--ingredient-apple);
}

.metric-grid article:nth-child(3) {
  background: var(--primary);
}

.metric-grid article:nth-child(4) {
  background: var(--ingredient-sky);
}

.metric-grid span {
  display: block;
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
}

.metric-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 54px;
  line-height: 0.95;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 42px;
  line-height: 0.95;
}

.section-title h3 {
  margin: 0;
}

.quick-redeem-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.metric-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.metric-split h3 {
  margin: 0 0 10px;
  font-family: "Work Sans", "Red Hat Display", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  text-transform: uppercase;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: var(--white);
}

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

th {
  background: var(--secondary);
  color: var(--white);
  font-size: 12px;
  text-transform: uppercase;
}

.pill {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.pill.winner {
  color: var(--ink);
  background: var(--ingredient-apple);
}

.pill.consolation {
  color: var(--ink);
  background: var(--ingredient-sky);
}

.status-ok {
  color: var(--ingredient-green);
  font-weight: 900;
}

.status-expired {
  color: #9a1f16;
  font-weight: 900;
}

.legal-shell {
  max-width: 900px;
}

.legal-shell > .eyebrow {
  margin-top: 16px;
}

.legal-block {
  margin: 18px 0;
  padding: 22px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.legal-block h2 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1;
}

.legal-block p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.warning-block {
  border: 2px solid var(--ink);
  background: var(--tertiary);
}

@media (max-width: 900px) {
  .shell {
    display: block;
    min-height: 0;
  }

  .hero {
    min-height: 620px;
    margin-bottom: 18px;
  }

  .hero-image {
    object-position: center top;
  }

  .hero::after {
    right: 18px;
    bottom: 104px;
    max-width: 220px;
  }

  .admin-header,
  .admin-login {
    display: grid;
    align-items: stretch;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .shell,
  .admin-shell,
  .legal-shell {
    width: min(100% - 20px, 1180px);
    padding: 10px 0 24px;
  }

  .hero {
    min-height: 560px;
    padding: 22px;
  }

  .hero::after {
    display: none;
  }

  .brand-mark {
    font-size: 36px;
  }

  h1 {
    font-size: 60px;
  }

  .lead {
    font-size: 17px;
  }

  .panel,
  .admin-header,
  .legal-block {
    padding: 18px;
  }

  .scan-meta,
  .section-title {
    display: grid;
  }

  .metric-split,
  .quick-redeem-form {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }
}
