/* Tiny Talks /tickets landing — cream + purple brand system, Recoleta body,
   poster-style hero (real logo + VOL. wordmark + starburst volume number). */

@font-face {
  font-family: "Recoleta";
  src: url("/wp-content/themes/tinytalks/assets/fonts/Recoleta-SemiBold.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: "Recoleta";
  src: url("/wp-content/themes/tinytalks/assets/fonts/Recoleta-Regular.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "ObviouslyCond";
  src: url("/wp-content/themes/tinytalks/assets/fonts/obviouslycond-black.woff2") format("woff2");
  font-weight: 900; font-display: swap;
}
@font-face {
  /* wide black numeral for the starburst volume number (poster style) */
  font-family: "ObviouslyBlk";
  src: url("/wp-content/themes/tinytalks/assets/fonts/obviously-black.woff2") format("woff2");
  font-weight: 900; font-display: swap;
}

:root {
  --cream: #e9e4de;
  --purple: #6d51ee;
  --purple-deep: #4c35e7;
  --purple-dark: #3c28b8;
  --yellow: #f6ad2d;
  --ink: #231f1a;
  --ink-soft: #6b655d;
  --tan: #ccc2b6;
  --red: #b3261e;
  --green: #1d7a34;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--cream); color: var(--ink);
  font-family: "Recoleta", Georgia, serif;
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-ligatures: none;   /* theme Recoleta woff2 has broken fi/fl ligature glyphs */
}
/* touch-action manipulation: rapid taps (qty stepper) must not fire iOS
   Safari's double-tap-to-zoom — this disables that heuristic per element
   while keeping pinch-zoom intact (Jon hit it live, 2026-08-25) */
button { font: inherit; cursor: pointer; touch-action: manipulation; }
a { color: var(--purple-deep); }
.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;
}

/* ---------- hero ---------- */
.hero {
  background: var(--purple); color: #fff; text-align: center;
  padding: 30px 20px 38px;
  position: relative; overflow: hidden;
}
.hero-inner { max-width: 640px; margin: 0 auto; position: relative; }

.hero-logo { width: 176px; height: auto; display: inline-block; }
/* pinwheel stays white (Jon tried gold 2026-08-25, reverted same day) */

.vol-lockup {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 18px auto 6px;
}
.vol-word-text {
  font-family: "ObviouslyBlk", "Arial Black", sans-serif; font-weight: 900;
  text-transform: uppercase; color: #000;
  font-size: clamp(42px, 10.5vw, 85px); line-height: 1; letter-spacing: .01em;
}
.vol-burst { position: relative; flex: 0 0 auto; width: clamp(74px, 17vw, 120px); }
.burst { display: block; width: 100%; height: auto; }
.vol-n {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: "ObviouslyBlk", "Arial Black", sans-serif; font-weight: 900;
  font-size: clamp(34px, 8vw, 55px); line-height: 1; color: #000;
  transform: translateY(-4.5%);   /* optical centering: digit em-box sits low in the burst */
}

.hero h1 {
  font-family: "ObviouslyCond", "Arial Black", sans-serif;
  font-weight: 900; font-size: clamp(34px, 8vw, 52px); line-height: 1.02;
  text-transform: uppercase; letter-spacing: .01em; text-wrap: balance;
}
.hero-when { margin-top: 14px; font-size: 19px; font-weight: 600; }
.hero-when-sub { margin-top: 2px; font-weight: 400; font-size: 17px; }
.hero-venue { margin-top: 6px; font-size: 15px; }
.hero-venue-link {
  color: #fff; opacity: .9; text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .45); text-underline-offset: 3px;
}
.hero-venue-link:hover { opacity: 1; }
.hero-link { color: #fff; }

/* slim brand-gold strip under the hero (22px → 11px; Jon tried white
   2026-08-25, reverted same day) */
.hero-bar { background: var(--yellow); height: 11px; }

/* ---------- layout ---------- */
.page { max-width: 790px; margin: 0 auto; padding: 28px 16px calc(40px + env(safe-area-inset-bottom)); }
.card {
  background: #fff; border-radius: 20px; padding: 26px 20px;
  box-shadow: 0 8px 32px rgba(35, 31, 26, .1);
}
@media (min-width: 640px) { .card { padding: 36px 44px; } }

.scarcity {
  text-align: center; color: var(--red); font-weight: 600; font-size: 15px;
  margin-bottom: 20px;
}
.form-section { margin-bottom: 30px; }
.form-section-tight { margin-bottom: 22px; }
.form-section h2 { font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.section-hint { font-size: 14px; color: var(--ink-soft); margin: -6px 0 12px; }

/* qty stepper + price */
/* whole row opts out of double-tap zoom too — a fast second tap often
   lands a few px off the button */
.qty-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; touch-action: manipulation; }
.qty-btn {
  width: 52px; height: 52px; border-radius: 14px; border: 2px solid var(--purple);
  background: #fff; color: var(--purple-deep); font-size: 26px; font-weight: 600;
  line-height: 1; display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: #f2eefe; }
.qty-btn:disabled { border-color: var(--tan); color: var(--tan); background: #fff; cursor: default; }
.qty-btn:focus-visible, .buy-btn:focus-visible, input:focus-visible, .code-reveal:focus-visible {
  outline: 3px solid var(--purple-deep); outline-offset: 2px;
}
.qty-num { font-size: 30px; font-weight: 600; min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.qty-price { margin-left: 6px; display: flex; flex-direction: column; line-height: 1.35; }
.qty-price strong { font-size: 17px; font-weight: 600; }
.qty-price span { font-size: 13px; color: var(--ink-soft); }

/* fields */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, #code-input {
  width: 100%; height: 48px; padding: 0 14px; font-size: 16px; font-family: inherit;
  border: 2px solid var(--tan); border-radius: 12px; background: #fff; color: var(--ink);
}
.field input:focus, #code-input:focus { border-color: var(--purple); }
.field input.invalid { border-color: var(--red); }
/* one placeholder tone everywhere — matches Stripe colorTextPlaceholder */
.field input::placeholder, #code-input::placeholder, .attendee-row input::placeholder { color: #8f877c; opacity: 1; }

.attendee-row { display: grid; grid-template-columns: 88px 1fr 1fr; gap: 10px; align-items: center; margin-bottom: 10px; }
.attendee-row .tix-label { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.attendee-row input {
  width: 100%; height: 44px; padding: 0 12px; font-size: 16px; font-family: inherit;
  border: 2px solid var(--tan); border-radius: 10px;
}
.attendee-row input:focus { border-color: var(--purple); }
.attendee-row input.invalid { border-color: var(--red); }
@media (max-width: 420px) {
  .attendee-row { grid-template-columns: 64px 1fr 1fr; }
}

/* discount code */
.code-reveal {
  background: none; border: none; color: var(--purple-deep);
  font-size: 15px; font-weight: 600; text-decoration: underline; padding: 4px 0;
}
.code-row { display: flex; gap: 10px; margin-top: 10px; }
#code-input { flex: 1; text-transform: uppercase; letter-spacing: .06em; }
#code-apply {
  height: 48px; padding: 0 20px; border-radius: 12px; border: 2px solid var(--purple);
  background: #fff; color: var(--purple-deep); font-weight: 600; font-size: 15px;
}
#code-apply:hover { background: #f2eefe; }
.code-msg { font-size: 14px; margin-top: 8px; min-height: 1.2em; }
.code-msg.ok { color: var(--green); font-weight: 600; }
.code-msg.err { color: var(--red); }

/* payment */
.pay-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pay-head h2 { margin-bottom: 0; }
.pay-secure {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
}
/* optical centering: flex centers the 14px lock against the full line-box,
   but the text's visual mass sits above center (descender space below) —
   measured ~1.5px low on the live page (Jon 2026-08-25) */
.pay-secure svg { position: relative; top: -1.5px; }
.pay-row3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 0 10px; }
/* mock fields (test mode): styled like live inputs so the design previews true */
.pay-fields input:disabled { background: #fff; color: var(--ink); }
.pay-redirect { font-size: 15px; color: var(--ink-soft); }

/* summary */
.summary { border-top: 2px dashed var(--tan); padding-top: 16px; margin-bottom: 20px; }
.sum-row { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.sum-discount { color: var(--green); font-weight: 600; }
.sum-total { font-size: 21px; font-weight: 600; margin-top: 4px; }

.form-error { color: var(--red); font-size: 15px; font-weight: 600; text-align: center; margin-bottom: 14px; }
.cancel-note {
  max-width: 560px; margin: 0 auto 18px; padding: 12px 18px;
  background: #fdf3d7; color: #6b5200; border-radius: 12px;
  font-size: 15px; font-weight: 600; text-align: center;
}

.buy-btn {
  width: 100%; height: 58px; border: none; border-radius: 16px;
  background: var(--purple); color: #fff; font-size: 19px; font-weight: 700;
  font-family: inherit; transition: background .15s ease;
}
.buy-btn:hover { background: var(--purple-deep); }
.buy-btn:disabled { background: var(--tan); cursor: default; }
.fine-print { text-align: center; font-size: 13px; color: var(--ink-soft); margin-top: 14px; }

/* Stripe mount zone: the final height is reserved in CSS — present from
   the very first paint, before ANY script (incl. the parser-blocked
   js.stripe.com fetch) runs — so the page never shifts while Stripe
   loads. The 514/750 breakpoints are the Payment Element's own
   container-width regimes (4 rows ≤441px, 3 rows 442–629, 2 rows ≥630 —
   measured empirically on staging 2026-08-14) translated to viewport
   widths through the .page (16px) + .card (20px / 44px ≥640px)
   horizontal padding. Heights per regime were measured with fonts primed
   (preloads in tickets.php). JS releases the clamp (.pay-settled) once
   Stripe fires 'ready', animating the delta in the rare bands where the
   regimes disagree (OS scrollbar widths, future Stripe layout changes). */
.pay-zone { position: relative; overflow: hidden; height: 316px; }
@media (min-width: 514px) { .pay-zone { height: 233px; } }
/* 751 not 750: Stripe's 2-row regime starts at zone width 631px (measured
   2026-08-25), which is viewport 751 in this padding regime — at exactly 750
   the clamp said 2 rows while Stripe rendered 3, shifting the page ~82px. */
@media (min-width: 751px) { .pay-zone { height: 151px; } }
.pay-zone.pay-settled { height: auto; }
.pay-zone.settling { transition: height .15s ease; }
.pay-skeleton {
  position: absolute; inset: 0; z-index: 1; overflow: hidden;
  background: #fff;   /* opaque: hides the iframe's mid-boot overshoot */
  display: flex; flex-direction: column; gap: 14px;
  opacity: 1; transition: opacity .25s ease; pointer-events: none;
}
/* 4 static ghost rows in the markup; the regimes show 4 / 3 / 2 of them */
@media (min-width: 514px) { .pay-skeleton .sk-row:nth-child(4) { display: none; } }
@media (min-width: 751px) { .pay-skeleton .sk-row:nth-child(3) { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .sk-row { animation: none; }
  .pay-zone.settling { transition: none; }
}
.pay-zone.pay-ready .pay-skeleton { opacity: 0; }
.sk-row { animation: sk-pulse 1.4s ease-in-out infinite; }
.sk-label { width: 96px; height: 14px; border-radius: 4px; background: #ded7cd; margin-bottom: 6px; }
.sk-input { height: 48px; border-radius: 12px; border: 2px solid #ded7cd; background: #fff; }
@keyframes sk-pulse { 50% { opacity: .55; } }

/* sold-out / off-sale */
.soldout-card { text-align: center; padding: 40px 24px; max-width: 560px; margin: 0 auto; }
.soldout-card h2 { font-size: 24px; font-weight: 600; margin-bottom: 10px; }
.soldout-card p { color: var(--ink-soft); }

/* waitlist capture inside the sold-out card */
.wl-form { display: flex; gap: 10px; margin-top: 20px; }
.wl-form input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px; font-size: 16px; font-family: inherit;
  border: 2px solid var(--tan); border-radius: 12px; background: #fff; color: var(--ink);
}
.wl-form input:focus { border-color: var(--purple); }
.wl-form input::placeholder { color: #8f877c; opacity: 1; }
.wl-form button {
  height: 48px; padding: 0 22px; border: none; border-radius: 12px;
  background: var(--purple); color: #fff; font-size: 16px; font-weight: 700;
  font-family: inherit; white-space: nowrap; transition: background .15s ease;
}
.wl-form button:hover { background: var(--purple-deep); }
.wl-form button:disabled { background: var(--tan); cursor: default; }
/* stacked layout: kill the row-mode flex:1 (flex-basis 0 collapses the
   input's HEIGHT once the main axis is vertical — it rendered 26px tall) */
@media (max-width: 460px) {
  .wl-form { flex-direction: column; }
  .wl-form input { flex: none; }
}
.wl-msg { margin-top: 16px; font-weight: 600; }
.wl-msg.ok { color: var(--green); }
.wl-msg.err { color: var(--red); }
.soldout-card .soldout-follow { margin-top: 18px; font-size: 14px; }

/* footer */
.foot { text-align: center; margin-top: 32px; }
.foot-mark { width: 60px; height: auto; display: inline-block; }
.foot-legal { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
/* Georgia for just the © — the Recoleta webfont's © glyph is broken (same as its ligatures) */
.copy-sign { font-family: Georgia, serif; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* hidden attr must beat display:flex rules above */
[hidden] { display: none !important; }
