/* Ticket shop for shop.pianistjessica.com
   Palette follows the concert flyer: deep plum, warm gold, cream. */

:root {
  --plum-950: #120820;
  --plum-900: #1a0c2c;
  --plum-800: #24123a;
  --plum-700: #311a4f;
  --plum-600: #44286b;
  --gold: #d9b76a;
  --gold-deep: #a9822f;
  --gold-soft: #f0dcae;
  --cream: #fbf6ea;
  --cream-2: #f3e9d4;
  --line: #e4d7ba;
  --ink: #24123a;
  --ink-soft: #5d4c70;
  --lilac: #cdbfe0;
  --ok: #1f8a4c;
  --warn: #c77700;
  --bad: #c0392b;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(8, 2, 18, 0.45);
  --font-script: 'Great Vibes', 'Snell Roundhand', cursive;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Cabin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--plum-950); }

[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-variant-numeric: lining-nums;
  font-size: 17px;
  line-height: 1.55;
  color: var(--cream);
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(193, 59, 214, 0.22), transparent 60%),
    radial-gradient(900px 520px at -10% 20%, rgba(217, 183, 106, 0.14), transparent 60%),
    linear-gradient(180deg, var(--plum-900), var(--plum-950) 900px);
  background-repeat: no-repeat;
  background-color: var(--plum-950);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--gold); }
a:hover { color: var(--gold-soft); }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0 8px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--cream); }
.brand-name { font-family: var(--font-script); font-size: 40px; line-height: 1; }
.brand-tag { font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold); }
.topbar-link { font-size: 14px; text-decoration: none; border-bottom: 1px solid rgba(217, 183, 106, 0.4); padding-bottom: 2px; }

.banner {
  background: #ffcf5c; color: #3a2a00; text-align: center; font-size: 14px; font-weight: 600;
  padding: 8px 16px;
}

/* ---------- Hero ---------- */
.hero { display: grid; gap: 36px; padding: 28px 0 56px; }
@media (min-width: 940px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-areas: 'info card' 'steps card';
    grid-template-rows: auto 1fr;
    column-gap: 56px; row-gap: 40px; align-items: start; padding: 48px 0 80px;
  }
  .hero .info { grid-area: info; }
  .hero .card { grid-area: card; }
  .hero .steps { grid-area: steps; }
}

.eyebrow { font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }

.title { font-family: var(--font-display); font-weight: 600; font-size: clamp(42px, 8.4vw, 76px); line-height: 1.02; margin: 0; letter-spacing: -0.01em; }
.title small { display: block; font-size: 0.46em; font-weight: 500; font-style: italic; color: var(--gold-soft); margin-top: 10px; letter-spacing: 0.01em; }

.artist { margin: 26px 0 0; }
.artist-name { font-family: var(--font-script); font-size: clamp(50px, 9vw, 74px); line-height: 1; color: var(--gold); display: block; }
.artist-role { display: block; font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--lilac); margin-top: 8px; }

.intro { font-size: 18px; color: #e6dcf2; max-width: 46ch; margin: 24px 0 0; }

.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.facts li { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; }
.facts svg { width: 22px; height: 22px; margin-top: 3px; color: var(--gold); }
.facts strong { display: block; font-size: 18px; font-weight: 600; }
.facts span { color: var(--lilac); font-size: 15px; }

.cause {
  margin: 30px 0 0; padding: 18px 20px; border: 1px solid rgba(217, 183, 106, 0.55); border-radius: 14px;
  background: rgba(217, 183, 106, 0.08);
}
.cause p { margin: 0; font-family: var(--font-display); font-size: 23px; line-height: 1.25; font-weight: 600; }
.cause small { display: block; margin-top: 8px; color: var(--lilac); font-size: 14px; font-family: var(--font-body); font-weight: 400; }

/* ---------- Ticket form card ---------- */
.card {
  background: var(--cream); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 22px; border: 1px solid rgba(255, 255, 255, 0.6);
}
@media (min-width: 560px) { .card { padding: 32px; } }
.card h2 { font-family: var(--font-display); font-size: 32px; line-height: 1.1; margin: 0 0 4px; font-weight: 700; }
.card .sub { margin: 0 0 18px; color: var(--ink-soft); font-size: 15px; }

.tiers { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tier { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tier-name { font-weight: 700; font-size: 17px; }
.tier-note { display: block; font-size: 13px; color: var(--ink-soft); }
.tier-price { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-right: 6px; }
.tier-right { display: flex; align-items: center; gap: 10px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid #cdbb93; border-radius: 999px; background: #fff; }
.stepper button {
  width: 44px; height: 44px; border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--ink);
  cursor: pointer; border-radius: 999px; font-family: var(--font-body);
}
.stepper button:hover:not(:disabled) { background: var(--cream-2); }
.stepper button:disabled { color: #c7bcae; cursor: not-allowed; }
.stepper output { min-width: 26px; text-align: center; font-weight: 700; font-size: 17px; }

.field { margin-top: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; height: 50px; border: 1px solid #cdbb93; border-radius: 10px; padding: 0 14px; font: inherit; color: var(--ink);
  background: #fff;
}
.field input:focus, .field select:focus, .stepper button:focus-visible, .btn:focus-visible {
  outline: 3px solid rgba(193, 59, 214, 0.45); outline-offset: 2px;
}
.hint { font-size: 13px; color: var(--ink-soft); margin: 6px 0 0; }

.guests { margin-top: 18px; padding: 14px 16px 16px; background: var(--cream-2); border-radius: 12px; }
.guests summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.guests .field:first-of-type { margin-top: 12px; }
.guests .field { margin-top: 10px; }
.guests .field label { font-weight: 500; font-size: 13px; }
.guests .field input { height: 46px; }

.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 22px; padding-top: 16px; border-top: 2px solid var(--ink); }
.total span { font-weight: 600; }
.total strong { font-family: var(--font-display); font-size: 34px; line-height: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 18px;
  border: 0; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 700; font-size: 18px; text-decoration: none;
  color: #1f0f33; background: linear-gradient(180deg, #e6c67c, #c9a14d); box-shadow: 0 8px 20px rgba(169, 130, 47, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.04); color: #1f0f33; }
.btn:disabled { background: #d9d0c0; color: #8b8172; box-shadow: none; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--ink); border: 1px solid #cdbb93; box-shadow: none; min-height: 48px; font-size: 16px; }
.btn.small { width: auto; min-height: 40px; padding: 0 16px; font-size: 15px; margin-top: 0; }

.secure { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; font-size: 13px; color: var(--ink-soft); }
.secure svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.msg { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; font-size: 15px; display: none; }
.msg.show { display: block; }
.msg.error { background: #fdecea; color: #8d2318; border: 1px solid #f3c1bb; }
.msg.info { background: #eef4ff; color: #1f3b77; border: 1px solid #c6d6f7; }

.notice { text-align: center; padding: 26px 8px 8px; }
.notice h3 { font-family: var(--font-display); font-size: 30px; margin: 0 0 6px; }
.notice p { margin: 0; color: var(--ink-soft); }

.lowstock { display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; background: #fff0d6; color: #8a5200; font-size: 13px; font-weight: 700; }

/* ---------- Steps ---------- */
.steps h2 { font-family: var(--font-display); font-size: 30px; margin: 0 0 16px; font-weight: 600; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; column-gap: 16px; align-items: start; }
.steps li::before { content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-weight: 700; }
.steps h3 { margin: 0; font-size: 18px; }
.steps p { margin: 2px 0 0; color: var(--lilac); font-size: 15.5px; }

.footer { border-top: 1px solid rgba(205, 191, 224, 0.18); padding: 26px 0 40px; color: var(--lilac); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer p { margin: 0; }

/* ---------- Ticket card (thank-you page, ticket page, print) ---------- */
.page-head { padding: 28px 0 8px; text-align: center; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(36px, 7vw, 54px); line-height: 1.05; margin: 0 0 10px; font-weight: 600; }
.page-head p { margin: 0 auto; max-width: 54ch; color: #e6dcf2; }

.tickets { display: grid; gap: 22px; padding: 26px 0 30px; justify-items: center; }

.ticket {
  width: min(520px, 100%); background: var(--cream); color: var(--ink); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow); position: relative;
}
.ticket-top { background: linear-gradient(135deg, var(--plum-800), var(--plum-600)); color: var(--cream); padding: 20px 24px 22px; }
.ticket-top .eyebrow { margin: 0 0 6px; font-size: 11px; }
.ticket-top h2 { font-family: var(--font-display); font-size: 30px; line-height: 1.05; margin: 0; font-weight: 600; }
.ticket-top .who { font-family: var(--font-script); color: var(--gold); font-size: 34px; line-height: 1.1; margin-top: 4px; }
.ticket-body { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 22px 24px; align-items: center; border-bottom: 2px dashed #d5c59f; position: relative; }
.ticket-body::before, .ticket-body::after {
  content: ''; position: absolute; bottom: -13px; width: 26px; height: 26px; border-radius: 50%; background: var(--plum-900);
}
.ticket-body::before { left: -13px; }
.ticket-body::after { right: -13px; }
.ticket-label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.ticket-name { font-family: var(--font-display); font-size: 30px; line-height: 1.1; font-weight: 700; margin: 2px 0 12px; overflow-wrap: anywhere; }
.ticket-meta { font-size: 15px; line-height: 1.45; }
.ticket-meta b { font-weight: 700; }
.ticket-qr { width: 148px; height: 148px; background: #fff; border-radius: 10px; padding: 4px; border: 1px solid var(--line); }
.ticket-qr img, .ticket-qr svg { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.ticket-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 24px 16px; font-size: 14px; }
.ticket-num { font-weight: 700; letter-spacing: 0.08em; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge.valid { background: #dff3e6; color: #17683a; }
.badge.used { background: #fff0d6; color: #8a5200; }
.badge.void { background: #fdecea; color: #8d2318; }
@media (max-width: 440px) {
  .ticket-body { grid-template-columns: 1fr; justify-items: start; }
  .ticket-qr { width: 200px; height: 200px; justify-self: center; }
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding-bottom: 46px; }
.actions .btn { width: auto; padding: 0 26px; margin-top: 0; }
.actions .btn.ghost { background: transparent; color: var(--cream); border: 1px solid rgba(217, 183, 106, 0.6); box-shadow: none; }
.panel-note { width: min(520px, 100%); margin: 0 auto 26px; padding: 14px 18px; border-radius: 12px; background: rgba(217, 183, 106, 0.12); border: 1px solid rgba(217, 183, 106, 0.45); font-size: 15px; text-align: center; }

.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(217, 183, 106, 0.3); border-top-color: var(--gold); animation: spin 0.9s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .btn { transition: none; } }

@media print {
  body { background: #fff; color: #000; }
  .topbar, .actions, .footer, .banner, .panel-note, .page-head p { display: none !important; }
  .page-head h1 { color: #000; font-size: 26px; }
  .ticket { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .ticket-top { background: #fff !important; color: #000; border-bottom: 1px solid #999; }
  .ticket-top .who, .ticket-top .eyebrow { color: #000; }
  .ticket-body::before, .ticket-body::after { display: none; }
}
