.swap-page {
  --swap-red: #ef171d;
  --swap-ink: #171a20;
  --swap-muted: #62666d;
  --swap-line: #dedfe3;
  --swap-soft: #f5f5f6;
  --swap-panel: #ffffff;
  color: var(--swap-ink);
  background: #fff;
}

.swap-page h1,
.swap-page h2,
.swap-page h3,
.swap-page p,
.swap-page ul,
.swap-page figure {
  margin: 0;
}

.swap-page img {
  display: block;
}

.swap-page .contact-info h2 {
  margin-bottom: clamp(54px, 5vw, 88px);
}

@media (max-width: 767px) {
  .swap-page .contact-info h2 {
    margin-bottom: 32px;
  }
}

.swap-hero {
  position: relative;
  display: grid;
  min-height: min(860px, 100svh);
  align-items: center;
  overflow: hidden;
  padding: 126px var(--page-x) 72px;
  background: #eceaea;
}

.swap-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% center;
}

.swap-hero > picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.swap-hero > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% center;
}

.swap-hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(247, 247, 247, .98) 0%, rgba(247, 247, 247, .9) 34%, rgba(247, 247, 247, .28) 58%, rgba(247, 247, 247, 0) 78%);
  content: "";
}

.swap-hero-copy {
  position: relative;
  z-index: 2;
  width: min(690px, 54vw);
}

.swap-hero h1 {
  font-size: var(--fs-hero);
  line-height: var(--lh-hero);
  letter-spacing: 0;
  font-weight: 700;
}

.swap-hero h2 {
  max-width: 640px;
  margin-top: 28px;
  font-size: var(--fs-card-title) !important;
  line-height: var(--lh-card-title) !important;
  letter-spacing: 0;
  font-weight: 620;
}

.swap-hero-copy > p {
  max-width: 560px;
  margin-top: 18px;
  color: var(--swap-muted);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.swap-hero-capabilities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: min(960px, 78vw);
  margin-top: clamp(48px, 6vw, 84px);
  overflow: hidden;
  border: 1px solid rgba(23, 26, 32, .16);
  border-radius: 8px;
  background: rgba(23, 26, 32, .16);
  box-shadow: 0 24px 70px rgba(23, 26, 32, .08);
}

.swap-hero-capabilities article {
  min-height: 128px;
  padding: 24px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(10px);
}

.swap-hero-capabilities strong {
  display: block;
  color: var(--swap-red);
  font-size: var(--fs-card-title);
  line-height: var(--lh-card-title);
  font-weight: 680;
}

.swap-hero-capabilities span {
  display: block;
  margin-top: 10px;
  color: #4e535a;
  font-size: var(--fs-muted);
  line-height: var(--lh-muted);
}

.swap-section {
  padding: clamp(78px, 9vw, 138px) var(--page-x);
}

.swap-heading {
  max-width: 920px;
  margin-bottom: var(--title-content-gap);
}

.swap-heading h2 {
  font-size: var(--fs-section-title);
  line-height: var(--lh-section-title);
  letter-spacing: 0;
  font-weight: 680;
}

.swap-heading h3 {
  margin-top: 18px;
  font-size: var(--fs-card-title);
  line-height: var(--lh-card-title);
  letter-spacing: 0;
  font-weight: 560;
}

.swap-heading p {
  max-width: 760px;
  margin-top: 18px;
  color: var(--swap-muted);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.swap-intro {
  background: #fff;
}

.swap-intro .swap-heading {
  max-width: 1120px;
}

.swap-intro .swap-heading p {
  max-width: none;
  white-space: nowrap;
}

.swap-intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
  gap: clamp(32px, 6vw, 92px);
  align-items: stretch;
}

.swap-intro-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.swap-intro-points article,
.swap-module,
.swap-advantage-grid article,
.swap-scene-grid article {
  border: 1px solid var(--swap-line);
  border-radius: 8px;
  background: var(--swap-panel);
}

.swap-intro-points article {
  display: flex;
  min-height: 226px;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 3vw, 38px);
}

.swap-intro-points span,
.swap-module span,
.swap-advantage-grid span,
.swap-scene-grid span {
  color: #8a8e95;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .08em;
  font-weight: 700;
}

.swap-intro-points h3 {
  margin-top: 34px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 620;
}

.swap-intro-points p {
  margin-top: 14px;
  color: var(--swap-muted);
  font-size: 15px;
  line-height: 1.75;
}

.swap-cabinet-figure {
  display: grid;
  min-height: 540px;
  place-items: center;
  padding: clamp(28px, 4vw, 56px);
  border-radius: 8px;
  background: linear-gradient(180deg, #f7f7f8 0%, #eeeeef 100%);
}

.swap-cabinet-figure img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
}

.swap-cabinet-figure figcaption {
  justify-self: start;
  align-self: end;
  color: #7a7d84;
  font-size: 13px;
}

.swap-system {
  background: #f6f7f8;
}

.swap-module-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.swap-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, .58fr);
  grid-template-rows: auto auto 1fr;
  gap: 12px 24px;
  align-items: center;
  min-height: 260px;
  padding: clamp(26px, 3vw, 42px);
}

.swap-module:nth-child(1),
.swap-module:nth-child(2) {
  grid-column: span 3;
}

.swap-module:nth-child(3),
.swap-module:nth-child(4),
.swap-module:nth-child(5) {
  grid-column: span 2;
}

.swap-module h3 {
  margin-top: 38px;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 640;
}

.swap-module p {
  margin-top: 16px;
  color: var(--swap-muted);
  font-size: 15px;
  line-height: 1.75;
}

.swap-module figure {
  grid-column: 2;
  grid-row: 1 / span 3;
  justify-self: end;
  align-self: stretch;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 180px;
  margin: 0;
}

.swap-module img {
  width: 100%;
  max-width: 220px;
  max-height: 220px;
  object-fit: contain;
}

.swap-module:nth-child(3),
.swap-module:nth-child(4),
.swap-module:nth-child(5) {
  grid-template-columns: minmax(0, 1fr) minmax(116px, .48fr);
}

.swap-module:nth-child(3) img,
.swap-module:nth-child(4) img,
.swap-module:nth-child(5) img {
  max-width: 180px;
}

.swap-advantages {
  background: #fff;
}

.swap-advantage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.swap-advantage-grid article {
  min-height: 288px;
  padding: clamp(24px, 3vw, 38px);
}

.swap-advantage-grid h3 {
  margin-top: 54px;
  font-size: clamp(23px, 2vw, 32px);
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 640;
}

.swap-advantage-grid p {
  margin-top: 18px;
  color: var(--swap-muted);
  font-size: 15px;
  line-height: 1.75;
}

.swap-scenes {
  background: #f6f7f8;
}

.swap-scene-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 18px;
}

.swap-scene-grid article {
  overflow: hidden;
  min-height: 330px;
}

.swap-scene-visual {
  position: relative;
  height: 150px;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--swap-line);
  background: #eceef1;
}

.swap-scene-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swap-scene-grid span {
  display: block;
  margin: 24px 24px 0;
}

.swap-scene-grid h3 {
  margin: 34px 24px 0;
  font-size: clamp(22px, 1.8vw, 30px);
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 640;
}

.swap-scene-grid p {
  margin: 14px 24px 28px;
  color: var(--swap-muted);
  font-size: 15px;
  line-height: 1.7;
}

.swap-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, .58fr);
  gap: clamp(28px, 4vw, 58px);
  align-items: center;
  min-height: 320px;
  padding-top: clamp(34px, 4vw, 50px);
  padding-bottom: clamp(34px, 4vw, 50px);
  color: #fff;
  background: #15171c;
}

.swap-cta h2 {
  max-width: 760px;
  font-size: var(--fs-section-title);
  line-height: var(--lh-section-title);
  letter-spacing: 0;
  font-weight: 680;
}

.swap-cta p {
  max-width: 620px;
  margin-top: 18px;
  color: rgba(255, 255, 255, .66);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.swap-cta-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 24px;
  padding: 0 24px;
  border: 1px solid var(--swap-red);
  border-radius: 4px;
  color: #fff;
  background: var(--swap-red);
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.swap-cta-button:hover {
  border-color: #fff;
  background: transparent;
}

.swap-cta-media {
  display: grid;
  min-height: 0;
  height: clamp(210px, 18vw, 260px);
  place-items: start center;
  overflow: hidden;
  padding: clamp(18px, 2.4vw, 30px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: #f2f2f3;
}

.swap-cta-media img {
  width: clamp(190px, 18vw, 260px);
  max-width: 100%;
  max-height: none;
  object-fit: contain;
}

@media (max-width: 1180px) {
  .swap-hero-copy {
    width: min(650px, 64vw);
  }

  .swap-hero-capabilities,
  .swap-advantage-grid,
  .swap-scene-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(680px, 74vw);
  }

  .swap-scene-grid,
  .swap-advantage-grid {
    width: auto;
  }

  .swap-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swap-module,
  .swap-module:nth-child(1),
  .swap-module:nth-child(2),
  .swap-module:nth-child(3),
  .swap-module:nth-child(4),
  .swap-module:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .swap-hero {
    min-height: 820px;
    align-items: start;
  }

  .swap-hero > img {
    object-position: 64% center;
  }

  .swap-hero > picture > img {
    object-position: 64% center;
  }

  .swap-hero::after {
    background: linear-gradient(180deg, rgba(247, 247, 247, .98) 0%, rgba(247, 247, 247, .92) 42%, rgba(247, 247, 247, .16) 72%, rgba(247, 247, 247, 0) 100%);
  }

  .swap-hero-copy,
  .swap-hero-capabilities {
    width: 100%;
  }

  .swap-intro-layout,
  .swap-cta {
    grid-template-columns: 1fr;
  }

  .swap-cabinet-figure,
  .swap-cta-media {
    min-height: 420px;
  }

  .swap-cta {
    min-height: 0;
  }

  .swap-intro .swap-heading p {
    white-space: normal;
  }

  .swap-cta-media {
    min-height: 0;
    height: 240px;
  }
}

@media (max-width: 767px) {
  .swap-hero {
    min-height: 880px;
    padding-top: 112px;
  }

  .swap-hero h1 {
    font-size: clamp(48px, 15vw, 68px);
  }

  .swap-hero h2 {
    margin-top: 20px;
  }

  .swap-hero-capabilities,
  .swap-intro-points,
  .swap-module-grid,
  .swap-advantage-grid,
  .swap-scene-grid {
    grid-template-columns: 1fr;
  }

  .swap-module,
  .swap-module:nth-child(3),
  .swap-module:nth-child(4),
  .swap-module:nth-child(5) {
    grid-template-columns: 1fr;
  }

  .swap-module figure {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
    min-height: 180px;
    margin-top: 16px;
  }

  .swap-module img,
  .swap-module:nth-child(3) img,
  .swap-module:nth-child(4) img,
  .swap-module:nth-child(5) img {
    max-width: min(240px, 78vw);
    max-height: 240px;
  }

  .swap-hero-capabilities article {
    min-height: auto;
  }

  .swap-heading h2,
  .swap-cta h2 {
    font-size: clamp(32px, 9vw, 44px);
  }

  .swap-heading p,
  .swap-cta p {
    font-size: 15px;
  }

  .swap-intro-points article,
  .swap-module,
  .swap-advantage-grid article {
    min-height: auto;
  }

  .swap-cabinet-figure,
  .swap-cta-media {
    min-height: 360px;
  }

  .swap-cta {
    gap: 28px;
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .swap-cta-media {
    min-height: 0;
    height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .swap-page *,
  .swap-page *::before,
  .swap-page *::after {
    transition-duration: .01ms !important;
  }
}

/* Align first-screen Banner titles with the homepage hero title hierarchy. */
.swap-hero h1 {
  font-size: var(--fs-hero) !important;
  line-height: var(--lh-hero) !important;
}

/* English battery-swap page: allow compact cards and headings to wrap. */
html[lang="en"] .swap-hero-copy,
html[lang="en"] .swap-hero-capabilities,
html[lang="en"] .swap-hero-capabilities article,
html[lang="en"] .swap-heading,
html[lang="en"] .swap-cta-copy,
html[lang="en"] .swap-module,
html[lang="en"] .swap-advantage-grid article,
html[lang="en"] .swap-scene-grid article {
  min-width: 0;
  max-width: 100%;
}

html[lang="en"] .swap-hero h1,
html[lang="en"] .swap-hero h2,
html[lang="en"] .swap-hero-copy > p,
html[lang="en"] .swap-hero-capabilities strong,
html[lang="en"] .swap-hero-capabilities span,
html[lang="en"] .swap-heading h2,
html[lang="en"] .swap-heading h3,
html[lang="en"] .swap-heading p,
html[lang="en"] .swap-cta-copy h2,
html[lang="en"] .swap-cta-copy p,
html[lang="en"] .swap-module h3,
html[lang="en"] .swap-module p,
html[lang="en"] .swap-advantage-grid h3,
html[lang="en"] .swap-advantage-grid p,
html[lang="en"] .swap-scene-grid h3,
html[lang="en"] .swap-scene-grid p {
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: normal;
}

@media (max-width: 600px) {
  html[lang="en"] .swap-hero-copy,
  html[lang="en"] .swap-heading,
  html[lang="en"] .swap-cta-copy {
    width: min(92vw, 100%);
    max-width: 92vw;
  }
}
