/* The Learn page, in the poster style: Nigel blue ground, off-white type,
   regular and medium weights only, dots, staggered lines and thin rules.
   Sits on top of styles.css (variables) and site.css (cookie banner). */

.v-learn {
  --rule: color-mix(in srgb, var(--page) 55%, transparent);
  --small: 12px;
  background: var(--blue);
  color: var(--page);
  font-weight: 400;
}
.v-learn ::selection { background: var(--page); color: var(--blue); }

/* ---------- Off-white band with the wordmark ---------- */

.band {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: clamp(18px, 2.4vw, 40px) var(--pad);
  background: var(--page);
  color: var(--blue);
}
.band-mark svg { display: block; height: clamp(30px, 3.4vw, 54px); width: auto; }
.band-meta { display: flex; gap: clamp(24px, 4vw, 72px); }
.band-meta p { margin: 0; font-size: 13px; font-weight: 500; line-height: 1.3; }

/* ---------- Shared pieces ---------- */

.stagger { margin: 0; font-weight: 500; letter-spacing: -.035em; line-height: 1.02; }
.stagger span { display: block; }
.stagger span:nth-child(2) { padding-left: 1.4em; }
.stagger span:nth-child(3) { padding-left: .6em; }

.dot, .dots i {
  display: block;
  width: clamp(26px, 3.4vw, 60px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--page);
}
.dots { display: flex; gap: clamp(8px, .9vw, 16px); }

/* A row boxed by thin off-white lines, like the table on the Grilli card */
.ruled {
  display: grid;
  border: 1px solid var(--rule);
}
.ruled > * { padding: 10px 12px; }
.ruled > * + * { border-left: 1px solid var(--rule); }

/* ---------- First screen ---------- */

.learn-hero {
  position: relative;
  display: grid;
  align-content: center;
  min-height: min(82svh, 860px);
  padding: clamp(72px, 10vw, 160px) var(--pad) clamp(140px, 14vw, 200px);
}
.learn-hero h1 { font-size: clamp(44px, 8.2vw, 148px); }
.dot-a { position: absolute; top: clamp(24px, 3vw, 48px); left: var(--pad); }
.dots-right { position: absolute; right: var(--pad); top: 50%; translate: 0 -50%; }

.small-grid {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: clamp(24px, 3vw, 48px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.small-grid p { margin: 0; font-size: var(--small); line-height: 1.35; }

/* ---------- The films ---------- */

.part { padding: 0 var(--pad) clamp(72px, 9vw, 140px); }
.part-head {
  grid-template-columns: 1fr 2fr 1fr;
  margin: 0 0 clamp(28px, 3.4vw, 56px);
  font-size: var(--small);
  font-weight: 500;
  letter-spacing: .02em;
}
.part-head span:last-child { text-align: right; }

.films {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 88px) clamp(24px, 3vw, 56px);
}
.lesson { margin: 0; }
.lesson-frame { position: relative; }
.lesson video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--page);
}
.lesson figcaption {
  grid-template-columns: auto 1fr auto;
  border-top: 0;
  align-items: start;
}
.lesson .num {
  font-size: clamp(30px, 3.4vw, 54px);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: .9;
  min-width: 1.6em;
}
.lesson .what { font-size: 14px; line-height: 1.45; }
.lesson .what b { display: block; font-weight: 500; font-size: clamp(17px, 1.5vw, 22px); letter-spacing: -.01em; margin-bottom: 2px; }
.lesson .len { font-size: var(--small); font-variant-numeric: tabular-nums; }

/* Play button: a blue dot in the corner of the title card. The browser's own
   controls only appear once the film is playing. */
.play {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: start;
  padding: clamp(14px, 1.6vw, 24px);
  background: none;
  border: 0;
  cursor: pointer;
}
.play span {
  display: grid;
  place-items: center;
  width: clamp(44px, 4.2vw, 64px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--blue);
  transition: scale .2s var(--ease);
}
.play span::after {
  content: '';
  margin-left: 12%;
  border-style: solid;
  border-width: .5em 0 .5em .85em;
  border-color: transparent transparent transparent var(--page);
  font-size: clamp(13px, 1.2vw, 18px);
}
.play:hover span, .play:focus-visible span { scale: 1.08; }
.play:focus-visible { outline: 2px solid var(--blue); outline-offset: -6px; }
.lesson.is-playing .play { display: none; }

/* ---------- The end ---------- */

.learn-end {
  display: grid;
  justify-items: start;
  gap: clamp(28px, 3.4vw, 56px);
  padding: clamp(40px, 6vw, 96px) var(--pad) clamp(80px, 10vw, 160px);
}
.learn-end .dots { justify-self: end; }
.learn-end h2 { font-size: clamp(40px, 6.6vw, 120px); }
.poster-btn {
  display: inline-block;
  padding: 16px 26px;
  background: var(--page);
  color: var(--blue);
  font-weight: 500;
  font-size: 16px;
  transition: background .2s, color .2s;
}
.poster-btn:hover, .poster-btn:focus-visible { background: var(--ink); color: var(--page); outline: none; }
.end-note { margin: 0; font-size: 15px; }

.learn-footer {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  margin: 0 var(--pad) clamp(20px, 2.4vw, 40px);
  font-size: var(--small);
}
.learn-footer b { font-weight: 500; }
.learn-footer .footer-links { justify-content: flex-end; }

/* ---------- Phones ---------- */

@media (max-width: 760px) {
  .band-meta p:last-child { display: none; }
  .learn-hero { min-height: 0; padding-top: clamp(96px, 26vw, 140px); padding-bottom: 210px; }
  .dots-right { top: auto; bottom: 150px; translate: none; }
  .small-grid { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .films { grid-template-columns: 1fr; }
  .stagger span:nth-child(2) { padding-left: .9em; }
  .learn-footer { grid-template-columns: 1fr; }
  .learn-footer > * + * { border-left: 0; border-top: 1px solid var(--rule); }
  .learn-footer .footer-links { justify-content: flex-start; }
}
