/* ============================================================
   Bloom · PLSR Club
   Primary brand: PLSR (oxblood koi silk, ivory, champagne —
   French elegance meets Japan tones).
   Sub-brand: De Club (logo + floor icons, ECHO in residence).
   Type system: De Club stack — Figtree (display), Heebo (body),
   IBM Plex Mono (utility eyebrows/labels).
   Signature device: a shibari rope-knot rule tying the programme
   together — the evening's own art form as page structure.
   ============================================================ */

:root {
  --wine-deep: #2a0707;
  --near-black: #170404;
  --oxblood: #6b1414;
  --ivory: #f0e6d4;
  --ivory-dim: rgba(240, 230, 212, 0.60);
  --ivory-faint: rgba(240, 230, 212, 0.30);
  --champagne: #c9a96a;
  --champagne-dim: rgba(201, 169, 106, 0.55);
  --ember: #cf4a2c;

  --font-display: 'Figtree', system-ui, sans-serif;
  --font-body: 'Heebo', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --measure: 620px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  background-color: var(--wine-deep);
  background-image:
    linear-gradient(180deg, rgba(23, 4, 4, 0.80) 0%, rgba(107, 20, 20, 0.34) 38%, rgba(107, 20, 20, 0.30) 60%, rgba(23, 4, 4, 0.88) 100%),
    url('assets/bloom-bg.jpg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint grain vignette to pull the edges down and lift the center */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 32%, transparent 40%, rgba(23, 4, 4, 0.55) 100%);
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1.4rem, 5vw, 2.6rem) 4rem;
  text-align: center;
}

/* ─────────────── shared type devices ─────────────── */

.eyebrow,
.label {
  font-family: var(--font-mono);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.84rem;
  color: var(--champagne);
  margin: 0;
  text-indent: 0.3em; /* balance the trailing tracking */
}

.label { color: var(--champagne-dim); font-size: 0.8rem; letter-spacing: 0.26em; text-indent: 0.26em; }

/* ─────────────── De Club host lockup (top) ─────────────── */

.hosted {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: clamp(2.6rem, 7vw, 3.8rem);
}
.hosted .declub-logo { height: 30px; }
.hosted .floors { margin-top: 0; }

/* ─────────────── masthead ─────────────── */

.masthead { margin-bottom: 2.4rem; }

.masthead .eyebrow { margin-bottom: clamp(1.6rem, 4vw, 2.4rem); }

.title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(4.2rem, 20vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--ivory);
  text-shadow: 0 2px 40px rgba(23, 4, 4, 0.5);
}

.lede {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.05rem, 3.6vw, 1.4rem);
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--ivory);
  margin: 1.8rem auto 0;
  max-width: 30ch;
}

/* ─────────────── rope-knot rule (signature) ─────────────── */

.rope {
  display: block;
  width: min(320px, 74%);
  height: 34px;
  margin: clamp(2.6rem, 6vw, 3.8rem) auto;
  overflow: visible;
}
.rope path { stroke: var(--champagne); fill: none; opacity: 0.85; }
.rope .knot { stroke-width: 1.4; }
.rope .strand { stroke-width: 1; }

@media (prefers-reduced-motion: no-preference) {
  .rope path {
    stroke-dasharray: 480;
    stroke-dashoffset: 480;
    animation: rope-draw 1.9s var(--ease) forwards;
  }
  @keyframes rope-draw { to { stroke-dashoffset: 0; } }
}

/* ─────────────── programme blocks ─────────────── */

.block { margin: 0 auto; max-width: 34ch; }
.block + .block { margin-top: 2.2rem; }
.block .label { margin-bottom: 0.9rem; }

.body-lg {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ivory);
  margin: 0;
}

.body {
  font-size: 1rem;
  color: var(--ivory-dim);
  margin: 0.7rem 0 0;
  letter-spacing: 0.02em;
}

/* ─────────────── the cast (playbill) ─────────────── */

.cast { max-width: 30rem; margin: 0 auto; }
.cast .label { margin-bottom: 1.6rem; }

.cast-list { display: flex; flex-direction: column; gap: 1.6rem; }

/* playbill: name on its line, role in mono champagne just beneath — stacked at
   every width so long roles never clip */
.cast-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.cast-row .name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 4.6vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: 0.015em;
  color: var(--ivory);
}
.cast-row .role {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--champagne);
}

/* ─────────────── dress code ─────────────── */

.dress {
  margin: clamp(2.6rem, 6vw, 3.6rem) auto 0;
  max-width: 30rem;
  padding: 1.6rem 1.4rem;
  border: 1px solid var(--ivory-faint);
  border-radius: 2px;
  background: rgba(23, 4, 4, 0.28);
}
.dress .label { margin-bottom: 0.7rem; }
.dress-line {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.08rem, 3.6vw, 1.35rem);
  line-height: 1.4;
  color: var(--ivory);
  margin: 0;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

/* ─────────────── detail strip ─────────────── */

.detail { margin: 0 auto; }
.detail .date {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 8vw, 3rem);
  letter-spacing: 0.04em;
  color: var(--ivory);
  margin: 0;
}
.detail .venue {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ivory-dim);
  margin: 1rem 0 0;
  line-height: 1.8;
}
.detail .venue .floor { display: block; color: var(--champagne-dim); font-size: 0.78rem; margin-top: 0.15rem; }
.detail .price {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--champagne);
  letter-spacing: 0.06em;
  margin: 1.4rem 0 0;
}

/* ─────────────── form ─────────────── */

.form-section {
  margin: clamp(2.8rem, 7vw, 4rem) auto 0;
  max-width: 30rem;
  text-align: left;
}

.form-head { text-align: center; margin-bottom: 1.8rem; }
.form-head .label { margin-bottom: 0.7rem; }
.form-head .form-note {
  font-size: 1.02rem;
  color: var(--ivory-dim);
  margin: 0;
  letter-spacing: 0.015em;
}

.form-card {
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px solid var(--ivory-faint);
  border-radius: 3px;
  background: rgba(23, 4, 4, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.field { margin-bottom: 1.15rem; }
.field:last-of-type { margin-bottom: 0; }

.field > label,
.fieldset-legend {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--champagne-dim);
  margin-bottom: 0.5rem;
}

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="date"] {
  width: 100%;
  padding: 0.72rem 0.85rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ivory);
  background: rgba(240, 230, 212, 0.04);
  border: 1px solid var(--ivory-faint);
  border-radius: 2px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder { color: rgba(240, 230, 212, 0.28); }
/* keep the native date picker + its text legible on the dark oxblood field */
input[type="date"] { color-scheme: dark; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.85); opacity: 0.7; cursor: pointer; }
input:focus {
  outline: none;
  border-color: var(--champagne);
  background: rgba(240, 230, 212, 0.07);
}

/* phone with fixed +972 prefix */
.phone-wrap { display: flex; align-items: stretch; }
.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ivory-dim);
  background: rgba(240, 230, 212, 0.06);
  border: 1px solid var(--ivory-faint);
  border-inline-end: none;
  border-radius: 2px 0 0 2px;
}
.phone-wrap input { border-radius: 0 2px 2px 0; direction: ltr; text-align: left; }

/* instagram verify link */
.ig-verify {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--champagne);
  text-decoration: none;
  border-bottom: 1px solid var(--champagne-dim);
  padding-bottom: 1px;
  transition: color 0.2s var(--ease);
}
.ig-verify:hover { color: var(--ivory); }

/* segmented gender pills */
.segmented { display: flex; gap: 0.5rem; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  flex: 1;
  text-align: center;
  padding: 0.6rem 0.4rem;
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--ivory-dim);
  border: 1px solid var(--ivory-faint);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  user-select: none;
}
.segmented input:checked + label {
  color: var(--near-black);
  background: var(--ivory);
  border-color: var(--ivory);
}
.segmented input:focus-visible + label { outline: 2px solid var(--champagne); outline-offset: 2px; }

/* validation */
.field.invalid input,
.field.invalid .phone-prefix { border-color: var(--ember); }
.error {
  display: block;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: #f0a58f;
  margin-top: 0.45rem;
  letter-spacing: 0.01em;
}

/* submit */
.submit {
  width: 100%;
  margin-top: 1.7rem;
  padding: 0.95rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--near-black);
  background: var(--ivory);
  border: 1px solid var(--ivory);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.12s var(--ease);
}
.submit:hover { background: var(--champagne); border-color: var(--champagne); }
.submit:active { transform: translateY(1px); }
.submit:disabled { opacity: 0.55; cursor: default; }

.consent {
  margin-top: 1rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ivory-faint);
  text-align: center;
}
.consent a { color: var(--ivory-dim); text-decoration: underline; text-underline-offset: 2px; }

/* ─────────────── payment + status panels ─────────────── */

.payplus-iframe-panel { margin-top: 0.5rem; }
#payplus-iframe {
  width: 100%;
  min-height: 640px;
  border: none;
  border-radius: 3px;
  background: #fff;
}
#iframe-loading {
  text-align: center;
  padding: 2.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

.panel {
  text-align: center;
  padding: 2.2rem 1.4rem;
  border: 1px solid var(--ivory-faint);
  border-radius: 3px;
  background: rgba(23, 4, 4, 0.42);
}
.panel h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.8rem;
  color: var(--ivory);
  margin: 0 0 0.8rem;
}
.panel p { color: var(--ivory-dim); margin: 0; font-size: 0.98rem; }
.panel .label { margin-bottom: 1rem; color: var(--champagne); }

/* ─────────────── sub-brand lockup (De Club) ─────────────── */

.subbrand {
  margin-top: clamp(3.5rem, 9vw, 5.5rem);
  padding-top: 2.4rem;
  border-top: 1px solid var(--ivory-faint);
  text-align: center;
}
.subbrand .label { margin-bottom: 1.3rem; color: var(--ivory-faint); }

.declub-logo {
  height: 26px;
  width: auto;
  /* black De Club paths → ivory to sit on oxblood */
  filter: brightness(0) invert(1);
  opacity: 0.78;
}

.floors {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
/* logo + all five floor icons carry one uniform shade */
.floors img {
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.78;
}

.social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.7rem;
  margin-top: 1.9rem;
}
.social a {
  color: var(--ivory-dim);
  display: inline-flex;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.social a:hover { color: var(--ivory); transform: translateY(-2px); }
.social svg { width: 22px; height: 22px; display: block; }

.legal {
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: var(--ivory-faint);
  letter-spacing: 0.03em;
}
.legal a { color: var(--ivory-faint); text-decoration: underline; text-underline-offset: 2px; }

/* ─────────────── reveal on load ─────────────── */

@media (prefers-reduced-motion: no-preference) {
  .hosted, .masthead, .block, .cast, .dress, .detail, .form-section {
    animation: rise 1s var(--ease) both;
  }
  .masthead { animation-delay: 0.12s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

/* hidden helper */
[hidden] { display: none !important; }

/* when a status panel takes over, hide the form body */
.form-section.paying #reg-form,
.form-section.success #reg-form,
.form-section.failed #reg-form,
.form-section.closed #reg-form,
.form-section.success .form-head,
.form-section.failed .form-head,
.form-section.closed .form-head { display: none; }

/* ─────────────── responsive ─────────────── */

@media (max-width: 460px) {
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .row2 .field { margin-bottom: 1.15rem; }
}
