/* Topic page: one layout for every lesson topic (beginner, chords, improvisation, songs, practice) */

/* Header */
.topic-hero{ background:var(--cream-deep); padding:56px 0 36px; }
.topic-grid{ display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:64px; align-items:center; padding:10px 0 20px; }
/* Heading text always starts at the same height, however long the note beside it is */
.topic-grid > div:first-child{ align-self:start; }
.topic-hero h1{ font-size:clamp(2.2rem, 4.4vw, 3.2rem); }
.topic-hero h1 .hand{ font-size:1.18em; line-height:1; padding-right:.1em; }
.topic-hero .lead{ max-width:34em; }

.hello{ position:relative; background:var(--paper); border-radius:var(--radius); box-shadow:var(--shadow); padding:28px 28px 24px; transform:rotate(1.5deg); }
.hello-top{ display:flex; align-items:center; gap:14px; margin-bottom:12px; }
.hello img{ width:68px; height:68px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.hello .hand{ font-size:1.8rem; line-height:1; display:block; }
.hello small{ color:var(--ink-soft); font-size:.82rem; }
.hello p{ font-size:.97rem; color:var(--ink-soft); margin:0; }
.hello .sig{ font-family:var(--hand); font-weight:700; color:var(--berry); font-size:1.5rem; margin-top:8px; }

/* Topic tabs: their own white bar under the header, so they read as navigation, not as part of the intro */
.topic-bar{ background:var(--paper); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.topic-nav{ display:flex; align-items:stretch; gap:30px; overflow-x:auto; scrollbar-width:none; }   /* one row; scrolls sideways when it doesn't fit */
.topic-nav::-webkit-scrollbar{ display:none; }
.topic-nav a{ display:flex; align-items:center; text-decoration:none; color:var(--ink-soft); font-weight:600; font-size:.95rem; white-space:nowrap; padding:18px 0 15px; border-bottom:3px solid transparent; transition:color .15s, border-color .15s; }
.topic-nav a:hover{ color:var(--ink); border-bottom-color:var(--line); }
.topic-nav a[aria-current="page"]{ color:var(--teal); border-bottom-color:var(--teal); }
.topic-nav .label{ align-self:center; font-size:.72rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--teal); margin-right:-6px; }

/* Start here: a few hand-picked lessons, the first one large (cards reuse .video from site.css) */
.head-left{ max-width:760px; margin-bottom:34px; }
.pick p{ margin:-6px 0 16px; font-size:.93rem; color:var(--ink-soft); }
.pick:hover h3{ color:var(--berry); }
.pick-top{ display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); margin-bottom:28px; }
.pick-top .thumb{ aspect-ratio:auto; }   /* fills the card's height; the image covers it */
.pick-top .video-body{ justify-content:center; padding:36px 40px; }
.pick-top h3{ font-size:1.55rem; line-height:1.25; margin-bottom:12px; }
.pick-top p{ margin:0 0 20px; font-size:1.02rem; }
.pick-top .includes{ margin-top:0; }
.picks{ display:grid; grid-template-columns:repeat(var(--n,4),minmax(0,1fr)); gap:24px; }   /* --n: number of small picks (max 4), set in topic.njk */


/* Free piano patterns */
.kit-panel{ display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:center; background:var(--teal-dark); color:#E6F1F0; border-radius:28px; padding:48px; }
.kit-panel h2{ color:#fff; }
.kit-panel .eyebrow{ color:var(--sun); }
.kit-panel .lead{ color:rgba(255,255,255,.88); }
.kit-panel .checks{ margin:0; }
.kit-panel .optin{ margin:0; max-width:none; border:0; color:var(--ink); }
/* Same gap below the kit panel as above it: one section padding, not the kit's bottom + the next section's top.
   Next to the white lessons band, split it so the band's edge sits halfway. */
.topic-kit + .section{ padding-top:0; }
.topic-kit:has(+ .lessons-all){ padding-bottom:48px; }
.topic-kit + .lessons-all{ padding-top:48px; }
@media (max-width: 900px){
  .topic-kit:has(+ .lessons-all){ padding-bottom:36px; }
  .topic-kit + .lessons-all{ padding-top:36px; }
}

/* All lessons with a filter */
.lessons-all{ background:var(--paper); }
.lessons-all .video{ background:var(--cream); }
.filter{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 30px; }
.filter button{ font:700 .88rem var(--sans); color:var(--ink); background:var(--paper); border:1.5px solid var(--line); border-radius:999px; padding:9px 18px; cursor:pointer; }
.filter button:hover{ border-color:var(--berry); color:var(--berry); }
.filter button[aria-pressed="true"]{ background:var(--ink); border-color:var(--ink); color:#fff; }
.filter button small{ font-weight:500; opacity:.7; margin-left:4px; }
.video[hidden]{ display:none; }

/* Course */
.course-band{ display:grid; grid-template-columns:.8fr 1.2fr; gap:56px; align-items:center; background:var(--paper); border:1px solid var(--line); border-radius:28px; padding:40px 48px; }
.course-band .img{ background:var(--cream-deep); border-radius:var(--radius); padding:20px; }
.course-band .level{ font-size:.72rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; padding:4px 10px; border-radius:999px; background:var(--berry-soft); color:var(--berry-deep); }
.course-band h2{ margin-top:14px; }
.course-band .checks li::before{ background-color:var(--teal); background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.course-band .row{ display:flex; flex-wrap:wrap; align-items:center; gap:14px 22px; }
.course-band .row small{ color:var(--ink-soft); font-size:.88rem; }

/* Where to go next */
.next{ background:var(--cream-deep); }
.next-grid{ display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:20px; }   /* one row, as many columns as tiles (topics without lessons are left out) */
.next-grid a{ display:flex; flex-direction:column; background:var(--paper); border:2px solid transparent; border-radius:var(--radius); padding:26px 24px; text-decoration:none; color:var(--ink); box-shadow:var(--shadow-sm); transition:transform .2s, border-color .2s; }
.next-grid a:hover{ transform:translateY(-4px); border-color:var(--teal-mid); color:var(--ink); }
.next-grid .ic{ width:52px; height:52px; border-radius:50%; background:var(--cream-deep); display:grid; place-items:center; font-size:1.5rem; margin-bottom:16px; }
.next-grid .when{ font-family:var(--hand); font-size:1.3rem; color:var(--berry); line-height:1.1; margin-bottom:6px; }
.next-grid h3{ font-size:1.2rem; margin-bottom:.3em; }
.next-grid p{ font-size:.92rem; color:var(--ink-soft); }
.next-grid .go{ margin-top:auto; font-weight:700; color:var(--berry); font-size:.9rem; }

@media (max-width: 1080px){
  .next-grid{ grid-auto-flow:row; grid-template-columns:repeat(2,1fr); }
  .picks{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px){
  .pick-top{ grid-template-columns:1fr; }
  .pick-top .thumb{ aspect-ratio:16/9; min-height:0; }
  .pick-top .video-body{ padding:24px 24px 26px; }
  .pick-top h3{ font-size:1.3rem; }
  .topic-grid, .kit-panel, .course-band{ grid-template-columns:1fr; gap:32px; }
  .hello{ max-width:460px; transform:none; }
  .kit-panel{ padding:36px 28px; }
  .course-band{ padding:32px 28px; }
  .course-band .img{ max-width:420px; }
}
@media (max-width: 560px){
  .topic-hero{ padding-top:36px; }
  .topic-nav{ gap:24px; }
  .topic-nav .label{ display:none; }
  .kit-panel{ padding:28px 18px; border-radius:22px; }
  .course-band{ padding:24px 18px; border-radius:22px; }
  .next-grid{ grid-template-columns:1fr; }
  .picks{ grid-template-columns:1fr; gap:20px; }
  .pick-top{ margin-bottom:20px; }
  .pick-top .video-body{ padding:20px 22px 22px; }
}

/* Phones: the long "every lesson" list becomes compact rows (small picture left, title right), so 80+ lessons
   are a few screens instead of forty. The hand-picked lessons above keep their big cards. */
@media (max-width: 560px){
  .hello{ display:none; }   /* the note repeats the intro; without it the topics start on the first screen */
  .topic-grid{ padding-bottom:8px; }
  .lessons-all .video-grid{ gap:12px; }
  .lessons-all .video{ flex-direction:row; align-items:center; gap:14px; padding:10px; border-radius:16px; }
  .lessons-all .thumb{ flex:0 0 44%; border-radius:10px; overflow:hidden; }
  .lessons-all .thumb .len{ right:6px; bottom:6px; font-size:.72rem; padding:2px 7px 2px 6px; }
  .lessons-all .video-body{ padding:2px 4px 2px 0; min-width:0; }
  .lessons-all .tag{ font-size:.68rem; margin-bottom:4px; }
  .lessons-all .video h3{ margin:0; font-size:1rem; line-height:1.3; }
  .lessons-all .includes{ display:none; }
  .filter{ margin-bottom:22px; }
  .filter button{ padding:11px 16px; }
  .head-left{ margin-bottom:26px; }
}
