/* SCC Padel Tickets — black / red / white */
:root {
  --black: #0b0b0b;
  --ink: #141414;
  --red: #e10600;
  --red-dark: #b80500;
  --white: #ffffff;
  --paper: #f5f4f1;
  --line: #e6e4df;
  --muted: #6b6b6b;
  --ok: #0f9d58;
  --warn: #f2a400;
  --radius: 18px;
  --display: 'Anton', 'Impact', sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: var(--mono); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11,11,11,.55) 0%, rgba(11,11,11,.70) 55%, rgba(11,11,11,.92) 100%),
    linear-gradient(90deg, rgba(11,11,11,.75) 0%, rgba(11,11,11,.15) 70%),
    url('hero.jpg') center 40% / cover no-repeat,
    var(--black);
  color: var(--white);
  padding: 36px 20px 120px;
  border-bottom: 6px solid var(--red);
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.hero-logo { height: 56px; width: auto; display: block; margin-bottom: 34px; }
.logo-text { font-family: var(--display); letter-spacing: 2px; text-transform: uppercase; font-size: 20px; }
.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red);
}
.hero .eyebrow { background: var(--red); color: #fff; padding: 6px 12px; border-radius: 6px; letter-spacing: 2.5px; }
.tickets-head .eyebrow { background: var(--red); color: #fff; padding: 6px 12px; border-radius: 6px; letter-spacing: 2.5px; }
.hero h1 {
  text-shadow: 0 4px 30px rgba(0,0,0,.5);
  margin: 0 0 22px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(56px, 13vw, 112px);
  line-height: .9;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hero h1 span {
  display: block;
  font-size: .36em;
  letter-spacing: 6px;
  margin-top: 12px;
  color: rgba(255,255,255,.75);
}
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  background: rgba(11,11,11,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.chips svg { color: var(--red); width: 16px; height: 16px; }

/* padel court line art */
.hero-court {
  position: absolute; z-index: 1;
  right: -120px; top: 40px;
  width: 520px; height: 300px;
  border: 2px solid rgba(255,255,255,.08);
  transform: rotate(-14deg);
}
.hero-court::before { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; border-left: 3px solid rgba(225,6,0,.5); }
.hero-court::after { content: ''; position: absolute; left: 22%; right: 22%; top: 50%; border-top: 2px solid rgba(255,255,255,.08); }

/* ---------------- Layout ---------------- */
.wrap { max-width: 760px; margin: -84px auto 0; padding: 0 14px 40px; position: relative; z-index: 3; }
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.25), 0 2px 6px rgba(0,0,0,.04);
  padding: 8px 26px 0;
}
.card.narrow { max-width: 440px; margin: 0 auto; padding: 36px 28px; }
.card h2 { margin: 0 0 6px; }
.alert {
  background: #fff1f0; color: var(--red-dark);
  border: 1px solid #ffd1cf; border-radius: 12px;
  padding: 12px 16px; margin-bottom: 14px; font-weight: 600;
}
.soldout { padding: 40px 28px; text-align: center; }
.soldout h2 { font-family: var(--display); font-weight: 400; font-size: 48px; text-transform: uppercase; }

/* ---------------- Steps ---------------- */
.step { padding: 24px 0; border-bottom: 1px solid var(--line); }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.step-head h2 { margin: 0; font-size: 19px; font-weight: 800; }
.num {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--black); color: var(--white);
  font-size: 13px; font-weight: 800;
}
.hint { margin: -6px 0 14px; color: var(--muted); font-size: 14px; }
.hint.hot { color: var(--red); font-weight: 700; margin: 12px 0 0; }

/* ticket type cards */
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-card { position: relative; cursor: pointer; display: block; }
.type-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-body {
  display: flex; flex-direction: column; height: 100%;
  border: 2px solid var(--line); border-radius: 14px;
  padding: 16px;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.type-card:hover .type-body { border-color: #c9c6bf; }
.type-card input:checked + .type-body {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.5);
  transform: translateY(-2px);
}
.type-card input:focus-visible + .type-body { outline: 3px solid var(--red); outline-offset: 2px; }
.type-top { display: flex; justify-content: space-between; align-items: center; }
.type-name { font-weight: 800; font-size: 15px; }
.tick {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line);
  position: relative;
}
.type-card input:checked + .type-body .tick { border-color: var(--red); background: var(--red); }
.type-card input:checked + .type-body .tick::after {
  content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.type-price { font-family: var(--display); font-size: 40px; line-height: 1.1; margin: 10px 0 4px; letter-spacing: .5px; }
.type-card input:checked + .type-body .type-price { color: var(--white); }
.type-note { font-size: 13px; color: var(--muted); }
.type-card input:checked + .type-body .type-note { color: rgba(255,255,255,.65); }

/* attendees */
.attendees { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.attendee {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px; border: 1px solid var(--line); border-radius: 14px;
  background: #fcfcfb;
  animation: rowIn .22s ease-out;
}
.attendee.leaving { opacity: 0; transform: translateX(12px); transition: all .18s; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.a-num {
  width: 30px; height: 30px; flex-shrink: 0; margin-top: 7px;
  border-radius: 8px; background: var(--red); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.a-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.a-remove {
  border: 0; background: transparent; color: #9a9a9a; cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px; margin-top: 5px;
  display: grid; place-items: center;
}
.a-remove:hover { background: #f0efec; color: var(--ink); }

input[type=text], input:not([type]), input[type=email], input[type=tel], input[type=password] {
  width: 100%;
  font: inherit; font-size: 16px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,6,0,.12); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: inline-block;
  padding: 6px 12px;
  border: 1.5px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--muted);
  white-space: nowrap;
  transition: all .15s;
}
.seg input:checked + span { background: var(--black); border-color: var(--black); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px dashed #c9c6bf; background: transparent;
  color: var(--ink); font: inherit; font-weight: 700; font-size: 15px;
  padding: 12px 18px; border-radius: 12px; cursor: pointer;
  text-decoration: none;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--black); border-style: solid; }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }
#addBtn { width: 100%; justify-content: center; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }

/* summary */
.summary {
  position: sticky; bottom: 0;
  margin: 0 -26px;
  padding: 16px 26px 18px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}
.summary-lines { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.summary-lines div { display: flex; justify-content: space-between; }
.summary-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.summary-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.summary-total { font-family: var(--display); font-size: 34px; line-height: 1; }
.btn-pay {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--red); color: #fff; border: 0;
  font: inherit; font-weight: 800; font-size: 16px;
  padding: 16px 26px; border-radius: 999px; cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 24px -8px rgba(225,6,0,.6);
  transition: background .15s, transform .1s;
}
.btn-pay:hover { background: var(--red-dark); }
.btn-pay:active { transform: scale(.98); }
.btn-pay:disabled { opacity: .7; cursor: progress; }
.btn-pay.wide { width: 100%; margin-top: 12px; }
.secure { display: flex; align-items: center; gap: 6px; justify-content: center; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.secure svg { width: 14px; height: 14px; }

.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 10px 20px 40px; }

/* ---------------- Status pages ---------------- */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--black); position: relative; isolation: isolate; }
.center-page .card h2 { font-family: var(--display); font-weight: 400; font-size: 34px; text-transform: uppercase; letter-spacing: .5px; }
.big-icon { font-size: 40px; margin-bottom: 8px; }
.spinner {
  width: 44px; height: 44px; margin: 0 auto 18px;
  border: 4px solid var(--line); border-top-color: var(--red);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Tickets page ---------------- */
.tickets-page { background: var(--black); color: #fff; min-height: 100vh; position: relative; isolation: isolate; }
/* event photo behind the tickets & status pages, darkened so content stays readable */
.tickets-page::before, .center-page::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,11,11,.72), rgba(11,11,11,.88)),
    url('hero.jpg') center 40% / cover no-repeat;
}
.tickets-head { text-align: center; padding: 44px 20px 26px; position: relative; overflow: hidden; }
.tickets-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 9vw, 72px); line-height: 1; margin: 0 0 8px; text-transform: uppercase; }
.tickets-head .muted { color: rgba(255,255,255,.6); }
.tickets-head .actions { margin-top: 20px; }
.tickets-page .foot { color: rgba(255,255,255,.5); }

.ticket-list { max-width: 820px; margin: 0 auto; padding: 0 14px 20px; display: flex; flex-direction: column; gap: 22px; }
/* Classic ticket shape: curved-in corners + scalloped side edges.
   Three layers because each mask does one job:
   .ticket-wrap  = drop shadow (masks would clip a normal box-shadow)
   .ticket-shape = curved-in corners
   .ticket       = scalloped left/right edges */
.ticket-wrap { filter: drop-shadow(0 22px 30px rgba(0,0,0,.55)); break-inside: avoid; page-break-inside: avoid; }
.ticket-shape {
  --corner: 22px;
  -webkit-mask:
    radial-gradient(circle at 0 0,       #0000 var(--corner), #000 calc(var(--corner) + .5px)) top left     / 51% 51% no-repeat,
    radial-gradient(circle at 100% 0,    #0000 var(--corner), #000 calc(var(--corner) + .5px)) top right    / 51% 51% no-repeat,
    radial-gradient(circle at 0 100%,    #0000 var(--corner), #000 calc(var(--corner) + .5px)) bottom left  / 51% 51% no-repeat,
    radial-gradient(circle at 100% 100%, #0000 var(--corner), #000 calc(var(--corner) + .5px)) bottom right / 51% 51% no-repeat;
          mask:
    radial-gradient(circle at 0 0,       #0000 var(--corner), #000 calc(var(--corner) + .5px)) top left     / 51% 51% no-repeat,
    radial-gradient(circle at 100% 0,    #0000 var(--corner), #000 calc(var(--corner) + .5px)) top right    / 51% 51% no-repeat,
    radial-gradient(circle at 0 100%,    #0000 var(--corner), #000 calc(var(--corner) + .5px)) bottom left  / 51% 51% no-repeat,
    radial-gradient(circle at 100% 100%, #0000 var(--corner), #000 calc(var(--corner) + .5px)) bottom right / 51% 51% no-repeat;
}
.ticket {
  --tooth: 5px;   /* size of each scallop */
  --gap: 15px;    /* distance between scallops */
  display: flex;
  background: var(--white); color: var(--ink);
  position: relative;
  -webkit-mask:
    radial-gradient(circle at 0 50%,    #0000 var(--tooth), #000 calc(var(--tooth) + .5px)) left  center / 51% var(--gap) repeat-y,
    radial-gradient(circle at 100% 50%, #0000 var(--tooth), #000 calc(var(--tooth) + .5px)) right center / 51% var(--gap) repeat-y;
          mask:
    radial-gradient(circle at 0 50%,    #0000 var(--tooth), #000 calc(var(--tooth) + .5px)) left  center / 51% var(--gap) repeat-y,
    radial-gradient(circle at 100% 50%, #0000 var(--tooth), #000 calc(var(--tooth) + .5px)) right center / 51% var(--gap) repeat-y;
}
/* inner border line, like a printed ticket */
.t-frame {
  position: absolute; inset: 13px 16px;
  border: 1.5px solid rgba(225,6,0,.55);
  border-radius: 12px;
  pointer-events: none; z-index: 2;
}
.t-main {
  flex: 1; min-width: 0;
  padding: 28px 30px 26px 36px;
  background: var(--white);
}
.ticket.is-premium .t-main {
  background: radial-gradient(circle at 100% 0, rgba(225,6,0,.08), transparent 45%), var(--white);
}
.t-top { display: flex; align-items: center; gap: 14px; }
.t-logo-wrap { background: var(--black); border-radius: 10px; padding: 8px 12px; display: inline-flex; color: #fff; }
.t-logo { height: 34px; width: auto; display: block; }
.t-logo.logo-text { font-size: 15px; height: auto; }
.t-partner { height: 34px; }
.t-badge {
  margin-left: auto;
  background: var(--black); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.ticket.is-premium .t-badge { background: var(--red); }
.t-event { margin: 18px 0 16px; }
.t-name { font-family: var(--display); font-size: clamp(38px, 7vw, 56px); line-height: .95; text-transform: uppercase; }
.t-sub { font-weight: 800; letter-spacing: 4px; text-transform: uppercase; font-size: 13px; color: var(--red); margin-top: 6px; }
.t-sub .star { letter-spacing: 0; color: var(--ink); }
.t-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 12px 20px; }
.t-grid span { display: block; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.t-grid strong { font-size: 15px; font-weight: 800; }
.t-grid div:first-child strong { font-size: 17px; }
.t-foot {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin-top: 18px; padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--muted); font-weight: 600;
}
.t-stub {
  width: 220px; flex-shrink: 0;
  background: #1c1c1c; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 26px 30px 26px 22px;
  border-left: 2px dashed rgba(255,255,255,.35);   /* tear-off line */
}
.t-stars { color: var(--red); font-size: 11px; letter-spacing: 6px; line-height: 1; margin: 2px 0 12px; }
.t-stars b { font-size: 16px; font-weight: 400; }
.t-stub .t-stars:last-child { margin: 12px 0 0; }
.qr { width: 160px; height: 160px; background: #fff; border-radius: 12px; padding: 8px; }
.qr svg { width: 100%; height: 100%; display: block; stroke: none; }
.t-code { font-family: var(--mono); font-size: 12px; margin-top: 12px; letter-spacing: .5px; }
.t-scan { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--red); font-weight: 800; margin-top: 4px; }

/* ---------------- Verify page ---------------- */
.verify-page { background: var(--paper); min-height: 100vh; }
.v-head { background: var(--black); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 4px solid var(--red); }
.v-logo { height: 30px; width: auto; }
.v-stats { font-size: 13px; font-weight: 700; background: rgba(255,255,255,.1); padding: 6px 12px; border-radius: 999px; }
.v-wrap { max-width: 480px; margin: 0 auto; padding: 20px 14px 40px; display: flex; flex-direction: column; gap: 16px; }
.v-wrap .card { padding: 28px 24px; }
.pin { text-align: center; font-size: 26px !important; letter-spacing: 8px; margin-top: 10px; }
.v-result { border-radius: var(--radius); padding: 26px 22px; color: #fff; text-align: center; }
.v-ok { background: var(--ok); }
.v-warn { background: var(--warn); color: #1a1200; }
.v-bad { background: var(--red); }
.v-title { font-family: var(--display); font-size: 40px; line-height: 1; letter-spacing: 1px; }
.v-name { font-size: 26px; font-weight: 800; margin-top: 14px; }
.v-meta { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 8px; flex-wrap: wrap; font-size: 13px; }
.v-type { background: rgba(0,0,0,.25); padding: 4px 10px; border-radius: 999px; font-weight: 800; }
.v-type.prem { background: #000; }
.v-buyer { font-size: 13px; opacity: .85; margin-top: 6px; }
.v-result p { margin: 14px 0 0; font-weight: 600; }
.btn-checkin {
  margin-top: 18px; width: 100%;
  background: #fff; color: var(--ok); border: 0;
  font: inherit; font-weight: 800; font-size: 20px;
  padding: 18px; border-radius: 14px; cursor: pointer;
}
.v-manual { display: flex; gap: 8px; }
.v-manual input { text-transform: uppercase; font-family: var(--mono); font-size: 14px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 620px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(11,11,11,.55) 0%, rgba(11,11,11,.75) 60%, rgba(11,11,11,.94) 100%),
      url('hero-mobile.jpg') 50% 45% / cover no-repeat,
      var(--black);
  }
  .tickets-page::before, .center-page::before {
    background: linear-gradient(180deg, rgba(11,11,11,.72), rgba(11,11,11,.9)), url('hero-mobile.jpg') 50% 45% / cover no-repeat;
  }
  .hero { padding: 26px 18px 110px; }
  .hero-logo { margin-bottom: 26px; height: 38px; }
  .card { padding: 4px 18px 0; }
  .summary { margin: 0 -18px; padding: 14px 18px 16px; }
  .types { grid-template-columns: 1fr; }
  .type-price { font-size: 34px; }
  .grid2 { grid-template-columns: 1fr; }
  .seg span { font-size: 12px; padding: 6px 11px; }
  .btn-pay { padding: 15px 20px; }

  .ticket { flex-direction: column; --gap: 13px; }
  .ticket-shape { --corner: 18px; }
  .t-main { padding: 26px 26px 20px 30px; }
  .t-grid { grid-template-columns: 1fr 1fr; }
  .t-stub { width: auto; padding: 22px 18px 30px; border-left: 0; border-top: 2px dashed rgba(255,255,255,.35); }
  .qr { width: 190px; height: 190px; }
}

/* ---------------- Print (save as PDF) ---------------- */
@media print {
  @page { margin: 12mm; }
  body, .tickets-page { background: #fff !important; }
  .no-print { display: none !important; }
  .tickets-page::before { display: none; }
  .ticket-list { padding: 0; gap: 10mm; }
  .ticket-wrap { filter: none; }
  .ticket { flex-direction: row !important; }
  .t-stub, .t-badge, .t-main, .v-result { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .t-stub { width: 220px !important; border-top: 0 !important; border-left: 2px dashed rgba(255,255,255,.35) !important; }
  .ticket { box-shadow: inset 0 0 0 1px #ccc; }
}
