/**
 * HORIZON — raffle.css (v2)
 * Launch Raffle modal + Client Intake Questionnaire.
 * All rules are namespaced under .hz-raffle to avoid colliding with the
 * rest of the site. Reuses the shared design tokens from styles.css
 * (--navy / --gold / --blue / --font-display / --sp-* / --r-* / --sh-*).
 *
 * Design direction: the grand prize is a plane ticket, so the wizard
 * borrows a quiet "boarding pass" vocabulary — gold-foil hairlines, a
 * dashed ticket-stub divider in the prize list, a monospaced-feeling
 * entry number — rather than a generic form-wizard look. Accent shifts
 * from blue (used for links/utility elsewhere on the site) to gold +
 * navy, since this is the one moment on the site meant to feel like a
 * premium keepsake, not a settings screen.
 */

@media (prefers-reduced-motion: no-preference) {
  @keyframes hz-raffle-rise    { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes hz-raffle-shimmer { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
  @keyframes hz-raffle-pop     { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}
@keyframes hz-raffle-spin { to { transform: rotate(360deg); } }

.hz-raffle-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4, 1rem);
  background: radial-gradient(circle at 50% 20%, rgba(17,40,69,.55), rgba(6,10,18,.82));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .3s var(--ease-std, ease);
}
.hz-raffle-backdrop.is-open { display: flex; opacity: 1; }

.hz-raffle-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--r-xl, 20px);
  border: 1px solid rgba(201, 168, 32, .16);
  box-shadow: 0 40px 90px -18px rgba(6, 14, 26, .55), 0 4px 16px rgba(6, 14, 26, .18);
  transform: translateY(22px) scale(.97);
  transition: transform .34s var(--ease, cubic-bezier(.22, 1, .36, 1));
  font-family: var(--font-body, 'Inter', sans-serif);

  /* Hide the scrollbar chrome while keeping the box scrollable. */
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* Legacy Edge */
}
.hz-raffle-box::-webkit-scrollbar { width: 0; height: 0; display: none; } /* Chrome/Safari */
.hz-raffle-backdrop.is-open .hz-raffle-box { transform: translateY(0) scale(1); }

.hz-raffle-bar {
  height: 3px;
  background: linear-gradient(90deg, transparent, #C9A820 20%, #F3D35B 50%, #C9A820 80%, transparent);
  background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .hz-raffle-bar { animation: hz-raffle-shimmer 4.5s ease-in-out infinite; }
}

.hz-raffle-head {
  background: var(--navy, #0B1F35);
  padding: var(--sp-5, 1.25rem) var(--sp-6, 1.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.hz-raffle-head::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(243,211,91,.08) 25%, transparent 25%),
    linear-gradient(225deg, rgba(243,211,91,.08) 25%, transparent 25%);
  background-size: 24px 24px;
  opacity: .5;
  pointer-events: none;
}
.hz-raffle-brandwrap {
  display: flex; align-items: center; gap: .55rem;
  position: relative; z-index: 1;
}
.hz-raffle-logo { height: 28px; width: auto; object-fit: contain; display: block; }
.hz-raffle-brand {
  font-family: var(--font-display, 'Fustat', sans-serif);
  font-weight: 900;
  font-size: 1.02rem;
  color: #fff;
  letter-spacing: .16em;
}
.hz-raffle-close {
  position: relative; z-index: 1;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  color: #fff; font-size: 1.05rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.hz-raffle-close:hover { background: rgba(243,211,91,.16); border-color: rgba(243,211,91,.45); transform: rotate(90deg); }

.hz-raffle-body { padding: var(--sp-8, 2rem) var(--sp-6, 1.5rem) var(--sp-6, 1.5rem); }

@media (prefers-reduced-motion: no-preference) {
  .hz-raffle-body > * { animation: hz-raffle-rise .46s var(--ease-std, ease) both; }
  .hz-raffle-body > *:nth-child(1) { animation-delay: 0ms; }
  .hz-raffle-body > *:nth-child(2) { animation-delay: 45ms; }
  .hz-raffle-body > *:nth-child(3) { animation-delay: 90ms; }
  .hz-raffle-body > *:nth-child(4) { animation-delay: 135ms; }
  .hz-raffle-body > *:nth-child(5) { animation-delay: 180ms; }
  .hz-raffle-body > *:nth-child(6) { animation-delay: 220ms; }
  .hz-raffle-body > *:nth-child(n+7) { animation-delay: 260ms; }
}

/* ── Welcome / confirmation screens ─────────────────────────────────── */
.hz-raffle-eyebrow {
  font-size: .7rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-text, #806414); margin: 0 0 var(--sp-2, .5rem);
}
.hz-raffle-title {
  font-family: var(--font-display, 'Fustat', sans-serif); font-size: 1.55rem; font-weight: 800;
  color: var(--navy, #0B1F35); margin: 0 0 var(--sp-3, .75rem); line-height: 1.22; letter-spacing: -.01em;
}
.hz-raffle-lede { font-size: .92rem; color: var(--gray-700, #3D4654); line-height: 1.7; margin: 0 0 var(--sp-5, 1.25rem); }

/* "Boarding pass" prize list — dashed ticket-stub dividers, grand prize
 * given a faint gold wash so it reads as the headline item. */
.hz-raffle-prizes {
  display: grid; gap: 0; margin: 0 0 var(--sp-5, 1.25rem);
  border-radius: var(--r-lg, 20px); overflow: hidden;
  border: 1px solid var(--gray-100, #EEF1F6);
  box-shadow: var(--sh-xs, 0 1px 3px rgba(11,31,53,.07));
}
.hz-raffle-prize {
  display: flex; align-items: center; gap: .8rem;
  background: #fff; padding: .8rem 1rem;
}
.hz-raffle-prize:first-child {
  background: linear-gradient(135deg, rgba(243,211,91,.16), rgba(243,211,91,.03));
}
.hz-raffle-prize + .hz-raffle-prize { border-top: 1px dashed var(--gray-200, #DDE3ED); }
.hz-raffle-prize-emoji {
  flex: none; font-size: 1.05rem; width: 2.15rem; height: 2.15rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #fff; box-shadow: var(--sh-xs, 0 1px 3px rgba(11,31,53,.07));
}
.hz-raffle-prize-label { font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gray-500, #6B7686); display: block; }
.hz-raffle-prize-value { font-family: var(--font-display, 'Fustat', sans-serif); font-size: .93rem; font-weight: 800; color: var(--navy, #0B1F35); letter-spacing: .01em; }

.hz-raffle-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: 0 0 var(--sp-6, 1.5rem); }
.hz-raffle-meta-item { font-size: .8rem; color: var(--gray-700, #3D4654); }
.hz-raffle-meta-item strong { color: var(--navy, #0B1F35); }

.hz-raffle-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hz-raffle-btn {
  font-family: inherit; font-weight: 700; font-size: .88rem; border-radius: var(--r-md, 12px);
  padding: .85rem 1.5rem; cursor: pointer; border: 2px solid transparent;
  transition: transform .2s var(--ease-std, ease), box-shadow .2s ease, border-color .2s ease, background .2s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.hz-raffle-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.hz-raffle-btn-primary {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #F6DB78, #F3D35B 45%, #E3BF41);
  color: var(--navy, #0B1F35); flex: 1 1 auto;
}
.hz-raffle-btn-primary::after {
  content: ''; position: absolute; top: 0; left: -65%; width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.65), transparent);
  transform: skewX(-18deg); transition: left .6s var(--ease-std, ease);
}
.hz-raffle-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(201,168,32,.38); }
.hz-raffle-btn-primary:hover:not(:disabled)::after { left: 130%; }
.hz-raffle-btn-primary:active:not(:disabled) { transform: translateY(0); }
.hz-raffle-btn-secondary { background: transparent; color: var(--gray-700, #3D4654); border-color: var(--gray-200, #E3E8EF); }
.hz-raffle-btn-secondary:hover { background: var(--gray-50, #F5F7FA); border-color: var(--gray-400, #A0ADBD); }
.hz-raffle-btn-block { width: 100%; }

/* ── Questionnaire wizard ────────────────────────────────────────────── */
.hz-raffle-progress-track { height: 5px; background: var(--gray-100, #EDF1F5); border-radius: var(--r-pill, 9999px); overflow: hidden; margin-bottom: var(--sp-2, .5rem); }
.hz-raffle-progress-fill {
  height: 100%; border-radius: inherit; transition: width .4s var(--ease-std, ease);
  background: linear-gradient(90deg, #C9A820, #F3D35B, #C9A820);
  background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) { .hz-raffle-progress-fill { animation: hz-raffle-shimmer 3.2s ease-in-out infinite; } }
.hz-raffle-progress-label { font-size: .7rem; color: var(--gray-500, #6B7686); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 var(--sp-5, 1.25rem); }

.hz-raffle-section-title { font-family: var(--font-display, 'Fustat', sans-serif); font-size: 1.12rem; font-weight: 800; color: var(--navy, #0B1F35); margin: 0 0 .2rem; letter-spacing: -.005em; }
.hz-raffle-section-sub { font-size: .8rem; color: var(--gray-500, #6B7686); margin: 0 0 .15rem; }
.hz-raffle-section-title-tl { font-size: .8rem; font-style: italic; color: var(--gray-500, #6B7686); margin: 0 0 var(--sp-5, 1.25rem); }

.hz-raffle-field { margin-bottom: var(--sp-4, 1rem); }
.hz-raffle-label { display: block; font-size: .82rem; font-weight: 700; color: var(--navy, #0B1F35); margin-bottom: .4rem; }
.hz-raffle-label .req { color: #C0392B; margin-left: 2px; }
.hz-raffle-label-tl { display: block; font-size: .74rem; font-style: italic; font-weight: 400; color: var(--gray-500, #6B7686); margin-top: .1rem; }
.hz-raffle-input, .hz-raffle-select, .hz-raffle-textarea {
  width: 100%; font-family: inherit; font-size: .88rem; color: var(--navy, #0B1F35);
  border: 1.5px solid var(--gray-200, #E3E8EF); border-radius: var(--r-md, 12px);
  padding: .72rem .9rem; background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
  scrollbar-width: none; -ms-overflow-style: none;
}
.hz-raffle-input::-webkit-scrollbar, .hz-raffle-textarea::-webkit-scrollbar { width: 0; height: 0; display: none; }
.hz-raffle-input:focus, .hz-raffle-select:focus, .hz-raffle-textarea:focus {
  outline: none; border-color: var(--navy, #0B1F35); box-shadow: 0 0 0 3px rgba(11,31,53,.09);
}
.hz-raffle-textarea { resize: vertical; min-height: 74px; }
.hz-raffle-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3, .75rem); }
@media (max-width: 480px) { .hz-raffle-row2 { grid-template-columns: 1fr; } }

/* Custom radio / checkbox — native inputs stay in place for accessibility
 * and click targets, but are visually replaced with a gold-on-navy mark
 * so the whole wizard reads as one jewel-toned object instead of default
 * browser form controls. */
.hz-raffle-options { display: grid; gap: .55rem; }
.hz-raffle-option {
  position: relative;
  display: flex; align-items: center; gap: .6rem;
  border: 1.5px solid var(--gray-200, #E3E8EF);
  border-radius: var(--r-md, 12px);
  padding: .68rem .9rem .68rem 2.85rem;
  cursor: pointer; font-size: .85rem; color: var(--gray-700, #3D4654);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.hz-raffle-option:hover {
  /* FIX: border-image ignores border-radius entirely (see styles.css's
   * #lightbox comment block for the full explanation), which showed
   * square corners on this rounded option row on hover. Simplified to a
   * plain solid border-color here rather than the gradient-border
   * background-layering trick used elsewhere, because .is-checked below
   * already owns this element's background (a subtle gold tint) and
   * layering a second background on :hover would fight with it when an
   * option is both checked and hovered at once. */
  border-color: var(--gold-deep, #C9A820);
}
.hz-raffle-option input[type="radio"],
.hz-raffle-option input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; margin: 0;
  position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; flex: none;
  border: 1.75px solid var(--gray-200, #DDE3ED);
  background: #fff; cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.hz-raffle-option input[type="radio"] { border-radius: 50%; }
.hz-raffle-option input[type="checkbox"] { border-radius: 5px; }
.hz-raffle-option input[type="radio"]::after {
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  background: var(--navy, #0B1F35); transform: scale(0);
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.hz-raffle-option input[type="checkbox"]::after {
  content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 9px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  transform-origin: center; transform: rotate(45deg) scale(0);
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.hz-raffle-option input[type="radio"]:checked::after,
.hz-raffle-option input[type="checkbox"]:checked::after { transform: rotate(45deg) scale(1); }
.hz-raffle-option input[type="radio"]:checked::after { transform: scale(1); }
.hz-raffle-option input:checked { border-color: var(--navy, #0B1F35); background: var(--gold, #F3D35B); }
.hz-raffle-option input:focus-visible { outline: 2px solid var(--navy, #0B1F35); outline-offset: 2px; }
.hz-raffle-option.is-checked {
  border-color: var(--gold-deep, #C9A820);
  background: linear-gradient(135deg, rgba(243,211,91,.1), rgba(243,211,91,.02));
  box-shadow: 0 1px 4px rgba(201,168,32,.12);
}

.hz-raffle-stars { display: flex; gap: .35rem; }
.hz-raffle-star {
  font-size: 1.75rem; cursor: pointer; color: var(--gray-200, #E3E8EF);
  transition: color .18s ease, transform .16s cubic-bezier(.34, 1.56, .64, 1), filter .18s ease;
  background: none; border: none; padding: 0;
}
.hz-raffle-star.is-filled { color: var(--gold, #F3D35B); filter: drop-shadow(0 2px 6px rgba(201,168,32,.45)); }
.hz-raffle-star:hover { transform: scale(1.16) rotate(-4deg); }

.hz-raffle-error { font-size: .76rem; color: #C0392B; margin-top: .35rem; display: none; }
.hz-raffle-error.is-shown { display: block; }
.hz-raffle-form-error {
  font-size: .82rem; color: #C0392B; background: rgba(192,57,43,.07);
  border-left: 3px solid #C0392B; border-radius: 0 var(--r-md, 12px) var(--r-md, 12px) 0;
  padding: .7rem .9rem; margin-bottom: var(--sp-4, 1rem); display: none;
}
.hz-raffle-form-error.is-shown { display: block; }

.hz-raffle-nav { display: flex; justify-content: space-between; gap: .75rem; margin-top: var(--sp-6, 1.5rem); }

/* ── Confirmation ────────────────────────────────────────────────────── */
.hz-raffle-confirm-icon {
  font-size: 2.3rem; margin-bottom: var(--sp-3, .75rem);
  display: inline-flex; width: 4.4rem; height: 4.4rem; align-items: center; justify-content: center;
  border-radius: 50%; background: linear-gradient(135deg, rgba(243,211,91,.22), rgba(243,211,91,.05));
}
@media (prefers-reduced-motion: no-preference) { .hz-raffle-confirm-icon { animation: hz-raffle-pop .5s cubic-bezier(.34, 1.56, .64, 1) both; } }
.hz-raffle-entry-card {
  background: var(--navy, #0B1F35);
  background-image: linear-gradient(135deg, rgba(243,211,91,.1), transparent 60%);
  border-radius: var(--r-md, 12px);
  padding: var(--sp-4, 1rem) var(--sp-5, 1.25rem);
  margin: 0 0 var(--sp-5, 1.25rem);
}
.hz-raffle-entry-label { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); margin: 0 0 .25rem; }
.hz-raffle-entry-number { font-family: var(--font-display, 'Fustat', sans-serif); font-size: 1.5rem; font-weight: 800; letter-spacing: .04em; color: var(--gold, #F3D35B); margin: 0; }

/* ── Loading spinner ─────────────────────────────────────────────────── */
.hz-raffle-spinner { width: 34px; height: 34px; border: 3px solid var(--gray-200, #E3E8EF); border-top-color: var(--navy, #0B1F35); border-radius: 50%; animation: hz-raffle-spin .8s linear infinite; margin: var(--sp-6, 1.5rem) auto; }

/* ── Persistent "resume later" pill ───────────────────────────────────
 * Appears immediately (not on a timer) once the visitor closes without
 * submitting. Sits right above the site's floating back-to-top arrow;
 * see the shared clearance variables below, also used by .hz-raffle-toast. */
:root {
  --hz-arrow-clear-desktop: calc(var(--sp-5, 1.25rem) + 40px + var(--sp-3, .75rem));
  --hz-arrow-clear-mobile:  calc(var(--sp-3, .75rem) + 34px + var(--sp-3, .75rem));
  --hz-pill-size: 52px;
  --hz-pill-size-mobile: 46px;
  --hz-pill-gap: .7rem;
}
.hz-raffle-resume-pill {
  position: fixed; right: var(--sp-4, 1rem); z-index: 3850;
  bottom: var(--hz-arrow-clear-desktop);
  width: var(--hz-pill-size); height: var(--hz-pill-size);
  border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  background: linear-gradient(135deg, #F6DB78, #F3D35B 55%, #E3BF41);
  color: var(--navy, #0B1F35);
  box-shadow: 0 10px 26px rgba(201,168,32,.4), 0 0 0 1px rgba(201,168,32,.25);
  transition: transform .2s var(--ease-std, ease), box-shadow .2s ease;
}
.hz-raffle-resume-pill:hover { transform: scale(1.08); box-shadow: 0 14px 32px rgba(201,168,32,.5), 0 0 0 1px rgba(201,168,32,.3); }
.hz-raffle-resume-pill:active { transform: scale(.97); }
@media (prefers-reduced-motion: no-preference) {
  .hz-raffle-resume-pill { animation: hz-raffle-pop .4s cubic-bezier(.34, 1.56, .64, 1) both, hz-raffle-pulse 2.6s ease-in-out 1s infinite; }
  @keyframes hz-raffle-pulse {
    0%, 100% { box-shadow: 0 10px 26px rgba(201,168,32,.4), 0 0 0 0 rgba(243,211,91,.35); }
    50%      { box-shadow: 0 10px 26px rgba(201,168,32,.4), 0 0 0 8px rgba(243,211,91,0); }
  }
}
@media (max-width: 768px) {
  .hz-raffle-resume-pill { bottom: var(--hz-arrow-clear-mobile); width: var(--hz-pill-size-mobile); height: var(--hz-pill-size-mobile); font-size: 1.15rem; }
}

/* ── Reminder toast ──────────────────────────────────────────────────── */
.hz-raffle-toast {
  position: fixed; right: var(--sp-4, 1rem); z-index: 3900;
  /* Stacks above both the back-to-top arrow AND the resume pill above it. */
  bottom: calc(var(--hz-arrow-clear-desktop) + var(--hz-pill-size) + var(--hz-pill-gap));
  width: min(340px, calc(100vw - 2rem));
  background: #fff; border-radius: var(--r-lg, 20px);
  border-top: 3px solid var(--gold, #F3D35B);
  box-shadow: 0 18px 50px rgba(6,14,26,.28);
  padding: var(--sp-4, 1rem) var(--sp-5, 1.25rem); display: none;
  transform: translateY(14px); opacity: 0; transition: transform .3s var(--ease-std, ease), opacity .3s ease;
  font-family: var(--font-body, 'Inter', sans-serif);
}
@media (max-width: 768px) {
  .hz-raffle-toast { bottom: calc(var(--hz-arrow-clear-mobile) + var(--hz-pill-size-mobile) + var(--hz-pill-gap)); }
}
.hz-raffle-toast.is-open { display: block; transform: translateY(0); opacity: 1; }
.hz-raffle-toast-title { font-family: var(--font-display, 'Fustat', sans-serif); font-weight: 800; font-size: .95rem; color: var(--navy, #0B1F35); margin: 0 0 .3rem; }
.hz-raffle-toast-body { font-size: .8rem; color: var(--gray-700, #3D4654); margin: 0 0 .85rem; line-height: 1.5; }
.hz-raffle-toast-actions { display: flex; gap: .5rem; }
.hz-raffle-toast-actions .hz-raffle-btn { padding: .55rem 1rem; font-size: .78rem; }

/* ── Honeypot (visually hidden, still in the tab/DOM flow for bots) ─── */
.hz-raffle-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 480px) {
  .hz-raffle-body { padding: var(--sp-6, 1.5rem) var(--sp-4, 1rem) var(--sp-4, 1rem); }
  .hz-raffle-title { font-size: 1.28rem; }
}