.lore-page {
  width: 100%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  margin-top: calc(-1 * var(--header-bar-height));
}

.lore-section {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
}

.lore-section__eyebrow {
  margin: 0;
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 2.9952px;
  text-transform: uppercase;
  color: #d0b16f;
}

.lore-section__eyebrow--right {
  color: #aebbd1;
  letter-spacing: 2px;
}

.lore-hero {
  min-height: 100svh;
}

.lore-hero__media {
  position: absolute;
  inset: 0;
}

.lore-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 61px;
  background: url("/assets/content-defaults/lore/separator-1-2-bottom.webp") center/cover no-repeat;
  z-index: 3;
  pointer-events: none;
}

.lore-hero__media-wrap,
.lore-hero__media-wrap > img,
.lore-hero__media-wrap > video,
.lore-hero__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lore-hero__content {
  position: relative;
  z-index: 2;
  width: 700px;
  margin-left: auto;
  margin-right: 72px;
  padding-top: 220px;
  text-align: center;
}

.lore-hero .lore-section__title {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: 118px;
  line-height: 115px;
  letter-spacing: 2px;
  color: #fbf0c9;
  text-transform: uppercase;
}

.lore-section__lead {
  margin: 20px auto 0;
  max-width: 630px;
  font-family: var(--font-body);
  font-size: var(--text-lead-size);
  line-height: var(--text-lead-lh);
  color: #dde9ff;
}

.lore-cta-row {
  margin-top: 18px;
}

.lore-hero__link {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #d0b16f;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 2px;
  color: #dde9ff;
  text-transform: uppercase;
}

.lore-story {
  min-height: 100svh;
  padding: 128px 50px 96px;
}

.lore-story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 1;
}

.lore-story::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgb(4 15 35 / 0.9) 32.06%, rgb(4 15 35 / 0) 90.3%);
}

.lore-story[data-lore-section="kingdomThatWas"] {
  --lore-story-frame-top-mask: url("/assets/content-defaults/lore/separator-1-2-top.webp");
  --lore-story-frame-bottom-mask: url("/assets/content-defaults/lore/separator-2-3-bottom.webp");
}

.lore-story[data-lore-section="kingdomThatWas"]::before {
  background-image: url("/assets/content-defaults/lore/story-kingdom-bg.webp");
}

.lore-story[data-lore-section="ageOfContracts"] {
  --lore-story-frame-top-mask: url("/assets/content-defaults/lore/separator-2-3-top.webp");
  --lore-story-frame-bottom-mask: url("/assets/content-defaults/lore/separator-3-4-bottom.webp");
}

.lore-story[data-lore-section="ageOfContracts"]::before {
  background-image: url("/assets/content-defaults/lore/story-contracts-bg.webp");
}

.lore-story[data-lore-section="warYetUnnamed"] {
  --lore-story-frame-top-mask: url("/assets/content-defaults/lore/separator-3-4-top.webp");
  --lore-story-frame-bottom-mask: url("/assets/content-defaults/lore/separator-4-cta-bottom.webp");
}

.lore-story[data-lore-section="warYetUnnamed"]::before {
  background-image: url("/assets/content-defaults/lore/story-war-bg.webp");
}

.lore-story__content {
  position: relative;
  z-index: 3;
  width: min(697px, 100%);
}

.lore-story__labels {
  display: flex;
  justify-content: space-between;
  min-height: 40px;
}

.lore-story__title {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: 82px;
  line-height: 80px;
  letter-spacing: 2px;
  color: #dde9ff;
  text-transform: uppercase;
}

.lore-story__text {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.lore-story__paragraph {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-paragraph-size);
  line-height: var(--text-paragraph-lh);
  color: #dde9ff;
  text-align: justify;
  text-align-last: left;
}

.lore-story__highlight-line {
  margin: 28px 0 0;
  padding: 16px 0;
  border-top: 1px solid #5a5c77;
  border-bottom: 1px solid #5a5c77;
  text-align: center;
}

.lore-story__highlight {
  font-family: var(--font-display);
  font-size: var(--text-lead-size);
  line-height: 1.45;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fbf0c9;
}

.lore-story__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background-color: transparent;
}

.lore-story__edge {
  position: absolute;
  left: 0;
  right: 0;
  height: 61px;
  z-index: 2;
  pointer-events: none;
  background-color: var(--color-bg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.lore-story__edge--top {
  top: 0;
  -webkit-mask-image: var(--lore-story-frame-top-mask);
  mask-image: var(--lore-story-frame-top-mask);
  -webkit-mask-size: 100% 61px;
  mask-size: 100% 61px;
  -webkit-mask-position: top center;
  mask-position: top center;
}

.lore-story__edge--bottom {
  bottom: 0;
  -webkit-mask-image: var(--lore-story-frame-bottom-mask);
  mask-image: var(--lore-story-frame-bottom-mask);
  -webkit-mask-size: 100% 61px;
  mask-size: 100% 61px;
  -webkit-mask-position: bottom center;
  mask-position: bottom center;
}

.lore-story__image {
  position: absolute;
  z-index: 1;
  display: block;
  height: auto;
  background: transparent;
}

.lore-hero__media,
.lore-hero__media-wrap,
.lore-hero__image,
.lore-hero__video {
  background-color: transparent;
}

.lore-story__image--base {
  bottom: 0;
  right: 0;
}

.lore-story__image--overlay {
  bottom: 120px;
  right: 34px;
  width: 268px;
  height: auto;
}

.lore-story__image--base-kingdomThatWas {
  width: min(760px, 100%);
  right: -48px;
}

.lore-story__image--base-ageOfContracts {
  width: min(720px, 100%);
  left: -36px;
  right: auto;
}

.lore-story__image--base-warYetUnnamed {
  width: min(790px, 100%);
  right: -24px;
}

.lore-story--flip::after {
  background: linear-gradient(270deg, rgb(4 15 35 / 0.9) 32.06%, rgb(4 15 35 / 0) 90.3%);
}

.lore-story--flip .lore-story__content {
  margin-left: auto;
}

.lore-story--flip .lore-story__media {
  left: 0;
  right: auto;
}

.lore-story--flip .lore-story__image--base {
  left: 0;
  right: auto;
}

.lore-story--flip .lore-story__image--overlay {
  left: 34px;
  right: auto;
}

.lore-section--cta {
  background: var(--color-bg);
  text-align: center;
  padding: 128px 20px;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lore-section--cta .lore-section__title {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: 74px;
  line-height: 72px;
  letter-spacing: 2px;
  color: #dde9ff;
  text-transform: uppercase;
}

.lore-section--cta .lore-section__lead {
  margin-top: 20px;
  max-width: 680px;
  font-size: var(--text-lead-size);
  line-height: var(--text-lead-lh);
  color: #aebbd1;
}

.lore-cta__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 229.818px;
  height: 96px;
  background: url("/assets/content-defaults/lore/cta-button.webp") center/contain no-repeat;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  text-decoration: none;
  color: #29354c;
}

.lore-cta__button:hover,
.lore-cta__button:focus-visible {
  text-decoration: none;
  color: #29354c;
}

/* Kept for smoke compatibility; active CTA uses lore-cta__button. */
.lore-button {
  display: inline-flex;
}

.lore-required-fallback {
  margin: 24px;
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  color: var(--color-text-soft);
  background: var(--color-surface-overlay-strong);
}

@media (prefers-reduced-motion: reduce) {
  .lore-hero__video {
    display: none;
  }

  .lore-hero__image--motion-fallback {
    display: block;
  }
}

@media (max-width: 1024px) {
  .lore-page {
    margin-top: calc(-1 * var(--header-mobile-bar-height));
  }

  .lore-hero {
    min-height: 100svh;
  }

  .lore-hero__content {
    width: 375px;
    margin: 0 auto;
    padding-top: 220px;
    padding-inline: 20px;
  }

  .lore-hero .lore-section__title {
    margin-top: 20px;
    font-size: 40px;
    line-height: 40px;
  }

  .lore-section__lead {
    margin-top: 20px;
    max-width: 335px;
    font-size: var(--text-lead-size);
    line-height: var(--text-lead-lh);
  }

  .lore-section.lore-story {
    height: auto;
    min-height: 0;
    overflow: hidden;
    padding: 40px 0 0;
  }

  .lore-story::after,
  .lore-story--flip::after {
    background: linear-gradient(180deg, rgb(4 15 35 / 0.92) 0%, rgb(4 15 35 / 0.55) 42%, rgb(4 15 35 / 0) 58%);
    background-repeat: no-repeat;
    background-size: 100% 52%;
    background-position: top center;
  }

  .lore-story__content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding-inline: 20px;
    margin-bottom: 4px;
  }

  .lore-story__labels {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .lore-story__title {
    font-size: 40px;
    line-height: 40px;
    color: var(--color-text-gold-light);
  }

  .lore-story__text {
    gap: 12px;
  }

  .lore-story__paragraph {
    margin: 0;
    font-size: var(--text-paragraph-size);
    line-height: var(--text-paragraph-lh);
    color: var(--color-text-soft);
  }

  .lore-story__labels .lore-section__eyebrow {
    color: var(--color-text-gold);
  }

  .lore-story__labels .lore-section__eyebrow--right {
    color: var(--color-text-steel);
  }

  .lore-story__highlight-line {
    margin-top: 20px;
    margin-bottom: 8px;
    padding: 16px 0;
  }

  .lore-story__highlight {
    font-size: var(--text-lead-size);
    line-height: 1.45;
    letter-spacing: 0.04em;
  }

  .lore-story::before {
    background-size: cover;
    background-repeat: no-repeat;
  }

  .lore-story[data-lore-section="kingdomThatWas"]::before {
    background-position: center 22%;
  }

  .lore-story[data-lore-section="ageOfContracts"]::before {
    background-position: center 28%;
  }

  .lore-story[data-lore-section="warYetUnnamed"]::before {
    background-position: center 24%;
  }

  .lore-hero__image,
  .lore-hero__video {
    object-position: center 18%;
  }

  .lore-story__media,
  .lore-story--flip .lore-story__media {
    position: relative;
    inset: auto;
    left: auto;
    right: auto;
    width: 100%;
    min-height: 368px;
    height: clamp(368px, 98vw, 448px);
    margin-top: 28px;
    margin-bottom: 0;
    overflow: hidden;
    z-index: 1;
  }

  .lore-story__image--base,
  .lore-story__image--base-kingdomThatWas,
  .lore-story__image--base-ageOfContracts,
  .lore-story__image--base-warYetUnnamed,
  .lore-story--flip .lore-story__image--base {
    position: absolute;
    left: 54%;
    right: auto;
    bottom: 0;
    top: auto;
    display: block;
    width: min(408px, 100%);
    max-width: none;
    max-height: 94%;
    height: auto;
    margin: 0;
    object-fit: contain;
    object-position: bottom center;
    transform: translateX(-50%);
    z-index: 1;
  }

  .lore-story__image--base-kingdomThatWas {
    left: 56%;
  }

  .lore-story__image--base-ageOfContracts,
  .lore-story--flip .lore-story__image--base {
    left: 52%;
  }

  .lore-story__image--base-warYetUnnamed {
    left: 54%;
  }

  .lore-story__image--overlay,
  .lore-story__image--overlay-kingdomThatWas,
  .lore-story__image--overlay-warYetUnnamed,
  .lore-story__image--overlay-ageOfContracts,
  .lore-story--flip .lore-story__image--overlay {
    width: 118px;
    height: auto;
    bottom: 78px;
    z-index: 1;
  }

  .lore-story__image--overlay-kingdomThatWas,
  .lore-story__image--overlay-warYetUnnamed {
    left: 20px;
    right: auto;
  }

  .lore-story__image--overlay-ageOfContracts,
  .lore-story--flip .lore-story__image--overlay {
    right: 20px;
    left: auto;
  }

  .lore-section--cta {
    padding: 60px 20px;
  }

  .lore-section--cta .lore-section__title {
    font-size: 30px;
    line-height: 46px;
  }

  .lore-section--cta .lore-section__lead {
    max-width: 335px;
    font-size: var(--text-lead-size);
    line-height: var(--text-lead-lh);
  }

  .lore-cta__button {
    width: 172.364px;
    height: 72px;
    font-size: 24px;
  }

  .lore-story.lore-story--bright-field::after {
    background: transparent;
  }

  .lore-story.lore-story--bright-field .lore-story__title,
  .lore-story.lore-story--bright-field .lore-story__paragraph,
  .lore-story.lore-story--bright-field .lore-story__highlight {
    color: var(--color-bg);
  }

  .lore-story.lore-story--bright-field .lore-story__labels .lore-section__eyebrow {
    color: #6b5630;
  }

  .lore-story.lore-story--bright-field .lore-story__labels .lore-section__eyebrow--right {
    color: #3d4a63;
  }

  .lore-story.lore-story--bright-field .lore-story__highlight-line {
    border-top-color: rgb(4 15 35 / 0.35);
    border-bottom-color: rgb(4 15 35 / 0.35);
  }

  .lore-story.lore-story--bright-field .lore-story__highlight[style] {
    color: var(--color-bg) !important;
  }
}

@media (max-width: 375px) {
  .lore-hero__content,
  .lore-story__content {
    padding-inline: 20px;
  }
}
