/* =====================================================================
   IvyES design system
   Brand colours live here — change these tokens to re-theme everything.
   ===================================================================== */
@import url('/vendor/fonts/cinzel/600.css');
@import url('/vendor/fonts/cinzel/700.css');
@import url('/vendor/fonts/sora/400.css');
@import url('/vendor/fonts/sora/600.css');
@import url('/vendor/fonts/sora/700.css');
@import url('/vendor/fonts/sora/800.css');
@import url('/vendor/fonts/inter/400.css');
@import url('/vendor/fonts/inter/500.css');
@import url('/vendor/fonts/inter/600.css');
@import url('/vendor/fonts/inter/700.css');

:root {
  /* Brand */
  --ivy-950: #110619;
  --ivy-900: #170a24;
  --ivy-850: #1d0d2d;
  --ivy-800: #241238;
  --ivy-700: #321a4d;
  --ivy-600: #472468;
  --ivy-500: #6b37a0;
  --ivy-400: #8e5cc8;
  --ivy-300: #b893e8;
  --ivy-200: #ddc9f7;
  --gold-500: #cdb88f;
  --gold-400: #e6d6b8;
  --gold-300: #f6e7db;

  /* Surfaces & text */
  --bg: var(--ivy-950);
  --surface: rgba(46, 20, 70, 0.55);
  --surface-strong: rgba(40, 17, 62, 0.88);
  --surface-hover: rgba(62, 30, 92, 0.6);
  --line: rgba(221, 201, 247, 0.12);
  --line-strong: rgba(221, 201, 247, 0.22);
  --text: #f4ecf8;
  --text-2: #bfaecd;
  --text-3: #8a779b;

  /* Status (always paired with an icon + label) */
  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, 0.14);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.14);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.14);
  --bad: #f87171;
  --bad-bg: rgba(248, 113, 113, 0.14);

  --grad-brand: linear-gradient(135deg, #8e5cc8 0%, #6b37a0 45%, #4a2373 100%);
  --grad-gold: linear-gradient(135deg, #f6e7db 0%, #e6d6b8 40%, #b89b6a 100%);
  --glow: 0 0 0 1px rgba(184, 147, 232, 0.25), 0 10px 40px -10px rgba(107, 55, 160, 0.6);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --font-brand: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-display: 'Sora', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}
img { max-width: 100%; display: block; }
svg[aria-hidden="true"] { width: 1.15em; height: 1.15em; flex: none; }
a { color: var(--ivy-300); text-decoration: none; }
a:hover { color: var(--gold-300); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(230, 214, 184, 0.35); }
:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 3px; border-radius: 6px; }

/* ---------------------------------------------------------------- */
/* Ambient background                                                */
/* ---------------------------------------------------------------- */
.ambient {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  /* Purple stone texture matching the event website — replace public/assets/bg-marble.webp to change it */
  background: #120818 url('/assets/bg-marble.webp') center / cover no-repeat;
}
.ambient::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 38%, rgba(124, 72, 170, 0.22), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, rgba(6, 2, 9, 0.55) 100%);
}
.ambient::after {
  content: ''; position: absolute; inset: 0; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.32; animation: drift 22s var(--ease) infinite alternate; }
.blob.b1 { width: 620px; height: 620px; left: -160px; top: -200px; background: radial-gradient(circle, #6b37a0 0%, transparent 65%); }
.blob.b2 { width: 520px; height: 520px; right: -140px; top: 10%; background: radial-gradient(circle, #4a2373 0%, transparent 65%); animation-duration: 28s; }
.blob.b3 { width: 460px; height: 460px; left: 30%; bottom: -220px; background: radial-gradient(circle, rgba(230, 214, 184, 0.55) 0%, transparent 65%); animation-duration: 34s; opacity: 0.35; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(60px, 40px, 0) scale(1.08); }
  100% { transform: translate3d(-40px, 80px, 0) scale(0.95); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------- */
/* Brand lockup                                                      */
/* ---------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand img { height: 36px; width: auto; max-width: 72px; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(107, 55, 160, 0.55)); }
.brand .wordmark { font-family: var(--font-brand); font-weight: 700; font-size: 21px; letter-spacing: 0.06em; line-height: 1; color: var(--gold-300); }
.brand .wordmark em { font-style: normal; }
.brand .sub { display: block; font: 600 10px/1 var(--font-body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-3); margin-top: 5px; }

.gold-text { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ivy-text { background: linear-gradient(120deg, #ddc9f7, #8e5cc8 60%, #e6d6b8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-font { font-family: var(--font-brand); letter-spacing: 0.04em; }
.eyebrow { font: 600 11px/1 var(--font-body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-400); }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- */
/* Surfaces                                                          */
/* ---------------------------------------------------------------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }

/* ---------------------------------------------------------------- */
/* Buttons                                                           */
/* ---------------------------------------------------------------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 20px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03);
  font-weight: 600; font-size: 14.5px; letter-spacing: 0.01em; cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s, opacity 0.2s;
  position: relative; overflow: hidden; user-select: none; text-decoration: none; color: var(--text);
}
.btn:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(221, 201, 247, 0.35); color: var(--text); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn[disabled], .btn.is-loading { opacity: 0.55; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--grad-brand); border-color: transparent; color: #ffffff; box-shadow: var(--glow); }
.btn-primary:hover { background: var(--grad-brand); filter: brightness(1.08); color: #ffffff; transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(184, 147, 232, 0.4), 0 16px 50px -12px rgba(107, 55, 160, 0.8); }
.btn-gold { background: var(--grad-gold); border-color: transparent; color: #2a0f3d; box-shadow: 0 10px 40px -12px rgba(230, 214, 184, 0.7); }
.btn-gold:hover { background: var(--grad-gold); filter: brightness(1.06); color: #2a0f3d; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); border-color: transparent; }
.btn-danger { background: var(--bad-bg); border-color: rgba(248, 113, 113, 0.35); color: #fecaca; }
.btn-danger:hover { background: rgba(248, 113, 113, 0.22); border-color: rgba(248, 113, 113, 0.55); color: #fff; }
.btn-lg { --h: 56px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-icon { width: var(--h); padding: 0; }
.btn-block { width: 100%; }
.btn .shine { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%); transform: translateX(-120%); animation: shine 3.6s var(--ease) infinite; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn.is-loading::after {
  content: ''; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- */
/* Forms                                                             */
/* ---------------------------------------------------------------- */
.field { position: relative; display: block; }
.field input, .field select, .field textarea {
  width: 100%; height: 56px; padding: 22px 16px 8px; border-radius: 14px;
  background: rgba(14, 5, 22, 0.55); border: 1px solid var(--line-strong);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; font-size: 15px;
}
.field textarea { height: auto; min-height: 96px; resize: vertical; padding-top: 26px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  height: 60px;
  padding-top: 26px;
  padding-bottom: 6px;
  padding-right: 38px;
  padding-left: 16px;
  cursor: pointer;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(216,197,163,0.7)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field label {
  position: absolute; left: 17px; top: 18px; right: 36px; color: var(--text-3); font-size: 15px; pointer-events: none;
  transition: transform 0.2s var(--ease), color 0.2s, font-size 0.2s; transform-origin: left top;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ivy-400); box-shadow: 0 0 0 4px rgba(142, 92, 200, 0.15); background: rgba(14, 5, 22, 0.75); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  transform: translateY(-11px);
  font-size: 11.5px;
  color: var(--ivy-300);
  letter-spacing: 0.02em;
  max-width: calc(100% - 36px);
  right: 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Select dropdown labels: Pin strictly to top to eliminate overlapping native option text on Android (Samsung) & iOS */
.field select + label {
  top: 7px !important;
  left: 17px !important;
  transform: none !important;
  font-size: 11px !important;
  font-weight: 600;
  color: var(--ivy-300);
  letter-spacing: 0.025em;
  max-width: calc(100% - 42px);
  right: 42px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.field.invalid input, .field.invalid textarea { border-color: rgba(248, 113, 113, 0.7); box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12); }
.field .hint { display: block; font-size: 12px; color: var(--text-3); margin: 6px 4px 0; }
.field.invalid .hint { color: var(--bad); }
.field .adorn { position: absolute; right: 14px; top: 18px; color: var(--text-3); font-size: 13px; }
.input-plain {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; background: rgba(14, 5, 22, 0.55);
  border: 1px solid var(--line-strong); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.input-plain:focus { border-color: var(--ivy-400); box-shadow: 0 0 0 4px rgba(142, 92, 200, 0.15); }
textarea.input-plain { height: auto; padding: 10px 14px; min-height: 80px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Toggle switch */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 44px; height: 26px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line-strong); position: relative; transition: background 0.25s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.25s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.switch input:checked + .track { background: var(--ivy-500); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--gold-400); outline-offset: 2px; }

/* Segmented control */
.segmented { display: inline-flex; padding: 4px; border-radius: 12px; background: rgba(14, 5, 22, 0.6); border: 1px solid var(--line); gap: 2px; }
.segmented button { height: 32px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.2s, color 0.2s; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: rgba(142, 92, 200, 0.18); color: var(--ivy-200); box-shadow: inset 0 0 0 1px rgba(184, 147, 232, 0.25); }

/* ---------------------------------------------------------------- */
/* Badges, chips, avatars                                            */
/* ---------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.ok { color: var(--ok); background: var(--ok-bg); border-color: rgba(52, 211, 153, 0.25); }
.badge.warn { color: var(--warn); background: var(--warn-bg); border-color: rgba(251, 191, 36, 0.25); }
.badge.info { color: var(--info); background: var(--info-bg); border-color: rgba(96, 165, 250, 0.25); }
.badge.bad { color: var(--bad); background: var(--bad-bg); border-color: rgba(248, 113, 113, 0.25); }
.badge.neutral { color: var(--text-2); background: rgba(255, 255, 255, 0.05); border-color: var(--line); }
.badge.gold { color: var(--gold-300); background: rgba(230, 214, 184, 0.12); border-color: rgba(230, 214, 184, 0.3); }

.avatar { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: var(--ivy-800); border: 1px solid var(--line-strong); flex: none; display: grid; place-items: center; font-weight: 700; color: var(--ivy-300); font-size: 14px; overflow: hidden; }
.avatar.round { border-radius: 50%; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--ivy-900); margin-left: -10px; font-size: 11px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------------------------------------------------------------- */
/* Toasts, modal, drawer                                             */
/* ---------------------------------------------------------------- */
.toasts { position: fixed; z-index: 1000; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px;
  background: rgba(29, 13, 45, 0.95); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  backdrop-filter: blur(14px); animation: toast-in 0.45s var(--ease) both; font-size: 14px;
}
.toast.out { animation: toast-out 0.3s var(--ease) both; }
.toast .ti { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--ok-bg); color: var(--ok); }
.toast.error .ti { background: var(--bad-bg); color: var(--bad); }
.toast.info .ti { background: rgba(230, 214, 184, 0.14); color: var(--gold-300); }
.toast .ti svg { width: 16px; height: 16px; }
.toast strong { display: block; font-weight: 600; margin-bottom: 2px; }
.toast span { color: var(--text-2); font-size: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

.overlay { position: fixed; inset: 0; z-index: 900; background: rgba(6, 2, 10, 0.66); backdrop-filter: blur(6px); animation: fade 0.25s both; }
@keyframes fade { from { opacity: 0; } }
.modal {
  position: fixed; z-index: 901; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto;
  background: var(--ivy-850); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 26px; animation: pop 0.35s var(--ease) both;
}
.modal.wide { width: min(860px, calc(100vw - 32px)); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(0.97); } }
.modal h3 { font-size: 20px; margin-bottom: 6px; }

/* ---------------------------------------------------------------- */
/* Misc                                                              */
/* ---------------------------------------------------------------- */
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.09), rgba(255,255,255,0.04)); background-size: 200% 100%; animation: sk 1.4s linear infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 12px; opacity: 0.6; }
.kbd { display: inline-block; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.04); font-size: 12px; font-family: ui-monospace, monospace; }
.reveal { animation: rise 0.7s var(--ease) both; }
.reveal.d1 { animation-delay: 0.08s; } .reveal.d2 { animation-delay: 0.16s; } .reveal.d3 { animation-delay: 0.24s; } .reveal.d4 { animation-delay: 0.32s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
[hidden], .hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) { .hide-mobile { display: none !important; } }

/* Range slider */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: rgba(255,255,255,0.1); outline: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--gold-400); border: 3px solid var(--ivy-900); box-shadow: 0 0 0 1px var(--gold-400); cursor: pointer; }
.range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--gold-400); border: 3px solid var(--ivy-900); cursor: pointer; }

/* Photo cropper */
.cropper { position: relative; width: min(100%, 360px); aspect-ratio: 1; margin: 0 auto; border-radius: 20px; overflow: hidden; background: var(--ivy-900); touch-action: none; }
.cropper canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.cropper canvas:active { cursor: grabbing; }
.cropper-ring { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at center, transparent 46%, rgba(6, 2, 10, 0.55) 46.5%); }
.cropper-ring::after { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: 2px dashed rgba(246, 231, 219, 0.8); }

/* Credit line */
