/* Variables */
:root {
  --bg:            #f0f4ff;
  --bg-card:       #ffffff;
  --bg-raised:     #e8eeff;
  --ink:           #141e3c;
  --ink-muted:     #4a65a8;
  --ink-faint:     #7a96d4;
  --border:        #c2d0f5;
  --border-light:  #d8e2fa;
  --accent:        #2d4fa3;
  --accent-hover:  #1e3a80;
  --accent-light:  #7a96d4;
  --serif-display: 'Playfair Display', Georgia, serif;
  --serif-body:    'Source Serif 4', Georgia, serif;
}

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

html,
body {
  min-height: 100%;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 16px;
  line-height: 1.7;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(45, 79, 163, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}


/* Page Layout */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.5rem 5rem;
}

/* Header */
.site-header {
  text-align: center;
  margin-bottom: 2.5rem;
  width: 100%;
  max-width: 660px;
}

.site-header .eyebrow {
  font-family: var(--serif-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.75rem;
}

.site-header h1 {
  font-family: var(--serif-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

.site-header h1 em {
  font-style: italic;
  color: var(--accent);
}

.site-header .subtitle {
  font-size: 15px;
  color: var(--ink-muted);
  font-style: italic;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.25rem 0;
  color: var(--border);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}


/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  width: 100%;
  max-width: 660px;
  padding: 3rem 3.5rem;
  box-shadow:
    0 1px 3px rgba(45, 79, 163, 0.06),
    0 4px 24px rgba(45, 79, 163, 0.09),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  position: relative;
  animation: fadeUp 0.5s ease both;
}

/* Decorative corner marks */
.card::before,
.card::after {
  content: '✦';
  position: absolute;
  font-size: 10px;
  color: var(--border);
  line-height: 1;
}

.card::before {
  top: 14px;
  left: 18px;
}

.card::after {
  bottom: 14px;
  right: 18px;
}


/* Progress Bar */
.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.progress-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-family: var(--serif-body);
}

.progress-track {
  height: 2px;
  background: var(--border-light);
  border-radius: 1px;
  margin-bottom: 2.25rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 10%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Question Text */
.q-text {
  font-family: var(--serif-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 1.75rem;
}

/* Answer Options */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 2rem;
}

.opt-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: 14px 18px;
  text-align: left;
  font-family: var(--serif-body);
  font-size: 15px;
  color: var(--ink-muted);
  cursor: pointer;
  line-height: 1.5;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.1s;
}

.opt-btn::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--border);
  margin-right: 12px;
  vertical-align: middle;
  transition: background 0.18s, border-color 0.18s;
}

.opt-btn:hover {
  background: var(--bg-raised);
  border-color: var(--border);
  color: var(--ink);
}

.opt-btn.selected {
  background: var(--bg-raised);
  border-color: var(--accent-light);
  color: var(--ink);
}

.opt-btn.selected::before {
  background: var(--accent);
  border-color: var(--accent);
}

.opt-btn:active {
  transform: scale(0.995);
}


/* Navigation Buttons */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
}

.nav-btn {
  font-family: var(--serif-body);
  font-size: 14px;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 2px;
  padding: 9px 22px;
  transition: background 0.18s, color 0.18s, opacity 0.18s, transform 0.1s;
}

.nav-btn.ghost {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--ink-muted);
}

.nav-btn.ghost:hover {
  background: var(--bg-raised);
  color: var(--ink);
}

.nav-btn.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #ffffff;
}

.nav-btn.primary:hover {
  background: var(--accent-hover);
}

.nav-btn.primary:active {
  transform: scale(0.98);
}

.nav-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}


/* Result Screen */

#result-screen {
  display: none;
}

.result-inner {
  text-align: center;
}

.result-emoji {
  font-size: 56px;
  display: block;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.result-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}

.result-name {
  font-family: var(--serif-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.result-years {
  font-size: 13px;
  color: var(--ink-faint);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.result-divider {
  width: 40px;
  height: 1px;
  background: var(--accent-light);
  margin: 0 auto 1.5rem;
}

.result-desc {
  font-size: 15.5px;
  color: var(--ink-muted);
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto 1.75rem;
  font-style: italic;
}

.traits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2rem;
}

.trait {
  font-family: var(--serif-body);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  color: var(--ink-muted);
  background: var(--bg-raised);
}

.result-nav {
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
  display: flex;
  justify-content: center;
}


/* Animations */

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


/* Responsive */

@media (max-width: 520px) {
  .card {
    padding: 2rem 1.5rem;
  }

  .site-header h1 {
    font-size: 1.7rem;
  }
}

/* Recommendation */
.result-rec {
  font-size: 14px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  margin: -0.75rem auto 1.5rem;
  max-width: 480px;
}
