/* ===================================================
   DOSSIER CÓDIGO ESPARTANO — DESIGN SYSTEM
   =================================================== */

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

/* ─── CSS VARIABLES ─────────────────────────────────── */
:root {
  --bg-base:       #0D0D0D;
  --bg-surface:    #1A1A1A;
  --bg-card:       #222222;
  --color-green:   #7D9A5C;
  --color-green-h: #91B269;
  --color-orange:  #E8632A;
  --color-orange-h:#F2743B;
  --color-white:   #FFFFFF;
  --color-muted:   #A0A0A0;
  --color-border:  #333333;
  --progress-bg:   #2C2C2C;
  --font-head:     'Oswald', sans-serif;
  --font-body:     'Inter', sans-serif;
  --radius-btn:    10px;
  --radius-card:   14px;
  --transition:    0.28s ease;
}

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

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

body {
  background: var(--bg-base);
  color: var(--color-white);
  font-family: var(--font-body);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── TACTICAL PROGRESS BAR ────────────────────────── */
#tactical-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #1C1C1E;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.01) 10px, rgba(255,255,255,0.01) 20px);
  padding: 16px 20px;
  border-bottom: 1px solid rgba(57,255,20,0.15);
  display: flex;
  justify-content: center;
  align-items: center;
}

#tactical-progress .tp-line-bg {
  position: absolute;
  top: 50%;
  left: 30px;
  right: 30px;
  height: 2px;
  background: #333;
  transform: translateY(-50%);
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
}

#tactical-progress .tp-line-fill {
  height: 100%;
  background: #39FF14;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(57,255,20,0.6);
}

.tp-bubbles {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tp-bubble {
  width: 32px;
  height: 32px;
  background: #000;
  border: 1.5px solid #444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  color: #777;
  letter-spacing: 0.05em;
  transition: all 0.4s ease;
  z-index: 2;
}

.tp-bubble.completed {
  border-color: #39FF14;
  color: #000;
  background: #39FF14;
  box-shadow: 0 0 12px rgba(57,255,20,0.5);
}

.tp-bubble.active {
  border-color: #FF4500;
  color: #FF4500;
  background: #000;
  box-shadow: 0 0 12px rgba(255,69,0,0.5);
}

/* ─── QUIZ WRAPPER ───────────────────────────────────── */
#quiz-wrapper {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 85px 20px 40px;
  position: relative;
}

/* ─── SCREENS ────────────────────────────────────────── */
.screen {
  display: none;
  flex-direction: column;
  min-height: calc(100dvh - 125px);
  animation: fadeIn 0.35s ease forwards;
  width: 100%;
}

.screen.active {
  display: flex;
}

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

/* ─── HERO SECTION (Screen 1) ────────────────────────── */
.hero-img-wrap {
  width: calc(100% + 40px);
  margin-left: -20px;
  margin-top: -85px;
  height: 55vw;
  max-height: 280px;
  overflow: hidden;
  position: relative;
}

.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: brightness(0.75) saturate(0.9);
}

.hero-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg-base) 100%);
}

.hero-badge {
  display: inline-block;
  background: var(--color-green);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 5px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-top: 24px;
  margin-bottom: 16px;
}

.hero-tagline {
  font-family: var(--font-head);
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-tagline span {
  color: var(--color-green);
}

.hero-desc {
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero-trust {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-muted);
}

.trust-item .dot {
  width: 8px; height: 8px;
  background: var(--color-green);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── QUESTION SCREENS ───────────────────────────────── */
.q-step-label {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-green);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.q-headline {
  font-family: var(--font-head);
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.q-sub {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.5;
  margin-bottom: 28px;
}

/* ─── OPTION BUTTON CARDS ────────────────────────────── */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  flex: 1;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.option-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(125,154,92,0.08), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.option-btn:hover { border-color: var(--color-green); transform: translateY(-1px); }
.option-btn:hover::before { opacity: 1; }

.option-btn.selected {
  border-color: var(--color-green);
  background: rgba(125,154,92,0.12);
}

.option-btn.selected::before { opacity: 1; }

.option-emoji {
  font-size: 22px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.option-text {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-white);
  line-height: 1.35;
  flex: 1;
}

.option-check {
  width: 22px; height: 22px;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.option-btn.selected .option-check {
  background: var(--color-green);
  border-color: var(--color-green);
}

.option-btn.selected .option-check::after {
  content: '✓';
  font-size: 12px;
  color: #fff;
  font-weight: 700;
}

/* ─── BODY TYPE OPTIONS (with images) ───────────────── */
.body-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
  flex: 1;
}

.body-type-card {
  background: var(--bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.body-type-card:hover { border-color: var(--color-green); transform: translateY(-2px); }

.body-type-card.selected {
  border-color: var(--color-green);
  box-shadow: 0 0 0 1px var(--color-green);
}

.body-type-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%) brightness(0.85);
}

.body-type-label {
  padding: 10px 12px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.body-type-label small {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  color: var(--color-muted);
  text-transform: none;
  letter-spacing: 0;
  margin-top: 2px;
}

/* ─── SPLASH SCREENS ─────────────────────────────────── */
.splash-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.splash-headline {
  font-family: var(--font-head);
  font-size: clamp(26px, 7vw, 36px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--color-white);
}

.splash-body {
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.splash-body strong {
  color: var(--color-white);
}

.blame-box {
  background: var(--bg-card);
  border-left: 3px solid var(--color-orange);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 16px 18px;
  margin-bottom: 28px;
}

.blame-box p {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
}

.blame-box strong {
  color: var(--color-white);
  font-weight: 600;
}

.ptt-box {
  background: linear-gradient(135deg, rgba(125,154,92,0.1), rgba(125,154,92,0.03));
  border: 1px solid rgba(125,154,92,0.3);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 24px;
}

.ptt-box-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ptt-box-text {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
}

.ptt-box-text strong { color: var(--color-white); }

/* ─── BIOMETRIC INPUTS ───────────────────────────────── */
.bio-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  flex: 1;
}

.bio-input-label {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.bio-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bio-input {
  flex: 1;
  background: var(--bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--color-white);
  text-align: center;
  outline: none;
  transition: border-color var(--transition);
  -moz-appearance: textfield;
  appearance: textfield;
}

.bio-input::-webkit-outer-spin-button,
.bio-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.bio-input:focus { border-color: var(--color-green); }

.bio-unit {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-muted);
  min-width: 36px;
}

.bio-hint {
  font-size: 13px;
  color: var(--color-muted);
  text-align: center;
  margin-top: 4px;
}

.age-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
  flex: 1;
}

/* ─── LOADING SCREEN ─────────────────────────────────── */
#screen-loading {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
}

.loader-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 36px;
}

.loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--color-border);
}

.loader-ring-fill {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--color-green);
  animation: spin 1.2s linear infinite;
}

.loader-ring-fill-2 {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--color-orange);
  animation: spin 0.8s linear infinite reverse;
}

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

.loader-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.loading-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-white);
  margin-bottom: 12px;
}

.loading-status {
  font-size: 14px;
  color: var(--color-green);
  min-height: 24px;
  transition: opacity 0.3s ease;
  margin-bottom: 32px;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 40px;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--color-border);
  opacity: 0.35;
  transition: all 0.4s ease;
}

.loading-step.done {
  opacity: 1;
  border-color: rgba(125,154,92,0.4);
  background: rgba(125,154,92,0.07);
}

.loading-step-icon {
  width: 28px; height: 28px;
  background: var(--color-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.loading-step.done .loading-step-icon {
  background: var(--color-green);
}

.loading-step-text {
  font-size: 13px;
  color: var(--color-muted);
  text-align: left;
  line-height: 1.4;
}

.loading-step.done .loading-step-text { color: var(--color-white); }

.loading-final {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeIn 0.5s ease;
}

.loading-final.visible { display: flex; }

.loading-final-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-white);
  text-align: center;
}

.loading-final-title span { color: var(--color-green); }

/* ─── BUTTONS ────────────────────────────────────────── */
.btn-primary {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--color-orange), #D4521A);
  color: #fff;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 18px 24px;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(232,99,42,0.35);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(232,99,42,0.5);
  background: linear-gradient(135deg, var(--color-orange-h), #E8632A);
}

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

.btn-secondary {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--color-green), #6A8A4A);
  color: #fff;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 18px 24px;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(125,154,92,0.35);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(125,154,92,0.5);
}

.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ─── DIVIDER / SPACER ───────────────────────────────── */
.spacer { flex: 1; }
.mt-auto { margin-top: auto; }

/* ─── SECURITY BADGE ─────────────────────────────────── */
.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-muted);
  margin-top: 14px;
  text-align: center;
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (min-width: 480px) {
  #quiz-wrapper { padding: 95px 28px 48px; }
  .hero-img-wrap { 
    width: calc(100% + 56px); 
    margin-left: -28px; 
    margin-top: -95px;
    max-height: 320px; 
  }
}

@media (max-width: 360px) {
  #quiz-wrapper { padding: 75px 16px 30px; }
  .hero-img-wrap { 
    width: calc(100% + 32px); 
    margin-left: -16px; 
    margin-top: -75px;
  }
  .body-type-grid { gap: 8px; }
  .age-grid { gap: 8px; }
  .option-btn { padding: 12px 14px; gap: 10px; }
  .option-emoji { width: 28px; font-size: 18px; }
  .option-text { font-size: 14px; }
  .btn-primary, .btn-secondary { padding: 15px 20px; font-size: 15px; }
  .hero-tagline { font-size: 26px; }
  .q-headline { font-size: 20px; }
}
