﻿:root {
  --navy: #102a43;
  --blue: #1d6fd2;
  --sky: #57b8ff;
  --cyan: #21c7d9;
  --green: #21a67a;
  --lime: #a8df65;
  --coral: #ff7a59;
  --amber: #ffbe3d;
  --ink: #172033;
  --muted: #627087;
  --line: #dce6f2;
  --soft: #f5f9fd;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(16, 42, 67, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(87, 184, 255, 0.22), transparent 28%),
    radial-gradient(circle at 88% 4%, rgba(255, 190, 61, 0.16), transparent 24%),
    linear-gradient(180deg, #f4faff 0%, #edf5fb 48%, #f8fbfe 100%);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: 0.08em;
}

.logo::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 10px 24px rgba(29, 111, 210, 0.26);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links .active {
  color: var(--blue);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  gap: 48px;
  padding: 52px 0 34px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(3.8rem, 8vw, 7.4rem);
  line-height: 0.92;
  color: var(--navy);
  letter-spacing: 0;
}

.hero-copy .subtitle {
  margin: 22px 0 12px;
  font-size: clamp(1.35rem, 2.4vw, 2.15rem);
  font-weight: 800;
  color: var(--blue);
}

.hero-copy p {
  margin: 0 0 28px;
  max-width: 660px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-visual {
  position: relative;
  min-height: 520px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(rgba(16, 42, 67, 0.12), rgba(16, 42, 67, 0.1)),
    url("https://images.unsplash.com/photo-1523580494863-6f3031224c94?auto=format&fit=crop&w=1200&q=80") center/cover;
  box-shadow: var(--shadow);
}

.visual-panel {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 14px;
}

.metric-strip,
.floating-note {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 18px;
  box-shadow: 0 16px 32px rgba(16, 42, 67, 0.16);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric-strip strong,
.stat-value {
  color: var(--navy);
  font-size: 1.45rem;
}

.metric-strip span,
.eyebrow,
.card small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(29, 111, 210, 0.22);
}

.btn-secondary {
  color: var(--blue);
  background: var(--white);
  border-color: var(--line);
}

.btn-ghost {
  color: #184600;
  background: #eaf9d5;
}

.section {
  padding: 54px 0;
}

.section-title {
  margin: 0 0 22px;
  color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.section-lead {
  max-width: 760px;
  margin: -10px 0 24px;
  color: var(--muted);
  font-size: 1.02rem;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 22px;
  box-shadow: 0 10px 26px rgba(16, 42, 67, 0.06);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green), var(--amber));
}

.card h2,
.card h3,
.card h4 {
  margin: 8px 0 8px;
  color: var(--navy);
}

.card p {
  color: var(--muted);
  margin: 0 0 16px;
}

.step-number,
.career-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue);
  font-weight: 900;
}

.page-head {
  padding: 44px 0 22px;
}

.page-head h1 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.page-head p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
}

.auth-shell {
  min-height: calc(100vh - 132px);
  display: grid;
  place-items: center;
  padding: 46px 0;
}

.auth-card {
  width: min(480px, 100%);
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--navy);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  font: inherit;
  background: var(--white);
  color: var(--ink);
}

input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--sky);
  outline: 3px solid rgba(87, 184, 255, 0.2);
}

.message {
  display: none;
  border-radius: 8px;
  padding: 12px 14px;
  color: #0f684f;
  background: linear-gradient(135deg, #e7f7f1, #eefbdc);
  font-weight: 800;
}

.message.show {
  display: block;
}

.career-card {
  position: relative;
  min-height: 178px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.career-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.career-card .soon {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.career-card:has(input:checked) {
  border-color: var(--blue);
  background: linear-gradient(135deg, rgba(87, 184, 255, 0.16), rgba(168, 223, 101, 0.16)), var(--white);
  box-shadow: 0 18px 42px rgba(29, 111, 210, 0.2);
  transform: translateY(-2px);
}

.career-card:has(input:checked)::after {
  content: "Seleccionada";
  position: absolute;
  top: 16px;
  right: 16px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  background: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.career-confirm {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  bottom: 18px;
  z-index: 5;
  margin-top: 20px;
  border: 1px solid rgba(29, 111, 210, 0.24);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.career-confirm.show {
  display: flex;
}

.career-confirm small {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.career-confirm strong {
  display: block;
  color: var(--navy);
  font-size: 1.15rem;
}

.career-confirm p {
  margin: 4px 0 0;
  color: var(--muted);
}

.compact-section {
  padding-top: 18px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  align-items: start;
}

.stats {
  grid-template-columns: repeat(4, 1fr);
}

.stat-value {
  display: block;
  margin: 10px 0 2px;
  font-weight: 900;
}

.stats .card:nth-child(1)::before,
.grid .card:nth-child(1)::before {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.stats .card:nth-child(2)::before,
.grid .card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--green), var(--lime));
}

.stats .card:nth-child(3)::before,
.grid .card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--coral), var(--amber));
}

.progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #d8e6f4;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.challenge-card {
  padding: 0;
}

.challenge-layout {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  align-items: stretch;
}

.learning-circuit {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--line);
  padding: 24px 22px;
  background:
    linear-gradient(180deg, rgba(87, 184, 255, 0.1), rgba(168, 223, 101, 0.16)),
    #f8fbfe;
}

.challenge-main {
  min-width: 0;
  padding: 26px 28px 28px;
}

.learning-circuit > small,
.block-status span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.learning-circuit > strong {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--navy);
  background: var(--white);
  box-shadow: 0 8px 22px rgba(16, 42, 67, 0.08);
  font-size: 1.05rem;
}

.learning-map {
  display: grid;
  gap: 12px;
  position: relative;
}

.learning-map::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 18px;
  width: 3px;
  border-radius: 999px;
  background: #cfe0ef;
}

.map-node {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
}

.map-node span {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 3px solid #cfe0ef;
  border-radius: 999px;
  color: var(--muted);
  background: var(--white);
  font-weight: 900;
  line-height: 1;
}

.map-node div {
  min-width: 0;
  border: 1px solid rgba(220, 230, 242, 0.82);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.72);
}

.map-node strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--navy);
  line-height: 1.2;
}

.map-node small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.map-node.active span {
  border-color: var(--blue);
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(87, 184, 255, 0.18);
}

.map-node.done span {
  border-color: var(--green);
  color: var(--white);
  background: var(--green);
}

.map-node.done span::before {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 3px solid var(--white);
  border-bottom: 3px solid var(--white);
  transform: rotate(-45deg);
}

.map-node.done span {
  font-size: 0;
}

.map-node.locked {
  opacity: 0.58;
}

.block-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.block-status strong {
  color: var(--green);
}

[data-challenge-list] {
  display: grid;
  gap: 2px;
  margin-top: 28px;
}

.question {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.question:last-child {
  border-bottom: 0;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.option {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.option:hover {
  border-color: var(--sky);
  background: #f3fbff;
  transform: translateY(-1px);
}

.option:has(input:checked) {
  border-color: var(--blue);
  background: linear-gradient(135deg, rgba(87, 184, 255, 0.14), rgba(168, 223, 101, 0.16));
  box-shadow: 0 10px 20px rgba(29, 111, 210, 0.08);
}

.reward {
  display: none;
  margin-top: 16px;
  border-radius: 8px;
  padding: 16px;
  color: #0f684f;
  background: linear-gradient(135deg, #e7f7f1, #fff5d8);
  font-weight: 900;
}

.reward.show {
  display: block;
}

.result-actions,
.next-challenge {
  display: none;
}

.result-actions.show,
.next-challenge.show {
  display: flex;
}

.result-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.diagnostic-feedback {
  display: none;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #f8fbfe;
}

.diagnostic-feedback.show {
  display: block;
}

.diagnostic-feedback h3 {
  margin: 0 0 14px;
  color: var(--navy);
}

.feedback-list {
  display: grid;
  gap: 10px;
}

.feedback-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--white);
}

.feedback-item strong {
  color: var(--navy);
}

.feedback-item span {
  float: right;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.feedback-item.correct span {
  color: var(--green);
}

.feedback-item.wrong {
  border-color: rgba(255, 122, 89, 0.45);
  background: #fff7f3;
}

.feedback-item.wrong span {
  color: var(--coral);
}

.feedback-item p,
.feedback-note {
  clear: both;
  margin: 6px 0 0;
  color: var(--muted);
}

.pomodoro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin: 18px 0;
  background: linear-gradient(135deg, #f8fbfe, #eaf9d5);
}

.pomodoro strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
  font-size: 2rem;
  line-height: 1;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.chat {
  display: grid;
  gap: 14px;
}

.bubble {
  max-width: 82%;
  border-radius: 8px;
  padding: 14px 16px;
}

.bubble.user {
  justify-self: end;
  color: var(--white);
  background: var(--blue);
}

.bubble.ai {
  justify-self: start;
  background: #eaf3fc;
}

.library-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 16px 0 0;
  margin-top: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  color: #0f684f;
  background: linear-gradient(135deg, #e7f7f1, #eefbdc);
  font-size: 0.83rem;
  font-weight: 900;
}

.source-card {
  background:
    linear-gradient(135deg, rgba(29, 111, 210, 0.07), rgba(33, 166, 122, 0.08)),
    var(--white);
}

.footer {
  margin-top: 40px;
  padding: 26px 0;
  color: var(--muted);
  background: var(--white);
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .nav-links,
  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero,
  .dashboard-layout,
  .challenge-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-visual {
    min-height: 380px;
  }

  .learning-circuit {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .learning-map {
    grid-template-columns: repeat(3, 1fr);
  }

  .learning-map::before {
    top: 21px;
    bottom: auto;
    left: 24px;
    right: 24px;
    width: auto;
    height: 3px;
  }

  .map-node {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .map-node div {
    width: 100%;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .container,
  .nav,
  .footer-inner {
    width: min(100% - 24px, 1120px);
  }

  .nav-links {
    gap: 12px;
    font-size: 0.9rem;
  }

  .hero-copy h1 {
    font-size: 3.7rem;
  }

  .metric-strip,
  .grid-4,
  .grid-3,
  .grid-2,
  .stats {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .bubble {
    max-width: 100%;
  }

  .pomodoro {
    align-items: flex-start;
    flex-direction: column;
  }

  .challenge-main {
    padding: 22px 18px 24px;
  }

  .learning-circuit {
    padding: 20px 18px;
  }

  .career-confirm {
    align-items: stretch;
    flex-direction: column;
  }
}

