/* Course landing pages only. Linked from classes/<slug>/index.html.
   Do not import this file from css/styles.css.

   OFL families, self-hosted from /fonts (see the LICENSE files there):
   Cinzel, Cinzel Decorative, Atkinson Hyperlegible, JetBrains Mono, Inter.
*/

@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/cinzel-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Cinzel Decorative";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/cinzel-decorative-latin-900-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-latin-700-normal.woff2") format("woff2");
}

.class-page {
  --purple: #2a1838;
  --purple-2: #3d2552;
  --char: #1c1a20;
  --gold: #f5c04a;
  --gold-soft: #ffe08a;
  --ember: #e8621c;
  --ember-deep: #c8440f;
  --green: #5fae2e;
  --cream: #fff4dc;
  --ink: #102006;
  --panel-text: #eadff5;
  --muted: #e3d4f2;
  --max: 1120px;
  margin: 0;
  background: #1a1022;
  color: var(--cream);
  font-family: "Atkinson Hyperlegible", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  color-scheme: dark;
}

.class-page *,
.class-page *::before,
.class-page *::after {
  box-sizing: border-box;
}

.class-page h1,
.class-page h2,
.class-page p,
.class-page ul,
.class-page ol,
.class-page figure,
.class-page pre {
  margin: 0;
}

.class-page img {
  max-width: 100%;
  height: auto;
  display: block;
}

.class-page a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
}

.class-page a:hover {
  color: #fff;
}

.class-page a:focus-visible,
.class-page .skip:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.class-page .skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-200%);
  background: var(--gold);
  color: var(--purple);
  font-weight: 700;
  text-decoration: none;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  z-index: 5;
}

.class-page .skip:focus {
  transform: none;
}

.class-page .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.class-page .wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.class-page .hero {
  background: #1d1228;
}

.class-page .mast {
  text-align: center;
  padding: 1.35rem 0 0.85rem;
}

.class-page .kicker {
  font-family: Cinzel, serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  color: var(--gold);
  text-transform: uppercase;
}

.class-page h1 {
  font-family: "Cinzel Decorative", serif;
  font-weight: 900;
  font-size: clamp(2.15rem, 8vw, 4.5rem);
  line-height: 1.05;
  margin-top: 0.35rem;
  color: var(--gold);
  text-shadow: 0 3px 0 #7a2a08, 0 0 18px rgba(232, 98, 28, 0.45);
  text-wrap: balance;
}

.class-page h1 .js {
  color: var(--cream);
}

.class-page h1.short {
  letter-spacing: 0.06em;
  font-size: clamp(3rem, 12vw, 5rem);
}

.class-page .tagline {
  margin-top: 0.55rem;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--cream);
}

.class-page .tagline b {
  color: var(--gold);
}

.class-page .age-line {
  margin-top: 0.7rem;
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--cream);
}

.class-page .coming-later {
  margin-top: 0.45rem;
  font-family: Cinzel, serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 1.05rem;
  color: var(--gold);
}

.class-page .hero-body {
  display: grid;
}

.class-page .pic {
  border-top: 3px solid var(--gold);
  background: #140e1c;
}

.class-page .pic img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 22%;
}

.class-page .pic img.scene {
  object-position: center center;
}

.class-page .panel {
  background: linear-gradient(160deg, var(--purple-2), var(--purple) 70%);
  padding: 1.25rem 0 1.6rem;
  border-top: 3px solid var(--gold);
}

.class-page .badge {
  width: 8.6rem;
  height: 8.6rem;
  margin: -3.2rem auto 1rem;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at 35% 30%, #ffe08a, #f5c04a 46%, #d98e1a);
  color: var(--purple);
  box-shadow: 0 0 0 4px var(--purple), 0 0 0 7px var(--gold), 0 8px 18px rgba(0, 0, 0, 0.45);
  transform: rotate(7deg);
}

.class-page .badge .a {
  font-family: Cinzel, serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.class-page .badge.for-ages .a {
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  line-height: 1.05;
  max-width: 7.1rem;
}

.class-page .badge .n {
  font-family: "Cinzel Decorative", serif;
  font-weight: 900;
  font-size: 1.85rem;
  line-height: 1;
}

.class-page .badge .x {
  font-family: "Atkinson Hyperlegible", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.15;
  margin-top: 0.2rem;
  padding: 0 0.85rem;
}

.class-page .lede {
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: clamp(1.28rem, 2.5vw, 1.7rem);
  line-height: 1.28;
  color: var(--cream);
  text-wrap: balance;
}

.class-page .lede em {
  font-style: normal;
  color: var(--gold);
}

.class-page .panel p + p {
  margin-top: 0.8rem;
}

.class-page .panel .small {
  color: var(--panel-text);
  font-size: 1.02rem;
}

.class-page .quest {
  background: var(--purple-2);
  border-top: 4px solid var(--gold);
  padding: 1.35rem 0 1.5rem;
}

.class-page .sectit,
.class-page .quick h2,
.class-page .proj h2,
.class-page .bonus h2,
.class-page .cta h2 {
  font-family: Cinzel, serif;
  font-weight: 700;
  color: var(--gold);
}

.class-page .sectit {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-wrap: balance;
}

.class-page .quest-note {
  margin: 0.4rem 0 0.95rem;
  color: #e8d3ff;
}

.class-page .lesson-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.class-page .lesson-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "mark name"
    "mark detail";
  gap: 0.12rem 0.75rem;
  align-items: center;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 8px;
  padding: 0.7rem 0.75rem;
}

.class-page .lesson-list li.has-time {
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "mark name"
    "mark detail"
    "mark time";
}

.class-page .mark {
  grid-area: mark;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--purple);
  font-family: Cinzel, serif;
  font-weight: 700;
  display: grid;
  place-items: center;
  align-self: center;
}

.class-page .lesson-name {
  grid-area: name;
  color: var(--cream);
  font-weight: 700;
  font-size: 1.05rem;
}

.class-page .lesson-detail {
  grid-area: detail;
  color: var(--muted);
  font-size: 0.98rem;
}

.class-page .time {
  grid-area: time;
  justify-self: start;
  margin-top: 0.2rem;
  background: var(--ember-deep);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.2;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.class-page .lesson-list li.goal {
  background: var(--green);
}

.class-page .lesson-list li.goal .mark {
  background: var(--char);
  color: var(--gold);
  font-size: 1.15rem;
}

.class-page .lesson-list li.goal .lesson-name,
.class-page .lesson-list li.goal .lesson-detail {
  color: #14240a;
}

.class-page .lesson-list li.goal .time {
  background: var(--char);
  color: var(--gold);
}

.class-page .duo-grid {
  display: grid;
}

.class-page .proj,
.class-page .bonus {
  padding: 1.3rem 1.5rem 1.45rem;
}

.class-page .proj {
  background: var(--green);
  color: var(--ink);
}

.class-page .bonus {
  background: var(--char);
  color: #e6dccb;
  border-top: 4px solid var(--gold);
}

.class-page .tag {
  font-family: Cinzel, serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.class-page .proj .tag {
  color: #183008;
}

.class-page .bonus .tag {
  color: var(--gold);
}

.class-page .proj h2,
.class-page .bonus h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.2;
  margin: 0.25rem 0 0.45rem;
  text-wrap: balance;
}

.class-page .proj h2 {
  color: #0c1a04;
}

.class-page .bonus h2 {
  color: var(--cream);
}

.class-page .proj p,
.class-page .bonus p {
  font-size: 1.02rem;
}

.class-page .facts {
  background: var(--purple);
}

.class-page .facts-grid {
  display: grid;
}

.class-page .fact {
  padding: 1.05rem 0;
  border-bottom: 2px solid #4b3263;
}

.class-page .fact:last-child {
  border-bottom: 0;
}

.class-page .fact .k {
  font-family: Cinzel, serif;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.class-page .fact .v {
  margin-top: 0.15rem;
  font-weight: 700;
  color: var(--cream);
  font-size: 1.28rem;
  line-height: 1.25;
}

.class-page .fact .s {
  margin-top: 0.2rem;
  color: var(--muted);
}

.class-page .quick {
  background: var(--char);
  border-top: 3px solid var(--ember);
  padding: 1.3rem 0 1.5rem;
}

.class-page .quick h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  line-height: 1.2;
}

.class-page .quick .lead {
  margin-top: 0.4rem;
  color: #e6dccb;
}

.class-page .code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  background: #0f0d12;
  color: #ffb4a6;
  border: 1px solid #4b3263;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
}

.class-page .code .c {
  color: #b9a98a;
}

.class-page .code .g {
  color: #a8ec8f;
}

.class-page .keys {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  color: #f2e3c4;
}

.class-page kbd {
  font-family: "Atkinson Hyperlegible", sans-serif;
  font-weight: 700;
  background: var(--cream);
  color: var(--char);
  border-radius: 4px;
  border-bottom: 3px solid #b98a2a;
  padding: 0.05rem 0.4rem;
  font-size: 0.95rem;
}

.class-page .cta {
  background: var(--ember);
  border-top: 4px solid var(--gold);
  padding: 1.45rem 0 1.55rem;
  text-align: center;
}

.class-page .cta h2 {
  color: #fff;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.18;
  text-shadow: 0 2px 0 #7a2a08;
  text-wrap: balance;
}

.class-page .cta h2 span {
  display: block;
  margin-top: 0.15rem;
  color: var(--purple);
  text-shadow: none;
}

.class-page .cta h2 a {
  color: inherit;
  text-decoration-color: currentColor;
}

.class-page .cta h2 a:hover {
  color: inherit;
}

.class-page .cta h2 a:focus-visible {
  color: inherit;
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.class-page .sponsor {
  background: #2E3235;
  border-top: 3px solid #4A7C78;
  color: #F7F9F9;
  font-family: Inter, system-ui, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

.class-page .sponsor-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.2rem;
  padding: 0.85rem 0;
}

.class-page .sponsor-logo {
  display: block;
  flex: none;
  line-height: 0;
}

.class-page .sponsor img {
  height: 0.85in;
  min-height: 0.5in;
  width: auto;
  max-width: none;
}

.class-page .byline {
  flex: 1 1 12rem;
  min-width: 0;
}

.class-page .by {
  margin: 0;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6B9B96;
  line-height: 1.2;
}

.class-page .name {
  margin: 0.1rem 0 0;
  font-weight: 700;
  font-size: 1.35rem;
  color: #F7F9F9;
  line-height: 1.2;
}

.class-page .web {
  margin: 0.15rem 0 0;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
}

.class-page .sponsor a {
  color: #F7F9F9;
  text-decoration-color: #6B9B96;
}

.class-page .sponsor .web a,
.class-page .sponsor .by {
  color: #6B9B96;
}

.class-page .sponsor a:hover {
  color: #fff;
}

.class-page .sponsor a:focus-visible {
  outline-color: #F7F9F9;
}

.class-page .contact {
  margin: 0;
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #F7F9F9;
}

@media (min-width: 40rem) {
  .class-page .proj,
  .class-page .bonus,
  .class-page .course-copy {
    padding-inline: 2rem;
  }

  .class-page .kicker {
    letter-spacing: 0.28em;
    font-size: 0.95rem;
  }

  .class-page .lesson-list li.has-time {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "mark name time"
      "mark detail time";
  }

  .class-page .time {
    margin-top: 0;
    justify-self: end;
    align-self: center;
  }

  .class-page .contact {
    margin-left: auto;
    text-align: right;
  }
}

@media (min-width: 52rem) {
  .class-page .hero-body {
    width: min(var(--max), calc(100% - 2rem));
    margin: 0 auto 0;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: stretch;
    position: relative;
  }

  .class-page .pic {
    border-right: 3px solid var(--gold);
  }

  .class-page .pic img {
    height: 100%;
    min-height: 22rem;
    aspect-ratio: auto;
    object-position: center 18%;
  }

  .class-page .pic img.scene {
    object-position: center center;
  }

  .class-page .panel {
    border-top: 3px solid var(--gold);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5.6rem 1.35rem 1.5rem 1.5rem;
  }

  .class-page .panel .wrap {
    width: auto;
  }

  .class-page .badge {
    position: absolute;
    top: 1.1rem;
    left: 58%;
    margin: 0;
    transform: translateX(-50%) rotate(8deg);
  }

  .class-page .lesson-list {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
    column-gap: 0.75rem;
  }

  .class-page .duo-grid {
    grid-template-columns: 1.65fr 1fr;
  }

  .class-page .bonus {
    border-top: 0;
    border-left: 4px solid var(--gold);
  }

  .class-page .facts-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .class-page .fact {
    border-bottom: 0;
    border-right: 2px solid #4b3263;
    padding: 1.15rem 1rem;
  }

  .class-page .fact:first-child {
    padding-left: 0;
  }

  .class-page .fact:last-child {
    border-right: 0;
    padding-right: 0;
  }

  .class-page .quick-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.2fr 0.9fr;
    gap: 1.1rem;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .class-page .badge {
    transform: none;
  }
}

@media (min-width: 52rem) and (prefers-reduced-motion: reduce) {
  .class-page .badge {
    transform: translateX(-50%);
  }
}

.class-page .suite-note {
  margin-top: 0.45rem;
  color: var(--cream);
  font-size: 1.05rem;
}

.class-page .suite {
  list-style: none;
  padding: 1.35rem 0 1.6rem;
  display: grid;
  gap: 1.25rem;
}

.class-page .course-card {
  background: #1d1228;
  border-top: 3px solid var(--gold);
  display: grid;
}

.class-page .course-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center center;
}

.class-page .course-copy {
  padding: 1.1rem 1.5rem 1.25rem;
}

.class-page .course-kicker {
  font-family: Cinzel, serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 0.85rem;
}

.class-page .course-card h2 {
  font-family: Cinzel, serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  line-height: 1.2;
  margin: 0.25rem 0 0.55rem;
}

.class-page .course-card h2 a {
  color: var(--cream);
  text-decoration-thickness: 2px;
}

.class-page .course-card .hook {
  color: var(--cream);
  font-size: 1.05rem;
}

.class-page .course-card .note {
  margin-top: 0.65rem;
  color: var(--panel-text);
}

@media (min-width: 52rem) {
  .class-page .course-card {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: stretch;
  }

  .class-page .course-card img {
    height: 100%;
    min-height: 16rem;
    aspect-ratio: auto;
  }
}
