/* TAL Around Town · pop-up raffle. Palette sampled from the Sesame × TAL card. */
:root {
  --plum: #4f3c8d;         /* card back */
  --plum-deep: #2f2160;
  --lilac: #8f6fb3;        /* card front mid */
  --mist: #efe8f4;         /* page ground */
  --paper: #ffffff;
  --field: #faf8fc;
  --line: #d9cfe6;
  --ink: #241a3f;
  --ink-2: #4a3d6b;
  --label: #6b5a93;
  --muted: #7d6e9e;        /* 4.6:1 on white */
  --error: #b3261e;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --hero-full: 100svh;
}
html[lang="ar"] {
  --serif: 'Amiri', 'Cormorant Garamond', Georgia, serif;
  --sans: 'IBM Plex Sans Arabic', 'Instrument Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: var(--plum); }
a:hover { color: var(--plum-deep); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }

.stage { max-width: 480px; margin: 0 auto; min-height: 100svh; position: relative; background: var(--mist); overflow-x: clip; }

/* ── HERO ─────────────────────────────────────────────── */
.hero {
  position: relative;
  height: var(--hero-full);
  min-height: 600px;
  padding: max(22px, env(safe-area-inset-top)) 24px 28px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: var(--lilac) url(/img/flowers-sm.webp) center 30% / cover no-repeat;
  overflow: hidden;
  transition: height .55s var(--ease), min-height .55s var(--ease);
}
.hero.hi-res { background-image: url(/img/flowers.webp); }
.hero-shimmer {
  position: absolute; inset: -20%;
  background: url(/img/shimmer.webp) center / 70% auto repeat;
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
.hero.shimmer-ready .hero-shimmer { opacity: .55; animation: drift 22s linear infinite alternate; }
@keyframes drift {
  from { transform: translate3d(-4%, -2%, 0) rotate(0deg); }
  to   { transform: translate3d(4%, 3%, 0) rotate(3deg); }
}
.hero-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.kicker { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; }
html[lang="ar"] .kicker { letter-spacing: .04em; font-size: 12px; }
.lang-toggle {
  border: 0; border-radius: 999px; background: #fff; color: var(--plum);
  font-size: 14px; font-weight: 600; padding: 0 14px; min-height: 36px; min-width: 56px; cursor: pointer;
}

.hero-body { position: relative; z-index: 1; display: none; flex-direction: column; flex: 1; }
.view-intro   .hero-intro,
.view-closed  .hero-closed   { display: flex; justify-content: flex-end; }
.view-entry   .hero-compact  { display: flex; justify-content: flex-start; padding-top: 22px; }
.view-success .hero-success  { display: flex; justify-content: flex-start; }

.view-entry   .hero { height: 220px; min-height: 220px; }
.view-success .hero { height: 460px; min-height: 460px; }

.lockup { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.lockup-sesame { height: 46px; width: auto; }
.lockup-tal { height: 43px; width: auto; }   /* 0.94 × Sesame block, as printed on the card */
.lockup-x { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 30px; line-height: 1; }
.lockup-sm { margin: 48px 0 18px; gap: 14px; }
.lockup-sm .lockup-sesame { height: 38px; }
.lockup-sm .lockup-tal { height: 36px; }
.lockup-sm .lockup-x { font-size: 26px; }

.display {
  margin: 0;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(52px, 16.5vw, 68px); line-height: .94; letter-spacing: -.01em;
  text-shadow: 0 2px 24px rgba(60, 40, 110, .35);
}
html[lang="ar"] .display { font-style: normal; font-weight: 700; line-height: 1.2; font-size: clamp(42px, 12vw, 54px); letter-spacing: 0; }
.display-sm { font-size: 40px; }
html[lang="ar"] .display-sm { font-size: 32px; }
.display:focus { outline: none; }
.hero-copy { margin: 18px 0 0; font-size: 16px; max-width: 310px; color: #f6f2fc; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; width: 100%; border-radius: 999px; border: 0; padding: 0 22px;
  font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(.985); }
.btn-light { margin-top: 30px; background: #fff; color: var(--plum); }
.btn-light:hover { color: var(--plum-deep); }
.btn-dark { background: var(--plum); color: #fff; }
.btn-dark:hover { background: var(--plum-deep); color: #fff; }
.btn-outline { background: transparent; color: var(--plum); border: 1.5px solid var(--plum); }
.btn[disabled] { opacity: .6; cursor: progress; }
html[dir="rtl"] .arrow { transform: scaleX(-1); transform-origin: center; }

.fine { margin: 16px 0 0; text-align: center; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.fine-light { color: #f1ebf9; }
.fine-light a { color: #fff; }

/* ── SHEET (postcard) ─────────────────────────────────── */
.sheet, .success { position: relative; z-index: 2; }
.sheet {
  margin-top: -70px;
  background: var(--paper);
  border-radius: 28px 28px 0 0;
  padding: 20px 22px calc(32px + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 40px rgba(60, 40, 110, .25);
  min-height: calc(100svh - 150px);
}
.sheet.is-in { animation: rise .55s var(--ease) both; }
@keyframes rise { from { transform: translateY(70vh); } to { transform: none; } }

.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.eyebrow { margin: 0; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--label); font-weight: 600; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 12px; }
.sheet-title { margin: 2px 0 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 28px; line-height: 1.05; color: var(--plum); }
html[lang="ar"] .sheet-title { font-style: normal; font-size: 24px; }
.icon-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 999px; border: 0; background: var(--mist); color: var(--plum); display: grid; place-items: center; cursor: pointer; }
.perf {
  height: 10px; margin: 16px -22px;
  background-image: radial-gradient(circle, var(--line) 1.3px, transparent 1.4px);
  background-size: 10px 10px; background-repeat: repeat-x; background-position: center;
}

form { display: flex; flex-direction: column; gap: 16px; }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend {
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--label); padding: 0;
}
html[lang="ar"] .field > label, html[lang="ar"] .field > legend { letter-spacing: 0; font-size: 13px; }
.field > legend { margin-bottom: 6px; }
.opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }

input[type="text"], input[type="email"], input[type="tel"], .cc select {
  height: 52px; width: 100%; min-width: 0;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--field);
  padding: 0 14px; font-size: 16px; color: var(--ink);
  transition: border-color .15s ease, background-color .15s ease;
  -webkit-appearance: none; appearance: none;
}
input::placeholder { color: #a99cc4; }
input:focus, .cc select:focus { border-color: var(--plum); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(79, 60, 141, .14); }
.field.has-error input, .field.has-error .cc select, .field.has-error .ig-row { border-color: var(--error); }

.phone-row { display: flex; gap: 8px; }
.cc { position: relative; flex: 0 0 auto; }
.cc select { width: auto; padding: 0 34px 0 12px; cursor: pointer; }
.cc svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--label); }
.phone-row input { flex: 1; }

.ig-row {
  display: flex; align-items: center; gap: 2px; height: 52px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--field); padding: 0 14px;
}
.ig-row:focus-within { border-color: var(--plum); background: #fff; box-shadow: 0 0 0 3px rgba(79, 60, 141, .14); }
.ig-row span { color: var(--muted); }
.ig-row input { border: 0; height: 48px; padding: 0; background: transparent; box-shadow: none !important; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--field); font-size: 14px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip input:checked + span { background: var(--plum); border-color: var(--plum); color: #fff; font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--plum); outline-offset: 2px; }
.field.has-error .chip span { border-color: #e2b4b0; }

.consent { flex-direction: row; gap: 12px; align-items: flex-start; margin-top: 2px; }
.consent input { width: 24px; height: 24px; margin: 0; flex-shrink: 0; accent-color: var(--plum); cursor: pointer; }
.consent label { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); text-transform: none; letter-spacing: 0; font-weight: 400; }
.field.has-error.consent input { outline: 2px solid var(--error); outline-offset: 1px; }

.err { margin: 0; min-height: 0; font-size: 13px; color: var(--error); }
.err:empty { display: none; }
.err-consent { margin-top: -10px; }
.form-error { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fbeceb; color: var(--error); font-size: 14px; }
.form-error:empty { display: none; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── SUCCESS ──────────────────────────────────────────── */
.success { margin-top: -70px; padding: 0 22px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.success.is-in .ticket { animation: pop .6s var(--ease) both; }
@keyframes pop { from { transform: translateY(40px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.ticket { background: #fff; border-radius: 20px; padding: 24px 22px 22px; box-shadow: 0 18px 40px rgba(79, 60, 141, .18); }
.ticket-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ticket-no { margin: 4px 0 0; font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 76px; line-height: .9; color: var(--plum); letter-spacing: -.02em; }
.ticket-where { margin: 0; font-size: 12.5px; color: var(--label); text-align: end; line-height: 1.4; }
.facts { margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 1.45; }
.facts div { display: flex; gap: 12px; }
.facts dt { width: 86px; flex-shrink: 0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding-top: 3px; }
html[lang="ar"] .facts dt { letter-spacing: 0; font-size: 12.5px; width: 76px; }
.facts dd { margin: 0; }
.success-copy { margin: 2px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.follow { display: flex; flex-direction: column; gap: 10px; }
.rack { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 16px; padding: 16px 18px; text-decoration: none; color: var(--ink); }
.rack-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--mist); color: var(--plum); display: grid; place-items: center; flex-shrink: 0; }
.rack-text { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--label); }
.rack-text strong { font-size: 14.5px; color: var(--ink); }

.noscript { padding: 24px; text-align: center; }

@media (min-width: 481px) {
  body { background: var(--plum); }
  .stage { box-shadow: 0 0 80px rgba(0, 0, 0, .25); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
