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

:root {
  --orange: #e86c2a;
  --orange-dark: #c9551a;
  --wood: #8b5e3c;
  --wood-light: #b5835a;
  --sky: #4a9ede;
  --sky-light: #87ceeb;
  --cream: #fdf6ec;
  --charcoal: #2d2d2d;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  min-height: 100vh;
  overflow-x: hidden;
}

/* === Layout === */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

.step {
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.step.active {
  display: flex;
  opacity: 1;
}

.step.fade-out {
  opacity: 0;
}

/* === Typography === */
.hero-title {
  font-family: 'Lilita One', cursive;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1.1;
  text-align: center;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.highlight {
  color: var(--orange);
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.25rem;
  text-align: center;
  color: var(--wood);
  margin-bottom: 2.5rem;
  font-weight: 500;
}

.question-text {
  font-family: 'Lilita One', cursive;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  line-height: 1.2;
  text-align: center;
  color: var(--charcoal);
  margin-bottom: 2rem;
}

/* === Buttons === */
.btn {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  display: inline-block;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--orange-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
}

.btn-secondary:hover {
  background: var(--orange);
  color: var(--white);
}

#start-btn {
  display: block;
  margin: 0 auto;
  font-size: 1.25rem;
  padding: 1.1rem 3rem;
}

/* === Progress Bar === */
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  margin-bottom: 3rem;
  overflow: hidden;
}

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

/* === Answers === */
.answers-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.answer-btn {
  font-family: 'Inter', sans-serif;
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 500;
  text-align: left;
  background: var(--white);
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  color: var(--charcoal);
}

.answer-btn:hover {
  border-color: var(--orange);
  background: #fff7f0;
  transform: translateX(4px);
}

.answer-btn:active {
  transform: translateX(2px);
}

.answer-btn.selected {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--white);
}

/* === Question transitions === */
#question-container {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#question-container.slide-out {
  opacity: 0;
  transform: translateX(-30px);
}

#question-container.slide-in {
  opacity: 0;
  transform: translateX(30px);
}

/* === Weather Check === */
.weather-state {
  text-align: center;
}

.weather-subtitle {
  font-size: 1.15rem;
  color: var(--wood);
  margin-bottom: 2rem;
  font-weight: 500;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--orange);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  animation: spin 0.8s linear infinite;
}

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

.weather-status {
  font-size: 0.95rem;
  color: var(--wood-light);
  font-style: italic;
}

/* === City Fallback === */
.city-input-group {
  display: flex;
  gap: 0.75rem;
  max-width: 420px;
  margin: 0 auto 1rem;
}

.city-input {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: 0.85rem 1.25rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.2s;
}

.city-input:focus {
  border-color: var(--orange);
}

.city-input-group .btn {
  padding: 0.85rem 1.5rem;
  white-space: nowrap;
}

.city-error {
  color: #d44;
  font-size: 0.9rem;
  min-height: 1.4em;
}

/* === Verdict === */
.verdict-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 40px var(--shadow);
  text-align: center;
}

.verdict-label {
  font-size: 1rem;
  color: var(--wood-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.verdict-text {
  font-family: 'Lilita One', cursive;
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.verdict-text.verdict-yes { color: #2e8b57; }
.verdict-text.verdict-strong-yes { color: #3a9d5e; }
.verdict-text.verdict-probably { color: var(--orange); }
.verdict-text.verdict-technically { color: var(--wood); }
.verdict-text.verdict-reconsider { color: #c77a30; }
.verdict-text.verdict-no { color: #c0392b; }

/* === Verdict Weather === */
.verdict-weather {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.weather-summary {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

.weather-detail {
  font-size: 0.95rem;
  color: var(--wood);
  line-height: 1.5;
}

.weather-commentary {
  margin-top: 0.75rem;
  font-style: italic;
  color: var(--orange-dark);
  font-weight: 500;
}

/* === Verdict Breakdown === */
.verdict-breakdown {
  text-align: left;
  margin-bottom: 2rem;
}

.breakdown-title {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wood-light);
  margin-bottom: 0.75rem;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-question {
  color: var(--charcoal);
  flex: 1;
  margin-right: 1rem;
}

.breakdown-answer {
  color: var(--wood);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

/* === Verdict Actions === */
.verdict-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.verdict-actions .btn {
  min-width: 140px;
}

/* === Responsive === */
@media (max-width: 480px) {
  .container {
    padding: 1.5rem 1rem;
  }

  .city-input-group {
    flex-direction: column;
  }

  .city-input-group .btn {
    width: 100%;
  }

  .verdict-card {
    padding: 2rem 1.25rem;
  }

  .verdict-actions {
    flex-direction: column;
  }

  .verdict-actions .btn {
    width: 100%;
  }

  .breakdown-item {
    flex-direction: column;
    gap: 0.15rem;
  }

  .breakdown-answer {
    text-align: left;
  }
}

/* === Entrance animation === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step.active .container {
  animation: fadeInUp 0.5s ease forwards;
}
