/* ===== Ruido Blanco — mobile first ===== */

:root {
  --blanco: #ebe7e6;
  --negro: #212121;
  --pad: 20px;
  --gap-section: clamp(120px, 34vw, 200px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  background: var(--negro);
  color: var(--blanco);
  font-family: "degular-mono", ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  padding-bottom: 32px;
}

/* Full-page grunge texture overlay */
.grain {
  position: fixed;
  inset: 0;
  background: url("assets/texture.jpg") center / cover no-repeat;
  opacity: 0.18;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 5;
}

main { position: relative; z-index: 1; }

/* ===== Hero ===== */
.hero {
  position: relative;
  width: 100%;
  background: var(--negro);
}

.hero picture {
  display: block;
  width: 100%;
}

.hero__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero__title {
  padding: 56px var(--pad) 0;
  font-family: "scotch-deck-compressed", serif;
  font-weight: 300;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 0.92;
  white-space: nowrap;
  font-size: clamp(2.9rem, 16vw, 4.3rem);
}

/* ===== Container / sections ===== */
.container {
  padding: 80px var(--pad) 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
}

.mono {
  font-family: "degular-mono", ui-monospace, monospace;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: -0.16px;
  text-transform: uppercase;
}

/* Intro group: details table + top CTA */
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
}

/* Event details */
.details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.rule {
  border: none;
  border-top: 1px solid rgba(235, 231, 230, 0.55);
  width: 100%;
}

.details__venue {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.muted {
  color: inherit;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
a.muted:hover { opacity: 1; }

/* Lineup blocks */
.block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  text-align: center;
}

.label {
  opacity: 0.9;
}

.name {
  font-family: "scotch-deck-compressed", serif;
  font-weight: 300;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
}

/* CTA */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 8px;
  background: var(--blanco);
  color: var(--negro);
  font-family: "degular-mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.16px;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.25s ease;
}
.cta:hover { opacity: 0.9; }
.cta:active { opacity: 0.8; }

/* ===== Pago screen ===== */
.pago {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px var(--pad);
  text-align: center;
}
.pago__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.pago__title {
  font-family: "scotch-deck-compressed", serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 12vw, 3.5rem);
  line-height: 0.95;
  text-transform: uppercase;
}
.pago__note { margin-top: 4px; }
.back {
  margin-top: 24px;
  color: inherit;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.back:hover { opacity: 1; }

/* ===== Purchase flow ===== */
.flow {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 64px var(--pad) 40px;
}
.flow__inner {
  flex: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.flow__fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}
.flow__inner > .cta { margin-top: 32px; }
.flow__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}
.flow__title {
  font-family: "scotch-deck-compressed", serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 12vw, 3.4rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field input {
  width: 100%;
  height: 54px;
  background: transparent;
  border: 1px solid rgba(235, 231, 230, 0.55);
  color: var(--blanco);
  font-size: 16px;
  letter-spacing: -0.16px;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.25s ease;
}
.field input::placeholder { color: rgba(235, 231, 230, 0.35); }
.field input:focus { border-color: var(--blanco); }

.qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(235, 231, 230, 0.55);
  padding: 6px;
}
.qty__btn {
  background: transparent;
  border: none;
  color: var(--blanco);
  font-family: "degular-mono", ui-monospace, monospace;
  font-size: 24px;
  line-height: 1;
  width: 48px;
  height: 40px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.qty__btn:hover { opacity: 0.7; }
.qty__btn:disabled { opacity: 0.25; cursor: default; }
.qty__num {
  font-family: "degular-mono", ui-monospace, monospace;
  font-size: 20px;
  min-width: 40px;
  text-align: center;
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: -0.16px;
}
.total span:last-child { font-size: 20px; }

.err {
  color: #e5a3a3;
  font-size: 13px;
  text-transform: none;
  margin-top: -18px;
}

.flow .back {
  position: absolute;
  top: 24px;
  left: var(--pad);
  margin: 0;
}

/* ===== Colophon page ===== */
.colofon {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px var(--pad) 40px;
}
.colofon .back { position: absolute; top: 24px; left: var(--pad); margin: 0; }
.colofon__inner {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.colofon__title {
  font-family: "scotch-deck-compressed", serif;
  font-weight: 300;
  font-size: clamp(2.6rem, 13vw, 3.6rem);
  line-height: 0.95;
  text-transform: uppercase;
  margin-top: 8px;
}
.colofon__block { display: flex; flex-direction: column; gap: 10px; }
.colofon__block .label { margin-bottom: 6px; }
.colofon__item {
  font-family: "scotch-deck-compressed", serif;
  font-weight: 300;
  font-size: 26px;
  line-height: 1.15;
  text-transform: uppercase;
}
.colofon__item a {
  color: var(--blanco);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 0.25s ease;
}
.colofon__item a:hover { opacity: 0.6; }
.colofon__de { opacity: 1; }
.colofon__link {
  font-size: 16px;
  letter-spacing: -0.16px;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  opacity: 0.6;
  margin-top: 6px;
  transition: opacity 0.3s ease;
}
.colofon__link:hover { opacity: 1; }
.colofon__note {
  font-family: "degular-mono", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.4;
  max-width: 420px;
  margin-top: 8px;
}

/* ===== Footer (colophon) ===== */
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 0 var(--pad);
  margin-top: clamp(96px, 30vw, 220px);
  font-family: "degular-mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: -0.16px;
  text-transform: uppercase;
  opacity: 0.5;
}
.footer__c { white-space: nowrap; }
.footer__colophon {
  text-align: right;
  max-width: 62%;
  line-height: 1.5;
}
.footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ===== Dashboard ===== */
.dash {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 56px var(--pad);
}
.dash__login {
  max-width: 380px;
  margin: 10vh auto 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}
.dash__panel {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.dash__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}
.dash__refresh {
  background: transparent;
  border: 1px solid rgba(235, 231, 230, 0.4);
  color: var(--blanco);
  padding: 8px 14px;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.dash__refresh:hover { opacity: 0.7; }

.dash__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(235, 231, 230, 0.18);
  border: 1px solid rgba(235, 231, 230, 0.18);
}
.stat {
  background: var(--negro);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat__label { font-size: 11px; opacity: 0.6; text-transform: uppercase; }
.stat__val {
  font-family: "scotch-deck-compressed", serif;
  font-weight: 300;
  font-size: 34px;
  line-height: 1;
}

.dash__tablewrap { overflow-x: auto; }
.dash__table {
  width: 100%;
  border-collapse: collapse;
  font-family: "degular-mono", ui-monospace, monospace;
  font-size: 13px;
}
.dash__table th,
.dash__table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(235, 231, 230, 0.15);
  white-space: nowrap;
}
.dash__table th {
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.5;
  font-weight: 400;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  text-transform: uppercase;
  border: 1px solid rgba(235, 231, 230, 0.3);
  opacity: 0.7;
}
.badge--ok {
  border-color: #6fae7f;
  color: #9fd3ab;
  opacity: 1;
}

@media (min-width: 700px) {
  .dash__stats { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Door check-in ===== */
.validar {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px var(--pad);
}
.validar__card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: center;
}
.v-state {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 40px 20px;
  border: 1px solid rgba(235, 231, 230, 0.2);
}
.v-big {
  font-family: "scotch-deck-compressed", serif;
  font-weight: 300;
  font-size: clamp(2.6rem, 13vw, 3.6rem);
  line-height: 0.95;
  text-transform: uppercase;
}
.v-sub { font-size: 14px; opacity: 0.75; word-break: break-word; }
.v-name { font-size: 24px; letter-spacing: 1px; opacity: 1; }
.v-qty { font-size: 24px; opacity: 0.75; margin-top: 6px; }
.v-ok  { border-color: #6fae7f; color: #b7e0c0; }
.v-warn { border-color: #d8a24a; color: #e7c78a; }
.v-bad { border-color: #d07a7a; color: #e6a8a8; }
.validar .cta { width: 100%; }

/* ===== Subtle reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero__title {
  opacity: 0;
  animation: title-in 1.4s ease 0.2s forwards;
}
@keyframes title-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Desktop ===== */
@media (min-width: 900px) {
  /* Hero image extends down to the first details line, title overlaid on top */
  .hero__img {
    height: 84vh;
    object-fit: cover;
    object-position: center bottom;
  }
  .hero__title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 var(--pad) 20px;
  }
  .container {
    padding-top: 8px;
  }
  /* Last CTA (bottom) fixed width, centered */
  .container > .cta {
    width: 400px;
    align-self: center;
  }
  body {
    padding-bottom: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero__title {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}
