/* The notebook page: the masterclass page's own grammar, shared by the home hub, the masterclass and the course page.
   Centred hero with a watermark drawing and one red-chalk ring; the examiner's mark sheet with drawn ticks; the offer
   leaves and cards; the free case with the examiner's question; the email form. Colours and fonts come from site.css. */
/* Hero: centred, with a drawing as a watermark behind it (Willis's brain on the masterclass). */
.hero { padding: 56px 0 40px; position: relative; }
.hero .container { min-height: 560px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.7rem, 5.8vw, 4.7rem); line-height: 1.02; letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; max-width: 12.5ch; }
/* The one authored moment: a red-chalk ring around the lesion. Drawn by default; animated only when motion is welcome. */
.circled { position: relative; display: inline-block; white-space: nowrap; margin: 0 .22em 0 .26em; }
.circled .ring { position: absolute; left: -14%; top: -10%; width: 128%; height: 126%; overflow: visible; pointer-events: none; }
.circled .ring path { fill: none; stroke: var(--chalk); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .9; }
.hero .sub { font-size: clamp(1.15rem, 2.3vw, 1.35rem); line-height: 1.5; color: var(--ink-soft); max-width: 36ch; margin-top: 24px; }
.hero .sub .nw, .hero .facts .nw { white-space: nowrap; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: center; margin-top: 32px; }
.hero .actions .btn { padding: 15px 30px; font-size: 1.1rem; }
.hero .actions a.link { font-size: 1.08rem; }
.hero .cred { font-family: var(--fell); font-style: italic; font-size: 1.08rem; color: var(--ink-soft); margin-top: 30px; white-space: nowrap; padding-top: 16px; border-top: 1px solid var(--rule); }
@media (max-width: 640px) { .hero .cred { white-space: normal; max-width: 40ch; } } /* one line wherever it fits; phones wrap */
/* The drawing sits centred behind the hero, like a watermark on the page. Pages set its width. */
.hero .bg-plate { --plate-opacity: .18; top: 50%; left: 50%; width: min(700px, 86%); transform: translate(-50%, -50%); }
.hero .bg-plate img { display: block; width: 100%; height: auto; }
/* A soft paper wash fades the engraving just behind the smaller hero text, so it always passes AA; invisible on plain paper. */
/* The hero's text block is one wrapper: centre every line inside it, not just the wrapper. */
.hero .container > div { display: flex; flex-direction: column; align-items: center; }
.hero .sub, .hero .actions, .hero .cred { position: relative; isolation: isolate; }
.hero .sub::before, .hero .actions::before, .hero .cred::before { content: ""; position: absolute; inset: -28px -64px; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(244, 237, 224, .85) 45%, rgba(244, 237, 224, 0)); }
.hero .actions::before { inset: -40px -96px; } /* the red link has the least contrast headroom */
@media (prefers-reduced-motion: no-preference) {
  .circled .ring path { stroke-dasharray: 1; animation: ring-draw 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.1s both; }
  @keyframes ring-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  /* The drawing fades in slowly, like ink coming through the paper. */
  .hero .bg-plate img { animation: ink-in 2.4s ease-out both; }
  @keyframes ink-in { from { opacity: 0; } to { opacity: 1; } }
  .hero .reveal { animation: rise .9s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* Outcomes: Cajal's neurons beside an examiner's mark sheet, each line ticked in the same red chalk. */
/* Cajal's neurons rise from the bottom left of the outcomes. */
.outcomes .bg-plate { bottom: -72px; left: -150px; width: min(380px, 36%); }
.outcomes .bg-plate img, .free-wrap .bg-plate img { display: block; width: 100%; height: auto; }
/* Everything on the page is centred: headings and blocks centre; lists and paragraphs keep a left edge inside their block. */
main .section-title { text-align: center; }
main .section-sub { margin-left: auto; margin-right: auto; text-align: center; }
.outcomes { display: flex; flex-direction: column; align-items: center; }
.marks { list-style: none; display: grid; gap: 26px; margin-top: 30px; }
.marks li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 16px; align-items: start; font-family: var(--serif); font-weight: 400; font-size: clamp(1.35rem, 2.4vw, 1.65rem); line-height: 1.3; letter-spacing: -0.012em; color: var(--ink); text-wrap: pretty; }
.marks svg { width: 42px; height: 34px; margin-top: -1px; overflow: visible; }
.marks path { fill: none; stroke: var(--chalk); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .marks.armed path { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .marks.armed.inview path { animation: ring-draw .55s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s) both; }
}

/* The offer: what you get, the guarantee, the price anchor, then the dates */
.stack { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.stack li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 2px 12px; align-content: start; padding: 18px 20px; background: var(--paper-light); border: 1px solid var(--rule); border-radius: 3px; }
.stack svg { width: 22px; height: 22px; color: var(--chalk); grid-row: span 2; margin-top: 3px; }
.stack strong { color: var(--ink); font-size: 1.08rem; font-weight: 600; }
.stack span { color: var(--ink-soft); }
.anchor { font-family: var(--fell); font-style: italic; font-size: clamp(1.25rem, 2.6vw, 1.5rem); line-height: 1.4; color: var(--ink); margin: 6px auto 28px; max-width: 52ch; text-wrap: balance; text-align: center; }
.anchor strong { font-family: var(--serif); font-style: normal; font-weight: 600; color: var(--chalk); }

/* Dates */
.dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.date-card { display: flex; flex-direction: column; gap: 2px; padding: 28px; box-shadow: 0 12px 24px -20px rgba(43, 33, 25, .35); }
.date-card .day { font-family: var(--serif); font-weight: 400; font-size: 2.3rem; line-height: 1.05; letter-spacing: -0.025em; color: var(--ink); }
.date-card .when { margin-top: 8px; font-weight: 600; }
.date-card .local { color: var(--ink-soft); font-size: .98rem; }
.date-card .row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
.date-card .price { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); font-variant-numeric: lining-nums; }
.date-card .price small { font-family: var(--fell); font-style: italic; font-size: .95rem; color: var(--ink-soft); margin-left: 8px; white-space: nowrap; }
.date-card .places { font-family: var(--fell); font-style: italic; color: var(--chalk); font-size: 1.02rem; }
.date-card .places.low { color: var(--low-stock); }
.date-card .places.full { color: var(--ink-soft); }
/* The scarcity countdown: shown once more than 75 of the 99 places are taken. */
.date-card .places.count { color: var(--danger); background: var(--danger-bg); padding: 2px 9px; border-radius: 2px; font-family: var(--serif); font-style: normal; font-weight: 600; font-size: .98rem; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.date-card .btn { margin-top: 16px; width: 100%; }
.date-card .err { color: var(--danger); font-size: .95rem; margin-top: 8px; }
.dates-empty { color: var(--ink-soft); text-align: center; grid-column: 1 / -1; }

/* Free case: Gowers testing the knee jerk, beside the examiner's question */
.free { max-width: 640px; margin: 0 auto; text-align: center; }
.free .section-sub { margin-left: auto; margin-right: auto; }
/* Gowers' knee jerk bleeds off the lower right of the free case. */
.free-wrap .bg-plate { bottom: -60px; right: -120px; width: min(360px, 34%); }
.free .sample { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; align-items: start; max-width: 560px; margin: 26px auto 0; text-align: left; }
.free .sample .mark { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--fell); font-size: 1.3rem; }
.free .sample .speech { background: var(--paper-light); border: 1px solid var(--rule); border-radius: 2px 16px 16px 16px; padding: 18px 22px; }
.free .sample .who { font-family: var(--fell); font-style: italic; font-size: .98rem; color: var(--ink-soft); }
.free .sample .speech p:last-child { font-family: var(--serif); font-size: 1.22rem; line-height: 1.4; color: var(--ink); margin-top: 4px; }

/* Email capture */
.notify { margin: 48px auto 0; padding-top: 30px; border-top: 1px solid var(--rule); max-width: 580px; text-align: center; }
.notify label { font-size: 1.1rem; }
.notify .row { display: flex; gap: 10px; margin-top: 4px; }
.notify .input { flex: 1; min-width: 0; }
.notify .fine { font-family: var(--fell); font-style: italic; color: var(--ink-soft); font-size: .98rem; margin-top: 8px; }
.notify .msg { margin-top: 12px; }

@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .hero .container { min-height: 0; }
  .hero .bg-plate { --plate-opacity: .12; width: 118%; }
  .outcomes .bg-plate { display: none; }
  .free-wrap .bg-plate { bottom: -40px; right: -30%; width: 56%; }
  .stack { grid-template-columns: minmax(0, 1fr); }
  .stack { gap: 10px; }
}
@media (max-width: 620px) {
  .hero .actions .btn { width: 100%; }
  .date-card .day { font-size: 2rem; }
  .notify .row { flex-direction: column; }
}

/* The free case in the hero: a second, outlined button so the lead magnet sits beside the booking. */
.hero .actions .btn.quiet { background: var(--paper-light); border-color: var(--chalk); }

/* Teaching clips: 16:9 frames on light leaves. Until a clip is added, each frame shows a drawn play mark. */
.clips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.clips-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 940px; margin: 0 auto; }
.clip { margin: 0; }
.clip .frame { position: relative; aspect-ratio: 16 / 9; background: var(--paper-light); border: 1px solid var(--rule); border-radius: 3px; display: grid; place-items: center; overflow: hidden; box-shadow: 0 12px 24px -20px rgba(43, 33, 25, .35); }
.clip .frame video, .clip .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.clip .frame svg { width: 64px; height: 64px; }
.clip .frame svg path { fill: none; stroke: var(--chalk); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.clip figcaption { margin-top: 10px; }
.clip figcaption b { display: block; font-weight: 600; color: var(--ink); }
.clip figcaption span { font-family: var(--fell); font-style: italic; color: var(--ink-soft); }
@media (max-width: 860px) { .clips { grid-template-columns: minmax(0, 1fr); gap: 26px; max-width: 520px; margin: 0 auto; } }


/* The free cases: four leaves, two by two (one column on phones). */
.freebies { list-style: none; padding: 0; margin: 30px auto 0; max-width: 820px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; position: relative; }
.freebies a { display: block; height: 100%; padding: 18px 20px; background: var(--paper-light); border: 1px solid var(--rule); border-radius: 2px 14px 14px 14px; text-decoration: none; color: var(--ink); transition: border-color .2s ease, transform .2s ease; }
.freebies a:hover, .freebies a:focus-visible { border-color: var(--chalk); transform: translateY(-2px); }
.freebies b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.22rem; line-height: 1.25; color: var(--chalk-dark); }
.freebies span { display: block; margin-top: 4px; color: var(--ink-soft); line-height: 1.4; }
@media (max-width: 620px) { .freebies { grid-template-columns: minmax(0, 1fr); } }

/* A sign-up form standing on its own in a section (the guides): no rule or gap above it. */
.notify[data-source] { margin-top: 0; padding-top: 0; border-top: 0; }

/* Four clips: two per row (one column on phones, from the rule above). */
@media (min-width: 861px) { .clips.clips-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; margin: 0 auto; } }

/* The guarantee, as a stamped sticker (home hero, masterclass offer) */
  .guarantee { display: inline-flex; align-items: center; gap: 14px; margin-top: 22px; padding: 12px 20px 12px 14px; text-align: left;
  background: var(--paper-light); border: 1.5px dashed var(--chalk); border-radius: 4px 18px 18px 18px; transform: rotate(-1.2deg); box-shadow: 0 8px 18px -12px rgba(42,33,24,.35); }
.guarantee .seal { flex: none; width: 46px; height: 46px; }
.guarantee svg { width: 100%; height: 100%; }
.guarantee path { fill: none; stroke: var(--chalk); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.guarantee p { max-width: 34ch; font-size: .98rem; line-height: 1.4; color: var(--ink-soft); }
.guarantee b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; color: var(--chalk-dark); }

/* Date cards: the year as a small line above the day, so every card is the same height */
.date-card .yr { font-family: var(--fell); font-style: italic; color: var(--ink-soft); font-size: 1.05rem; }
.date-card .day { white-space: nowrap; }
.date-card .row { margin-top: auto; }
.date-card .local + .row, .date-card .when + .row { margin-top: auto; }
.date-card .when { margin-bottom: 18px; }
.offer-guarantee { text-align: center; margin: 30px 0 6px; }

/* Masterclass dates as a clean list: date, price, availability, Book now */
.dates-note { text-align: center; font-family: var(--fell); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); margin: 34px 0 14px; }
.dates.date-rows { display: block; max-width: 860px; margin: 0 auto; border-top: 1px solid var(--rule); }
.date-row { display: grid; grid-template-columns: minmax(0, 1fr) 9rem 7rem 11rem; align-items: center; gap: 12px 20px; padding: 18px 4px; border-bottom: 1px solid var(--rule); }
.dr-day { font-family: var(--serif); font-size: 1.45rem; line-height: 1.2; color: var(--ink); }
.dr-local { color: var(--ink-soft); font-size: .95rem; }
.dr-price { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); font-variant-numeric: lining-nums; }
.dr-price small { display: block; font-family: var(--fell); font-style: italic; font-size: .92rem; color: var(--ink-soft); }
.dr-status { font-weight: 600; font-size: .98rem; }
.dr-status::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: currentColor; margin-right: .5em; vertical-align: .08em; }
.dr-status.available { color: var(--ink); }
.dr-status.limited { color: var(--low-stock); }
.dr-status.full { color: var(--danger); }
.dr-act .btn { width: 100%; }
.dr-act .err { color: var(--danger); font-size: .9rem; margin-top: 6px; }
.date-row.is-full .dr-day, .date-row.is-full .dr-price { color: var(--ink-soft); }
@media (max-width: 640px) {
  .date-row { grid-template-columns: minmax(0, 1fr) auto; }
  .dr-when { grid-column: 1 / -1; }
  .dr-act { grid-column: 1 / -1; }
}
.call-card .day { white-space: normal; font-size: 1.9rem; }
.call-card .day, .call-card .when { text-align: center; }
