/*
 * Frontend experience layer
 * Keeps public typography, task priority and responsive density separate
 * from the shared component library in app.css.
 */

:where(
  .page-public,
  .page-courses,
  .page-recommend,
  .page-bundle,
  .page-cert,
  .page-course,
  .page-account,
  .page-login
) h1 {
  max-width: 22ch;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

:where(
  .page-public,
  .page-courses,
  .page-recommend,
  .page-bundle,
  .page-cert,
  .page-course,
  .page-account,
  .page-login
) .section-head h2 {
  max-width: 22ch;
  font-size: clamp(26px, 2.5vw, 36px);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.page-public .hero {
  min-height: auto;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr);
  align-items: stretch;
  gap: clamp(28px, 3vw, 48px);
  padding-block: clamp(32px, 4vw, 56px);
}

.page-public .hero-copy {
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-public .hero-copy h1 {
  max-width: 14ch;
  margin-bottom: 20px;
  font-size: clamp(38px, 4.3vw, 58px);
  line-height: 1.08;
}

.page-public .hero-copy .lead {
  max-width: 620px;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.78;
}

.page-public .hero-panel {
  min-height: 420px;
  align-self: stretch;
  border-radius: 16px;
}

.page-public .course-wheel {
  top: clamp(20px, 2.4vw, 34px);
  right: auto;
  bottom: clamp(20px, 2.4vw, 34px);
  left: 50%;
  width: min(calc(100% - 56px), 460px);
  transform: translateX(-50%);
  grid-template-rows: repeat(2, minmax(120px, 136px));
  gap: 12px;
  padding: 0;
  align-content: center;
}

.page-public .wheel-item {
  min-height: 120px;
  display: grid;
  align-content: center;
  padding: 18px;
  background: rgba(255, 255, 255, .075);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.page-public .wheel-item strong {
  font-size: 18px;
}

.hero-primary-actions {
  gap: 12px;
}

.hero-primary-actions .btn {
  min-height: 50px;
}

.start-steps {
  max-width: 620px;
}

.start-steps span {
  min-height: 48px;
}

.starter-course-section {
  padding-top: clamp(18px, 2.5vw, 32px);
}

.starter-course-section .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  align-items: end;
  column-gap: clamp(28px, 5vw, 72px);
}

.starter-course-section .section-head h2 {
  max-width: none;
  font-size: clamp(28px, 2.7vw, 38px);
}

.starter-course-section .grid {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.starter-course-section .course-card {
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(20, 58, 58, .06);
}

.starter-course-section .course-cover {
  min-height: 94px;
}

.starter-course-section .course-body {
  padding: 20px;
}

.starter-course-section .course-body h3 {
  min-height: auto;
  font-size: 20px;
  line-height: 1.42;
}

.starter-course-section .course-body > p {
  font-size: 15px;
  line-height: 1.72;
}

.starter-course-section .pill {
  font-size: 12px;
}

.starter-course-section .course-foot {
  gap: 10px;
}

.starter-course-section .course-foot .btn {
  min-height: 44px;
  padding-inline: 16px;
}

.role-gateway > a {
  min-height: 168px;
}

@media (max-width: 1120px) {
  .page-public .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

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

  .page-public .hero-panel {
    min-height: clamp(340px, 48vw, 500px);
  }
}

@media (max-width: 980px) {
  .starter-course-section .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .starter-course-section .course-card:last-child:nth-child(odd) {
    width: calc(50% - 8px);
    grid-column: 1 / -1;
    justify-self: center;
  }
}

@media (max-width: 900px) {
  .starter-course-section .section-head {
    grid-template-columns: 1fr;
    align-items: start;
    row-gap: 10px;
  }

  .starter-course-section .section-head p {
    max-width: 720px;
  }
}

@media (max-width: 720px) {
  :where(
    .page-public,
    .page-courses,
    .page-recommend,
    .page-bundle,
    .page-cert,
    .page-course,
    .page-account,
    .page-login
  ) h1 {
    max-width: none;
    font-size: clamp(29px, 9vw, 40px);
    letter-spacing: -.03em;
  }

  .page-public .hero {
    gap: 26px;
    padding-block: 24px 30px;
  }

  .page-public .hero-copy h1 {
    max-width: none;
    margin-bottom: 15px;
    font-size: clamp(34px, 10.5vw, 46px);
  }

  .page-public .hero-copy .lead {
    font-size: 16px;
    line-height: 1.72;
  }

  .hero-primary-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-primary-actions .btn,
  .hero-primary-actions .text-action {
    width: 100%;
    justify-content: center;
  }

  .start-steps {
    grid-template-columns: 1fr;
  }

  .start-steps span {
    min-height: 46px;
  }

  .page-public .hero-panel {
    min-height: 280px;
  }

  .page-public .course-wheel {
    top: 12px;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    transform: none;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    padding: 0;
    align-content: stretch;
  }

  .page-public .wheel-item {
    min-height: 96px;
    padding: 14px;
  }

  .starter-course-section .section-head h2 {
    font-size: 28px;
  }
}

@media (max-width: 680px) {
  .starter-course-section .grid {
    grid-template-columns: 1fr;
  }

  .starter-course-section .course-card:last-child:nth-child(odd) {
    width: 100%;
    grid-column: auto;
  }
}

@media (max-width: 360px) {
  .page-public .course-wheel {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(0, 1fr));
  }

  .page-public .hero-panel {
    min-height: 452px;
  }
}
