:root {
  --ink: #15202f;
  --muted: #667085;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --mist: #edf7f5;
  --line: rgba(21, 32, 47, 0.14);
  --deep-blue: #273c8b;
  --teal: #10a8a0;
  --teal-dark: #087d77;
  --gold: #b68a4f;
  --rose: #a95d65;
  --success: #4f8f65;
  --warning: #b46f38;
  --shadow: 0 22px 70px rgba(17, 24, 39, 0.12);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

body.is-guest .requires-auth {
  display: none;
}

body.is-authenticated .auth-section {
  display: block;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.section-shell {
  width: min(1160px, calc(100% - 42px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 28px;
  padding: 10px max(21px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(16, 32, 52, 0.94);
  color: #fff;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  font-weight: 800;
}

.brand img,
.footer-inner img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.brand span {
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  gap: 22px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.main-nav a:hover {
  color: #b8f3ef;
}

.header-action {
  min-height: 40px;
  padding: 10px 15px;
  border: 1px solid rgba(184, 243, 239, 0.48);
  background: transparent;
  color: #b8f3ef;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-action:hover {
  border-color: #b8f3ef;
  background: rgba(184, 243, 239, 0.1);
}

.hero {
  min-height: 680px;
  background:
    linear-gradient(120deg, rgba(12, 31, 48, 0.96) 0%, rgba(39, 60, 139, 0.88) 48%, rgba(16, 168, 160, 0.65) 100%),
    url("../assets/entrenamiento-mcv-cover.png");
  background-position: center;
  background-size: cover;
  color: #fff;
}

.hero-inner {
  display: grid;
  width: min(1160px, calc(100% - 42px));
  min-height: 680px;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.64fr);
  align-items: center;
  gap: 58px;
  margin-inline: auto;
  padding-block: 68px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #b8f3ef;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: 6.8rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.9;
}

.subtitle {
  margin-bottom: 18px;
  color: #d7fbf8;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.15;
}

.intro {
  max-width: 620px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.78);
}

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

.button,
.ghost-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button {
  padding: 0 20px;
}

.button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.primary {
  background: var(--teal);
  color: #fff;
}

.primary:hover {
  background: #13c4ba;
}

.secondary {
  border-color: rgba(255, 255, 255, 0.42);
  background: transparent;
  color: #fff;
}

.secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.secondary.dark {
  border-color: rgba(16, 168, 160, 0.34);
  color: var(--teal-dark);
}

.secondary.dark:hover {
  border-color: var(--teal);
  background: rgba(16, 168, 160, 0.08);
}

.cover-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: 28px 34px 80px rgba(0, 0, 0, 0.35);
}

.cover-panel img {
  width: 100%;
  aspect-ratio: 0.72;
  object-fit: cover;
}

.progress-band {
  padding-block: 30px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.progress-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.progress-layout h2 {
  margin-bottom: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.progress-meter {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #e5e9f0;
}

.progress-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--deep-blue), var(--gold));
  transition: width 0.35s ease;
}

.ghost-button {
  min-height: 42px;
  padding: 0 14px;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.auth-section {
  padding-block: 42px 0;
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 26px;
  border: 1px solid rgba(16, 168, 160, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #eefaf8);
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
}

.auth-card h2 {
  margin-bottom: 8px;
  font-size: 2.35rem;
  line-height: 1;
}

.auth-card p:not(.eyebrow) {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.code-access-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid rgba(16, 168, 160, 0.2);
}

.code-access-form label {
  display: grid;
  gap: 7px;
}

.code-access-form span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.code-access-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: #fff;
  color: var(--ink);
}

.code-access-form input:focus {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 4px rgba(16, 168, 160, 0.12);
}

.is-guest #logout-button {
  display: none;
}

.is-authenticated #login-button {
  display: none;
}

.is-authenticated .code-access-form {
  display: none;
}

.intro-section,
.evaluation-section {
  padding-block: 92px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 4.2rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.95;
}

.section-heading p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
}

.reader-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 18px;
}

.intro-panel,
.evaluation-card,
.start-panel,
.phase-detail,
.phase-tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.intro-panel {
  align-self: start;
  padding: 24px;
}

.intro-panel h3,
.start-panel h3 {
  margin-bottom: 12px;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.intro-panel p,
.start-panel p,
.evaluation-card p {
  color: var(--muted);
}

.intro-panel button,
.pdf-toolbar button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pdf-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.pdf-toolbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #f4f8f8;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.intro-panel button:hover,
.pdf-toolbar button:hover {
  color: var(--deep-blue);
}

.pdf-panel iframe {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
}

.start-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff, var(--mist));
}

.start-panel.is-hidden {
  display: none;
}

.phases-section {
  padding-block: 92px;
  background: #eef6f5;
}

.phase-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.phase-tab {
  min-height: 136px;
  padding: 16px;
  color: var(--ink);
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.phase-tab:hover {
  transform: translateY(-3px);
}

.phase-tab.is-active {
  border-color: rgba(16, 168, 160, 0.7);
  box-shadow: 0 12px 34px rgba(16, 168, 160, 0.15);
}

.phase-tab.is-locked {
  color: #8a94a4;
  background: #f7f8fa;
}

.phase-tab span {
  display: block;
  margin-bottom: 10px;
  color: var(--teal-dark);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.phase-tab.is-locked span {
  color: #98a2b3;
}

.phase-tab strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1;
}

.phase-tab small {
  color: var(--muted);
  font-weight: 700;
}

.phase-detail {
  overflow: hidden;
  box-shadow: var(--shadow);
}

.phase-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 28px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(21, 32, 47, 0.95), rgba(39, 60, 139, 0.84)),
    url("../assets/entrenamiento-mcv-cover.png");
  background-position: center;
  background-size: cover;
  color: #fff;
}

.phase-hero h3 {
  margin-bottom: 12px;
  font-size: 4rem;
  font-weight: 700;
  line-height: 0.95;
}

.phase-hero p {
  color: rgba(255, 255, 255, 0.78);
}

.phase-meta {
  display: grid;
  gap: 10px;
  align-content: start;
}

.phase-meta div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.phase-meta strong,
.phase-meta span {
  display: block;
}

.phase-meta strong {
  color: #b8f3ef;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.phase-meta span {
  margin-top: 4px;
  font-weight: 800;
}

.phase-body {
  padding: 26px;
}

.locked-message {
  padding: 34px;
  text-align: center;
}

.locked-message h3 {
  margin-bottom: 10px;
  font-size: 2.2rem;
}

.locked-message p {
  margin-bottom: 0;
  color: var(--muted);
}

.phase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.phase-actions .secondary {
  border-color: rgba(16, 168, 160, 0.34);
  color: var(--teal-dark);
}

.video-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.video-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-card div {
  padding: 13px;
}

.video-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--teal-dark);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-card h4 {
  min-height: 42px;
  margin: 0 0 11px;
  font-size: 0.94rem;
  line-height: 1.25;
}

.video-card a {
  color: var(--deep-blue);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ready-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(182, 138, 79, 0.34);
  border-radius: 8px;
  background: #fff9ef;
}

.ready-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.evaluation-card {
  padding: 26px;
  box-shadow: var(--shadow);
}

.evaluation-form {
  display: grid;
  gap: 18px;
}

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

.question-block h3 {
  margin-bottom: 10px;
  font-size: 1.55rem;
  line-height: 1.05;
}

.option-list {
  display: grid;
  gap: 9px;
}

.option-list label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.option-list input {
  margin-top: 4px;
}

.result-box {
  margin-top: 20px;
  padding: 20px;
  border-radius: 8px;
}

.result-box.is-pass {
  border: 1px solid rgba(79, 143, 101, 0.36);
  background: #eef8f1;
}

.result-box.is-fail {
  border: 1px solid rgba(180, 111, 56, 0.36);
  background: #fff5eb;
}

.result-box h3 {
  margin-bottom: 10px;
  font-size: 2rem;
}

.result-box ul {
  margin: 12px 0 0;
  padding-left: 19px;
  color: var(--muted);
}

.site-footer {
  padding-block: 30px;
  background: #102034;
  color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-inner p {
  margin-bottom: 0;
  color: #fff;
  font-weight: 800;
}

.footer-inner span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.72rem;
}

.footer-inner a {
  margin-left: auto;
  color: #b8f3ef;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 1040px) {
  h1 {
    font-size: 5.4rem;
  }

  .section-heading h2,
  .phase-hero h3 {
    font-size: 3.7rem;
  }

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

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

@media (max-width: 820px) {
  .main-nav {
    display: none;
  }

  .hero-inner,
  .reader-grid,
  .phase-hero,
  .progress-layout {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 34px;
    padding-block: 52px;
  }

  .cover-panel {
    width: min(360px, 100%);
  }

  h1 {
    font-size: 4.25rem;
  }

  .subtitle {
    font-size: 1.7rem;
  }

  .section-heading h2,
  .phase-hero h3 {
    font-size: 3.2rem;
  }

  .progress-layout {
    align-items: stretch;
  }

  .start-panel,
  .ready-panel,
  .auth-card {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-card,
  .code-access-form {
    grid-template-columns: 1fr;
  }

  .auth-actions {
    justify-content: stretch;
  }

  .auth-actions .button {
    width: 100%;
  }

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

@media (max-width: 620px) {
  .section-shell,
  .hero-inner {
    width: min(100% - 28px, 540px);
  }

  .site-header {
    min-height: 66px;
    padding-inline: 14px;
  }

  .brand span {
    display: none;
  }

  .header-action {
    padding-inline: 10px;
    font-size: 0.62rem;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  h1 {
    font-size: 2.82rem;
    line-height: 0.96;
  }

  .subtitle {
    font-size: 1.42rem;
  }

  .intro-section,
  .evaluation-section,
  .phases-section {
    padding-block: 68px;
  }

  .section-heading h2,
  .phase-hero h3 {
    font-size: 2.68rem;
  }

  .pdf-panel iframe {
    height: 560px;
  }

  .phase-tabs,
  .video-strip,
  .phase-meta {
    grid-template-columns: 1fr;
  }

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

  .footer-inner div {
    max-width: calc(100% - 56px);
  }

  .footer-inner a {
    width: 100%;
    margin: 6px 0 0;
  }
}
