:root {
  --primary: #f85604;
  --primary-dark: #d94500;
  --primary-soft: rgba(248, 86, 4, 0.1);
  --primary-ring: rgba(248, 86, 4, 0.22);

  --secondary: #00a63e;
  --secondary-soft: rgba(0, 166, 62, 0.1);

  --text: #4a5579;
  --heading: #10162f;
  --muted: #6b7280;

  --line: #e6e8ef;
  --surface: #ffffff;
  --surface-soft: #f9f9fa;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(16, 22, 47, 0.06);
  --shadow-sm: 0 4px 14px rgba(16, 22, 47, 0.07);
  --shadow-md: 0 12px 30px rgba(16, 22, 47, 0.09);
  --shadow-lg: 0 22px 50px rgba(16, 22, 47, 0.13);

  --ease: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1320px;
}

/* ---------- 2. Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

ul {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  color: var(--heading);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 3. Layout helpers ---------- */
.container {
  width: 86%;
  max-width: var(--container);
  margin-inline: auto;
}

.section {
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}

.section--soft {
  background: var(--surface-soft);
}

.text-primary {
  color: var(--primary);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 999;
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: top var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- 4. Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--heading);
  --btn-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.62rem 1.15rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform var(--ease), box-shadow var(--ease),
    background-color var(--ease), color var(--ease), border-color var(--ease);
}

.btn i {
  font-size: 0.85em;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  --btn-bg: var(--primary);
  --btn-fg: #fff;
  box-shadow: 0 8px 20px rgba(248, 86, 4, 0.28);
}

.btn--primary:hover {
  --btn-bg: var(--primary-dark);
  box-shadow: 0 12px 26px rgba(248, 86, 4, 0.36);
}

.btn--outline {
  --btn-border: var(--line);
  --btn-fg: var(--heading);
  background: #fff;
}

.btn--outline:hover {
  --btn-border: var(--primary);
  --btn-fg: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  --btn-bg: var(--primary-soft);
  --btn-fg: var(--primary);
}

.btn--ghost:hover {
  --btn-bg: rgba(248, 86, 4, 0.18);
}

.btn--soft {
  --btn-bg: var(--primary-soft);
  --btn-fg: var(--primary);
  width: 100%;
}

.btn--soft:hover {
  --btn-bg: var(--primary);
  --btn-fg: #fff;
}

.btn--success {
  --btn-bg: var(--secondary);
  --btn-fg: #fff;
  box-shadow: 0 8px 20px rgba(0, 166, 62, 0.24);
}

.btn--success:hover {
  --btn-bg: #008c34;
}

.btn--lg {
  padding: 0.95rem 1.7rem;
  font-size: 1rem;
}

.btn--sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.83rem;
}

.btn--block {
  width: 100%;
}

/* ---------- 5. Pills & badges ---------- */
.pill {
  display: inline-block;
  padding: 0.42rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  border: 1px solid var(--primary-ring);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-beta {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(30%, -60%);
  background: var(--primary);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
}

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(16, 22, 47, 0.04);
}

.header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.9rem 0;
}

.brand img {
  width: 148px;
  height: auto;
}

/* Contact strip */
.contact-strip {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.contact-strip li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.contact-strip__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.9rem;
  transition: background-color var(--ease), color var(--ease);
}

.contact-strip li:hover .contact-strip__icon {
  background: var(--primary-soft);
  color: var(--primary);
}

.contact-strip__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.contact-strip__label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--heading);
  transition: color var(--ease);
}

.contact-strip li:hover .contact-strip__label {
  color: var(--primary);
}

.contact-strip__value {
  font-size: 0.76rem;
  color: var(--muted);
}

/* Header actions */
.header__actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search i {
  position: absolute;
  left: 0.95rem;
  font-size: 0.82rem;
  color: var(--muted);
  pointer-events: none;
  transition: color var(--ease);
}

.search input {
  width: 230px;
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: #fff;
  font-size: 0.86rem;
  transition: border-color var(--ease), box-shadow var(--ease), width var(--ease);
}

.search input::placeholder {
  color: #9aa1b4;
}

.search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-ring);
}

.search:focus-within i {
  color: var(--primary);
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--heading);
  font-size: 1.05rem;
  transition: background-color var(--ease), color var(--ease);
}

.menu-toggle:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---------- 7. Navigation ---------- */
.nav {
  border-top: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav__inner::-webkit-scrollbar {
  display: none;
}

.nav__link {
  position: relative;
  flex-shrink: 0;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.2rem 0;
  transition: color var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transition: width var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--primary);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  width: 100%;
}

.nav__link--tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

.nav__link--tag::after {
  display: none;
}

.nav__link--tag:hover {
  background: var(--primary-dark);
  color: #fff;
}

.nav__link--compiler {
  position: relative;
  padding: 0.32rem 0.95rem;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-pill);
  color: var(--primary);
  font-weight: 600;
}

.nav__link--compiler::after {
  display: none;
}

.nav__link--compiler:hover {
  background: var(--primary);
  color: #fff;
}

/* ---------- 8. Hero ---------- */
.hero {
  position: relative;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(
      900px 420px at 88% -10%,
      rgba(248, 86, 4, 0.09),
      transparent 70%
    ),
    radial-gradient(
      700px 380px at 0% 100%,
      rgba(0, 166, 62, 0.07),
      transparent 70%
    ),
    #fff;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}

.hero__title {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  font-weight: 900;
  line-height: 1.08;
}

.hero__tagline {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 600;
  color: var(--heading);
}

.hero__tagline span {
  color: var(--primary);
  margin: 0 0.35rem;
}

.hero__desc {
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--text);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.4rem;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
  margin-top: 1rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform var(--ease), box-shadow var(--ease),
    border-color var(--ease);
}

.stat:hover {
  transform: translateY(-3px);
  border-color: var(--primary-ring);
  box-shadow: var(--shadow-sm);
}

.stat > i {
  font-size: 1.35rem;
  color: var(--primary);
}

.stat__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.stat__text strong {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--heading);
  transition: color var(--ease);
}

.stat:hover .stat__text strong {
  color: var(--primary);
}

.stat__text span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Hero media */
.hero__media {
  position: relative;
}

.hero__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

.hero__float {
  position: absolute;
  left: -1rem;
  bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  animation: float 4s ease-in-out infinite;
}

.hero__float i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--secondary-soft);
  color: var(--secondary);
  font-size: 0.95rem;
}

.hero__float span {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.hero__float strong {
  font-size: 0.88rem;
  color: var(--heading);
}

.hero__float span span {
  font-size: 0.75rem;
  color: var(--muted);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* ---------- 9. Section headers ---------- */
.section__head {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.section__head--row {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section__head--center {
  align-items: center;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 2.75rem;
}

.section__title {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.section__title--xl {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 900;
}

.section__sub {
  color: var(--text);
  max-width: 62ch;
}

.section__sub em,
.section__sub i {
  font-style: italic;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--primary);
  transition: gap var(--ease);
}

.link-arrow:hover {
  gap: 0.85rem;
}

/* ---------- 10. Batch cards ---------- */
.batch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.batch-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.4rem 1.3rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform var(--ease), box-shadow var(--ease),
    border-color var(--ease);
}

.batch-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-ring);
  box-shadow: var(--shadow-md);
}

.batch-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.batch-card__top h3 {
  font-size: 1.12rem;
  font-weight: 700;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.55;
  }
}

.batch-card__date {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.83rem;
  color: var(--muted);
}

.batch-card__date i {
  color: var(--primary);
}

.batch-card__date strong {
  color: var(--heading);
  font-weight: 600;
}

.batch-card__price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.price {
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--heading);
}

.price-old {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: line-through;
}

.discount {
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--secondary-soft);
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 700;
}

/* ---------- 11. Promo strip ---------- */
.promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
  padding: 1.15rem 1.4rem;
  border: 1.5px dashed var(--secondary);
  border-radius: var(--radius);
  background: var(--secondary-soft);
  transition: background-color var(--ease);
}

.promo:hover {
  background: rgba(0, 166, 62, 0.16);
}

.promo__left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.promo__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--secondary);
  font-size: 1.15rem;
}

.promo__title {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--heading);
}

.promo__title strong {
  color: var(--secondary);
  font-weight: 700;
}

.promo__meta {
  font-size: 0.8rem;
  color: var(--text);
}

/* ---------- 12. Course cards ---------- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.course-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--ease), box-shadow var(--ease),
    border-color var(--ease);
}

.course-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-ring);
  box-shadow: var(--shadow-lg);
}

.course-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface-soft);
}

.course-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover .course-card__media img {
  transform: scale(1.06);
}

.course-card__tag {
  position: absolute;
  top: 0.75rem;
  left: 0;
  padding: 0.28rem 0.7rem 0.28rem 0.8rem;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(248, 86, 4, 0.3);
}

.course-card__rating {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--heading);
}

.course-card__rating i {
  color: #fbbf24;
}

.course-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.25rem 1.35rem 1.4rem;
  flex: 1;
}

.course-card__body h3 {
  font-size: 1.18rem;
  font-weight: 700;
  transition: color var(--ease);
}

.course-card:hover .course-card__body h3 {
  color: var(--primary);
}

.course-card__body > p {
  font-size: 0.88rem;
  color: var(--text);
  flex: 1;
}

.course-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

/* Featured wide card */
.course-card--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.course-card--wide .course-card__media {
  aspect-ratio: auto;
  height: 100%;
  min-height: 320px;
}

.course-card--wide .course-card__body {
  justify-content: center;
  gap: 0.85rem;
  padding: clamp(1.75rem, 3vw, 3rem);
}

.course-card--wide .course-card__body h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.course-card--wide .course-card__body > p {
  font-size: 0.98rem;
  max-width: 54ch;
}

.course-card--wide .course-card__footer {
  justify-content: flex-start;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

/* ---------- 13. Footer ---------- */
.site-footer {
  background: #0e1430;
  color: #a8b0c8;
  padding-top: clamp(3rem, 5vw, 4.5rem);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 34ch;
}

.footer__logo {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  background: #fff;
  width: fit-content;
}

.footer__logo img {
  width: 130px;
}

.footer__brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer__social {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.footer__social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #cdd4e6;
  font-size: 0.9rem;
  transition: background-color var(--ease), color var(--ease),
    transform var(--ease);
}

.footer__social a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer__col h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.footer__col a {
  font-size: 0.88rem;
  color: #a8b0c8;
  width: fit-content;
  transition: color var(--ease), transform var(--ease);
}

.footer__col a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.35rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.83rem;
}

/* =========================================================
   14. Responsive
   ========================================================= */

/* --- Large tablets / small laptops --- */
@media (max-width: 1200px) {
  .contact-strip {
    gap: 1.1rem;
  }

  .search input {
    width: 180px;
  }

  .batch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Tablets --- */
@media (max-width: 1024px) {
  .container {
    width: 90%;
  }

  .contact-strip {
    display: none;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero__content {
    align-items: center;
    text-align: center;
  }

  .hero__desc {
    max-width: 60ch;
  }

  .hero__cta {
    justify-content: center;
  }

  .hero__float {
    left: 1rem;
  }

  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-card--wide {
    grid-template-columns: 1fr;
  }

  .course-card--wide .course-card__media {
    min-height: 240px;
    aspect-ratio: 16 / 9;
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* --- Mobile menu kicks in --- */
@media (max-width: 992px) {
  .menu-toggle {
    display: grid;
  }

  .nav {
    display: none;
  }

  .nav.is-open {
    display: block;
    animation: slide-down 0.25s ease;
  }

  .nav__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem 0 1.1rem;
    overflow: visible;
  }

  .nav__link {
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid var(--line);
  }

  .nav__link::after {
    display: none;
  }

  .nav__link--tag,
  .nav__link--compiler {
    justify-content: center;
    margin-top: 0.6rem;
    border-bottom: 0;
  }

  .nav__link--tag {
    padding: 0.55rem 1rem;
  }

  .nav__link--compiler {
    display: flex;
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Small tablets / large phones --- */
@media (max-width: 768px) {
  .header__top {
    gap: 1rem;
  }

  .brand img {
    width: 120px;
  }

  .search {
    display: none;
  }

  .hero__title {
    font-size: clamp(1.9rem, 7vw, 2.6rem);
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    padding: 0.7rem 0.8rem;
    gap: 0.65rem;
  }

  .stat > i {
    font-size: 1.15rem;
  }

  .stat__text strong {
    font-size: 0.95rem;
  }

  .stat__text span {
    font-size: 0.75rem;
  }

  .hero__float {
    position: static;
    margin-top: 1rem;
    animation: none;
    width: 100%;
    justify-content: flex-start;
  }

  .batch-grid {
    grid-template-columns: 1fr;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .promo {
    flex-direction: column;
    align-items: flex-start;
  }

  .promo .btn {
    width: 100%;
  }

  .section__head--row {
    align-items: flex-start;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer__bottom {
    justify-content: center;
    text-align: center;
  }
}

/* --- Phones --- */
@media (max-width: 560px) {
  .container {
    width: 92%;
  }

  .btn--lg {
    width: 100%;
    padding: 0.85rem 1.25rem;
  }

  .hero__cta {
    flex-direction: column;
    width: 100%;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .course-card__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .course-card__footer .btn {
    width: 100%;
  }

  .batch-card {
    padding: 1.15rem 1rem;
  }
}

/* --- Accessibility: reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}