/* Deen Skills. One stylesheet for the whole site.
   Spacing sits on a 4px grid. Chrome is green and neutral. The six brand
   colours appear only in the logo, the footer strip, subject tags and steps. */

@font-face { font-family: Inter; src: url('/assets/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url('/assets/fonts/inter-tight.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --green: #154734;
  --green-hover: #1d5c44;
  --gold: #ffc631;
  --pink: #ee3380;
  --purple: #67308c;
  --teal: #16a399;
  --cyan: #4fc9f5;
  --lime: #8fc33f;

  --bg: #fff;
  --surface: #f5f8f6;
  --text: #15211b;
  --text-2: #48564f;
  --text-3: #66726b;
  --line: rgba(21, 33, 27, .1);
  --line-strong: rgba(21, 33, 27, .2);
  --error: #b42318;

  --display: 'Inter Tight', Inter, system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --fast: 150ms;
  --medium: 220ms;
  --slow: 480ms;

  --gutter: clamp(20px, 4vw, 48px);
  --wrap: 1248px;
  --header: 72px;
  --section: clamp(64px, 8vw, 112px);
  --radius-s: 8px;
  --radius-m: 10px;
  --radius-l: 12px;
  --radius-xl: 16px;
  color-scheme: light;
}

/* Subject colours: a bright dot, a readable ink and a pale tint. */
.subject-teal, .tag-teal { --subject: var(--teal); --subject-ink: #096f68; --subject-tint: #e3f3f2; }
.subject-pink, .tag-pink { --subject: var(--pink); --subject-ink: #b51959; --subject-tint: #fdeaf1; }
.subject-cyan, .tag-cyan { --subject: var(--cyan); --subject-ink: #126b89; --subject-tint: #e6f6fd; }
.subject-purple, .tag-purple { --subject: var(--purple); --subject-ink: #67308c; --subject-tint: #efe8f3; }

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header) + 24px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body); overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.4vw, 68px); line-height: 1.04; letter-spacing: -.03em; }
h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; letter-spacing: -.025em; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -.01em; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { padding: 0; border: 0; background: none; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold); color: var(--green); }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section-flush { padding-top: 0; }
.section-tint { background: var(--surface); }
.skip { position: absolute; left: 16px; top: -64px; z-index: 100; padding: 12px 16px; border-radius: var(--radius-s); background: var(--green); color: #fff; }
.skip:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { flex: none; width: 16px; height: 16px; }
.lead { margin-top: 20px; max-width: 36rem; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; color: var(--text-2); }
.note { font-size: 14px; color: var(--text-3); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--radius-m);
  background: var(--green); color: #fff; font: 500 16px/1 var(--body); white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn .icon, .link .icon { transition: transform var(--medium) var(--ease); }
.btn:active { transform: scale(.98); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-quiet { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-light { background: #fff; color: var(--green); }
.btn[disabled] { opacity: .6; cursor: progress; }

.link {
  display: inline-flex; align-items: center; gap: 8px; padding-bottom: 4px;
  font-weight: 500; color: var(--text); border-bottom: 1px solid var(--line-strong);
  transition: border-color var(--fast) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--green-hover); }
  .btn-quiet:hover { background: var(--surface); }
  .btn-light:hover { background: #e9f1ed; }
  .btn:hover .icon, .link:hover .icon { transform: translateX(3px); }
  .link:hover { border-color: currentColor; }
}

/* ---------- Header ---------- */

.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); view-transition-name: site-header; }
.header-inner { display: flex; align-items: center; gap: 32px; height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--green); font: 700 15px/1.05 var(--display); }
.nav { display: flex; gap: 28px; font-size: 15px; color: var(--text-2); }
.nav a { position: relative; padding: 8px 0; transition: color var(--fast) var(--ease); }
.nav a::after { content: ""; position: absolute; inset: auto 0 2px; height: 1.5px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform var(--medium) var(--ease); }
.nav a[aria-current] { color: var(--text); }
.nav a[aria-current]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--text); }
  .nav a:hover::after { transform: scaleX(1); }
}

.menu-toggle { display: none; position: relative; width: 44px; height: 44px; margin-right: -12px; }
.menu-toggle span { position: absolute; left: 12px; width: 20px; height: 1.5px; border-radius: 1px; background: var(--text); transition: transform var(--medium) var(--ease); }
.menu-toggle span:first-child { top: 18px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-nav {
  display: none; position: absolute; inset: 100% 0 auto; flex-direction: column;
  padding: 8px var(--gutter) 24px; background: var(--bg); border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(-4px);
  transition: opacity var(--medium) var(--ease), transform var(--medium) var(--ease), display var(--medium) allow-discrete;
}
.mobile-nav a { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); font: 500 18px/1.2 var(--display); }
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a[aria-current] { color: var(--green); }

/* ---------- Home hero ----------
   A centred headline over a coverflow of course covers. site.js places the
   slides; without it the covers sit in a row that scrolls sideways. */

.hero { padding-top: clamp(40px, 7svh, 72px); padding-bottom: clamp(40px, 6vw, 72px); text-align: center; overflow-x: clip; }
.hero-copy { max-width: 760px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 80px); letter-spacing: -.035em; }
.hero .lead { max-width: 34rem; margin: 24px auto 0; color: var(--text); }
.hero-meta { margin-top: 12px; font-size: 15px; line-height: 24px; color: var(--text-3); }
.hero .actions { justify-content: center; margin-top: 8px; }
.mark { background: linear-gradient(transparent 64%, var(--gold) 64%, var(--gold) 92%, transparent 92%) no-repeat left / 100% 100%; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.coverflow { --slide: clamp(176px, 23vw, 300px); position: relative; margin-top: clamp(24px, 4vw, 48px); text-align: left; }
.coverflow-track { display: flex; gap: 16px; padding: 24px var(--gutter, 20px) 32px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.coverflow-slide { flex: none; width: var(--slide); scroll-snap-align: center; }
.coverflow-slide .cover { border-radius: var(--radius-m, 12px); box-shadow: 0 12px 32px rgba(21, 33, 27, .16); }
.coverflow.is-ready { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.coverflow.is-ready .coverflow-track { display: block; position: relative; height: calc(var(--slide) + 56px); padding: 0; overflow: hidden; perspective: 1200px; pointer-events: none; user-select: none; }
.coverflow.is-ready .coverflow-slide { position: absolute; top: 24px; left: 0; right: 0; margin-inline: auto; transition: transform var(--slow) var(--ease), opacity var(--slow) var(--ease); will-change: transform; }
.coverflow-slide.is-wrapping { transition: none; }
.coverflow-toggle { display: none; }
.coverflow.is-ready .coverflow-toggle { display: grid; place-items: center; position: absolute; right: max(20px, 14%); bottom: 0; z-index: 200; width: 44px; height: 44px; border-radius: 50%; color: var(--text-3); transition: color var(--fast) var(--ease); }
.coverflow-toggle svg { width: 16px; height: 16px; }
.coverflow-toggle .icon-play, .coverflow-toggle[aria-pressed="true"] .icon-pause { display: none; }
.coverflow-toggle[aria-pressed="true"] .icon-play { display: block; }
@media (hover: hover) and (pointer: fine) { .coverflow-toggle:hover { color: var(--green); } }

/* ---------- Course covers and cards ---------- */

.cover { display: block; position: relative; isolation: isolate; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-l); background: #182027; color: #fff; container-type: inline-size; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% center; transition: transform 600ms var(--ease); }
.cover::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(4, 9, 15, 0) 44%, rgba(4, 9, 15, .8) 100%); }
.cover-title { position: absolute; z-index: 2; left: 7%; right: 5%; bottom: 7%; font: 600 13cqw/1 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.cover-title-small { font-size: 11.6cqw; }
.cover-go { position: absolute; z-index: 2; top: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-s); background: #fff; color: var(--green); opacity: 0; transform: translate(-4px, 4px); transition: opacity var(--medium) var(--ease), transform var(--medium) var(--ease); }

.course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 24px; }
.card-link { display: block; }
.card .cover { margin-bottom: 16px; }
.card h3 { margin-top: 8px; font-size: 18px; transition: color var(--fast) var(--ease); }
.meta { display: block; margin-top: 8px; font-size: 14px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; line-height: 20px; color: var(--text-2); }
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--subject); }
@media (hover: hover) and (pointer: fine) {
  .card-link:hover .cover img { transform: scale(1.03); }
  .card-link:hover h3 { color: var(--green); }
  .card-link:hover .cover-go { opacity: 1; transform: none; }
}
.card-link:focus-visible .cover-go { opacity: 1; transform: none; }

/* ---------- Home: how it works ----------
   Three colour panels, each with a flat illustration of its step. The
   pieces settle into place when the panel scrolls in, then drift a little as
   the page scrolls. */

.how { background: var(--surface); }
.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.how-card { --shift: calc((2 - var(--i)) * 40px); margin-top: var(--shift); overflow: hidden; border-radius: var(--radius-xl); background: var(--panel); color: var(--ink); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease), translate var(--medium) var(--ease); transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0ms; }
.how-1 { --panel: var(--gold); --ink: var(--green); --a: var(--green); --b: var(--pink); --c: #fff; }
.how-2 { --panel: var(--green); --ink: #fff; --a: var(--cyan); --b: var(--gold); --c: var(--lime); }
.how-3 { --panel: var(--purple); --ink: #fff; --a: var(--pink); --b: var(--gold); --c: var(--cyan); }
.how-art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.how-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.shape { transform-box: fill-box; transform-origin: center; transition: transform 900ms var(--ease), opacity var(--slow) var(--ease); transition-delay: calc(var(--i, 0) * 90ms + var(--k, 0) * 110ms + 120ms); }
.shape-a { --k: 0; }
.shape-b { --k: 1; }
.shape-c { --k: 2; }
.how-no { position: absolute; left: 24px; top: 12px; z-index: 1; font: 600 clamp(88px, 10vw, 136px)/1 var(--display); letter-spacing: -.05em; color: var(--ink); }
.how-body { padding: 8px 24px 28px; }
.how-body h3 { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.02em; }
.how-body p { margin-top: 8px; max-width: 24rem; opacity: .86; }
.reveal .how-card:not(.is-in) .shape-a { transform: translateY(46px) scale(.7); opacity: 0; }
.reveal .how-card:not(.is-in) .shape-b { transform: translateY(-34px) rotate(-18deg) scale(.6); opacity: 0; }
.reveal .how-card:not(.is-in) .shape-c { transform: scale(.3); opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .how-card:hover { translate: 0 -6px; }
  .how-card:hover .shape-a { transform: translateY(-6px); }
  .how-card:hover .shape-b { transform: rotate(6deg) scale(1.08); }
  .how-card:hover .shape-c { transform: scale(1.12); }
  .how-card:hover .shape { transition-delay: 0ms; transition-duration: 600ms; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .how-art { animation: how-drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    .how-no { animation: how-rise linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }
}
@keyframes how-drift { from { background-position: 0 0; scale: 1.06; } to { scale: 1; } }
@keyframes how-rise { from { translate: 0 28px; } to { translate: 0 -12px; } }

/* Slow, small loops that keep the illustrations alive. They use translate, rotate
   and scale, so they add to the settle-in and hover transforms instead of replacing them. */
@media (prefers-reduced-motion: no-preference) {
  .how-1 .shape-a { animation: how-tilt 7s ease-in-out infinite alternate; }
  .how-1 .shape-b { animation: how-float 4s ease-in-out infinite alternate; }
  .how-1 .shape-c { animation: how-tilt 8s ease-in-out -3s infinite alternate-reverse; }
  .how-2 .shape-a { animation: how-float 5s ease-in-out infinite alternate; }
  .how-2 .shape-b { animation: how-pulse 2.8s ease-in-out infinite alternate; }
  .how-3 .shape-a { animation: how-float 6s ease-in-out infinite alternate; }
  .how-3 .person { animation: how-nod 3.2s ease-in-out infinite alternate; }
  .how-3 .person:nth-of-type(2) { animation-delay: -1.1s; }
  .how-3 .person:nth-of-type(3) { animation-delay: -2.2s; }
  .how-3 .person:nth-of-type(4) { animation-delay: -.6s; }
  .how-3 .live-dot { animation: how-blink 1.6s ease-in-out infinite alternate; }
}
@keyframes how-float { from { translate: 0 3px; } to { translate: 0 -5px; } }
@keyframes how-tilt { from { rotate: -2deg; } to { rotate: 2deg; } }
@keyframes how-pulse { from { scale: 1; } to { scale: 1.08; } }
@keyframes how-nod { from { translate: 0 0; } to { translate: 0 -3px; } }
@keyframes how-blink { from { opacity: 1; } to { opacity: .25; } }

.pitch-video { padding-bottom: var(--section); }
.pitch-video .wrap { max-width: calc(1040px + var(--gutter) * 2); }
.pitch-video h2 { margin-bottom: 24px; }
.pitch-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius-xl); background: var(--green); }

/* ---------- Courses page: bento grid of photo tiles ----------
   Photos are anchored near the top so a wide, short tile keeps the teacher's face. */

.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 270px; grid-auto-flow: dense; gap: 16px; }
.tile { position: relative; overflow: hidden; border-radius: var(--radius-xl); background: #182027; }
.tile[hidden] { display: none; }
.tile-big { grid-column: span 2; grid-row: span 2; }
.tile-wide { grid-column: span 2; }
.tile-left { grid-column: 1 / span 2; }
.tile-link { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; color: #fff; }
.tile-photo { position: absolute; inset: 0; }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%; transition: transform 600ms var(--ease); }
.tile-wide .tile-photo img { object-position: 50% var(--face, 14%); }
.tile-link[href$="/islamic-history"] .tile-photo img { --face: 0%; }
.tile-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 9, 15, 0) 42%, rgba(4, 9, 15, .86) 100%); }
.tile-tag { position: absolute; left: 16px; top: 16px; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: var(--text); }
.tile-text { position: relative; display: flex; flex-direction: column; gap: 6px; }
.tile h3 { font-size: 28px; line-height: 1.04; letter-spacing: -.03em; color: #fff; }
.tile-wide h3 { font-size: 36px; }
.tile-big h3 { font-size: 54px; }
.tile-by { font-size: 15px; color: #e6eee9; }
.tile-by b { font-weight: 600; color: #fff; }
.tile-link:focus-visible { outline-offset: -4px; outline-color: #fff; }
@media (hover: hover) and (pointer: fine) { .tile-link:hover .tile-photo img { transform: scale(1.04); } }

.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 40px; }

/* ---------- Steps on green ---------- */

.band { background: var(--green); color: #fff; padding-block: var(--section); }
.band :focus-visible, .register :focus-visible { outline-color: #fff; }
.register .form :focus-visible { outline-color: var(--green); }
.band-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 48px; }
.band .link { color: #fff; border-color: rgba(255, 255, 255, .4); }
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.steps li { margin-top: calc((var(--n) - var(--i) - 1) * 24px); padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .24); }
.step-no { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 20px; border-radius: var(--radius-s); background: var(--gold); color: var(--green); font: 600 15px/1 var(--display); }
.steps li:nth-child(2) .step-no { background: var(--cyan); }
.steps li:nth-child(3) .step-no { background: var(--lime); }
.steps li:nth-child(4) .step-no { background: #fff; }
.steps p { margin-top: 8px; max-width: 22rem; color: #d5e3db; }

/* ---------- Photo and copy ---------- */

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 7vw, 96px); align-items: center; }
.split-flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.split-flip .split-media { justify-self: end; }
.split-media, .intro-media { width: 100%; max-width: 480px; }
.photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-xl); background: var(--surface); }
.split-copy p { margin-block: 20px 28px; max-width: 34rem; font-size: 18px; color: var(--text-2); }

/* ---------- Questions ---------- */

.faq, .guide-grid, .form-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 6vw, 96px); align-items: start; }
.faq-head { display: grid; justify-items: start; gap: 20px; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; list-style: none; cursor: pointer; font: 500 18px/1.4 var(--display); transition: color var(--fast) var(--ease); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; flex: none; width: 16px; height: 16px; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; inset: 7px 0 auto; height: 1.5px; border-radius: 1px; background: currentColor; transition: transform var(--medium) var(--ease); }
.faq-icon::after { transform: rotate(90deg); }
.faq-list details[open] .faq-icon::after { transform: rotate(0deg); }
.faq-list p { max-width: 60ch; padding: 0 32px 24px 0; color: var(--text-2); }
.faq-list details[open] p { animation: rise 320ms var(--ease) both; }
.faq-list p a, .legal a { text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .faq-list summary:hover { color: var(--green); } }

/* ---------- Closing band and footer ---------- */

.closing { background: var(--surface); padding-block: clamp(48px, 6vw, 80px); }
.closing-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 32px; }

.site-footer { padding-top: 64px; border-top: 4px solid; border-image: linear-gradient(to right, var(--gold) 0 16.666%, var(--pink) 16.666% 33.333%, var(--purple) 33.333% 50%, var(--teal) 50% 66.666%, var(--cyan) 66.666% 83.333%, var(--lime) 83.333% 100%) 1; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 48px 64px; }
.footer-brand p { margin-top: 16px; font-size: 14px; color: var(--text-2); }
.footer-nav { display: grid; grid-template-columns: repeat(3, auto); gap: 32px 64px; }
.footer-nav h2 { margin-bottom: 12px; font: 500 14px/20px var(--body); letter-spacing: 0; color: var(--text-3); }
.footer-nav a { display: block; padding: 4px 0; font-size: 15px; transition: color var(--fast) var(--ease); }
.footer-legal { margin-top: 48px; padding-block: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
@media (hover: hover) and (pointer: fine) { .footer-nav a:hover { color: var(--green); } }

/* ---------- Page intros ---------- */

.intro { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(40px, 5vw, 64px); }
.intro h1 { max-width: 14em; }
.intro-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.intro-media { justify-self: end; }

/* ---------- Course catalogue ---------- */

.filters { display: flex; align-items: center; gap: 16px 24px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: var(--radius-s); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.chip[aria-pressed="true"] { background: var(--green); box-shadow: none; color: #fff; }
.filter-select { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.filter-select select { min-height: 36px; padding-block: 4px; font-size: 14px; }
.count { margin-left: auto; font-size: 14px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { display: grid; justify-items: start; gap: 16px; padding-block: 48px; color: var(--text-2); }
@media (hover: hover) and (pointer: fine) { .chip:not([aria-pressed="true"]):hover { background: var(--surface); color: var(--text); } }

/* ---------- Course page ---------- */

.course-hero { padding-block: clamp(32px, 4vw, 56px) clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.course-hero-inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.course-hero h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.06; }
.course-hero-media { justify-self: end; width: 100%; max-width: 440px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; font-size: 14px; color: var(--text-3); }
.crumbs a, .crumbs span { padding: 4px 0; }
.crumbs a { transition: color var(--fast) var(--ease); }
.hero-price { font-size: 15px; color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--text); } }

.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(40px, 6vw, 96px); align-items: start; padding-block: clamp(40px, 5vw, 64px) var(--section); }
.course-aside { grid-area: 1 / 2; position: sticky; top: calc(var(--header) + 24px); padding: 8px 24px 24px; border-radius: var(--radius-xl); background: var(--surface); }
.course-main { grid-area: 1 / 1; display: grid; gap: 56px; max-width: 680px; }
.facts > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 24px; }
.facts dt { color: var(--text-3); }
.facts dd { font-weight: 500; font-variant-numeric: tabular-nums; }
.course-aside .btn { width: 100%; margin-top: 24px; }

.block h2 { margin-bottom: 20px; font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -.02em; }
.block > p { font-size: 17px; line-height: 1.65; color: var(--text-2); }
.block > p + p { margin-top: 16px; }
.block > .outcome { margin-top: 24px; padding: 20px 24px; border-radius: var(--radius-l); background: var(--subject-tint); color: var(--text); }
.outcome span { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 500; line-height: 20px; color: var(--subject-ink); }

.lessons li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.lessons li:last-child { border-bottom: 1px solid var(--line); }
.lesson-no { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-s); background: var(--subject-tint); color: var(--subject-ink); font: 600 14px/1 var(--display); font-variant-numeric: tabular-nums; }
.lessons h3 { font-size: 17px; line-height: 24px; }
.lessons p { margin-top: 4px; font-size: 15px; line-height: 24px; color: var(--text-2); }

.checks li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.checks .icon { margin-top: 5px; color: var(--green); }

.teacher-photo { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; }
.teacher img { width: 96px; height: 96px; border-radius: var(--radius-xl); object-fit: cover; }
.teacher h3 + p, .teacher p + p { margin-top: 8px; }
.teacher p { color: var(--text-2); }
.teacher .teacher-role { margin-top: 4px; font-size: 14px; color: var(--text-3); }
.teacher .checks { margin-top: 12px; }

.register { background: var(--green); color: #fff; padding-block: clamp(56px, 7vw, 96px); }
.register-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.register-inner > div p { margin-top: 16px; max-width: 30rem; font-size: 18px; color: #d5e3db; font-variant-numeric: tabular-nums; }
.register-inner > .btn { justify-self: end; }
.register .form { padding: 24px; border-radius: var(--radius-xl); background: #fff; color: var(--text); }

/* ---------- Guide and teach ---------- */

.guide-section { padding-block: clamp(48px, 6vw, 88px); border-top: 1px solid var(--line); }
.prose p { max-width: 40rem; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; }
.prose p + p { margin-top: 20px; }
.prose .sources { font-size: 14px; line-height: 22px; color: var(--text-3); }
.prose .sources a { text-decoration: underline; text-underline-offset: 3px; }

/* Six examples, each a photo with its sentence, marked with the six blocks from the logo. */
.imagine-lead { margin-top: clamp(40px, 5vw, 64px); font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -.02em; }
.imagine { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; margin-top: 24px; }
.imagine img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-l); background: var(--surface); }
.imagine p { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; margin-top: 16px; font: 500 18px/1.45 var(--display); letter-spacing: -.01em; }
.imagine p::before { content: ""; width: 12px; height: 12px; margin-top: 7px; border-radius: 3px; background: var(--gold); }
.imagine li:nth-child(6n+2) p::before { background: var(--pink); }
.imagine li:nth-child(6n+3) p::before { background: var(--purple); }
.imagine li:nth-child(6n+4) p::before { background: var(--lime); }
.imagine li:nth-child(6n+5) p::before { background: var(--cyan); }
.imagine li:nth-child(6n+6) p::before { background: var(--teal); }
.imagine-close { position: relative; margin-top: clamp(48px, 6vw, 80px); padding-top: clamp(40px, 5vw, 64px); }
.imagine-close::before { content: ""; position: absolute; inset: 0 var(--gutter) auto; height: 1px; background: var(--line); }
.imagine-close h3 { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -.02em; }
.rows > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 8px 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.rows > div:first-child { padding-top: 0; border-top: 0; }
.rows > div:last-child { padding-bottom: 0; }
.rows dt { font: 600 19px/1.4 var(--display); letter-spacing: -.01em; }
.rows dd { font-size: 17px; color: var(--text-2); }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.roles > div { padding: 24px; border-radius: var(--radius-xl); background: var(--surface); }
.roles h3 { margin-bottom: 8px; }
.roles-note { margin-top: 24px; max-width: 40rem; }

/* Teacher pitch page: founder signature, the 60/40 split, semesters and topics. */
.prose .signature { margin-top: 32px; font-size: 15px; line-height: 24px; color: var(--text-3); }
.signature strong { display: block; font: 600 19px/1.4 var(--display); letter-spacing: -.01em; color: var(--text); }
.split-bar { display: grid; grid-template-columns: 6fr 4fr; margin-bottom: 40px; border-radius: var(--radius-xl); overflow: hidden; font-size: 15px; line-height: 20px; }
.split-bar span { display: grid; align-content: center; gap: 8px; min-height: 104px; padding: 16px 24px; }
.split-bar strong { font: 600 clamp(28px, 3vw, 36px)/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.split-you { background: var(--green); color: #fff; }
.split-us { background: var(--surface); color: var(--text-2); }
.split-us strong { color: var(--text); }
.semesters { display: grid; grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); gap: 16px; }
.semesters li { padding: 24px; border-radius: var(--radius-xl); background: var(--surface); }
.semesters h3 { font: 500 15px/24px var(--body); letter-spacing: 0; color: var(--text-2); }
.semester-dates { margin-top: 8px; font: 600 22px/1.25 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.semesters dl { margin-top: 20px; }
.semesters dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.semesters dl div:last-child { padding-bottom: 0; }
.semesters dt { color: var(--text-3); }
.semesters dd { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
/* Topics as a two-column table: an icon tile, then the topic. */
.topic-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; border-top: 1px solid var(--line); }
.topic-table li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font: 500 17px/1.35 var(--display); letter-spacing: -.01em; }
.topic-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-s); background: var(--surface); }
.topic-icon img { width: 28px; height: 28px; }
.form-grid > div > p { margin-top: 16px; max-width: 24rem; color: var(--text-2); }
.contact-aside { display: grid; gap: 16px; justify-items: start; }
.contact-aside p { margin: 0 !important; }

/* ---------- Forms ---------- */

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.field { display: grid; gap: 8px; align-content: start; font-size: 14px; font-weight: 500; line-height: 20px; }
.field-wide { grid-column: 1 / -1; }
.hint { margin-top: -4px; font-weight: 400; font-size: 13px; color: var(--text-3); }
.field input, .field textarea, select {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-m);
  background-color: #fff; font-size: 16px; font-weight: 400; line-height: 22px; color: var(--text);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.field textarea { min-height: 128px; resize: vertical; }
select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2348564f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.field input::placeholder { color: var(--text-3); }
.field input:focus-visible, .field textarea:focus-visible, select:focus-visible { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgba(21, 71, 52, .16); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { font-weight: 400; font-size: 13px; color: var(--error); }
.consent { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; font-size: 14px; line-height: 22px; color: var(--text-2); }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); }
.consent a, .form-status a, .note a { text-decoration: underline; text-underline-offset: 3px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.form-status { font-size: 14px; line-height: 22px; color: var(--text-2); }
.form-status:empty { display: none; }
.form-status[data-state="success"] { color: var(--green); font-weight: 500; animation: rise 320ms var(--ease) both; }
.form-status[data-state="error"] { color: var(--error); }
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (hover: hover) and (pointer: fine) { .field input:hover, .field textarea:hover, select:hover { border-color: rgba(21, 33, 27, .36); } }

/* ---------- Policies and 404 ---------- */

.legal-inner { max-width: calc(720px + var(--gutter) * 2); margin-inline: 0 auto; }
.legal h1 { font-size: clamp(36px, 4.4vw, 56px); }
.legal .note { margin-top: 20px; }
.legal section { margin-top: 40px; }
.legal h2 { margin-bottom: 8px; font-size: 22px; letter-spacing: -.01em; }
.legal section p { color: var(--text-2); }
.legal-inner > p:last-child { margin-top: 48px; }
.not-found { min-height: 60svh; }

/* ---------- Motion ----------
   One curve, three durations. Page intros rise once on load. Sections below
   the fold rise once as they enter. Everything is visible without JavaScript. */

@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes mark { from { background-size: 0 100%; } }
.rise { animation: rise var(--slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.mark { animation: mark 640ms var(--ease) 420ms both; }
[data-reveal] { transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.reveal [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(12px); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
  ::view-transition-group(*) { animation-duration: 360ms; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; }
  .mobile-nav.is-open { @starting-style { opacity: 0; transform: translateY(-4px); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
}

/* ---------- Narrower screens ---------- */

@media (max-width: 1100px) {
  .course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .course-grid-featured .card:nth-child(n+7), .course-grid-row .card:nth-child(n+4) { display: none; }
  .imagine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-layout { grid-template-columns: minmax(0, 1fr) 304px; }
}

@media (max-width: 767px) {
  :root { --header: 64px; }
  .nav, .header-cta { display: none; }
  .menu-toggle { display: block; }
  .mobile-nav.is-open { display: flex; opacity: 1; transform: none; }

  .hero { padding-top: 24px; }
  .hero h1 { font-size: clamp(40px, 10.8vw, 60px); }
  .coverflow { --slide: clamp(168px, 52vw, 240px); }
  .coverflow.is-ready { -webkit-mask-image: none; mask-image: none; }
  .coverflow.is-ready .coverflow-toggle { right: 8px; }

  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
  .course-grid-featured .card:nth-child(n+7), .course-grid-row .card:nth-child(n+4) { display: block; }
  .card h3 { font-size: 16px; }
  .card .cover { margin-bottom: 12px; }
  .cover-go { display: none; }
  .section-head, .band-head { margin-bottom: 32px; }

  .steps { grid-auto-flow: row; gap: 32px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 46vw; gap: 12px; }
  .tile-link { padding: 14px; }
  .tile-tag { left: 10px; top: 10px; padding: 5px 9px; font-size: 11px; }
  .tile h3 { font-size: 19px; }
  .tile-wide h3 { font-size: 24px; }
  .tile-big h3 { font-size: 34px; }
  .tile-by { font-size: 13px; }
  .how-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .how-card { --shift: 0px; }
  .how-art { aspect-ratio: 16 / 10; }
  .steps li { margin-top: 0; }

  .split, .split-flip, .intro-split, .faq, .guide-grid, .form-grid, .course-hero-inner, .register-inner, .course-layout { grid-template-columns: minmax(0, 1fr); }
  .split-flip .split-media { order: -1; justify-self: start; }
  .intro-media { justify-self: start; }
  .faq-list summary { font-size: 17px; }

  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; width: 100%; }

  .filters { flex-wrap: wrap; }
  .chips { flex-wrap: nowrap; width: calc(100% + var(--gutter) * 2); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { min-height: 40px; }
  .count { margin-left: 0; }

  .course-hero-media { justify-self: start; max-width: none; }
  .course-layout { gap: 48px; }
  .course-aside, .course-main { grid-area: auto; }
  .course-aside { position: static; }
  .course-main { gap: 48px; }
  .register-inner > .btn { justify-self: start; }

  .rows > div { grid-template-columns: minmax(0, 1fr); }
  .imagine { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .topic-table { grid-template-columns: minmax(0, 1fr); }
  .topic-table li { font-size: 16px; }
  .imagine p { font-size: 17px; }
  .roles { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .form { grid-template-columns: minmax(0, 1fr); }
  .actions .btn { width: 100%; }
  .closing .btn { width: 100%; }
}

@media (min-width: 768px) {
  .faq-head, .guide-grid > h2, .form-grid > div:first-child { position: sticky; top: calc(var(--header) + 32px); }
}
