.matricula-page {
  background: var(--bg);
  color: var(--fg);
}

.matricula-hero {
  position: relative;
  isolation: isolate;
  min-height: 480px;
  overflow: hidden;
  background: var(--fg);
  color: var(--bg);
}

.matricula-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: image-set(
    url("../images/optimized/mri100kp-lol-1920.avif") type("image/avif"),
    url("../images/optimized/mri100kp-lol-1920.webp") type("image/webp"),
    url("../images/mri100kp-lol.jpg") type("image/jpeg")
  ) 66% 50% / cover no-repeat;
  filter: saturate(0.86) contrast(1.04);
}

.matricula-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--fg) 86%, transparent) 0%, color-mix(in srgb, var(--fg) 66%, transparent) 52%, color-mix(in srgb, var(--fg) 34%, transparent) 100%);
}

.matricula-hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 480px;
  align-items: center;
  padding-top: 76px;
  padding-bottom: 56px;
}

.matricula-hero__copy {
  max-width: 720px;
}

.matricula-page .eyebrow {
  display: block;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.matricula-hero h1 {
  max-width: 13ch;
  margin: 24px 0 22px;
  color: var(--bg);
  font-family: var(--font-display);
  font-size: clamp(46px, 4.8vw, 72px);
  font-weight: 550;
  letter-spacing: -0.026em;
  line-height: 1.02;
  text-wrap: balance;
}

.matricula-hero .lead {
  max-width: 58ch;
  margin: 0;
  color: color-mix(in srgb, var(--bg) 88%, transparent);
  font-size: 18px;
  line-height: 1.58;
}

.matricula-section {
  padding: 80px 0;
}

.matricula-section--entry {
  padding-top: 64px;
}

.matricula-section--surface {
  background: var(--surface);
}

.matricula-section--white {
  background: var(--bg);
}

.matricula-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: start;
}

.section-intro {
  grid-column: 1 / 5;
}

.section-intro h2 {
  max-width: 12ch;
  margin: 18px 0 16px;
  font-size: clamp(36px, 4.2vw, 58px);
  font-weight: 550;
  letter-spacing: -0.026em;
  line-height: 1.04;
  text-wrap: balance;
}

.section-intro p {
  max-width: 36ch;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.62;
}

.step-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.step-label .eyebrow {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.step-index {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  line-height: 1;
}

.matricula-section--white .step-index {
  background: var(--surface);
}

.step-label--dark .step-index {
  border-color: color-mix(in srgb, var(--bg) 28%, transparent);
  background: transparent;
  color: var(--bg);
}

.step-label--dark .eyebrow {
  color: color-mix(in srgb, var(--bg) 78%, transparent);
}

.matricula-panel {
  grid-column: 5 / 13;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.matricula-section--white .matricula-panel {
  background: var(--surface);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.075em;
  line-height: 1.2;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.matricula-section--surface .field input,
.matricula-section--surface .field select,
.matricula-section--surface .field textarea {
  background: var(--surface);
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.required {
  color: var(--accent);
}

.program-card {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.program-card[hidden],
.summary-card[hidden] {
  display: none;
}

.program-card__head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.program-card__head h3 {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 550;
  letter-spacing: -0.018em;
  line-height: 1.12;
}

.program-status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.data-item {
  min-height: 106px;
  padding: 16px;
  background: var(--bg);
}

.data-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  min-height: 84px;
}

.data-item span,
.summary-line span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.data-item strong,
.summary-line strong {
  display: block;
  font-size: 16px;
  font-weight: 550;
  line-height: 1.35;
}

.process-stack {
  display: grid;
  gap: 28px;
}

.process-header {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.process-header h2 {
  max-width: 14ch;
  margin: 18px auto 14px;
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 550;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

.process-header p {
  max-width: 62ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.62;
}

.process-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  gap: 28px;
  align-items: start;
}

.process-grid.has-summary {
  grid-template-columns: minmax(0, 760px) 360px;
}

.process-grid:not(.has-summary) aside {
  display: none;
}

.process-grid .matricula-panel {
  grid-column: auto;
}

.summary-card,
.important-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.summary-card {
  position: sticky;
  top: 96px;
  padding: 26px;
}

.summary-card h3,
.important-card h3 {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.summary-lines {
  display: grid;
  gap: 0;
}

.summary-line {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.summary-line:last-child {
  border-bottom: 0;
}

.summary-line strong {
  max-width: 18ch;
  text-align: right;
}

.summary-total {
  margin-top: 10px;
  padding-top: 18px;
  border-top: 2px solid var(--fg);
}

.summary-total strong {
  font-size: 22px;
}

.important-card {
  grid-column: 5 / 13;
  padding: 28px 32px;
}

.important-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.important-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.55;
}

.important-list li:first-child {
  padding-top: 0;
}

.important-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.final-action {
  border-top: 0;
  background: var(--accent);
  color: var(--bg);
}

.final-action .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
  text-align: center;
}

.final-action h2 {
  max-width: 18ch;
  margin: 0 0 16px;
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 550;
  letter-spacing: -0.022em;
  line-height: 1.06;
  text-wrap: balance;
}

.final-action p {
  max-width: 50ch;
  margin: 0 0 14px;
  color: color-mix(in srgb, var(--bg) 88%, transparent);
  font-size: 17px;
  line-height: 1.58;
}

.final-action__note {
  font-weight: 600;
}

.continue-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 34px;
  border: 1px solid var(--bg);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  cursor: default;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.continue-button:disabled {
  opacity: 1;
}

@media (max-width: 1020px) {
  .matricula-grid,
  .process-grid,
  .process-grid.has-summary {
    grid-template-columns: 1fr;
  }

  .section-intro,
  .matricula-panel,
  .important-card {
    grid-column: auto;
  }

  .section-intro p {
    max-width: 58ch;
  }

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

  .summary-card {
    position: static;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(var(--container), calc(100% - 32px));
  }

  .matricula-hero,
  .matricula-hero .container {
    min-height: 460px;
  }

  .matricula-section {
    padding: 64px 0;
  }

  .matricula-section--entry {
    padding-top: 48px;
  }

  .matricula-panel,
  .program-card,
  .important-card,
  .summary-card {
    padding: 22px;
  }

  .field-grid,
  .data-grid {
    grid-template-columns: 1fr;
  }

  .program-card__head,
  .summary-line {
    flex-direction: column;
  }

  .summary-line strong {
    max-width: none;
    text-align: left;
  }
}
