/* LUNARTECH RISE ACADEMY: "Start from where you are." on index.html, driven by js/lunartech-paths.js. A visitor picks
   where they are starting from and sees an ordered path of real courses, its total hours and the bootcamp it leads to.
   Every path sits in the same grid cell, so the section keeps the height of the tallest one and choosing a path never
   moves the page below it. */

/* ---------- Layout ---------- */

/* The section scales with the screen. These set the size of a row; the line through the numbers is placed from them. */
.lt-paths {
  --lt-num: clamp(24px, 1.4vw, 28px);
  --lt-thumb: clamp(60px, 3.45vw, 72px);
  --lt-thumb-h: calc(var(--lt-thumb) * 0.625);
  --lt-row: clamp(0.45rem, 0.43vw, 0.6rem);
}
.lt-paths .space-10rem { min-height: clamp(8.5rem, 8.5vw, 10.5rem); }
/* The intro's children join the grid, so the heading runs across the top with the chips and the path side by side below. */
.lt-paths-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 5vw; align-items: start; }
.lt-paths-intro { display: contents; }
.lt-paths-title { grid-column: 1 / -1; margin: 0; font-size: 2.2vw; font-weight: 300; line-height: 1.14; letter-spacing: -0.01em; text-transform: none; color: #f5f5f5; }
.lt-paths-title .highlight { display: block; } /* two lines: white, then gray */
.lt-paths-lede { grid-column: 1 / -1; margin: 1.1rem 0 0; font-family: 'Geist', sans-serif; font-size: clamp(14px, 0.81vw, 16px); font-weight: 300; line-height: 1.65; color: #8a8a8a; }
.lt-paths-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- The choices ---------- */

.lt-paths-options { grid-column: 1; display: flex; flex-direction: column; gap: 1.7rem; margin-top: 2.5rem; }
.lt-paths-group { display: flex; flex-wrap: wrap; gap: 8px; }
.lt-paths-group-label { flex: 0 0 100%; margin: 0 0 6px; font-family: 'Geist', sans-serif; font-size: 12px; font-weight: 400; line-height: 1.3; letter-spacing: 0.16em; text-transform: uppercase; color: #6a6a6a; }
.lt-paths-option {
  padding: 0.55em 1em; border: 1px solid rgba(255, 255, 255, 0.11); border-radius: 9999px; background: none;
  font-family: 'Geist', sans-serif; font-size: clamp(13px, 0.75vw, 15px); font-weight: 300; line-height: 1.2; color: #a0a0a0; white-space: nowrap; cursor: pointer; transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.lt-paths-option:hover { border-color: rgba(255, 255, 255, 0.28); color: #f0f0f0; }
.lt-paths-option[aria-pressed="true"] { border-color: #f0f0f0; background-color: #f0f0f0; color: #050505; }
.lt-paths-option:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.5); outline-offset: 2px; }

/* One native menu instead of the chips on tablets and phones, see the responsive rules below. */
.lt-paths-select { grid-column: 1 / -1; display: none; width: 100%; height: 44px; margin-top: 1.25rem; padding: 0 2.75rem 0 1rem; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 6px; background: #080808 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 1rem center; font-family: 'Geist', sans-serif; font-size: 16px; font-weight: 300; color: #f5f5f5; color-scheme: dark; -webkit-appearance: none; appearance: none; cursor: pointer; }
.lt-paths-select:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.5); outline-offset: 2px; }

/* ---------- A path ---------- */

.lt-paths-stack { grid-column: 2; display: grid; margin-top: 2.5rem; }
.lt-path { grid-area: 1 / 1; min-width: 0; visibility: hidden; }
.lt-path.is-active { visibility: visible; }
.lt-path-head { margin: 0 0 0.8rem; font-family: 'Geist', sans-serif; font-size: 12px; font-weight: 400; line-height: 1.3; letter-spacing: 0.16em; text-transform: uppercase; color: #8a8a8a; }

/* The line runs down through the step numbers and draws as the steps appear. */
.lt-path-steps { position: relative; margin: 0; padding: 0; list-style: none; font-family: 'Geist', sans-serif; }
.lt-path-steps::before { content: ""; position: absolute; top: calc(var(--lt-thumb-h) / 2 + var(--lt-row)); bottom: calc(var(--lt-thumb-h) / 2 + var(--lt-row)); left: calc(var(--lt-num) / 2 - 0.5px); width: 1px; background-color: rgba(255, 255, 255, 0.16); transform: scaleY(0); transform-origin: 50% 0; }
.lt-paths.is-in .lt-path.is-active .lt-path-steps::before { transform: none; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }

.lt-step { opacity: 0; transform: translateY(10px); }
.lt-paths.is-in .lt-path.is-active .lt-step { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s ease; transition-delay: calc(var(--i) * 70ms); }
.lt-step + .lt-step .lt-step-link { border-top: 1px solid rgba(255, 255, 255, 0.05); }

.lt-step-link { display: grid; grid-template-columns: var(--lt-num) var(--lt-thumb) minmax(0, 1fr) auto; column-gap: clamp(14px, 0.9vw, 18px); align-items: center; padding: var(--lt-row) 0; color: inherit; text-decoration: none; }
.lt-step-num {
  position: relative; display: flex; align-items: center; justify-content: center; width: var(--lt-num); height: var(--lt-num); box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 50%; background-color: #050505; font-size: clamp(10.5px, 0.62vw, 12px); font-weight: 300; color: #8a8a8a; font-variant-numeric: tabular-nums; transition: border-color 0.25s, color 0.25s;
}
.lt-step-thumb { display: block; width: var(--lt-thumb); height: var(--lt-thumb-h); overflow: hidden; border-radius: 6px; background-color: #111; }
.lt-step-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.lt-step-title { min-width: 0; font-size: clamp(15px, 0.86vw, 17px); font-weight: 300; line-height: 1.35; color: #cfcfcf; transition: color 0.25s; }
.lt-step-hours { font-size: clamp(12.5px, 0.7vw, 14px); font-weight: 300; color: #6a6a6a; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color 0.25s; }

.lt-step-link:hover .lt-step-title { color: #fff; }
.lt-step-link:hover .lt-step-hours { color: #bdbdbd; }
.lt-step-link:hover .lt-step-num { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.lt-step-link:hover .lt-step-thumb img { transform: scale(1.06); }
.lt-step-link:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.4); outline-offset: 2px; }

/* Where the path leads: the same row, set apart with a hairline card. The card reaches 1rem past the column on each side,
   so its number stays on the line and its price lines up with the hours above. */
.lt-step--bootcamp { margin: 0.9rem -1rem 0; }
.lt-step--bootcamp .lt-step-link {
  padding: var(--lt-row) calc(1rem - 1px); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 10px; background-color: #080808; transition: border-color 0.25s;
}
.lt-step--bootcamp .lt-step-link:hover { border-color: rgba(255, 255, 255, 0.24); }
.lt-step--bootcamp .lt-step-num { border-color: rgba(255, 255, 255, 0.4); color: #f5f5f5; }
.lt-step-then { display: block; margin-bottom: 2px; font-size: clamp(10px, 0.57vw, 11px); letter-spacing: 0.08em; text-transform: uppercase; color: #6a6a6a; }
.lt-step--bootcamp .lt-step-title { color: #f5f5f5; }

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .lt-paths .space-10rem { min-height: 7rem; }
  .lt-paths-grid { grid-template-columns: minmax(0, 1fr); }
  .lt-paths-title { font-size: 4.4vw; }
  .lt-paths-options { display: none; }
  .lt-paths-select { display: block; }
  .lt-paths-stack { grid-column: 1; margin-top: 1.5rem; }
}

@media (max-width: 767px) {
  .lt-paths .space-10rem { min-height: 5.5rem; }
  .lt-paths-title { font-size: 6.6vw; }
}

/* On a phone the price is too long to share a line with the bootcamp's name, so it drops under it. */
@media (max-width: 479px) {
  .lt-paths { --lt-num: 22px; --lt-thumb: 48px; --lt-row: 0.5rem; }
  .lt-path-steps::before { bottom: 2.6rem; } /* the bootcamp row is taller here, with its price on its own line */
  .lt-step-link { column-gap: 10px; }
  .lt-step-title { font-size: 14px; }
  .lt-step--bootcamp .lt-step-link { grid-template-columns: var(--lt-num) var(--lt-thumb) minmax(0, 1fr); }
  .lt-step--bootcamp .lt-step-hours { grid-column: 3; margin-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .lt-step { opacity: 1; transform: none; }
  .lt-paths.is-in .lt-path.is-active .lt-step { transition: none; }
  .lt-path-steps::before { transform: none; }
  .lt-paths.is-in .lt-path.is-active .lt-path-steps::before { transition: none; }
  .lt-paths-option, .lt-step-num, .lt-step-title, .lt-step-hours, .lt-step-thumb img, .lt-step--bootcamp .lt-step-link { transition: none; }
}
