/* ============================================
   Tamiz TDAH · Hackea tu TDAH design system
   ============================================ */

:root {
  --navy: #0B1538;
  --navy-2: #141E47;
  --navy-soft: #2A325E;
  --cyan: #2DD4D4;
  --cyan-bright: #5EEAEA;
  --cyan-deep: #1ABFBF;
  --violet: #6B46C1;
  --violet-light: #8B5FD6;
  --coral: #F08C7B;
  --coral-soft: #FBD8D0;
  --paper: #FBFBFE;
  --paper-2: #F1F2FA;
  --ink: #0B1538;
  --ink-soft: #3C4566;
  --muted: #6F7798;
  --border: #E5E7F2;
  --success: #16A085;
  --warn: #F2994A;
  --danger: #EB5757;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 4px 12px rgba(11, 21, 56, 0.06);
  --shadow-md: 0 10px 30px rgba(11, 21, 56, 0.10);
  --shadow-glow: 0 8px 24px rgba(45, 212, 212, 0.35);
  --shadow-violet: 0 8px 24px rgba(107, 70, 193, 0.30);
}

/* Reset + base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background effects */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(107, 70, 193, 0.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(45, 212, 212, 0.08), transparent 60%);
  pointer-events: none;
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(45, 212, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 212, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 30%, transparent 75%);
  pointer-events: none;
}

/* ================== NAV ================== */
.nav {
  background: var(--navy);
  color: white;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(45, 212, 212, 0.35);
}
.brand-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: white;
}
.brand-dot { color: var(--cyan); }
.brand-tag { color: var(--cyan); }
.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--cyan); }

/* ================== SCREENS ================== */
main { min-height: calc(100vh - 70px - 100px); }
.screen { display: none; padding: 64px 0 96px; animation: fadeIn 0.4s ease; }
.screen.active { display: block; }

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

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ================== TYPOGRAPHY ================== */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--violet);
  margin: 0 0 16px;
}
.hero-title {
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin: 0 0 20px;
  color: var(--ink);
}
.grad-text {
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--ink-soft);
  margin: 0 0 32px;
  line-height: 1.65;
}
.meta {
  font-size: 13px;
  color: var(--muted);
  margin: 24px 0 0;
  line-height: 1.55;
}

/* ================== CARDS ================== */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* Disclaimer */
.disclaimer {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: start;
  background: linear-gradient(135deg, #FFF8F5, #FFFFFF);
  border-color: rgba(240, 140, 123, 0.30);
}
.disclaimer-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--coral-soft);
  color: var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Info grid (intro) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}
.info-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: left;
}
.info-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--violet);
  line-height: 1;
  margin-bottom: 4px;
}
.info-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.info-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

/* Form */
.form-card { background: linear-gradient(135deg, #F8F8FE, white); }
.form-help {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 18px !important;
}
.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.form-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.form-row input {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-row input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(45, 212, 212, 0.15);
}

/* ================== BUTTONS ================== */
.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-deep) 100%);
  color: var(--navy);
  border: none;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(45, 212, 212, 0.5);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-outline:hover {
  border-color: var(--violet);
  color: var(--violet);
  background: rgba(107, 70, 193, 0.04);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 12px 16px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.btn-ghost:hover { color: var(--ink); background: var(--paper-2); }
.btn-ghost:disabled { opacity: 0.3; cursor: not-allowed; }

/* ================== QUIZ ================== */
.progress-wrap { margin-bottom: 28px; }
.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.progress-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.progress-track {
  height: 6px;
  background: var(--paper-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  width: 0%;
  border-radius: var(--radius-pill);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-card { padding: 36px; }
.q-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--violet);
  margin: 0 0 14px;
}
.q-text {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 8px;
}
.q-context {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
  font-style: italic;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  transition: all 0.18s;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.option:hover {
  border-color: var(--cyan);
  background: rgba(45, 212, 212, 0.04);
}
.option-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}
.option-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  transform: scale(0);
  transition: transform 0.18s;
}
.option.selected {
  border-color: var(--violet);
  background: linear-gradient(135deg, rgba(45, 212, 212, 0.06), rgba(107, 70, 193, 0.06));
  box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.10);
}
.option.selected .option-radio {
  border-color: var(--violet);
}
.option.selected .option-radio::after { transform: scale(1); }
.option-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-left: auto;
  letter-spacing: 1px;
}

.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ================== RESULTS ================== */
.interpretation {
  padding: 32px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
}
.interpretation::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(107, 70, 193, 0.30), transparent 70%);
  pointer-events: none;
}
.interpretation::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -20%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(45, 212, 212, 0.20), transparent 70%);
  pointer-events: none;
}
.interpretation > * { position: relative; z-index: 1; }
.interpretation .eyebrow { color: var(--cyan); margin-bottom: 12px; }
.interpretation h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
  color: white;
}
.interpretation p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15.5px;
  margin: 0 0 12px;
  line-height: 1.6;
}
.interpretation p:last-child { margin-bottom: 0; }

/* Domains */
.domains-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.domain-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  position: relative;
}
.domain-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.domain-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.domain-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  white-space: nowrap;
}
.domain-tag.tag-low { background: rgba(22, 160, 133, 0.12); color: var(--success); }
.domain-tag.tag-mid { background: rgba(242, 153, 74, 0.14); color: var(--warn); }
.domain-tag.tag-high { background: rgba(235, 87, 87, 0.12); color: var(--danger); }

.domain-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}
.domain-score-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}
.domain-score-max {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
}
.domain-bar {
  height: 6px;
  background: var(--paper-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 10px;
}
.domain-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.domain-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

/* Next steps */
.next-steps h3 { margin-bottom: 12px; }
.bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bullets li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.55;
}
.bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cyan);
  font-weight: 700;
}

.disclaimer-results { margin-top: 24px; }

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ================== FOOTER ================== */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 32px 0;
  margin-top: 64px;
}
.footer-inner {
  max-width: 1180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer p {
  margin: 0;
  font-size: 13px;
}
.footer-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ================== RESPONSIVE ================== */
@media (max-width: 720px) {
  .info-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .domains-grid { grid-template-columns: 1fr; }
  .quiz-card { padding: 24px; }
  .interpretation { padding: 24px; }
  .interpretation h2 { font-size: 22px; }
  .actions { flex-direction: column; }
  .actions .btn-primary,
  .actions .btn-outline { width: 100%; }
  .nav-link { font-size: 13px; }
  .brand-text { font-size: 11px; }
  .screen { padding: 36px 0 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
