@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  /* Paleta base */
  --background-profundo: #141220;
  --azul-marca-oscuro: #031D8C;
  --azul-primario-cta: #1C52D8;
  --cyan-acento-luminoso: #6BC3F2;
  --gris-medio: #777988;
  --gris-claro: #C1C7D3;
  --blanco: #FFFFFF;

  /* Sistema visual adaptado */
  --bg-main: linear-gradient(160deg, #141220 0%, #10163a 38%, #0b122f 100%);
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-soft: rgba(28, 82, 216, 0.08);
  --bg-active: rgba(28, 82, 216, 0.16);

  --border-soft: rgba(193, 199, 211, 0.14);
  --border-strong: rgba(107, 195, 242, 0.24);

  --text-main: #f4f7fb;
  --text-muted: var(--gris-claro);
  --text-soft: var(--gris-medio);
  --text-white: var(--blanco);

  --primary: var(--azul-primario-cta);
  --primary-light: var(--cyan-acento-luminoso);
  --primary-dark: var(--azul-marca-oscuro);

  --green: #22c55e;
  --yellow: #eab308;
  --orange: #f97316;
  --red: #ef4444;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-primary: 0 4px 24px rgba(28, 82, 216, 0.32);
  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: "Montserrat", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: none;
}

textarea,
input {
  outline: none;
}

#app {
  min-height: 100vh;
}

.screen {
  min-height: 100vh;
  padding: 24px 20px;
}

.screen--center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.container--narrow {
  max-width: 640px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--cyan-acento-luminoso);
  text-transform: uppercase;
  font-weight: 600;
}

.eyebrow--wide {
  letter-spacing: 6px;
  font-size: 14px;
}

.hero-title,
.page-title,
.question-title,
.section-title,
.result-title,
.cta-title {
  margin: 0;
  color: var(--text-white);
}

.hero-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.08;
  background: linear-gradient(135deg, #fff 25%, var(--cyan-acento-luminoso) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-copy,
.page-copy,
.help-text,
.result-copy,
.muted {
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-copy {
  max-width: 480px;
  margin: 0 auto 32px;
  font-size: 17px;
}

.page-copy,
.help-text,
.result-copy,
.muted {
  font-size: 14px;
}

.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan-acento-luminoso), var(--primary));
  border-radius: 999px;
  margin: 20px auto;
}

.feature-grid,
.option-grid,
.info-grid,
.stats-grid,
.breakdown-grid,
.recommendations-grid,
.summary-grid {
  display: grid;
  gap: 16px;
}

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 40px;
}

.option-grid {
  grid-template-columns: repeat(3, 1fr);
}

.option-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.info-grid {
  gap: 18px;
}

.info-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.info-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.summary-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stats-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(107, 195, 242, 0.12);
}

.card,
.feature-card,
.metric-card,
.recommendation-card,
.cta-card,
.breakdown-card,
.summary-card,
.status-card {
  background: var(--bg-card);
  border: 1px solid rgba(193, 199, 211, 0.10);
  border-radius: var(--radius-md);
}

.feature-card {
  padding: 20px 12px;
  background: rgba(107, 195, 242, 0.06);
  border-color: rgba(107, 195, 242, 0.16);
  text-align: center;
}

.feature-card__icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.feature-card__text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  text-decoration: none;
  font-weight: 700;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-white);
  box-shadow: var(--shadow-primary);
  margin-top: 32px;
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(107, 195, 242, 0.05);
  border-color: rgba(107, 195, 242, 0.38);
}

.btn--full {
  width: 100%;
}

.card-block {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card-soft);
  border: 1px solid rgba(107, 195, 242, 0.12);
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.field,
.textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field:focus,
.textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(107, 195, 242, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

.choice-button {
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.choice-button:hover {
  border-color: rgba(107, 195, 242, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

.choice-button.is-active {
  border: 2px solid var(--primary-light);
  background: var(--bg-active);
  color: var(--text-white);
  font-weight: 600;
}

.choice-button--compact {
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
}

.choice-list {
  display: grid;
  gap: 10px;
}

.choice-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.choice-indicator {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.choice-indicator--radio {
  border-radius: 50%;
  border: 2px solid rgba(107, 195, 242, 0.30);
}

.choice-button.is-active .choice-indicator--radio {
  border: 6px solid var(--primary-light);
}

.choice-indicator--check {
  border-radius: 5px;
  border: 2px solid rgba(107, 195, 242, 0.30);
  color: transparent;
}

.choice-button.is-active .choice-indicator--check {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.question-shell {
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.question-shell.is-leaving {
  opacity: 0;
  transform: translateX(30px);
}

.progress-shell {
  margin-bottom: 32px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: rgba(107, 195, 242, 0.10);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.navigation-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
}

.navigation-row .btn--primary {
  flex: 1;
  max-width: 280px;
}

.hero,
.info-screen,
.results-screen,
.question-screen {
  padding-top: 40px;
  padding-bottom: 40px;
}

.hero {
  text-align: center;
}

.question-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.question-title {
  font-size: 22px;
  line-height: 1.45;
  font-weight: 600;
  margin-bottom: 24px;
}

.result-header {
  text-align: center;
  margin-bottom: 40px;
}

.grade-card {
  text-align: center;
  padding: 40px 32px;
  margin-bottom: 32px;
}

.grade-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 5px solid currentColor;
}

.grade-value {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}

.grade-label {
  font-size: 13px;
  font-weight: 600;
}

.score-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-white);
}

.score-value small {
  font-size: 16px;
  color: var(--text-soft);
}

.section-block {
  margin-bottom: 40px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.breakdown-grid,
.recommendations-grid {
  gap: 12px;
}

.breakdown-card {
  padding: 18px 20px;
}

.breakdown-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.breakdown-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.summary-card {
  padding: 24px;
  margin-bottom: 40px;
  background: var(--bg-card-soft);
  border-color: rgba(107, 195, 242, 0.12);
}

.summary-item__label {
  color: var(--text-soft);
  font-size: 12px;
  margin-bottom: 2px;
}

.summary-item__value {
  color: var(--cyan-acento-luminoso);
  font-weight: 500;
  font-size: 14px;
}

.summary-quote {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(107, 195, 242, 0.10);
}

.summary-quote__text {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  font-style: italic;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.recommendation-card {
  padding: 24px;
}

.recommendation-card--urgent {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
}

.recommendation-card--high {
  background: rgba(249, 115, 22, 0.05);
  border-color: rgba(249, 115, 22, 0.15);
}

.recommendation-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.recommendation-icon {
  font-size: 24px;
}

.recommendation-title {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-white);
}

.recommendation-list {
  margin: 0;
  padding-left: 36px;
  color: var(--text-muted);
}

.recommendation-list li {
  margin: 8px 0;
  line-height: 1.55;
}

.cta-card {
  padding: 48px 32px;
  text-align: center;
  background: linear-gradient(135deg, rgba(3, 29, 140, 0.18), rgba(107, 195, 242, 0.08));
  border-color: rgba(107, 195, 242, 0.22);
  margin-bottom: 40px;
}

.cta-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.metric-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-light);
}

.metric-label {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.footer-note {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(107, 195, 242, 0.08);
}

.status-card {
  padding: 16px 18px;
  margin-bottom: 16px;
}

.status-card--loading {
  border-color: rgba(234, 179, 8, 0.22);
  background: rgba(234, 179, 8, 0.06);
}

.status-card--success {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.06);
}

.status-card--error {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.06);
}

.status-card--idle {
  border-color: rgba(107, 195, 242, 0.18);
  background: rgba(107, 195, 242, 0.05);
}

.status-card__title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
}

.status-card__text {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.stack-xs > * + * {
  margin-top: 8px;
}

.stack-sm > * + * {
  margin-top: 12px;
}

.stack-md > * + * {
  margin-top: 18px;
}

.center {
  text-align: center;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .feature-grid,
  .option-grid,
  .option-grid--4,
  .info-grid--2,
  .info-grid--3,
  .summary-grid,
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .screen {
    padding: 20px 16px;
  }

  .feature-grid,
  .option-grid,
  .option-grid--4,
  .info-grid--2,
  .info-grid--3,
  .summary-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .navigation-row {
    flex-direction: column;
  }

  .navigation-row .btn--primary {
    max-width: none;
  }

  .grade-card,
  .cta-card,
  .summary-card,
  .card-block {
    padding: 24px 20px;
  }

  .grade-circle {
    width: 120px;
    height: 120px;
  }

  .grade-value {
    font-size: 40px;
  }

  .recommendation-list {
    padding-left: 20px;
  }
}