/* Transcar article experience */

:root {
  --article-progress: 0;
}

body.article-template {
  background:
    linear-gradient(135deg, #eef7ff 0%, #ffffff 42%, #f6fbff 100%);
}

.article-page {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background:
    radial-gradient(circle at calc(12% + (var(--article-progress) * 48%)) calc(8% + (var(--article-progress) * 18%)), rgba(0,113,227,0.18), transparent 30vw),
    linear-gradient(135deg, #eef7ff 0%, #ffffff 46%, #f8fcff 100%);
}

.article-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: calc(0.55 + (var(--article-progress) * 0.22));
  background:
    linear-gradient(120deg, rgba(41,151,255,0.16), rgba(255,255,255,0) 38%, rgba(0,102,204,0.10) 100%);
  transform: translate3d(0, calc(var(--article-progress) * -34px), 0);
  will-change: transform, opacity;
}

.article-dock {
  position: fixed;
  top: 86px;
  left: 0;
  right: 0;
  z-index: 70;
  padding: 0 22px;
  opacity: 0;
  transform: translate3d(0, -12px, 0);
  pointer-events: none;
  transition: opacity 260ms ease, transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.article-dock.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.article-dock-inner {
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,0.64);
  background: rgba(255,255,255,0.72);
  box-shadow: 0 14px 46px rgba(0,50,110,0.10);
  backdrop-filter: blur(24px) saturate(1.35);
  border-radius: 16px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.article-dock-title {
  min-width: 0;
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 24px);
  line-height: 1.05;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-dock-meta {
  color: var(--ink-48);
  font-size: 13px;
  white-space: nowrap;
}

.article-hero {
  min-height: 72vh;
  padding: 162px 22px 46px;
  position: relative;
  display: grid;
  align-items: end;
}

.article-hero-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.article-kicker {
  color: var(--action);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.article-hero h1 {
  max-width: 1160px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 94px);
  line-height: 0.98;
  font-weight: 650;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.article-standfirst {
  max-width: 780px;
  margin: 26px 0 0;
  color: var(--ink-80);
  font-size: clamp(18px, 1.8vw, 25px);
  line-height: 1.44;
  font-weight: 360;
}

/* Clears the sticky nav and article dock when jumped to from the hero. */
#article-body {
  scroll-margin-top: 150px;
}

/* Jumps past the hero image to the caption text, which the standfirst clips. */
.article-readmore {
  display: inline-block;
  margin-top: 18px;
  color: var(--action);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.article-readmore:hover {
  text-decoration: underline;
}

.article-byline {
  margin-top: 28px;
  display: flex;
  gap: 12px 18px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--ink-48);
  font-size: 15px;
}

.article-byline strong {
  color: var(--ink);
  font-weight: 600;
}

.article-facts {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto 40px;
  display: flex;
  gap: 12px 10px;
  flex-wrap: wrap;
  transform: none;
  position: relative;
  z-index: 5;
}

.article-fact {
  border: 1px solid rgba(0,113,227,0.20);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(232,244,255,0.90));
  box-shadow: 0 8px 22px rgba(0,102,204,0.07);
  border-radius: 999px;
  padding: 10px 15px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.article-fact .label {
  color: var(--action);
  font-weight: 700;
  margin-right: 5px;
}

.article-image {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
  position: relative;
  z-index: 2;
}

/* Uncropped hero. Portrait sources are capped by height rather than cropped,
   so the whole photo shows without pushing the article below the fold. */
.article-image img {
  display: block;
  max-width: 100%;
  width: auto;
  max-height: 76vh;
  margin: 0 auto;
  border-radius: 28px;
  box-shadow: 0 34px 90px rgba(0,48,110,0.18);
  will-change: transform;
}

.article-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 92px 22px 116px;
}

.article-body > :first-child {
  margin-top: 0;
}

.article-body h2 {
  margin: 54px 0 16px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.3vw, 48px);
  line-height: 1.06;
  font-weight: 620;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.article-body h3 {
  margin: 36px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 31px);
  line-height: 1.14;
  font-weight: 620;
  text-wrap: balance;
}

.article-body p {
  margin: 0 0 20px;
  color: var(--ink-80);
  font-size: 19px;
  line-height: 1.72;
  letter-spacing: -0.006em;
}

.article-body strong {
  color: var(--ink);
  font-weight: 650;
}

.article-body a {
  color: var(--action);
  font-weight: 550;
  text-decoration-line: underline;
  text-decoration-color: rgba(0, 102, 204, 0.32);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.article-body a:hover {
  color: #004f9f;
  text-decoration-color: currentColor;
}

.article-body ul,
.article-body ol {
  margin: 4px 0 28px;
  padding-left: 1.4em;
  color: var(--ink-80);
}

.article-body li {
  padding-left: 0.35em;
  font-size: 18px;
  line-height: 1.65;
}

.article-body li + li {
  margin-top: 9px;
}

.article-body li::marker {
  color: var(--action);
  font-weight: 700;
}

.article-gallery {
  margin: 54px 0 10px;
}

.article-gallery h2 {
  margin: 0 0 16px;
}

.article-gallery-continuation {
  margin-top: 12px;
}

.article-gallery div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.article-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  background: var(--parchment);
  box-shadow: 0 18px 50px rgba(0,48,110,0.10);
}

.share-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 38px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(0,102,204,0.14);
}

.share-strip span {
  font-size: 13px;
  color: var(--ink-48);
}

.share-strip a,
.share-strip button {
  font: inherit;
  font-size: 14px;
  color: var(--action);
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(0,102,204,0.14);
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
  text-decoration: none;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(0,102,204,0.14);
  padding-top: 28px;
  margin-top: 54px;
}

@media (max-width: 760px) {
  .article-dock {
    top: 74px;
    padding: 0 12px;
  }
  .article-dock-inner {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 12px;
  }
  .article-dock-meta {
    display: none;
  }
  .article-hero {
    min-height: 66vh;
    padding-top: 132px;
  }
  .article-hero h1 {
    font-size: clamp(38px, 12vw, 64px);
  }
  .article-image img {
    max-height: 68vh;
    border-radius: 20px;
  }
  .article-facts {
    width: calc(100% - 28px);
    margin-bottom: 30px;
  }
  .article-gallery div {
    grid-template-columns: 1fr;
  }
  .post-nav {
    flex-direction: column;
  }
}
