/* ============================================================
   IKIGAI — stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --bg:        #faf7f2;
  --surface:   #ffffff;
  --border:    #e8e2d9;
  --text:      #2c2c2c;
  --muted:     #7a7468;
  --accent:    #c45c26;
  --accent-light: #f5e6dc;
  --green:     #4a7c59;
  --green-light: #ddeee3;
  --blue:      #2d5986;
  --blue-light: #dce8f5;
  --gold:      #b8860b;
  --gold-light: #fdf3d0;
  --radius:    12px;
  --shadow:    0 2px 20px rgba(0,0,0,0.08);
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; }

/* ---------- Landing Page ---------- */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background: linear-gradient(160deg, #faf7f2 0%, #f0e8dc 100%);
}

.landing-logo {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 48px;
  opacity: 0.8;
}

.landing h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.2;
  max-width: 700px;
  margin-bottom: 24px;
  color: var(--text);
}

.landing h1 span { color: var(--accent); }

.landing-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 48px;
  font-weight: 300;
}

.landing-features {
  display: flex;
  gap: 32px;
  margin-bottom: 56px;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.landing-feature::before {
  content: '✓';
  color: var(--green);
  font-weight: 600;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 18px 40px;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
  background: #a84d1e;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(196, 92, 38, 0.35);
}

.landing-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

/* Ikigai diagram decorative */
.ikigai-diagram-preview {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 48px;
}

.ikigai-diagram-preview .circle {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.35;
}
.circle-love    { background: #e05c6e; top: 0;   left: 40px; }
.circle-good    { background: #4a7c59; top: 40px; right: 0; }
.circle-paid    { background: #c45c26; bottom: 0; left: 40px; }
.circle-world   { background: #2d5986; top: 40px; left: 0; }
.ikigai-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  letter-spacing: 1px;
  z-index: 10;
}

/* ---------- Quiz Layout ---------- */
.quiz-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 60px;
}

.quiz-header {
  width: 100%;
  max-width: 680px;
  padding: 24px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-brand {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
}

.quiz-step-label {
  font-size: 13px;
  color: var(--muted);
}

/* Progress bar */
.progress-wrap {
  width: 100%;
  max-width: 680px;
  margin: 20px 0 40px;
}

.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-dots {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: var(--transition);
  cursor: default;
}

.progress-dot.active   { background: var(--accent); }
.progress-dot.done     { background: var(--green); }

/* ---------- Step ---------- */
.step {
  width: 100%;
  max-width: 680px;
  animation: fadeIn 0.4s ease;
}

.step.hidden { display: none; }

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

.step-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.step h2 {
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.25;
  margin-bottom: 12px;
}

.step-intro {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 36px;
}

/* ---------- Questions ---------- */
.question {
  margin-bottom: 32px;
}

.question label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text);
}

.question label .q-num {
  color: var(--accent);
  font-weight: 600;
  margin-right: 6px;
}

/* Radio / Checkbox pills */
.options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-pill input { display: none; }

.option-pill label {
  display: inline-block;
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text);
  margin: 0;
  user-select: none;
}

.option-pill input:checked + label {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

.option-pill label:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* Text inputs */
.question textarea,
.question input[type="text"] {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--surface);
  transition: var(--transition);
  resize: vertical;
  outline: none;
}

.question textarea { min-height: 90px; }

.question textarea:focus,
.question input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.question textarea::placeholder,
.question input::placeholder {
  color: #bbb;
  font-weight: 300;
}

/* Scale / range */
.scale-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.scale-options {
  display: flex;
  gap: 8px;
}

.scale-option {
  flex: 1;
  display: flex;
}

.scale-option input { display: none; }

.scale-option label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 4px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text);
  margin: 0;
  min-width: 0;
}

.scale-option input:checked + label {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

/* Navigation buttons */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn-back {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--muted);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

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

.btn-next, .btn-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-next:hover, .btn-submit:hover {
  background: #a84d1e;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196, 92, 38, 0.3);
}

.btn-submit { background: var(--green); }
.btn-submit:hover { background: #3d6b4a; box-shadow: 0 6px 20px rgba(74, 124, 89, 0.3); }

/* Validation error */
.error-msg {
  color: #c0392b;
  font-size: 13px;
  margin-top: 8px;
  display: none;
}

/* ---------- Loading Screen ---------- */
.loading-screen {
  text-align: center;
  padding: 60px 20px;
}

.loader-ring {
  width: 64px;
  height: 64px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 32px;
}

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

.loading-screen h2 { margin-bottom: 12px; }
.loading-screen p  { color: var(--muted); font-size: 15px; }

.loading-steps {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  opacity: 0.4;
  transition: opacity 0.5s;
}

.loading-step.active { opacity: 1; color: var(--text); }
.loading-step.done   { opacity: 0.7; }

.loading-step-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.loading-step.active .loading-step-icon { border-color: var(--accent); color: var(--accent); }
.loading-step.done   .loading-step-icon { border-color: var(--green); background: var(--green); color: #fff; }

/* ---------- Results ---------- */
.results {
  width: 100%;
  max-width: 720px;
}

.results-header {
  text-align: center;
  padding: 20px 0 48px;
}

.results-header .tag {
  display: inline-block;
  background: var(--green-light);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.results-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
}

.results-header p {
  font-size: 16px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

/* Summary card */
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.summary-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--accent);
}

.summary-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

/* Ikigai map */
.ikigai-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.ikigai-area {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border-top: 3px solid transparent;
}

.ikigai-area.love   { border-color: #e05c6e; }
.ikigai-area.good   { border-color: var(--green); }
.ikigai-area.paid   { border-color: var(--accent); }
.ikigai-area.world  { border-color: var(--blue); }

.ikigai-area-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ikigai-area-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.love  .ikigai-area-icon { background: #fde8eb; }
.good  .ikigai-area-icon { background: var(--green-light); }
.paid  .ikigai-area-icon { background: var(--accent-light); }
.world .ikigai-area-icon { background: var(--blue-light); }

.ikigai-area h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.ikigai-area ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ikigai-area ul li {
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.ikigai-area ul li::before {
  content: '→';
  color: var(--muted);
  flex-shrink: 0;
  margin-top: 1px;
}

/* Paths */
.paths-title {
  font-size: 24px;
  margin-bottom: 8px;
}

.paths-subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.path-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.path-card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }

.path-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 16px;
}

.path-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.path-card:nth-child(2) .path-number { background: var(--green); }
.path-card:nth-child(3) .path-number { background: var(--blue); }

.path-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  flex: 1;
}

.path-timeframe {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--accent);
  white-space: nowrap;
}

.path-card:nth-child(2) .path-timeframe { background: var(--green-light); color: var(--green); }
.path-card:nth-child(3) .path-timeframe { background: var(--blue-light); color: var(--blue); }

.path-description {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.path-why {
  background: var(--bg);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.path-why strong { color: var(--text); }

.path-steps-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.path-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.path-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.path-card:nth-child(2) .step-badge { background: var(--green-light); color: var(--green); }
.path-card:nth-child(3) .step-badge { background: var(--blue-light); color: var(--blue); }

/* Closing message */
.closing-card {
  background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  margin-top: 32px;
}

.closing-card h3 {
  font-size: 22px;
  margin-bottom: 14px;
  color: #fff;
}

.closing-card p {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  max-width: 500px;
  margin: 0 auto 24px;
}

.btn-restart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  text-decoration: none;
}

.btn-restart:hover { background: rgba(255,255,255,0.2); }

/* Error state */
.error-screen {
  text-align: center;
  padding: 60px 20px;
}

.error-screen .icon { font-size: 48px; margin-bottom: 24px; }
.error-screen h2   { margin-bottom: 12px; }
.error-screen p    { color: var(--muted); margin-bottom: 32px; }

/* ---------- Payment CTA ---------- */
.payment-cta-card {
  background: linear-gradient(135deg, #1a1a2e, #2c2c2c);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px;
  margin: 32px 0;
}

.payment-cta-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.payment-cta-card h3 {
  font-size: 22px;
  color: #fff;
  margin-bottom: 12px;
}

.payment-cta-card > p {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  margin-bottom: 24px;
}

.payment-cta-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 28px;
}

.payment-cta-features span {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

.payment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-input {
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 15px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: var(--transition);
}

.payment-input::placeholder { color: rgba(255,255,255,0.35); }

.payment-input:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.12);
}

.btn-pay {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 16px 28px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  margin-top: 4px;
}

.btn-pay:hover:not(:disabled) {
  background: #a84d1e;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(196,92,38,0.4);
}

.btn-pay:disabled { opacity: 0.6; cursor: default; }

.payment-note {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .ikigai-map       { grid-template-columns: 1fr; }
  .path-card-header { flex-wrap: wrap; }
  .scale-options    { gap: 4px; }
  .scale-option label { padding: 10px 4px; font-size: 12px; }
  .landing-features { flex-direction: column; align-items: center; }
}
