/* Learn hub and teardown pages. Builds on landing.css (tokens, header, footer, buttons). */

.learn-main {
  padding: 56px 0 104px;
}

.learn-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.learn-breadcrumb li + li::before {
  content: "/";
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.32);
}

.learn-breadcrumb a:hover,
.learn-breadcrumb a:focus-visible {
  color: #32c5fd;
}

.learn-breadcrumb [aria-current="page"] {
  color: rgba(255, 255, 255, 0.86);
}

.learn-title {
  margin: 0;
  max-width: 940px;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.learn-standfirst {
  margin: 18px 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.6;
}

/* Placeholders James fills in before publishing. Visible on purpose. */
.learn-todo {
  padding: 0 4px;
  border-radius: 4px;
  background: #f5c84c;
  color: #1a1400;
  font-weight: 600;
}

/* Hub */

.learn-hub-head {
  padding: 28px 0 44px;
}

.learn-group + .learn-group {
  margin-top: 64px;
}

.learn-group-title {
  margin: 0 0 22px;
  color: #ffffff;
  font-size: 26px;
  font-weight: 800;
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.learn-card a {
  display: grid;
  gap: 12px;
  align-content: start;
  height: 100%;
}

.learn-card-media {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  aspect-ratio: 1 / 1;
}

.learn-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.learn-card a:hover .learn-card-media img,
.learn-card a:focus-visible .learn-card-media img {
  transform: scale(1.02);
}

.learn-card-tag {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.learn-card-title {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.learn-card a:hover .learn-card-title,
.learn-card a:focus-visible .learn-card-title {
  color: #32c5fd;
}

.learn-card-summary {
  margin: 0;
  color: rgba(224, 232, 240, 0.8);
  font-size: 16px;
  line-height: 1.6;
}

/* Teardown */

.learn-article-head {
  max-width: 940px;
  margin: 0 auto;
}

.learn-hero {
  max-width: 760px;
  margin: 44px auto 0;
}

/* Reserves the chart's square before the embed loads, so nothing below moves. */
.learn-embed {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  aspect-ratio: 1 / 1;
}

.learn-embed iframe,
.learn-embed img,
.learn-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.learn-hero figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 16px;
}

.learn-caption {
  flex: 1 1 320px;
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  line-height: 1.6;
}

.learn-caption a,
.learn-body sup a {
  color: #32c5fd;
}

.learn-body {
  display: grid;
  gap: 24px;
  width: min(100%, 720px);
  margin: 64px auto 0;
}

.learn-body h2 {
  margin: 28px 0 0;
  color: #ffffff;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.learn-body h2:first-child {
  margin-top: 0;
}

.learn-body p {
  margin: 0;
  color: rgba(224, 232, 240, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.learn-short-answer {
  display: grid;
  gap: 14px;
  padding: 24px 26px;
  border-left: 2px solid rgba(50, 197, 253, 0.8);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.03);
}

.learn-short-answer h2 {
  margin: 0;
}

.learn-figure {
  margin: 12px 0;
}

.learn-figure img,
.learn-figure video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.learn-figure video {
  aspect-ratio: 1 / 1;
}

.learn-figure-label {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
}

.learn-body h3 {
  margin: 20px 0 0;
  color: #ffffff;
  font-size: clamp(21px, 2.4vw, 24px);
  font-weight: 800;
  line-height: 1.3;
}

.learn-steps {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: learn-step;
}

.learn-steps > li {
  counter-increment: learn-step;
}

.learn-steps > li > p::before {
  content: counter(learn-step) ".";
  margin-right: 10px;
  color: #32c5fd;
  font-weight: 800;
}

.learn-build {
  display: grid;
  justify-items: start;
  gap: 16px;
  margin-top: 28px;
  padding: 32px;
  border: 1px solid rgba(52, 196, 237, 0.36);
  border-radius: 16px;
  background: rgba(0, 164, 237, 0.08);
}

.learn-build h2 {
  margin: 0;
}

.learn-author {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 28px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.learn-author-photo {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b3a52, #0c1726);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

.learn-author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.learn-author-name {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
}

.learn-author-name a:hover,
.learn-author-name a:focus-visible {
  color: #32c5fd;
}

.learn-author-role {
  margin: 2px 0 10px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.learn-body .learn-author-bio {
  font-size: 16px;
  line-height: 1.7;
}

.learn-footnotes {
  margin-top: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.learn-footnotes h2 {
  margin: 0 0 12px;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

.learn-footnotes ol {
  margin: 0;
  padding-left: 20px;
}

.learn-body .learn-footnotes li,
.learn-body .learn-footnotes p {
  color: rgba(224, 232, 240, 0.72);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 960px) {
  .learn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .learn-main {
    padding: 32px 0 72px;
  }

  .learn-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .learn-hero {
    margin-top: 32px;
  }

  .learn-hero figcaption .button,
  .learn-build .button {
    width: 100%;
  }

  .learn-body {
    margin-top: 44px;
  }

  .learn-body p {
    font-size: 17px;
  }

  .learn-short-answer,
  .learn-build {
    padding: 22px 20px;
  }
}
