@font-face {
  font-family: Bricolage;
  src: url("assets/bricolage-grotesque-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Instrument;
  src: url("assets/instrument-sans-400-700-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: Instrument;
  src: url("assets/instrument-sans-400-700-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


:root {
  --paper: #f8f7f2;
  --lavender: #e2daf7;
  --ink: #251c37;
  --yellow: #ffe575;
  --portrait-background: #c8dff3;
  --pad: clamp(28px, 4.6vw, 74px);
  color: var(--ink);
  background: var(--paper);
  font-family: Instrument, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, p, figure { margin: 0; }
::selection { background: var(--yellow); color: var(--ink); }
main { width: min(calc(100% - clamp(32px, 6vw, 100px)), 1370px); margin: clamp(16px, 3vw, 52px) auto; }

.hero {
  --hero-top: clamp(68px, 8vw, 121px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: start;
  isolation: isolate;
  min-height: clamp(540px, 51vw, 700px);
  overflow: hidden;
  border-radius: 12px;
  background: var(--lavender);
}
.masthead {
  position: relative;
  z-index: 1;
  padding: clamp(23px, 3.2vw, 47px) var(--pad) 0;
}
.wordmark {
  font: 700 clamp(24px, 2.6vw, 39px)/1 Bricolage, Instrument, sans-serif;
  letter-spacing: -.04em;
}
.wordmark span { color: #5632b5; }
.site-nav {
  position: absolute;
  top: clamp(23px, 3.2vw, 47px);
  right: var(--pad);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.65vw, 38px);
  min-height: clamp(24px, 2.6vw, 39px);
}
.site-nav a, .program-link {
  color: var(--ink);
  font-size: clamp(14px, 1.35vw, 17px);
  font-weight: 650;
  text-underline-offset: 5px;
}
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a:focus-visible, .program-link:focus-visible, .author:focus-visible {
  outline: 2px solid #5632b5;
  outline-offset: 5px;
}
.hero-copy {
  position: relative;
  z-index: 1;
  grid-area: 2 / 1;
  width: 59%;
  padding: var(--hero-top) 0 clamp(44px, 5vw, 85px) var(--pad);
}
h1 {
  font: 700 clamp(56px, 8.15vw, 125px)/.91 Bricolage, Instrument, sans-serif;
  letter-spacing: -.04em;
}
h1 > span { display: block; }
h1 > span + span { margin-top: .09em; }
h1 mark {
  position: relative;
  display: inline-block;
  isolation: isolate;
  background: none;
  color: inherit;
}
h1 mark::before {
  position: absolute;
  content: "";
  z-index: -1;
  inset: .35em -.065em -.015em -.06em;
  background: var(--yellow);
  transform: rotate(-3deg);
  clip-path: polygon(1% 10%, 97% 0, 100% 25%, 98% 91%, 0 100%, 1% 68%);
}
.lead {
  max-width: min(35ch, 95%);
  margin-top: clamp(20px, 2.55vw, 37px);
  font-size: clamp(19px, 2.15vw, 27px);
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.22;
  text-wrap: balance;
}
.description {
  max-width: min(46ch, 95%);
  margin-top: 11px;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.44;
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px clamp(15px, 2.3vw, 31px);
  margin-top: 23px;
}
.program-link { text-decoration-thickness: 1px; }
.program-link:hover { color: #5632b5; }
.lesson-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 13px 17px 13px 20px;
  min-height: 48px;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: clamp(15px, 1.42vw, 18px);
  font-weight: 650;
}
.lesson-link:hover { background: #493477; }
.lesson-link:focus-visible { outline: 3px solid #5632b5; outline-offset: 5px; }
.lesson-link svg { flex: none; }
.brand-shape {
  position: absolute;
  z-index: -1;
  right: -1.3%;
  top: 16%;
  width: 45%;
  height: 66%;
  background: #a39ae4;
  clip-path: url("#brand-wave");
  pointer-events: none;
}
[data-brand-shape="skos"] .brand-shape {
  clip-path: polygon(0 25%, 87% 0, 100% 6%, 100% 80%, 29% 100%);
}
[data-brand-shape="stopnie"] .brand-shape {
  clip-path: polygon(26% 4%, 100% 4%, 100% 100%, 46% 100%, 46% 89%, 7% 89%, 7% 61%, 0 61%, 0 32%, 13% 32%, 13% 18%, 26% 18%);
}
[data-brand-shape="luk"] .brand-shape {
  border-radius: 54% 54% 0 0 / 53% 53% 0 0;
  clip-path: none;
}

@media (min-width: 731px) {
  [data-brand-shape="skos"] .brand-shape { inset: 15% -4% auto auto; width: 49%; height: 74%; }
  [data-brand-shape="stopnie"] .brand-shape { inset: 14% -2% auto auto; width: 46%; height: 69%; }
  [data-brand-shape="luk"] .brand-shape { inset: 15% -3% auto auto; width: 46%; height: 85%; }
}
.author {
  position: relative;
  z-index: 1;
  grid-area: 2 / 1;
  place-self: start end;
  display: grid;
  gap: 12px;
  width: clamp(226px, 27vw, 318px);
  max-width: 37%;
  margin: calc(var(--hero-top) - 4px) clamp(38px, 6.4vw, 96px) 0 0;
  padding: 11px 11px 14px;
  border-radius: 10px;
  background: #fff8ea;
  box-shadow: 1px 2px 0 rgb(37 28 55 / 15%);
}
.author-photo {
  position: relative;
  height: clamp(118px, 12.7vw, 157px);
  overflow: hidden;
  border-radius: 6px;
  background: var(--portrait-background);
}
[data-portrait-background="wanilia"] { --portrait-background: #f4dfb0; }
[data-portrait-background="roz"] { --portrait-background: #efc3d9; }
[data-portrait-background="lawenda"] { --portrait-background: #cfc2f0; }
.portrait-effects { position: absolute; }
.author img {
  position: absolute;
  top: 4%;
  left: 50%;
  width: clamp(156px, 16.9vw, 205px);
  height: auto;
  transform: translateX(-50%);
  filter: url("#portrait-outline");
}
.author figcaption { display: grid; gap: 4px; line-height: 1.2; }
figcaption strong { font-size: clamp(21px, 2.15vw, 27px); line-height: 1; letter-spacing: -.035em; }
figcaption > span { font-size: clamp(13px, 1.28vw, 16px); font-weight: 570; }
figcaption .score { margin-top: 4px; color: #4d425e; font-size: clamp(12px, 1.15vw, 14px); font-weight: 650; }
figcaption mark { padding: 0 .19em; margin-left: -.19em; background: #ffea95; color: inherit; }
.author-bio { margin-top: 3px; font-size: clamp(13px, 1.22vw, 15px); line-height: 1.38; }

@media (max-width: 730px) {
  :root { --pad: clamp(20px, 5vw, 37px); }
  .hero { display: block; min-height: 0; }
  .hero-copy { width: 100%; padding: 44px var(--pad) 30px; }
  h1 { font-size: clamp(44px, 10.3vw, 74px); }
  .brand-shape { top: auto; bottom: 14px; right: 8px; height: 180px; width: 65%; }
  .author { max-width: calc(100% - var(--pad) * 2); margin: 0 var(--pad) 25px auto; }
}
