/* ════════════════════════════════════════════════════════════════
   ZORY ARTIST PORTAL — Premium UI Stylesheet
   ════════════════════════════════════════════════════════════════ */

/* ── Custom Properties ────────────────────────────────────────── */
:root {
  /* Palette */
  --bg:          #0a0a0b;
  --surface:     #111113;
  --surface-2:   #18181c;
  --border:      rgba(255,255,255,.07);
  --border-focus: rgba(194,161,96,.55);
  --gold:        #c2a160;
  --gold-light:  #dfc080;
  --gold-dim:    rgba(194,161,96,.18);
  --text:        #e8e6e0;
  --text-muted:  #7a7872;
  --text-subtle: #4a4844;
  --error:       #b85555;
  --success:     #5a9a72;

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  /* Layout */
  --max-w: 740px;
  --radius: 6px;
  --radius-lg: 12px;

  /* Animation */
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background Texture ───────────────────────────────────────── */
.bg-noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px;
}
.bg-gradient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(194,161,96,.06) 0%, transparent 70%),
              radial-gradient(ellipse 60% 40% at 80% 100%, rgba(194,161,96,.04) 0%, transparent 60%);
}

/* ── Site Header ──────────────────────────────────────────────── */
.site-header {
  position: relative; z-index: 10;
  display: flex; align-items: center; gap: 14px;
  padding: 28px 40px;
}
.logo-mark {
  width: 42px; height: 42px;
  border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 300;
  color: var(--gold);
  letter-spacing: .05em;
  flex-shrink: 0;
}
.header-text {
  display: flex; flex-direction: column; gap: 1px;
}
.brand-name {
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: .25em;
  color: var(--gold);
}
.brand-tagline {
  font-size: 11px; color: var(--text-muted);
  letter-spacing: .08em;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  position: relative; z-index: 5;
  max-width: var(--max-w);
  margin: 60px auto 80px;
  padding: 0 24px;
  text-align: center;
}
.eyebrow {
  font-size: 11px; letter-spacing: .22em;
  color: var(--gold); text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(52px, 8vw, 90px);
  font-weight: 300;
  line-height: 1.02;
  color: #fff;
  letter-spacing: -.01em;
  margin-bottom: 28px;
}
.hero-title em { color: var(--gold); font-style: normal; }
.hero-sub {
  font-size: 15px; color: var(--text-muted);
  line-height: 1.75;
  max-width: 480px; margin: 0 auto 40px;
}
.cta-button {
  display: inline-block;
  padding: 14px 38px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 11px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.cta-button:hover {
  background: var(--gold);
  color: var(--bg);
}

/* ── Progress ─────────────────────────────────────────────────── */
.progress-wrap {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,11,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 0;
}
.progress-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap;
  max-width: var(--max-w); margin: 0 auto;
  padding-bottom: 14px;
}
.prog-step {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-subtle);
  transition: color .3s var(--ease);
  white-space: nowrap; padding: 0 4px;
}
.prog-step.active { color: var(--gold); }
.prog-step.done   { color: var(--text-muted); }
.prog-sep {
  display: inline-block; width: 24px; height: 1px;
  background: var(--border); margin: 0 6px;
  flex-shrink: 0;
}
.progress-bar {
  height: 2px; background: var(--border);
  position: relative; overflow: hidden;
}
.progress-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: var(--gold);
  transition: width .5s var(--ease);
  width: 20%;
}

/* ── Form Shell ───────────────────────────────────────────────── */
.form-shell {
  position: relative; z-index: 5;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px 100px;
}
fieldset { border: none; }

/* ── Steps ────────────────────────────────────────────────────── */
.form-step {
  display: none;
  animation: fadeUp .45s var(--ease) both;
}
.form-step.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Step Header ──────────────────────────────────────────────── */
.step-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.step-label {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
  display: block; margin-bottom: 12px;
}
.step-title {
  font-family: var(--font-serif);
  font-size: 42px; font-weight: 300;
  color: #fff; letter-spacing: -.01em;
  margin-bottom: 12px;
}
.step-desc {
  font-size: 14px; color: var(--text-muted);
  max-width: 420px;
}

/* ── Field Groups ─────────────────────────────────────────────── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

.field-group {
  position: relative;
  margin-bottom: 20px;
}

/* Floating-label inputs */
.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="tel"],
.field-group input[type="url"],
.field-group input[type="password"],
.field-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 20px 16px 8px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color .25s var(--ease), background .25s var(--ease);
  resize: vertical;
}
.field-group input:focus,
.field-group textarea:focus {
  border-color: var(--border-focus);
  background: var(--surface-2);
}
.field-group input.invalid,
.field-group textarea.invalid {
  border-color: var(--error);
}

/* Floating labels */
.field-group label {
  position: absolute;
  left: 16px; top: 14px;
  font-size: 13px; color: var(--text-muted);
  pointer-events: none;
  transition: top .2s var(--ease), font-size .2s var(--ease), color .2s var(--ease);
}
.field-group input:focus ~ label,
.field-group input:not(:placeholder-shown) ~ label,
.field-group textarea:focus ~ label,
.field-group textarea:not(:placeholder-shown) ~ label {
  top: 6px; font-size: 10px; color: var(--gold);
  letter-spacing: .08em; text-transform: uppercase;
}

.field-hint {
  font-size: 12px; color: var(--text-subtle);
  margin-top: 6px; margin-bottom: 18px;
  line-height: 1.55;
}
.field-hint strong { color: var(--text-muted); }

.field-group-title {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-subtle);
  margin: 8px 0 14px;
}

/* Social field */
.social-field { padding-left: 30px; }
.social-icon {
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  color: var(--gold); font-size: 10px; opacity: .6;
}

/* ── Question Block ───────────────────────────────────────────── */
.question-block {
  margin-bottom: 44px;
}
.question-label {
  display: block;
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 400;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 10px;
}

/* ── Checkbox / Radio Cards ───────────────────────────────────── */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
@media (max-width: 540px) { .checkbox-grid { grid-template-columns: 1fr; } }

.radio-stack {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 4px;
}

.check-card,
.radio-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
  user-select: none;
}
.check-card:hover,
.radio-card:hover {
  border-color: rgba(194,161,96,.3);
  background: var(--surface-2);
}
.check-card.selected,
.radio-card.selected {
  border-color: var(--gold);
  background: var(--gold-dim);
}
.check-card.wide { grid-column: 1 / -1; }

/* Hide native inputs */
.check-card input[type="checkbox"],
.radio-card  input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}

/* Custom box */
.check-box,
.radio-box {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border: 1px solid var(--text-subtle);
  border-radius: 2px;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.radio-box { border-radius: 50%; }

.check-card.selected .check-box,
.radio-card.selected .radio-box {
  border-color: var(--gold);
  background: var(--gold);
}
.check-card.selected .check-box::after {
  content: '';
  display: block; width: 5px; height: 9px;
  border: 1.5px solid var(--bg);
  border-top: none; border-left: none;
  transform: rotate(42deg) translateY(-1px);
}
.radio-card.selected .radio-box::after {
  content: '';
  display: block; width: 7px; height: 7px;
  border-radius: 50%; background: var(--bg);
}

.check-text,
.radio-text {
  font-size: 14px; color: var(--text);
  line-height: 1.5;
}
.check-text small,
.radio-text small {
  display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px;
}

/* ── Other / Conditional field ────────────────────────────────── */
.other-field-wrap {
  margin-top: 10px;
  overflow: hidden;
  max-height: 0;
  transition: max-height .35s var(--ease), opacity .3s;
  opacity: 0;
}
.other-field-wrap.visible {
  max-height: 80px;
  opacity: 1;
}
.other-field-wrap input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color .2s var(--ease);
}
.other-field-wrap input:focus { border-color: var(--border-focus); }

/* ── File Upload ──────────────────────────────────────────────── */
.upload-zone {
  position: relative;
  border: 1px dashed rgba(194,161,96,.3);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--gold);
  background: var(--gold-dim);
}
.upload-input {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.upload-icon { color: var(--gold); margin-bottom: 14px; }
.upload-icon svg { width: 40px; height: 40px; }
.upload-label {
  font-size: 14px; color: var(--text-muted);
}
.upload-link { color: var(--gold); text-decoration: underline; }
.upload-sub {
  font-size: 12px; color: var(--text-subtle); margin-top: 6px;
}
.file-list {
  list-style: none;
  margin-top: 20px;
  display: flex; flex-direction: column; gap: 8px;
  text-align: left;
}
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
}
.file-item-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.file-item-size { color: var(--text-muted); font-size: 12px; }
.file-remove {
  background: none; border: none;
  color: var(--text-subtle); font-size: 16px; cursor: pointer;
  padding: 0 4px; line-height: 1;
  transition: color .2s;
}
.file-remove:hover { color: var(--error); }

/* ── GDPR Block ───────────────────────────────────────────────── */
.gdpr-block {
  margin: 48px 0 36px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.gdpr-title {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 20px;
}
.gdpr-check {
  display: flex; align-items: flex-start; gap: 14px;
  cursor: pointer; margin-bottom: 16px;
  user-select: none;
}
.gdpr-check:last-child { margin-bottom: 0; }
.gdpr-check input { position: absolute; opacity: 0; }
.gdpr-box {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border: 1px solid var(--text-subtle);
  border-radius: 2px; margin-top: 2px;
  transition: background .2s, border-color .2s;
  display: flex; align-items: center; justify-content: center;
}
.gdpr-check.checked .gdpr-box {
  background: var(--gold); border-color: var(--gold);
}
.gdpr-check.checked .gdpr-box::after {
  content: '';
  display: block; width: 5px; height: 9px;
  border: 1.5px solid var(--bg);
  border-top: none; border-left: none;
  transform: rotate(42deg) translateY(-1px);
}
.gdpr-text {
  font-size: 13px; color: var(--text-muted); line-height: 1.6;
}
.gdpr-text strong { color: var(--text); }

/* ── Required / Optional markers ─────────────────────────────── */
.req { color: var(--gold); font-style: normal; }
.optional { color: var(--text-subtle); font-size: .85em; font-style: italic; }

/* ── Navigation Buttons ───────────────────────────────────────── */
.step-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 52px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.btn-back,
.btn-next,
.btn-submit {
  font-family: var(--font-sans);
  border: none; cursor: pointer;
  font-size: 12px; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: var(--radius);
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), opacity .25s var(--ease);
  display: flex; align-items: center; gap: 8px;
}
.btn-back {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-back:hover {
  border-color: rgba(255,255,255,.2); color: var(--text);
}

.btn-next {
  background: var(--gold);
  color: var(--bg);
}
.btn-next:hover {
  background: var(--gold-light);
}

.btn-submit {
  background: var(--gold);
  color: var(--bg);
  position: relative;
}
.btn-submit:hover:not(:disabled) { background: var(--gold-light); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

.btn-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(10,10,11,.2);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn-spinner.visible { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

.arrow { font-size: 14px; }

/* ── Success Screen ───────────────────────────────────────────── */
.success-screen {
  display: none;
  text-align: center;
  padding: 80px 24px;
  animation: fadeUp .5s var(--ease) both;
}
.success-screen.visible { display: block; }

.success-glyph {
  font-size: 40px; color: var(--gold);
  margin-bottom: 28px;
  animation: pulse 2.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}
.success-title {
  font-family: var(--font-serif);
  font-size: 48px; font-weight: 300; color: #fff;
  margin-bottom: 20px;
}
.success-sub {
  font-size: 15px; color: var(--text-muted);
  line-height: 1.75; max-width: 400px; margin: 0 auto 28px;
}
.success-id {
  font-size: 11px; letter-spacing: .14em;
  color: var(--text-subtle); font-family: 'Courier New', monospace;
}

/* ── Error messages ───────────────────────────────────────────── */
.error-msg {
  font-size: 12px; color: var(--error);
  margin-top: 6px; display: none;
}
.error-msg.visible { display: block; }

/* ── Toast ────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 32px; right: 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 13px; color: var(--text);
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 9999;
  transform: translateY(20px); opacity: 0;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.toast-error { border-color: var(--error); }
.toast.toast-success { border-color: var(--success); }

/* ── Site Footer ──────────────────────────────────────────────── */
.site-footer {
  position: relative; z-index: 5;
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-subtle);
  letter-spacing: .06em;
}

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* ── Selection ────────────────────────────────────────────────── */
::selection { background: var(--gold-dim); color: var(--gold-light); }

/* ── Utility: visually hidden ─────────────────────────────────── */
.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;
}
