/* ── Variables ── */
:root {
  --navy: #0d1b2a;
  --navy-mid: #162032;
  --navy-light: #1e2f44;
  --gold: #c9a96e;
  --gold-light: #e8d5b0;
  --gold-dim: #8a6f45;
  --cream: #f5f0e8;
  --muted: #7a8a9a;
  --white: #ffffff;
  --border: rgba(201, 169, 110, 0.2);
  --border-hover: rgba(201, 169, 110, 0.6);
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Base ── */
body {
  background: var(--navy);
  color: var(--cream);
  font-family: 'Didact Gothic', sans-serif;
  height: 100vh;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(201, 169, 110, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, rgba(201, 169, 110, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── App Shell ── */
.app {
  position: relative;
  z-index: 1;
  max-width: 640px;
  height: 100vh;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Header ── */
.header {
  padding: 20px 0 16px;
  text-align: center;
  flex-shrink: 0;
}

.logo-img {
  height: 64px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.logo-divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin: 14px auto 0;
}

/* ── Screen System ── */
.screen {
  display: none;
  flex: 1;
  min-height: 0;
}

.screen.active {
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Intro and result screens scroll internally */
#screen-intro,
#screen-result {
  overflow-y: auto;
  padding-bottom: 40px;
}

/* ── Loading Screen ── */
#screen-loading {
  align-items: center;
  justify-content: center;
}

.loader-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.loader-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ── Intro ── */
.intro-content {
  padding-top: 40px;
  text-align: center;
}

.intro-symbol {
  display: block;
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 28px;
  opacity: 0.7;
}

.intro-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 9vw, 54px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--cream);
  margin-bottom: 20px;
}

.intro-headline em {
  font-style: italic;
  color: var(--gold-light);
}

.intro-sub {
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 44px;
  line-height: 1.7;
}

.name-field-wrap {
  text-align: left;
  margin-bottom: 24px;
}

.name-field-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 10px;
}

.name-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 14px 16px;
  color: var(--cream);
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  outline: none;
  transition: border-color 0.2s;
}

.name-field:focus {
  border-color: var(--gold);
}

.name-field::placeholder {
  color: var(--muted);
}

/* ── Buttons ── */
.btn-primary {
  width: 100%;
  background: var(--gold);
  border: none;
  padding: 16px 24px;
  color: var(--navy);
  font-family: 'Didact Gothic', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--gold-light);
}

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
  opacity: 0.7;
}

.btn-back {
  background: none;
  border: 1px solid var(--border);
  padding: 12px 20px;
  color: var(--muted);
  font-family: 'Didact Gothic', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-back:hover {
  border-color: var(--border-hover);
  color: var(--cream);
}

.btn-next {
  background: none;
  border: 1px solid var(--gold-dim);
  padding: 12px 28px;
  color: var(--gold);
  font-family: 'Didact Gothic', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-next:hover:not(:disabled) {
  background: rgba(201, 169, 110, 0.08);
  border-color: var(--gold);
}

.btn-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-cta {
  display: block;
  width: 100%;
  background: var(--gold);
  border: none;
  padding: 16px 36px;
  color: var(--navy);
  font-family: 'Didact Gothic', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-cta:hover {
  background: var(--gold-light);
}

/* ── Footnote ── */
.intro-footnote {
  font-size: 11px;
  color: var(--muted);
  margin-top: 16px;
  letter-spacing: 0.05em;
}

/* ── Progress ── */
.progress-wrap {
  padding: 16px 0 0;
  flex-shrink: 0;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.progress-track {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Question ── */
.question-wrap {
  padding: 20px 0 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* hide scrollbar visually but keep functionality */
  scrollbar-width: none;
}
.question-wrap::-webkit-scrollbar {
  display: none;
}

.q-section {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 10px;
}

.q-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(20px, 4.5vw, 26px);
  font-weight: 300;
  line-height: 1.3;
  color: var(--cream);
  margin-bottom: 8px;
}

.q-hint {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 16px;
  font-style: italic;
}

.multi-hint {
  font-size: 11px;
  color: var(--gold-dim);
  margin-top: 10px;
  letter-spacing: 0.05em;
}

/* ── Options ── */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.option-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 13px 18px;
  color: rgba(245, 240, 232, 0.8);
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.option-btn:hover {
  background: rgba(201, 169, 110, 0.06);
  border-color: var(--border-hover);
  color: var(--cream);
  transform: translateX(4px);
}

.option-btn.selected {
  background: rgba(201, 169, 110, 0.10);
  border-color: var(--gold);
  color: var(--cream);
  transform: translateX(6px);
}

.option-marker {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-hover);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--gold);
  transition: all 0.2s;
}

.option-btn.selected .option-marker {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

/* ── Text Textarea ── */
.text-area {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 16px;
  color: var(--cream);
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  line-height: 1.6;
  resize: vertical;
  min-height: 120px;
  outline: none;
  transition: border-color 0.2s;
}

.text-area:focus {
  border-color: var(--gold);
}

.text-area::placeholder {
  color: var(--muted);
}

/* ── Question Nav ── */
.q-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 16px;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════
   RESULT SCREEN
   ═══════════════════════════════════════════════ */

body:has(#screen-result.active) {
  overflow-y: auto;
  height: auto;
}

.app:has(#screen-result.active) {
  max-width: 100%;
  padding: 0;
  height: auto;
  min-height: 100vh;
  overflow: visible;
  display: block;
}


.app:has(#screen-result.active) #screen-result {
  height: auto;
  overflow: visible;
  padding-bottom: 0;
  display: block !important;
  animation: none;
}

#resultContent {
  display: block;
  height: auto;
}

/* ── Two-column layout ── */
.rz-layout {
  display: grid;
  grid-template-columns: 55fr 45fr;
  min-height: calc(100vh - 115px);
}

.rz-col-left {
  padding: 72px 60px 80px;
}

.rz-col-right {
  padding: 72px 60px 80px;
  display: flex;
  flex-direction: column;
}

/* ── Shared ── */
.rz-eyebrow {
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 16px;
  display: block;
}

/* ── Identity block ── */
.rz-identity {
  margin-bottom: 72px;
}

.rz-mask-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(44px, 5.2vw, 72px);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.05;
  margin-bottom: 10px;
}

.rz-secondary {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
}

.rz-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0;
}

.rz-rule span:not(.rz-dot) {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.rz-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.rz-description {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.85;
  color: rgba(245, 240, 232, 0.85);
}

/* ── Profile block ── */
.rz-profile {
  padding-top: 8px;
}

.rz-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 40px;
  margin-top: 28px;
}

.rz-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rz-field-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.rz-field-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: var(--cream);
  line-height: 1.4;
}

/* ── CTA block ── */
.rz-cta {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.rz-cta-bottom {
  margin-top: auto;
  text-align: center;
}

.rz-cta-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 2.5vw, 36px);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.2;
  margin-bottom: 20px;
}

.rz-cta-body {
  font-size: 13px;
  color: rgba(245, 240, 232, 0.65);
  line-height: 1.75;
  margin-bottom: 48px;
}

.rz-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 64px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}

.rz-price-note {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 20px;
}

.btn-cta-zone {
  background: var(--gold);
  border: none;
  padding: 18px 32px;
  color: var(--navy);
  font-family: 'Didact Gothic', sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.btn-cta-zone:hover { background: var(--gold-light); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .rz-col-left { padding: 56px 40px; }
  .rz-col-right { padding: 56px 40px; }
}

@media (max-width: 768px) {
  body:has(#screen-result.active) {
    overflow-y: auto !important;
    height: auto !important;
  }

  .app:has(#screen-result.active) {
    overflow: visible;
    height: auto;
    display: block;
  }

  .rz-layout {
    grid-template-columns: 1fr;
  }

  .rz-col-left {
    padding: 40px 24px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .rz-col-right {
    padding: 40px 24px;
  }

  .rz-cta { position: static; }
  .rz-mask-name { font-size: 38px; }
  .rz-profile-grid { gap: 20px 24px; }
}

@media (max-width: 480px) {
  .options-grid { grid-template-columns: 1fr; }
  .rz-mask-name { font-size: 32px; }
  .rz-price { font-size: 48px; }
}