

:root {

  --color-bg:          #0b0805;
  --color-bg-alt:      #120d08;
  --color-surface:     #1a130b;
  --color-surface-2:   #221a10;
  --color-border:      #33281a;
  --color-primary:     #e0a44a;
  --color-primary-strong: #f0c070;
  --color-on-primary:  #1a1206;
  --color-text:        #f2e9d8;
  --color-text-muted:  #b3a288;
  --color-text-faint:  #8a7a62;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --container: 1160px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --transition: 220ms ease-out;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--color-primary); color: var(--color-on-primary); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.container--narrow { max-width: 820px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform var(--transition), background var(--transition),
              color var(--transition), border-color var(--transition),
              box-shadow var(--transition);
}

.btn:active { transform: scale(.97); }

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
  color: var(--color-on-primary);
  box-shadow: 0 6px 24px rgba(224, 164, 74, .25);
}
.btn--primary:hover {
  box-shadow: 0 8px 32px rgba(224, 164, 74, .4);
  transform: translateY(-2px);
}

.btn--outline {
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
  background: transparent;
}
.btn--outline:hover {
  background: rgba(224, 164, 74, .12);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--color-text-muted);
  border-color: var(--color-border);
}
.btn--ghost:hover { color: var(--color-text); border-color: var(--color-text-faint); }

.btn--sm { min-height: 40px; padding: 8px 20px; font-size: 14px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  color: var(--color-primary-strong);
  font-weight: 600;
  font-size: 14.5px;
  transition: gap var(--transition), color var(--transition);
}
.link-arrow:hover { gap: 10px; color: var(--color-primary); }

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-block: 18px;
  transition: background var(--transition), padding var(--transition),
              box-shadow var(--transition), backdrop-filter var(--transition);
}

.navbar.is-scrolled {
  padding-block: 10px;
  background: rgba(11, 8, 5, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .4);
  border-bottom: 1px solid var(--color-border);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--color-text);
}
.navbar__brand svg { color: var(--color-primary); }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.navbar__links > a:not(.btn) {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 6px 2px;
  position: relative;
  transition: color var(--transition);
}
.navbar__links > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.navbar__links > a:not(.btn):hover { color: var(--color-text); }
.navbar__links > a:not(.btn):hover::after { transform: scaleX(1); }

.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}
.navbar__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.navbar__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__toggle.is-open span:nth-child(2) { opacity: 0; }
.navbar__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: -12px;
  z-index: -2;
  background: url("../guitar.png") center right / cover no-repeat;
  /* WebP: 51 KB instead of the 1.2 MB PNG. Browsers that understand
     image-set() with types use it; older ones keep the PNG line above. */
  background-image: image-set(url("../images/hero.webp") type("image/webp"), url("../guitar.png") type("image/png"));
  filter: blur(2.5px) brightness(.92);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 8, 5, .88) 0%, rgba(11, 8, 5, .55) 45%, rgba(11, 8, 5, .1) 75%),
    linear-gradient(0deg, var(--color-bg) 0%, transparent 22%);
}

.hero__content {
  padding-block: 140px 100px;
  max-width: 720px;
  margin-inline: 0 auto;
}

.hero__eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 18px;
}

.hero__title {
  font-size: clamp(64px, 11vw, 128px);
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1;
  background: linear-gradient(120deg, var(--color-text) 30%, var(--color-primary-strong) 70%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--color-primary-strong);
  margin-top: 14px;
}

.hero__desc {
  margin-top: 22px;
  max-width: 560px;
  font-size: 17px;
  color: var(--color-text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  animation: bob 2.4s ease-in-out infinite;
  transition: color var(--transition), border-color var(--transition);
}
.hero__scroll:hover { color: var(--color-primary); border-color: var(--color-primary); }

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}

.hero__social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 -14px;
}

.hero__social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  background: rgba(11, 8, 5, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: color var(--transition), border-color var(--transition),
              background var(--transition), transform var(--transition);
}
.hero__social a:hover {
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
  border-color: transparent;
  transform: translateY(-3px);
}

.hero__notes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero__notes .note {
  position: absolute;
  top: 0;
  left: 0;
  font-size: var(--note-size, 26px);
  color: var(--color-primary);
  opacity: 0;
  text-shadow: 0 0 18px rgba(224, 164, 74, .55);
  offset-rotate: 0deg;
  animation: flow var(--note-dur, 14s) linear infinite;
  animation-delay: var(--note-delay, 0s);
}

.note--p1 { offset-path: path("M -60 420 C 240 260, 420 560, 720 400 S 1240 240, 1560 420 S 2000 560, 2100 380"); }
.note--p2 { offset-path: path("M -60 170 C 280 60, 560 290, 880 160 S 1480 30, 1780 190 S 2060 300, 2140 150"); }
.note--p3 { offset-path: path("M -60 640 C 320 760, 640 540, 980 660 S 1560 790, 1880 630 S 2080 540, 2140 660"); }
.note--p4 { offset-path: path("M 2140 300 C 1760 150, 1440 430, 1060 290 S 480 130, 160 320 S -40 420, -100 290"); }
.note--p5 { offset-path: path("M -60 530 C 360 400, 700 640, 1080 500 S 1700 360, 2140 520"); }

@keyframes flow {
  0%   { offset-distance: 0%;   opacity: 0; }
  6%   { opacity: var(--note-opacity, .75); }
  88%  { opacity: var(--note-opacity, .75); }
  100% { offset-distance: 100%; opacity: 0; }
}

.section { padding-block: 96px; }
.section--alt { background: var(--color-bg-alt); }

.section__head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section__eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section__title { font-size: clamp(30px, 4.4vw, 44px); }

.section__sub {
  margin-top: 16px;
  color: var(--color-text-muted);
  font-size: 16.5px;
}

.section__cta {
  margin-top: 48px;
  text-align: center;
}

.about__combined {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 76px;
}
.about__combined > * { min-width: 0; }

.about__logo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}
.about__logo img { width: 100%; height: auto; display: block; }

.about__lead {
  font-size: 17px;
  color: var(--color-text-muted);
  margin-bottom: 30px;
}

.about__points-title {
  font-size: 21px;
  color: var(--color-primary-strong);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: 110px;
}

/* Lesson options on the homepage: compact 2x2 information tiles (not links —
   prices live on the courses page, reached by the one button underneath). */
.about__points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.about__point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.about__point h3 { color: var(--color-primary-strong); }
.about__prices { margin-top: 20px; }
html[dir="rtl"] .about__prices svg { transform: scaleX(-1); }

.about__icon {
  border-color: var(--color-primary);
  background: rgba(224, 164, 74, .18);
}

.about__point-arrow {
  flex-shrink: 0;
  align-self: center;
  color: var(--color-primary);
  opacity: .7;
  transition: opacity var(--transition), transform var(--transition);
}
.about__point-link:hover .about__point-arrow { opacity: 1; transform: translateX(4px); }
html[dir="rtl"] .about__point-arrow { transform: scaleX(-1); }
html[dir="rtl"] .about__point-link:hover .about__point-arrow { transform: scaleX(-1) translateX(4px); }

.about__icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  color: var(--color-primary);
  background: rgba(224, 164, 74, .1);
  border: 1px solid rgba(224, 164, 74, .25);
}

.about__points h3 { font-size: 16px; margin-bottom: 2px; }
.about__points p { color: var(--color-text-muted); font-size: 13.5px; line-height: 1.5; }
@media (max-width: 560px) {
  .about__point { flex-direction: column; gap: 8px; padding: 12px; }
  .about__icon { width: 34px; height: 34px; border-radius: 10px; }
  .about__points h3 { font-size: 15px; }
  .about__points p { font-size: 13px; }
  .about__prices { width: 100%; justify-content: center; }
}

.about__programs {
  border-top: 1px solid var(--color-border);
  padding-top: 68px;
}

/* ---- Homepage "Our Lesson Types": photo cards + an options card ---- */
.programs__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.programs__accent { color: var(--color-primary); }
.programs__sub {
  margin-top: 12px;
  max-width: 360px;
  color: var(--color-text-muted);
  font-size: 15.5px;
}
.programs__all { gap: 10px; flex-shrink: 0; }
html[dir="rtl"] .programs__all svg,
html[dir="rtl"] .program__go svg,
html[dir="rtl"] .program--options .btn svg { transform: scaleX(-1); }

.programs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 16px;
}

.program {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.program:hover {
  transform: translateY(-6px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}

.program__media {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-bg-alt));
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}
.program__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.program:hover .program__media img { transform: scale(1.05); }

/* Round badge straddling the photo's bottom edge. */
.program__icon {
  position: absolute;
  inset-inline-start: 18px;
  top: 0;
  margin-top: calc(56.25% - 26px);   /* 9/16 of the card width = photo height */
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  color: var(--color-primary);
  background: var(--color-bg);
  border: 1.5px solid var(--color-primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .45);
}

.program__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  padding: 40px 20px 18px;
}
.program h3 {
  font-size: 20px;
  color: var(--color-primary);
}
.program__desc {
  flex-grow: 1;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.program__go {
  align-self: flex-end;
  color: var(--color-primary);
  transition: transform var(--transition);
}
.program:hover .program__go { transform: translateX(4px); }
html[dir="rtl"] .program:hover .program__go { transform: translateX(-4px); }

.program--options {
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 18px;
  text-align: center;
  background: radial-gradient(circle at 50% 25%, rgba(224, 164, 74, .1), transparent 60%), var(--color-surface);
}
.program--options:hover { transform: none; box-shadow: none; border-color: var(--color-border); }
.program__note { color: var(--color-primary); margin-bottom: 14px; }
.program--options h3 { font-family: var(--font-body); font-size: 16px; font-weight: 600; }
.program--options p { color: var(--color-text-muted); font-size: 14.5px; }
.program--options .btn {
  margin-top: 18px;
  gap: 8px;
  padding-inline: 18px;
  font-size: 14px;
  white-space: nowrap;
}

.programs__next {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin: 24px auto 0;
  border-radius: 50%;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}
.programs__next:hover { color: var(--color-primary); border-color: var(--color-primary); transform: translateY(3px); }

/* Phones: one card per row, with a much shorter photo so four cards plus
   the options card don't become an endless scroll. Desktop is unchanged. */
@media (max-width: 560px) {
  .programs__head { align-items: flex-start; }
  .program__media { aspect-ratio: 3 / 1; }
  .program__icon { margin-top: calc(33.333% - 26px); }   /* 1/3 */
}

.lessons__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 22px;
}

.lesson {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: linear-gradient(160deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  transition: transform var(--transition), border-color var(--transition);
}
.lesson:hover { transform: translateY(-4px); border-color: var(--color-primary); }

.lesson__icon {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  border-radius: 50%;
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
}

.lesson h3 { font-size: 20px; }
.lesson p { color: var(--color-text-muted); font-size: 15px; flex-grow: 1; }

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 22px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 26px 28px 84px;
  transition: border-color var(--transition), transform var(--transition);
}
.step:hover { border-color: var(--color-primary); transform: translateY(-3px); }

.step__num {
  position: absolute;
  left: 24px; top: 26px;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--color-primary-strong);
  border: 1.5px solid var(--color-primary);
  background: rgba(224, 164, 74, .08);
}

.step h3 { font-size: 18.5px; margin-bottom: 8px; }
.step p { color: var(--color-text-muted); font-size: 14.5px; }

.achievements__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 22px;
}

.testimonial {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform var(--transition), border-color var(--transition);
}
.testimonial:hover { transform: translateY(-4px); border-color: var(--color-primary); }

.testimonial blockquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
}

.testimonial figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testimonial__avatar,
.instructor__avatar {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
}

.testimonial figcaption strong {
  display: block;
  font-size: 14.5px;
}
.testimonial figcaption span:not(.testimonial__avatar) {
  font-size: 13px;
  color: var(--color-primary-strong);
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq__item[open] { border-color: var(--color-primary); }

.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 24px;
  font-weight: 600;
  font-size: 16px;
  position: relative;
  transition: color var(--transition);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--color-primary-strong); }

.faq__item summary::after {
  content: "";
  position: absolute;
  right: 24px; top: 50%;
  width: 10px; height: 10px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--transition);
}
.faq__item[open] summary::after { transform: translateY(-30%) rotate(225deg); }

.faq__item p {
  padding: 0 24px 22px;
  color: var(--color-text-muted);
  font-size: 15px;
}

.instructors__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 22px;
}

.instructor {
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 34px 26px;
  transition: transform var(--transition), border-color var(--transition);
}
.instructor:hover { transform: translateY(-4px); border-color: var(--color-primary); }

.instructor__avatar {
  width: 74px; height: 74px;
  font-size: 22px;
  margin-inline: auto;
  margin-bottom: 18px;
}

.instructor h3 { font-size: 20px; }

.instructor__role {
  color: var(--color-primary-strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 6px 0 12px;
}

.instructor__bio { color: var(--color-text-muted); font-size: 14.5px; }

.instructor__exp {
  margin-top: 14px;
  font-size: 13px;
  color: var(--color-text-faint);
}

.cta-band {
  padding-block: 90px;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(224, 164, 74, .18), transparent 65%),
    var(--color-bg-alt);
  border-block: 1px solid var(--color-border);
  text-align: center;
}

.cta-band h2 { font-size: clamp(28px, 4vw, 40px); }
.cta-band p {
  margin-top: 14px;
  color: var(--color-text-muted);
  font-size: 17px;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: start;
}

.contact__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact__list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact__list svg { color: var(--color-primary); margin-top: 4px; flex-shrink: 0; }
.contact__list strong {
  display: block;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 3px;
}
.contact__list a, .contact__list span { font-size: 15.5px; color: var(--color-text); }
.contact__list a:hover { color: var(--color-primary-strong); }

.contact__social {
  display: flex;
  gap: 12px;
  margin-top: 36px;
}
.contact__social a {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}
.contact__social a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-3px);
}

.contact__form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 34px 30px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form__field { margin-bottom: 18px; }

.form__field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--color-text-muted);
}
.form__field label span { color: var(--color-primary); }

.form__field input,
.form__field select,
.form__field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form__field textarea { resize: vertical; }

.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(224, 164, 74, .18);
}

.form__field input.is-invalid,
.form__field textarea.is-invalid { border-color: #e05a4a; }

.form__submit { width: 100%; margin-top: 6px; }

.form__status {
  margin-top: 14px;
  font-size: 14.5px;
  text-align: center;
  min-height: 22px;
}
.form__status.is-success { color: var(--color-primary-strong); }
.form__status.is-error { color: #e57a6c; }

.footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding-top: 64px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 36px;
  padding-bottom: 48px;
}

.footer__brand p {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--color-text-muted);
  max-width: 260px;
}

.footer__col { display: flex; flex-direction: column; gap: 10px; }

.footer__col h4 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 6px;
}

.footer__col a {
  font-size: 14.5px;
  color: var(--color-text-muted);
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--color-primary-strong); }

.footer__bottom {
  border-top: 1px solid var(--color-border);
  padding-block: 22px;
  text-align: center;
  font-size: 13.5px;
  color: var(--color-text-faint);
}

.footer__credit {
  margin-top: 6px;
  font-size: 11.5px;
  opacity: .65;
}

.lang-toggle {
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: 'Cairo', var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary-strong);
  background: transparent;
  border: 1.5px solid var(--color-primary);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.lang-toggle:hover {
  background: rgba(224, 164, 74, .12);
  transform: translateY(-1px);
}

.lang-toggle--bar {
  display: none;
  min-height: 36px;
  padding: 5px 14px;
  font-size: 13.5px;
  margin-inline-start: auto;
}

html[lang="ar"] body { font-family: 'Cairo', var(--font-body); }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4,
html[lang="ar"] .price, html[lang="ar"] .step__num {
  font-family: 'Amiri', var(--font-display);
}
html[lang="ar"] .hero__tagline { font-family: 'Amiri', var(--font-display); }

html[dir="rtl"] .hero__eyebrow,
html[dir="rtl"] .section__eyebrow,
html[dir="rtl"] .footer__col h4,
html[dir="rtl"] .instructor__role,
html[dir="rtl"] .course__facts strong,
html[dir="rtl"] .course__teacher-label,
html[dir="rtl"] .contact__list strong,
html[dir="rtl"] .schedule th { letter-spacing: .04em; }

html[dir="rtl"] .hero__content { margin-inline: auto 0; text-align: right; }

html[dir="rtl"] .step { padding: 28px 84px 28px 26px; }
html[dir="rtl"] .step__num { left: auto; right: 24px; }

html[dir="rtl"] .course__why-note {
  border-left: none;
  border-right: 3px solid var(--color-primary);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

html[dir="rtl"] .checklist li { padding-left: 0; padding-right: 30px; }
html[dir="rtl"] .checklist li::before { left: auto; right: 0; }

html[dir="rtl"] .schedule th,
html[dir="rtl"] .schedule td { text-align: right; }
/* (the card layout below uses logical start/end; its selectors carry an extra
   .table-scroll so they outrank this rule.) */

html[dir="rtl"] .faq__item summary { padding: 20px 24px 20px 56px; }
html[dir="rtl"] .faq__item summary::after { right: auto; left: 24px; }

html[dir="rtl"] .course__media-badge { left: auto; right: 14px; }

.page-hero {
  padding: 150px 0 56px;
  background:
    radial-gradient(ellipse at 20% -20%, rgba(224, 164, 74, .14), transparent 60%),
    var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.page-hero__title { font-size: clamp(34px, 5vw, 54px); }

.page-hero__sub {
  margin-top: 14px;
  max-width: 620px;
  color: var(--color-text-muted);
  font-size: 16.5px;
}

.section--flush { padding-top: 56px; }

.navbar__links > a.is-active { color: var(--color-primary-strong); }
.navbar__links > a.is-active::after { transform: scaleX(1); }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 44px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 11px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: color var(--transition), background var(--transition),
              border-color var(--transition), transform var(--transition);
}
.tab:hover { color: var(--color-text); border-color: var(--color-primary); transform: translateY(-2px); }

.tab[aria-selected="true"] {
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
  border-color: transparent;
  color: var(--color-on-primary);
  box-shadow: 0 6px 24px rgba(224, 164, 74, .25);
}

@media (max-width: 640px) {
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin-inline: -24px;
    padding-inline: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
  }
  .tab {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* Course picker follows the visitor while they scroll the course details.
   Sticks just under the fixed navbar (--nav-h is measured by main.js, since
   the navbar's height differs between desktop and mobile). The box-shadow
   paints a full-width band behind it so text never shows through, without
   creating horizontal overflow the way a 100vw pseudo-element would.

   .tabbar wraps the tablist plus an arrow that hides / shows it. The arrow
   lives OUTSIDE role="tablist", which may only hold tabs. The visitor's
   choice is stored by main.js as html.tabs-hidden. */
.tabs--sticky {
  position: sticky;
  top: var(--nav-h, 72px);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 12px;
  margin-bottom: 32px;
  background: var(--sticky-bg, var(--color-bg));
  box-shadow: 0 0 0 100vmax var(--sticky-bg, var(--color-bg));
  clip-path: inset(0 -100vmax);
  transition: border-color var(--transition);
  border-bottom: 1px solid transparent;
}
.tabs--sticky > .tabs { flex: 1; margin-bottom: 0; min-width: 0; }
.tabs--sticky.is-stuck { border-bottom-color: var(--color-border); }
/* Match the band to the section it sits in (Lesson Options is on the alt bg). */
.section--alt .tabs--sticky { --sticky-bg: var(--color-bg-alt); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The hide/show arrow is a MOBILE feature only (see the 640px block below):
   on desktop the row is one line tall and never gets in the way. Hidden here,
   and html.tabs-hidden is ignored here too, so a choice made on a phone can
   never leave a desktop visitor with no bar and no arrow to bring it back. */
.tabbar__toggle { display: none; }
.tabbar__toggle .lbl-off { display: none; }
html.tabs-hidden .tabbar__toggle .lbl-on { display: none; }
html.tabs-hidden .tabbar__toggle .lbl-off { display: inline; }

/* Re-appearing tabs slide in instead of popping. */
.tabs--sticky > .tabs { animation: tabbar-in .25s ease-out; }
@keyframes tabbar-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  /* PHONES, two states (switched by main.js):
     1. At the top of the courses: the course buttons are a normal swipeable
        ROW above the course (the generic mobile .tabs rule).
     2. After that row has scrolled away (html.tabs-floating): the same bar
        becomes a small floating RAIL at the screen edge — left in English,
        right in Arabic — always OPEN at first; the arrow can fold it into a
        pull-tab for this page view (html.tabs-hidden). */
  .courses-layout { display: block; }
  .tabs--sticky {
    position: relative;
    top: auto;
    display: block;
    margin: 0 0 20px;
    padding: 0;
    background: none;
    box-shadow: none;
    clip-path: none;
    border-bottom: 0;
  }
  .tabs--sticky.is-stuck { border-bottom-color: transparent; }
  .tabbar__toggle { display: none; }

  /* ---- state 2: floating rail ---- */
  html.tabs-floating .courses-layout { padding-top: var(--tabbar-h, 0px); }
  html.tabs-floating .tabs--sticky {
    position: fixed;
    top: calc(var(--nav-h, 61px) + 12px);
    inset-inline-start: 6px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 74px;
    margin: 0;
    padding: 8px 6px;
    border-radius: 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
    animation: tabbar-in-side .25s ease-out;
  }
  html.tabs-floating .tabs--sticky > .tabs {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    align-self: stretch;
    margin: 0;
    padding: 0;
    gap: 8px;
  }
  html.tabs-floating .tabs--sticky .tab {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 100%;
    min-height: 58px;
    padding: 6px 4px;
    border-radius: 14px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  html.tabs-floating .tabs--sticky .tab:hover { transform: none; }
  /* past the end of the courses section: step aside */
  html.tabs-floating.tabs-rail-off .tabs--sticky {
    opacity: 0;
    pointer-events: none;
    transform: translateX(var(--slide-from, -10px));
    transition: opacity .2s, transform .2s;
  }

  html.tabs-floating .tabbar__toggle {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    color: var(--color-primary);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
  }
  html.tabs-floating .tabbar__toggle:hover,
  html.tabs-floating .tabbar__toggle:focus-visible { border-color: var(--color-primary); }
  .tabbar__toggle svg { transition: transform var(--transition); }

  /* Arrow points toward the edge the rail folds into: left in English,
     right in Arabic; flipped when folded. */
  .tabbar__toggle svg { transform: none; }
  html[dir="rtl"] .tabbar__toggle svg { transform: scaleX(-1); }
  html.tabs-hidden .tabbar__toggle svg { transform: scaleX(-1); }
  html.tabs-hidden[dir="rtl"] .tabbar__toggle svg { transform: none; }

  /* folded: only a small gold pull-tab at the screen edge */
  html.tabs-floating.tabs-hidden .tabs--sticky {
    inset-inline-start: 0;
    width: auto;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  html.tabs-floating.tabs-hidden .tabs--sticky > .tabs { display: none; }
  html.tabs-floating.tabs-hidden .tabbar__toggle {
    width: 22px; height: 52px;
    border-radius: 0;
    border-start-end-radius: 12px;
    border-end-end-radius: 12px;
    border-color: transparent;
    background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
    color: var(--color-on-primary);
  }
}
@keyframes tabbar-in-side {
  from { opacity: 0; transform: translateX(var(--slide-from, -10px)); }
  to   { opacity: 1; transform: none; }
}
/* The rail slides in from its own edge. */
html[dir="rtl"] .tabs--sticky > .tabs { --slide-from: 10px; }

.course-panel[hidden] { display: none; }

.course-panel { animation: panel-in .35s ease-out; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.course__top {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 28px;
}

.course__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}
.course__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.course__media-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.badge--yes {
  color: #9fdca2;
  background: rgba(24, 46, 26, .75);
  border: 1px solid rgba(120, 200, 125, .45);
}
.badge--no {
  color: #f0c070;
  background: rgba(46, 34, 15, .78);
  border: 1px solid rgba(224, 164, 74, .45);
}

.course__intro h2 { font-size: clamp(28px, 3.6vw, 38px); margin-bottom: 14px; }

.lesson-intro { max-width: 760px; margin-bottom: 32px; }
.lesson-intro .btn { margin-top: 4px; }

.course__lead { color: var(--color-text-muted); font-size: 16px; }

.course__facts {
  list-style: none;
  margin: 22px 0 26px;
  display: grid;
  gap: 9px;
}
.course__facts li {
  display: flex;
  gap: 12px;
  font-size: 14.5px;
  color: var(--color-text);
}
.course__facts strong {
  flex-shrink: 0;
  width: 120px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  padding-top: 2px;
}

.course__why-note {
  margin: -8px 0 24px;
  padding: 12px 16px;
  border-left: 3px solid var(--color-primary);
  background: rgba(224, 164, 74, .07);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px;
  color: var(--color-text-muted);
}

.course__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.course__grid > *,
.course__top > * { min-width: 0; }

.course-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.course-card--wide { grid-column: 1 / -1; }

.course-card h3 {
  font-size: 20px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

.course-card__note {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--color-text-faint);
}
.course-card__note strong { color: var(--color-primary-strong); }

.checklist {
  list-style: none;
  display: grid;
  gap: 12px;
}
.checklist li {
  position: relative;
  padding-left: 30px;
  font-size: 15px;
  color: var(--color-text-muted);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231a1206" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / 11px no-repeat,
    linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
}

.pricing { list-style: none; display: grid; }
.pricing li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 15px;
  color: var(--color-text-muted);
}
.pricing li:last-child { border-bottom: none; }

.price {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--color-primary-strong);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.price--free { color: #9fdca2; }

.table-scroll { overflow-x: auto; }

.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 520px;
}
.schedule th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
}
.schedule td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.schedule tbody tr:last-child td { border-bottom: none; }
.schedule tbody tr:hover td { background: rgba(224, 164, 74, .05); color: var(--color-text); }
.schedule td:first-child { color: var(--color-text); font-weight: 500; }

/* Weekly schedule on narrow screens: one small card per session instead of a
   520px table that only showed half its columns (with no hint to swipe).

   A CONTAINER query, not a screen-width one: what matters is the room the
   table actually gets — beside the mobile side rail it is ~245px, with the
   rail hidden ~327px, on tablets it can sit in a narrow column too.
   Browsers without container queries keep the old scrollable table.

     Monday                 4:00 – 5:00 PM
     Beginners                 [In-person]                                   */
.table-scroll { container-type: inline-size; }

@container (max-width: 520px) {
  .schedule { min-width: 0; font-size: 14px; }
  .schedule, .schedule tbody { display: block; }
  .schedule thead {            /* kept for screen readers, not shown */
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .schedule tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-2);
  }
  .schedule tbody tr:last-child { margin-bottom: 0; }
  .schedule td,
  .schedule tbody tr:last-child td { padding: 0; border: 0; }
  .schedule tbody tr:hover td { background: none; }

  .table-scroll .schedule td:nth-child(1) { font-weight: 600; color: var(--color-text); }
  .table-scroll .schedule td:nth-child(2) {
    text-align: end;
    font-weight: 600;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .table-scroll .schedule td:nth-child(3) { color: var(--color-text-muted); font-size: 13.5px; }
  .table-scroll .schedule td:nth-child(4) {
    justify-self: end;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    white-space: nowrap;
  }
}
/* Very narrow (side rail on a small phone): time drops under the day so
   neither gets squeezed or cut. */
@container (max-width: 260px) {
  .schedule tr { grid-template-columns: minmax(0, 1fr); }
  html .table-scroll .schedule td:nth-child(2),
  html .table-scroll .schedule td:nth-child(4) { text-align: start; justify-self: start; }
}

.course__teacher {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 18px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: linear-gradient(160deg, var(--color-surface) 0%, var(--color-bg-alt) 100%);
  transition: border-color var(--transition), transform var(--transition);
}
.course__teacher:hover { border-color: var(--color-primary); transform: translateY(-2px); }

.course__teacher img {
  width: 58px; height: 58px;
  flex-shrink: 0;               /* never squeezed into an oval by long text */
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
}
.course__teacher > div { flex-grow: 1; display: grid; min-width: 0; }   /* the text wraps instead */
.course__teacher-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.course__teacher strong { font-size: 16.5px; }
.course__teacher > div span:last-child { font-size: 13.5px; color: var(--color-text-muted); }
.course__teacher > svg { color: var(--color-primary); flex-shrink: 0; }

.profile {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 44px;
  align-items: center;
  padding-block: 44px;
}
.profile + .profile { border-top: 1px solid var(--color-border); }

.profile--flip .profile__photo { order: 2; }
.profile--flip .profile__body { order: 1; }

.profile__photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}
.profile__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.profile__teaches {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary-strong);
  background: rgba(224, 164, 74, .1);
  border: 1px solid rgba(224, 164, 74, .3);
  margin-bottom: 16px;
}

/* One badge per course the instructor teaches (ticked in the admin). */
.profile__teaches-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.profile__teaches-list .profile__teaches { margin-bottom: 0; }

.profile__body h2 { font-size: clamp(26px, 3.4vw, 34px); }

.profile__meta {
  margin: 8px 0 16px;
  font-size: 14px;
  color: var(--color-primary-strong);
}

.profile__body > p:not(.profile__meta) {
  color: var(--color-text-muted);
  font-size: 15.5px;
}

.profile__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 22px;
}
.profile__tags li {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 18px;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 10px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
}

.gallery-card__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 11px;
  overflow: hidden;
  background: var(--color-bg-alt);
}
.gallery-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}
.gallery-card:hover .gallery-card__photo img { transform: scale(1.04); }

.gallery-card__photo--empty {
  display: grid;
  place-items: center;
  color: var(--color-text-faint);
}

.gallery-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 8px 7px;
}
.gallery-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}
.gallery-card__achv {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-primary-strong);
}
.gallery-card__comment {
  margin-top: 6px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html[dir="rtl"] .gallery-card__comment { font-family: 'Amiri', var(--font-display); }

.gallery__empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 16px;
  padding: 48px 0;
}

.instructor__photo {
  width: 108px; height: 108px;
  border-radius: 50%;
  object-fit: cover;
  margin-inline: auto;
  margin-bottom: 18px;
  border: 2.5px solid var(--color-primary);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .4);
}

.music-toggle {
  position: fixed;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .55), 0 0 0 2px rgba(240, 192, 112, .35);
  transition: transform var(--transition), box-shadow var(--transition);
}
.music-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .6), 0 0 0 2px rgba(240, 192, 112, .6);
}

/* MOBILE: keep the button above the browser's own toolbar.
   `bottom` is measured against the LAYOUT viewport, which on phones extends
   behind the browser chrome — so `bottom: 18px` puts a 54px button roughly
   45px from the bottom edge, i.e. underneath iOS Safari's bottom bar, which
   is drawn over fixed content. The button is rendered and hit-testable; it is
   simply covered, which looks identical to "missing".

   svh = the SMALL viewport height: the visible area with the browser UI
   shown. Anchoring to it means the button clears the toolbar. svh is used
   rather than dvh deliberately — dvh changes as the toolbar hides on scroll,
   which makes the button slide around mid-scroll. svh is stable.

   On desktop svh == vh, so this resolves to exactly the same position as
   `bottom: 18px` and nothing changes there.
   Height math: 100svh - 18px gap - 54px button = 100svh - 72px. */
@supports (height: 100svh) {
  .music-toggle {
    top: calc(100svh - 72px - env(safe-area-inset-bottom, 0px));
    bottom: auto;
  }
}

.music-toggle__slash {
  stroke: var(--color-on-primary);
  transition: opacity var(--transition);
}
.music-toggle.is-playing .music-toggle__slash { opacity: 0; }

.music-toggle.is-playing {
  animation: music-pulse 2.4s ease-in-out infinite;
}
/* Notes floating up out of the button (js/main.js adds them). Gold while the
   music plays, grey while it is off — a hint that there is music to turn on. */
.music-toggle__notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.music-toggle__note {
  position: absolute;
  left: 50%;
  top: 6px;
  font-size: 17px;
  line-height: 1;
  font-weight: 700;
  color: #9c968c;                       /* off: grey */
  text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
  opacity: 0;
  animation: music-note-float 3.6s ease-out infinite;
}
.music-toggle.is-playing .music-toggle__note {
  color: var(--color-primary-strong);   /* on: gold */
}
.music-toggle__note--2 { animation-delay: 1.2s; font-size: 15px; }
.music-toggle__note--3 { animation-delay: 2.4s; font-size: 13px; }
@keyframes music-note-float {
  0%   { opacity: 0; transform: translate(-50%, 0) rotate(0deg) scale(.7); }
  15%  { opacity: 1; }
  70%  { opacity: .85; }
  100% { opacity: 0; transform: translate(calc(-50% - 26px), -58px) rotate(-14deg) scale(1.05); }
}
/* the middle note rises more steeply, so the three don't follow one line */
.music-toggle__note--2 { animation-name: music-note-float-2; }
@keyframes music-note-float-2 {
  0%   { opacity: 0; transform: translate(-50%, 0) rotate(0deg) scale(.7); }
  15%  { opacity: 1; }
  70%  { opacity: .85; }
  100% { opacity: 0; transform: translate(calc(-50% - 8px), -66px) rotate(10deg) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .music-toggle__note { animation: none; }
  .music-toggle__note--1 { opacity: 1; transform: translate(-90%, -34px); }
}

@keyframes music-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(0, 0, 0, .45), 0 0 0 0 rgba(224, 164, 74, .35); }
  50%      { box-shadow: 0 6px 24px rgba(0, 0, 0, .45), 0 0 0 10px rgba(224, 164, 74, 0); }
}

.sdash-body { background: var(--color-bg); }

.sdash { display: flex; min-height: 100dvh; }

.sdash__side {
  width: 264px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 22px;
  border-inline-end: 1px solid var(--color-border);
  background: rgba(11, 8, 5, .6);
  position: sticky;
  top: 0;
  height: 100dvh;
}
.sdash__brand { padding: 0 10px 22px; }

.sdash__nav { display: flex; flex-direction: column; gap: 6px; }

.sdash__navbtn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-align: start;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.sdash__navbtn svg { flex-shrink: 0; }
.sdash__navbtn:hover { color: var(--color-text); background: var(--color-surface); }
.sdash__navbtn.is-active {
  color: var(--color-text);
  background: var(--color-surface);
  border-color: var(--color-border);
}
.sdash__navbtn.is-active svg { color: var(--color-primary); }

.sdash__count {
  margin-inline-start: auto;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
}
.sdash__count--bad { background: #b3492f; color: #ffe3db; }

.sdash__foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.sdash__plan { font-size: 12.5px; }
.sdash__logout button {
  background: none;
  border: none;
  padding: 4px 2px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-faint);
  cursor: pointer;
  transition: color var(--transition);
}
.sdash__logout button:hover { color: #e57a6c; }

.sdash__main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 44px clamp(22px, 5vw, 64px) 80px;
  max-width: 1060px;
}

.sdash-panel { display: none; }
.sdash-panel.is-active { display: block; animation: panel-in .3s ease-out; }

.sdash-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 10px;
}
.sdash-title {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  margin-bottom: 30px;
}
.sdash-title em { font-style: italic; color: var(--color-text); }

.sdash-name { font-size: 22px; }

.sdash-missions { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sdash-mission {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
}
.sdash-mission .dchip { margin-top: 1px; }
.sdash-mission__body { flex: 1 1 auto; min-width: 0; }
.sdash-mission__body strong { font-size: 14.5px; }
.sdash-mission__body p { margin-top: 3px; font-size: 13px; }
.sdash-mission__due { flex-shrink: 0; font-size: 12.5px; white-space: nowrap; }
.sdash-mission--done { opacity: .55; }
.sdash-mission--done strong { text-decoration: line-through; }

.sdash-more { margin-top: 14px; border-top: 1px dashed var(--color-border); }
.sdash-more summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 4px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.sdash-more summary::-webkit-details-marker { display: none; }
.sdash-more summary::after { content: " ▾"; }
.sdash-more[open] summary::after { content: " ▴"; }

.sdash-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px 24px;
}
.sdash-facts > div { display: grid; gap: 3px; }
.sdash-facts .dash-muted { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; }

@media (max-width: 900px) {
  .sdash { flex-direction: column; }
  .sdash__side {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    border-inline-end: none;
    border-bottom: 1px solid var(--color-border);
  }
  .sdash__brand { padding: 0 6px 0 0; }
  .sdash__nav {
    order: 3;
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
  }
  .sdash__navbtn { width: auto; white-space: nowrap; padding: 10px 14px; }
  .sdash__foot {
    margin: 0 0 0 auto;
    padding: 0;
    border: none;
    flex-direction: row;
    align-items: center;
  }
  .sdash__plan { display: none; }
  .sdash__main { padding-top: 26px; }
}

.dash-body { background: var(--color-bg); }

.dash-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  background: rgba(11, 8, 5, .92);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.dash-top__badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
}
.dash-top__actions { margin-inline-start: auto; display: flex; gap: 10px; align-items: center; }
.dash-logout { display: inline; }

.dash-wrap {
  max-width: 980px;
  margin-inline: auto;
  padding: 28px 22px 80px;
}

.dash-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  margin-bottom: 18px;
}

.dash-h2 { font-size: 21px; margin-bottom: 16px; }
.dash-h2--section { margin: 30px 0 14px; font-size: 24px; }
.dash-h4 {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 22px 0 10px;
}
.dash-muted { color: var(--color-text-faint); font-size: 13.5px; }

.dash-profile { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.dash-profile__id { display: flex; align-items: center; gap: 16px; }
.dash-profile__id h1 { font-size: 26px; }
.dash-profile__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-avatar {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
}

.dchip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.dchip--ok   { color: #9fdca2; background: rgba(24, 46, 26, .6); border: 1px solid rgba(120, 200, 125, .4); }
.dchip--warn { color: #f0c070; background: rgba(46, 34, 15, .6); border: 1px solid rgba(224, 164, 74, .4); }
.dchip--bad  { color: #e57a6c; background: rgba(46, 18, 14, .6); border: 1px solid rgba(229, 122, 108, .4); }
.dchip--off  { color: var(--color-text-muted); background: var(--color-bg-alt); border: 1px solid var(--color-border); }
.dchip--gold { color: var(--color-on-primary); background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary)); }

.dash-joinlink {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  color: var(--color-primary-strong); border: 1px solid var(--color-primary);
  text-decoration: none; transition: background .2s, color .2s;
}
.dash-joinlink:hover { background: var(--color-primary); color: var(--color-on-primary); }

.dash-notif { padding: 12px 0; border-bottom: 1px dashed var(--color-border); }
.dash-notif:last-child { border-bottom: none; padding-bottom: 0; }
.dash-notif__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.dash-notif--new strong { color: var(--color-primary-strong); }

.dash-course__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-course__name { font-size: 22px; }

.dash-progress { margin: 16px 0 6px; }
.dash-progress__bar {
  height: 9px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.dash-progress__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-strong));
  transition: width .4s ease;
}
.dash-progress__meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--color-text-muted);
}
.dash-progress__meta strong { color: var(--color-primary-strong); }

.dash-instructor {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
}
.dash-instructor img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--color-primary); }
.dash-instructor > div { display: grid; }
.dash-instructor .dash-muted { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; }

.dash-paychips { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-paychip {
  flex: 1 1 140px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  font-size: 13px;
  color: var(--color-text-muted);
}
.dash-paychip span {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 2px;
}
.dash-paychip--ok span   { color: #9fdca2; }
.dash-paychip--warn span { color: #f0c070; }
.dash-paychip--bad span  { color: #e57a6c; }

.dash-tbl { min-width: 480px; }
.dash-grade { color: var(--color-primary-strong); font-weight: 700; }

.dash-footer { text-align: center; margin-top: 36px; }

@media (max-width: 640px) {
  .dash-card { padding: 20px 18px; }
  .dash-profile__id h1 { font-size: 22px; }
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 940px) {
  .about__combined { grid-template-columns: 1fr; gap: 32px; }
  .about__logo { max-width: 340px; margin-inline: auto; }
  .course__top { grid-template-columns: 1fr; gap: 28px; }
  .course__grid { grid-template-columns: 1fr; }
  .profile {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .profile--flip .profile__photo { order: 0; }
  .profile--flip .profile__body { order: 0; }
  .profile__photo { max-width: 380px; }
}

@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; }

  .navbar__toggle { display: flex; }

  .navbar__links {
    position: fixed;
    top: 0; right: 0;
    height: 100dvh;
    width: min(320px, 82vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    padding: 96px 32px 32px;
    background: rgba(13, 10, 6, .97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid var(--color-border);
    transform: translateX(100%);
    transition: transform .3s ease-out;
    z-index: 90;
  }
  .navbar__links.is-open { transform: translateX(0); }
  .navbar__links > a:not(.btn) {
    font-size: 17px;
    padding: 12px 0;
    width: 100%;
  }
  .navbar__links .btn { margin-top: 16px; width: 100%; }

  .navbar__links .lang-toggle { display: none; }
  .lang-toggle--bar { display: inline-flex; align-items: center; }
  .navbar__toggle { position: relative; z-index: 95; }
}

@media (max-width: 640px) {
  .section { padding-block: 68px; }
  .hero__content { padding-block: 130px 90px; }
  .hero__actions .btn { width: 100%; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .cta-band__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero__notes { display: none; }
  .reveal { opacity: 1; transform: none; }
}

html[data-theme="light"] {
  --color-bg:          #f7f1e6;
  --color-bg-alt:      #efe6d2;
  --color-surface:     #fffdf7;
  --color-surface-2:   #f3ebda;
  --color-border:      #ddcfb2;
  --color-primary:     #b07a1f;
  --color-primary-strong: #8a5f10;
  --color-on-primary:  #fffaf0;
  --color-text:        #2e2314;
  --color-text-muted:  #6d5c41;
  --color-text-faint:  #97866a;
  --shadow: 0 10px 30px rgba(96, 66, 22, .14);
}

html[data-theme="light"] .hero {
  --color-bg: #0b0805;
  --color-surface: #1a130b;
  --color-surface-2: #221a10;
  --color-border: #33281a;
  --color-primary: #e0a44a;
  --color-primary-strong: #f0c070;
  --color-on-primary: #1a1206;
  --color-text: #f2e9d8;
  --color-text-muted: #b3a288;
  --color-text-faint: #8a7a62;
}

html[data-theme="light"] .navbar.is-scrolled {
  background: rgba(250, 245, 235, .9);
  box-shadow: 0 4px 20px rgba(96, 66, 22, .14);
}
@media (max-width: 860px) {
  html[data-theme="light"] .navbar__links {
    background: rgba(250, 245, 235, .97);
  }
}
html[data-theme="light"] .dash-top { background: rgba(250, 245, 235, .93); }
html[data-theme="light"] .sdash__side { background: rgba(255, 252, 244, .75); }

html[data-theme="light"] .badge--yes,
html[data-theme="light"] .dchip--ok {
  color: #1d5f26;
  background: rgba(120, 200, 125, .18);
  border-color: rgba(29, 95, 38, .35);
}
html[data-theme="light"] .badge--no,
html[data-theme="light"] .dchip--warn {
  color: #8a5c00;
  background: rgba(224, 164, 74, .16);
  border-color: rgba(138, 92, 0, .35);
}
html[data-theme="light"] .dchip--bad {
  color: #9c2f1c;
  background: rgba(229, 122, 108, .16);
  border-color: rgba(156, 47, 28, .35);
}
html[data-theme="light"] .price--free,
html[data-theme="light"] .dash-paychip--ok span { color: #1d7a2a; }
html[data-theme="light"] .dash-paychip--warn span { color: #8a5c00; }
html[data-theme="light"] .dash-paychip--bad span,
html[data-theme="light"] .form__status.is-error,
html[data-theme="light"] .sdash__logout button:hover { color: #b0361f; }

.theme-toggle {
  min-height: 40px;
  min-width: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 17px;
  line-height: 1;
  color: var(--color-primary-strong);
  background: transparent;
  border: 1.5px solid var(--color-primary);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.theme-toggle:hover { background: rgba(224, 164, 74, .12); transform: translateY(-1px); }
html[dir="rtl"] .theme-toggle { font-family: var(--font-body); }

.theme-toggle--bar { display: none; }
@media (max-width: 860px) {
  .navbar__links .theme-toggle { display: none; }
  .theme-toggle--bar { display: inline-flex; align-items: center; justify-content: center; }
}

.hw-item {
  padding: 14px 0;
  border-bottom: 1px dashed var(--color-border);
}
.hw-item:last-child { border-bottom: none; padding-bottom: 0; }
.hw-item__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.hw-item--past { opacity: .62; }
.hw-item__photo {
  display: inline-block;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
  max-width: 260px;
  transition: transform var(--transition), border-color var(--transition);
}
.hw-item__photo:hover { transform: translateY(-2px); border-color: var(--color-primary); }
.hw-item__photo img { width: 100%; display: block; }

.hw-item__photo { padding: 0; background: none; cursor: zoom-in; }
.hw-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 4vmin;
  background: rgba(5, 3, 1, .88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: zoom-out;
  animation: hwLightboxIn .18s ease-out;
}
@keyframes hwLightboxIn { from { opacity: 0; } to { opacity: 1; } }
.hw-lightbox img {
  max-width: 94vw;
  max-height: 92vh;
  width: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}
.hw-lightbox__close {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--color-primary);
  background: rgba(11, 8, 5, .6);
  color: var(--color-primary-strong);
  font-size: 18px;
  cursor: pointer;
}
.hw-lightbox__close:hover { background: var(--color-primary); color: var(--color-on-primary); }

.instructors__grid--single {
  grid-template-columns: 1fr;
}
.instructors__grid--single .instructor {
  padding: 44px 28px 40px;
}
.instructors__grid--single .instructor__photo {
  width: 132px;
  height: 132px;
  margin-inline: auto;
}
.instructors__grid--single .instructor__bio {
  max-width: 760px;
  margin-inline: auto;
}

.navbar__toggle {
  border: 1.5px solid var(--color-primary);
  border-radius: 12px;
  background: rgba(11, 8, 5, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.navbar__toggle span {
  height: 2.5px;
  background: var(--color-primary-strong);
}
html[data-theme="light"] .navbar__toggle { background: rgba(250, 245, 235, .65); }

/* The academy homepage opens on a dark hero photo, so an unscrolled navbar
   needs pale text to read against it. The store pages share .page-home but
   open on a cream panel — there the same pale text is invisible, so they are
   excluded and keep the normal light-theme colours. */
html[data-theme="light"] .page-home:not(.store-body) .navbar:not(.is-scrolled) {
  --color-text: #f2e9d8;
  --color-text-muted: #b3a288;
  --color-primary: #e0a44a;
  --color-primary-strong: #f0c070;
  --color-border: #33281a;
}
html[data-theme="light"] .page-home:not(.store-body) .navbar:not(.is-scrolled) .navbar__toggle {
  background: rgba(11, 8, 5, .45);
}

@media (max-width: 480px) {
  .navbar__inner { gap: 10px; }
  .navbar__brand { font-size: 19px; letter-spacing: .08em; gap: 7px; }
  .navbar__brand svg { width: 24px; height: 24px; }
  .lang-toggle--bar {
    min-height: 34px;
    padding: 4px 11px;
    font-size: 12.5px;
    margin-inline-start: auto;
  }
  .theme-toggle--bar {
    min-height: 34px;
    min-width: 34px;
    padding: 4px 9px;
    font-size: 15px;
  }
  .navbar__toggle { width: 40px; height: 40px; padding: 9px; flex-shrink: 0; }
}

.sbill-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 22px 26px; margin-bottom: 16px;
  border: 1px solid var(--color-border); border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(224, 164, 74, .10), var(--color-surface) 65%);
}
.sbill-hero.is-owing { border-color: rgba(229, 122, 108, .45);
  background: linear-gradient(135deg, rgba(229, 122, 108, .14), var(--color-surface) 65%); }
.sbill-hero.is-clear { border-color: rgba(224, 164, 74, .4); }
.sbill-hero__main { display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.sbill-hero__label { font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
  font-weight: 700; color: var(--color-text-muted); }
.sbill-hero__amt { font-family: var(--font-display); font-size: 44px; line-height: 1;
  font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }
.sbill-hero.is-owing .sbill-hero__amt { color: #e57a6c; }
.sbill-hero__chip { margin-top: 2px; }
.sbill-hero__side { flex: 1 1 260px; min-width: 220px; }
.sbill-bar { height: 10px; border-radius: 99px; overflow: hidden;
  background: var(--color-bg); border: 1px solid var(--color-border); }
.sbill-bar > span { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-strong));
  transition: width .5s ease; }
.sbill-hero__cap { margin-top: 8px; font-size: 13px; color: var(--color-text-muted); }
.sbill-hero__cap strong { color: var(--color-text); font-variant-numeric: tabular-nums; }

.sbill-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 6px; }
.sbill-tile { padding: 14px 16px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-surface);
  display: flex; flex-direction: column; gap: 5px; }
.sbill-tile__l { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase;
  font-weight: 700; color: var(--color-text-muted); }
.sbill-tile__v { font-size: 22px; font-weight: 700; color: var(--color-text);
  font-variant-numeric: tabular-nums; }
.sbill-tile.is-paid .sbill-tile__v { color: #9fdca2; }
.sbill-tile.is-disc .sbill-tile__v { color: var(--color-primary-strong); }

.sbill-courses { display: grid; gap: 12px; }
.sbill-course { padding: 16px 18px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-surface); }
.sbill-course__top { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sbill-course__name { font-size: 17px; margin: 0 0 3px; }
.sbill-course__meta { margin: 0; font-size: 13px; color: var(--color-text-muted); }
.sbill-model { color: var(--color-primary-strong); font-weight: 600; }
.sbill-course__none { margin: 0; font-size: 13.5px; }
.sbill-line { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.sbill-line > div { flex: 1 1 110px; padding: 9px 12px; border-radius: 9px;
  background: var(--color-bg); border: 1px solid var(--color-border); }
.sbill-line dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--color-text-muted); font-weight: 700; margin-bottom: 3px; }
.sbill-line dd { margin: 0; font-size: 17px; font-weight: 700; color: var(--color-text);
  font-variant-numeric: tabular-nums; }
.sbill-line dd.is-paid { color: #9fdca2; }
.sbill-line dd.is-disc { color: var(--color-primary-strong); }
.sbill-line dd.is-owing { color: #e57a6c; }
.sbill-line dd.is-clear { color: var(--color-text-muted); }

.sbill-amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.sbill-empty { text-align: center; padding: 32px 16px; color: var(--color-text-muted); }
.sbill-empty svg { width: 40px; height: 40px; opacity: .45; margin-bottom: 10px; }
.sbill-empty p { margin: 0 0 4px; }

@media (max-width: 620px) {
  .sbill-hero { padding: 18px; }
  .sbill-hero__amt { font-size: 36px; }
  .sbill-line > div { flex: 1 1 calc(50% - 5px); }
}

.testimonial__photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
  border: 2px solid var(--color-primary);
  background: var(--color-bg-alt);
}

.shopcta {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 26px;
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.shopcta::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.shopcta:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}
.shopcta:hover::before { opacity: 1; }
.shopcta:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-color: var(--color-primary);
}

.shopcta__photo {
  flex: none;
  display: block;
  width: 92px; height: 92px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.shopcta__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.shopcta__body { display: block; min-width: 0; }

.shopcta__title {
  display: block;
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.3;
  margin-bottom: 5px;
}
.shopcta__text {
  display: block;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 52ch;
}

.shopcta__btn {
  flex: none;
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  white-space: nowrap;
}
.shopcta:hover .shopcta__btn { transform: translateY(-2px); }

[dir="rtl"] .shopcta__btn svg { transform: scaleX(-1); }
[dir="rtl"] .shopcta:hover .shopcta__btn { transform: translateX(-3px); }

@media (max-width: 720px) {
  .shopcta { flex-wrap: wrap; gap: 16px; padding: 20px; }
  .shopcta__body { flex: 1 1 100%; order: 3; }
  .shopcta__btn  { flex: 1 1 100%; order: 4; justify-content: center; margin-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .shopcta, .shopcta__btn { transition: none; }
  .shopcta:hover, .shopcta:hover .shopcta__btn { transform: none; }
}

.shopperks {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 34px;
  margin: 18px 0 0;
  padding: 0 4px;
  list-style: none;
}
.shopperks li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: var(--color-text-muted);
}
.shopperks svg { color: var(--color-primary); flex: none; }

@media (max-width: 560px) {
  .shopperks { gap: 12px 20px; }
  .shopperks li { font-size: 13.5px; }
}

.product-card.is-hidden { display: none; }
.store-more { margin-top: 34px; text-align: center; }

/* Per-course CTA pair: "Book a Trial Lesson" plus the instrument-specific
   WhatsApp enquiry. Wraps on narrow screens instead of overflowing. */
.course__cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.course__cta .btn { flex: 0 1 auto; }
@media (max-width: 480px) {
  .course__cta { flex-direction: column; align-items: stretch; }
}

/* ---------------------------------------------------------------------------
   Sticky "Book a free trial" bar — every PHONE and TABLET, any orientation.
   Shown on narrow screens AND on any touch-only device, so a phone turned
   sideways or a large tablet still gets it.
   Always visible: an earlier "appear after scrolling" version never showed on
   short pages, which read as the bar being missing.
   Anchored with svh like .music-toggle, so iOS Safari's bottom toolbar
   cannot cover it.
   ------------------------------------------------------------------------- */
.bookbar { display: none; }

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .bookbar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 110;                 /* under the navbar menu (100+) & music (120) */
    display: flex;
    gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
    justify-content: center;
  }

  .bookbar__book {
    flex: 1;
    max-width: 560px;           /* tablets: don't stretch edge to edge */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    color: var(--color-on-primary);
    background: linear-gradient(135deg, var(--color-primary-strong), var(--color-primary));
    box-shadow: 0 6px 20px rgba(224, 164, 74, .25);
    text-decoration: none;
    min-width: 0;
  }
  .bookbar__book span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bookbar__call {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 50%;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    background: var(--color-surface);
  }

  /* Room at the end of the page so the bar never hides the footer. */
  body.has-bookbar { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }

  /* Music button rides above the bar while it is showing. */
  html.bookbar-on .music-toggle { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  /* Pinned with bottom:0, NOT the svh "top" trick .music-toggle uses.
     top: calc(100svh - ...) pushed both the bar and the music button below
     the visible screen in desktop Chrome's device mode (svh resolved larger
     than the emulated viewport). bottom:0 is what every browser handles the
     same way, and iOS Safari 15+ keeps bottom-fixed bars above its toolbar.
     The safe-area padding covers the iPhone home indicator. */
  .bookbar { top: auto; bottom: 0; }
  html.bookbar-on .music-toggle {
    top: auto;
    bottom: calc(69px + 18px + env(safe-area-inset-bottom, 0px));
  }
}

/* ===========================================================================
   Courses page — "What you will learn" + pricing (design from the mockup).
   The hero banner and the pricing panel are dark in BOTH themes, like the
   mockup; the learn cards follow the theme. Markup: courses.php, helpers:
   learn_icon / price_parts / price_plan in api/lib.php.
   ========================================================================= */
.learn { display: grid; gap: 16px; }

.learn__hero {
  position: relative;
  padding: 34px 32px 30px;
  border-radius: var(--radius);
  overflow: hidden;
  color: #f6efe2;
  background:
    linear-gradient(100deg, rgba(10, 7, 4, .96) 0%, rgba(10, 7, 4, .86) 45%, rgba(10, 7, 4, .45) 100%),
    var(--learn-bg, none) center / cover no-repeat,
    #120d08;
}
.learn__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #e9dcc4;
}
.learn__eyebrow::after { content: "\203A"; font-size: 15px; letter-spacing: 0; opacity: .8; }
html[dir="rtl"] .learn__eyebrow::after { content: "\2039"; }
.learn__title {
  white-space: pre-line;        /* a line break typed in the admin starts a new line */
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.2;
  color: #fff8ec;
}
.learn__rule {
  display: block;
  width: 44px; height: 2px;
  margin: 16px 0 14px;
  border-radius: 2px;
  background: var(--color-primary);
}
.learn__sub { max-width: 420px; font-size: 15px; color: #d8ccb6; }

.learn__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.learn-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
/* Information, not buttons: no arrow, no click, no hover lift. */
.learn-card__icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  color: var(--color-primary);
  background: rgba(224, 164, 74, .12);
  border: 1px solid rgba(224, 164, 74, .3);
}
.learn-card__text {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.35;
}

/* Last item on its own row: photo on the far side, like "Recitals & Exams". */
.learn-card--wide {
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr) 38%;
  padding-block: 0;
  padding-inline-end: 0;
  min-height: 0;
}
.learn-card--wide .learn-card__icon,
.learn-card--wide .learn-card__text { margin-block: 16px; }
.learn-card__photo {
  align-self: stretch;
  width: 100%;
  height: 120px;              /* fixed, or the photo's own size stretches the row */
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28%);
          mask-image: linear-gradient(to right, transparent 0, #000 28%);
}
html[dir="rtl"] .learn-card__photo {
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28%);
          mask-image: linear-gradient(to left, transparent 0, #000 28%);
}

/* ---- Pricing panel ---- */
.plans {
  margin-top: 36px;             /* clear gap after "What you will learn" */
  padding: 30px 26px 28px;
  border-radius: var(--radius);
  color: #f6efe2;
  background:
    linear-gradient(180deg, rgba(10, 7, 4, .93), rgba(10, 7, 4, .97)),
    var(--plans-bg, none) center / cover no-repeat,
    #0b0805;
  border: 1px solid rgba(224, 164, 74, .14);
}
.plans__title {
  margin: 10px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  color: #fff8ec;
}
.plans__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 14px;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 18px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .14);
}
.plan--featured {
  border-color: #e0a44a;
  background: linear-gradient(180deg, rgba(224, 164, 74, .14), rgba(224, 164, 74, .04));
  box-shadow: 0 0 0 1px rgba(224, 164, 74, .35), 0 12px 32px rgba(224, 164, 74, .12);
}
.plan__badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  color: #1a1206;
  background: linear-gradient(135deg, #f0c070, #c98d2e);
}
.plan__head { display: flex; align-items: center; gap: 10px; }
.plan__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: #e9dcc4;
  border: 1px solid rgba(255, 255, 255, .28);
}
.plan--featured .plan__icon { color: #f0c070; border-color: rgba(240, 192, 112, .5); }
.plan__name { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: #fff8ec; }
.plan__price {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: #fff8ec;
  font-variant-numeric: tabular-nums;
}
.plan__price--free { color: #f0c070; }
.plan__sub { margin-top: 6px; font-size: 13px; color: #b9ad97; }
.plan__list {
  list-style: none;
  display: grid;
  gap: 7px;
  margin: 16px 0 18px;
  font-size: 13.5px;
  color: #e9dcc4;
}
.plan__list li { position: relative; padding-inline-start: 22px; }
.plan__list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: .38em;
  width: 10px; height: 5px;
  border-left: 2px solid #e0a44a;
  border-bottom: 2px solid #e0a44a;
  transform: rotate(-45deg);
}
.plan__btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff8ec;
  border: 1px solid rgba(255, 255, 255, .5);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.plan__btn:hover { border-color: #e0a44a; color: #f0c070; }
.plan--featured .plan__btn {
  color: #1a1206;
  border-color: transparent;
  background: linear-gradient(135deg, #f0c070, #c98d2e);
}
.plan--featured .plan__btn:hover { color: #1a1206; filter: brightness(1.06); }
.plan__btn svg { display: none; }
.plan--featured .plan__btn svg { display: block; }
html[dir="rtl"] .plan__btn svg { transform: scaleX(-1); }

/* Phones (and the narrow column beside the course rail). */
@media (max-width: 640px) {
  .learn__hero { padding: 24px 20px 22px; }
  .learn__grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .learn-card { min-height: 0; padding: 14px; gap: 12px; }
  .learn-card__icon { width: 40px; height: 40px; }
  .learn-card__text { font-size: 15px; }
  /* Wide card: the photo becomes a strip on top instead of a side panel. */
  .learn-card--wide {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0 14px;
  }
  .learn-card__photo {
    grid-row: 1;
    grid-column: 1 / -1;
    margin-inline: -14px;
    width: calc(100% + 28px);
    max-width: none;          /* the global img { max-width:100% } cut the bleed short */
    height: 110px;
    min-height: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
            mask-image: linear-gradient(to bottom, #000 55%, transparent);
  }
  html[dir="rtl"] .learn-card__photo {
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
            mask-image: linear-gradient(to bottom, #000 55%, transparent);
  }
  .learn-card--wide .learn-card__icon,
  .learn-card--wide .learn-card__text { grid-row: 2; margin-block: 2px 14px; }
  .plans { margin-top: 24px; padding: 24px 16px 20px; }
  .plans__grid { gap: 18px; }
}

/* ===========================================================================
   Course header (photo + intro), from the mockup.
   ========================================================================= */
.course__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px; }

/* Landscape photo at every size. The <img> carries height="733"; with only a
   width in CSS that attribute won and made a 733px-tall strip. */
.course__media img { height: auto; aspect-ratio: 3 / 2; }

.course__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.course__eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

/* Four facts as icon columns with thin dividers, instead of a stacked list.
   Scoped with --cols: the lesson-option panels reuse .course__facts. */
.course__facts--cols {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 24px 0 26px;
  padding-block: 4px;
}
.course__facts--cols li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-inline: 16px;
  border-inline-start: 1px solid var(--color-border);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.course__facts--cols li:first-child { padding-inline-start: 0; border-inline-start: 0; }
.course__facts--cols svg { color: var(--color-primary); margin-bottom: 6px; }
.course__facts--cols strong {
  width: auto;
  padding: 0;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--color-text);
}

.course__book { gap: 8px; }
html[dir="rtl"] .course__book svg { transform: scaleX(-1); }

/* Tablets: the two columns get tight, so stack photo over text. */
@media (max-width: 900px) {
  .course__top { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* Phones: the four facts become a 2 x 2 grid. */
@media (max-width: 640px) {
  .course__media img { aspect-ratio: 16 / 9; }
  .course__facts--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .course__facts--cols li { padding-inline: 12px; }
  .course__facts--cols li:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
}

/* ---------------------------------------------------------------------------
   Course header — clean bottom edge + breathing room before "What you will
   learn" (option A). The text column was taller than the photo, so the Book /
   Ask buttons hung below the photo and read as the start of the next section.
   ------------------------------------------------------------------------- */
.course__top { margin-bottom: 76px; }

/* Desktop: the photo fills the full height of the text column, so photo and
   buttons end on the same line. Tablets/phones keep their own photo shapes. */
@media (min-width: 901px) {
  .course__top { align-items: stretch; }
  .course__media { display: flex; }
  .course__media img {
    height: 100%;
    min-height: 320px;
    aspect-ratio: auto;
  }
}
@media (max-width: 640px) {
  .course__top { margin-bottom: 48px; }
}

/* "What you will learn" banner: its own background instead of repeating the
   course photo right under the header — dark gradient + soft gold glow, and a
   music staff on the right whose notes scroll slowly along the lines
   (markup: music_staff_svg() in api/lib.php). */
.learn__hero {
  background:
    radial-gradient(ellipse 60% 120% at 88% 50%, rgba(224, 164, 74, .16), transparent 70%),
    linear-gradient(100deg, #0d0906 0%, #140e08 55%, #1d140a 100%);
  border: 1px solid rgba(224, 164, 74, .14);
}
.learn__hero > * { position: relative; z-index: 1; }

.learn__hero > .learn__staff {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 0;
  width: 58%;
  height: 168px;
  transform: translateY(-50%);
  pointer-events: none;
  overflow: hidden;
  /* fade in from the text side, fade out at the far edge */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%, #000 82%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 30%, #000 82%, transparent 100%);
}
.learn__staff-lines line { stroke: rgba(240, 192, 112, .16); stroke-width: 1; }
.learn__notes {
  color: rgba(240, 192, 112, .62);
  fill: currentColor;
  animation: staff-scroll 34s linear infinite;
}
/* One pattern width (900px, see music_staff_svg): the second copy slides into
   exactly the place the first started, so the loop has no visible jump. */
@keyframes staff-scroll {
  from { transform: translateX(0); }
  /* one passage width, set per staff by music_staff_svg() */
  to   { transform: translateX(var(--staff-w, -900px)); }
}

/* Real notation (Für Elise) — glyphs from the Noto Music font. */
.learn__glyph {
  font-family: "Noto Music", "Segoe UI Symbol", "Apple Symbols", serif;
  fill: currentColor;
}
.learn__timesig {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  text-anchor: middle;
  fill: currentColor;
}
.learn__stem, .learn__ledger, .learn__barline { stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.learn__barline { stroke-width: 1.3; opacity: .75; }
.learn__flag { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.learn__beam { stroke: currentColor; stroke-width: 3.6; }

html[dir="rtl"] .learn__hero > .learn__staff {
  right: auto;
  left: 0;
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 30%, #000 82%, transparent 100%);
          mask-image: linear-gradient(to left, transparent 0, #000 30%, #000 82%, transparent 100%);
}
html[dir="rtl"] .learn__hero {
  background:
    radial-gradient(ellipse 60% 120% at 12% 50%, rgba(224, 164, 74, .16), transparent 70%),
    linear-gradient(-100deg, #0d0906 0%, #140e08 55%, #1d140a 100%);
}

/* Phones: the text takes the full width, so the staff moves under it. */
@media (max-width: 640px) {
  .learn__hero { padding-bottom: 150px; }
  .learn__hero > .learn__staff {
    top: auto;
    bottom: 0;
    width: 100%;
    transform: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18%, #000 82%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 18%, #000 82%, transparent 100%);
  }
}

/* Respect "reduce motion": the notes stay put. */
@media (prefers-reduced-motion: reduce) {
  .learn__notes { animation: none; }
}

/* ---- Pricing: lesson-length buttons at the top of each card ----
   Only on cards the admin gave lengths to (Courses -> Pricing -> "Prices by
   lesson length"). One length = a plain label; 2+ = buttons that switch the
   card's price (js/main.js). */
.plan__lengths {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
}
.plan--featured .plan__lengths { margin-top: 6px; }   /* clear the badge */
.plan__len {
  flex: 1 1 0;
  min-width: 0;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  color: #e9dcc4;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.plan__len:hover { color: #fff8ec; background: rgba(255, 255, 255, .07); }
.plan__len[aria-pressed="true"] {
  color: #1a1206;
  background: linear-gradient(135deg, #f0c070, #c98d2e);
}
.plan__len:focus-visible { outline: 2px solid #f0c070; outline-offset: 2px; }
/* One-line description under the plan name (from the old Lesson Options). */
.plan__desc {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #b9ad97;
}
/* A single length is information, not a choice. */
.plan__lengths--one { align-self: flex-start; }
.plan__lengths--one .plan__len { flex: none; padding: 0 14px; cursor: default; }
