/* MK/02 — sistema visual MeinKlasse aplicado a tickets */
:root {
  --waldschwarz: #0f1311;
  --waldschwarz-2: #161b18;
  --britischgruen: #17302a;
  --altgold: #b8973e;
  --altgold-2: #d4b46a;
  --pergament: #ede4d1;
  --pergament-2: #cfc6b3;
  --zinn: #8a8f8b;
  --bronze: #8c6a3f;
  --apex: #d7262b;
  --ok: #3f9a5d;
  --warn: #d9a21b;
  --line: rgba(237, 228, 209, 0.12);
  --font-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 6px;
  --gutter: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--waldschwarz); color: var(--pergament);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--altgold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.caps { font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 0.22em; font-size: 11px; font-weight: 600; }
.caps.soft { color: var(--zinn); font-weight: 500; }
.serif { font-family: var(--font-serif); font-weight: 500; }
.mono { font-family: var(--font-mono); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--apex); margin-left: 8px; vertical-align: 2px; }
.gold { color: var(--altgold); }
.muted { color: var(--zinn); }
.hidden { display: none !important; }

/* Header */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 22px 0 18px; border-bottom: 1px solid var(--line); }
.topbar .brand { letter-spacing: 0.3em; font-weight: 600; font-size: 12px; color: var(--pergament); }
.topbar .code { color: var(--zinn); }

/* Hero */
.hero { position: relative; padding: 64px 0 56px; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 500px at 85% 10%, rgba(23, 48, 42, 0.75), transparent 60%),
    radial-gradient(800px 400px at 10% 90%, rgba(140, 106, 63, 0.25), transparent 60%),
    var(--waldschwarz);
}
/* Banner con foto: texto a la izquierda, foto a la derecha fundida al fondo. En celular, foto arriba y texto abajo. */
.hero.has-photo { display: flex; align-items: center; min-height: 72vh; padding: 56px 0 52px; }
.hero.has-photo .wrap { position: relative; z-index: 1; width: 100%; }
.hero.has-photo .hero-text { max-width: 50%; }
.hero.has-photo h1 { font-size: clamp(56px, 6.8vw, 96px); white-space: nowrap; }
.hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 62%; overflow: hidden; background: var(--waldschwarz-2); }
.hero-photo .slide { position: absolute; inset: 0; background-position: center; background-size: cover; background-repeat: no-repeat; opacity: 0; transform: scale(1.04); transition: opacity 1.4s ease; }
.hero-photo .slide.on { opacity: 1; animation: kenburns 7s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .hero-photo .slide, .hero-photo .slide.on { animation: none; transform: none; transition: opacity 1s ease; } }
.hero-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, var(--waldschwarz) 0%, rgba(15,19,17,0.88) 14%, rgba(15,19,17,0.35) 48%, rgba(15,19,17,0.06) 100%),
    linear-gradient(0deg, rgba(15,19,17,0.85) 0%, rgba(15,19,17,0) 32%),
    linear-gradient(180deg, rgba(15,19,17,0.45) 0%, rgba(15,19,17,0) 25%);
}
@media (max-width: 900px) {
  .hero.has-photo { display: block; min-height: 0; padding: 0 0 44px; }
  .hero-photo { position: relative; width: 100%; height: 44vh; min-height: 260px; max-height: 420px; }
  .hero-photo::after { background: linear-gradient(0deg, var(--waldschwarz) 0%, rgba(15,19,17,0.6) 22%, rgba(15,19,17,0.05) 55%); }
  .hero.has-photo .hero-text { max-width: none; margin-top: -56px; }
  .hero.has-photo h1 { font-size: clamp(52px, 13vw, 80px); white-space: normal; }
}
.hero .kicker { color: var(--altgold); margin-bottom: 18px; }
.hero h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(56px, 11vw, 124px); line-height: 0.92; margin: 0 0 18px; letter-spacing: -0.01em; }
.hero h1 .num { color: var(--altgold); font-style: italic; }
.hero .tagline { font-size: clamp(16px, 2.2vw, 20px); color: var(--pergament-2); margin: 0 0 32px; max-width: 520px; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px 32px; max-width: 760px; }
.meta .label { color: var(--zinn); margin-bottom: 6px; }
.meta .value { font-size: 16px; font-weight: 500; }
.meta .sub { color: var(--zinn); font-size: 13px; margin-top: 2px; }

/* Sections */
section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-family: var(--font-serif); font-weight: 500; font-size: 36px; margin: 0; line-height: 1; }
.section-head .caps { color: var(--zinn); }

/* Ticket cards */
.tickets { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.ticket-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px 24px;
  background: linear-gradient(180deg, rgba(237,228,209,0.035), rgba(237,228,209,0.01));
  cursor: pointer; transition: border-color .2s, transform .2s;
}
.ticket-card:hover { border-color: rgba(184,151,62,0.5); }
.ticket-card.selected { border-color: var(--altgold); box-shadow: 0 0 0 1px var(--altgold) inset; }
.ticket-card.soldout { opacity: 0.55; cursor: not-allowed; }
.ticket-card .type { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ticket-card .type .caps { color: var(--altgold); }
.ticket-card.general .type .caps { color: var(--pergament-2); }
.ticket-card .price { font-family: var(--font-serif); font-size: 52px; line-height: 1; font-weight: 500; margin-bottom: 4px; }
.ticket-card .price small { font-size: 22px; vertical-align: 14px; margin-right: 4px; color: var(--pergament-2); }
.ticket-card .per { color: var(--zinn); font-size: 13px; margin-bottom: 20px; }
.ticket-card ul { list-style: none; padding: 0; margin: 0 0 22px; }
.ticket-card li { padding: 8px 0; border-top: 1px solid var(--line); color: var(--pergament-2); font-size: 14px; display: flex; gap: 10px; }
.ticket-card li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--altgold); flex: 0 0 5px; margin-top: 8px; }
.ticket-card .avail { font-size: 12px; color: var(--zinn); }
.ticket-card .avail.low { color: var(--warn); }
.ticket-card .avail.out { color: var(--apex); }
.pick { position: absolute; top: 20px; right: 20px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--zinn); }
.ticket-card.selected .pick { border-color: var(--altgold); background: radial-gradient(circle, var(--altgold) 45%, transparent 50%); }

/* Form */
.form-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; background: rgba(237,228,209,0.02); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 16px; }
.field label { display: block; color: var(--zinn); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--waldschwarz-2); border: 1px solid var(--line); color: var(--pergament);
  border-radius: 4px; padding: 12px 13px; font: inherit; font-size: 15px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--altgold); }
.field input.invalid { border-color: var(--apex); }
.attendee { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.attendee h4 { margin: 0 0 14px; font-weight: 500; color: var(--altgold-2); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }
.check { display: flex; gap: 12px; align-items: flex-start; color: var(--pergament-2); font-size: 13.5px; margin: 22px 0 0; }
.check input { margin-top: 3px; accent-color: var(--altgold); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  font: inherit; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; font-size: 12px;
  border-radius: 4px; padding: 16px 26px; border: 1px solid var(--altgold); color: var(--waldschwarz); background: var(--altgold);
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--altgold-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn.ghost { background: transparent; color: var(--pergament); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--altgold); background: transparent; }
.btn.block { width: 100%; }
.btn.danger { background: transparent; color: var(--apex); border-color: rgba(215,38,43,0.5); }
.summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 26px 0 16px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.summary .total { font-family: var(--font-serif); font-size: 36px; line-height: 1; }
.summary .total small { font-size: 16px; color: var(--pergament-2); margin-right: 4px; }
.error { color: var(--apex); font-size: 13.5px; margin-top: 12px; min-height: 1em; }
.note { color: var(--zinn); font-size: 12.5px; margin-top: 14px; line-height: 1.5; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--zinn); font-size: 12.5px; }
footer .row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--pergament-2); }

/* Status pages */
.status-card { max-width: 640px; margin: 48px auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 30px; text-align: center; }
.status-card h1 { font-family: var(--font-serif); font-weight: 500; font-size: 44px; margin: 10px 0 8px; line-height: 1.05; }
.status-card p { color: var(--pergament-2); }
.spinner { width: 26px; height: 26px; border: 2px solid var(--line); border-top-color: var(--altgold); border-radius: 50%; margin: 0 auto 18px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ticket-list { text-align: left; margin: 26px 0 0; display: grid; gap: 12px; }
.ticket-row { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ticket-row .who { font-weight: 500; }
.ticket-row .who small { display: block; color: var(--zinn); font-weight: 400; font-size: 12.5px; }
.ticket-row .links { display: flex; gap: 14px; font-size: 13px; }

/* Ticket page */
.eticket { max-width: 460px; margin: 36px auto; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--waldschwarz-2); }
.eticket .top { padding: 26px 26px 20px; border-bottom: 1px dashed rgba(237,228,209,0.25); }
.eticket .title { font-family: var(--font-serif); font-size: 44px; line-height: 1; margin: 10px 0 4px; }
.eticket .title .num { color: var(--altgold); font-style: italic; }
.eticket .qrbox { background: var(--pergament); padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.eticket .qrbox img { width: 240px; height: 240px; image-rendering: pixelated; }
.eticket .qrbox .code { font-family: var(--font-mono); color: var(--waldschwarz); font-size: 15px; letter-spacing: 0.04em; }
.eticket .qrbox .caps { color: var(--bronze); font-size: 10px; }
.eticket .holder { padding: 20px 26px 24px; }
.eticket .holder .name { font-family: var(--font-serif); font-size: 30px; line-height: 1.05; }
.badge { display: inline-block; padding: 7px 12px; border-radius: 3px; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; }
.badge.vip { background: var(--altgold); color: var(--waldschwarz); }
.badge.general { border: 1px solid var(--pergament); color: var(--pergament); }
.badge.used { background: var(--zinn); color: var(--waldschwarz); }
.badge.void { background: var(--apex); color: #fff; }

@media (max-width: 640px) {
  .hero { padding: 44px 0 40px; }
  section { padding: 40px 0; }
  .section-head h2 { font-size: 30px; }
  .ticket-card, .form-card { padding: 22px 18px; }
  .ticket-card .price { font-size: 44px; }
}
