:root {
  --ink: #050810;
  --ink-soft: #0b101b;
  --panel: #101725;
  --paper: #f3f5f8;
  --muted: #a5adbb;
  --blue: #6ab9ff;
  --blue-deep: #164e82;
  --gold: #d7a45a;
  --gold-soft: #f3d39a;
  --line: rgba(255, 255, 255, 0.14);
  --hero-edge-inset: 4.65rem;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
}

a { color: inherit; }

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem clamp(1.25rem, 5vw, 5rem);
  border-bottom: 1px solid rgba(106, 185, 255, .38);
  background: linear-gradient(to bottom, rgba(5, 8, 16, 0.72), transparent);
  box-shadow: 0 1px 10px rgba(106, 185, 255, .2);
}

.mini-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
}

.mini-mark {
  display: inline-block;
  width: .75rem;
  height: .75rem;
  transform: rotate(45deg);
  border: 1px solid var(--blue);
  background: radial-gradient(circle, #fff 0 17%, var(--gold) 18% 45%, transparent 46%);
  box-shadow: 0 0 18px rgba(106, 185, 255, .7);
}

nav { display: flex; gap: clamp(1.25rem, 3vw, 2.75rem); }
nav a {
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: .86rem;
  letter-spacing: .11em;
  text-transform: uppercase;
}
nav a:hover, nav a:focus-visible { color: #fff; }

.hero {
  position: relative;
  display: grid;
  min-height: max(100svh, 50vw);
  isolation: isolate;
  overflow: hidden;
  background: #03060c;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: var(--hero-edge-inset);
  left: 0;
  height: 1px;
  pointer-events: none;
  background: rgba(106, 185, 255, .38);
  box-shadow: 0 0 10px rgba(106, 185, 255, .2);
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% top;
  filter: brightness(.92);
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2,5,12,.94) 0%, rgba(2,5,12,.76) 16%, rgba(2,5,12,.34) 30%, rgba(2,5,12,.1) 43%, rgba(2,5,12,.03) 58%),
    linear-gradient(0deg, rgba(3,6,12,.85) 0%, transparent 30%, rgba(3,6,12,.15) 70%);
}

.hero-content {
  align-self: center;
  width: min(42rem, 92vw);
  padding: 8.5rem 0 6rem clamp(1.25rem, 7vw, 7.5rem);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--gold-soft);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}

h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: .95; }
h1 {
  display: flex;
  flex-direction: column;
  font-size: clamp(4rem, 8vw, 8.5rem);
  letter-spacing: -.055em;
  text-shadow: 0 4px 40px rgba(0,0,0,.5);
}
h1 span:last-child {
  margin-left: .42em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.72);
}

.brand-rule {
  position: relative;
  width: min(28rem, 80%);
  height: 1px;
  margin: 2rem 0;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.brand-rule span {
  position: absolute;
  top: 50%;
  left: 0;
  width: .75rem;
  height: .75rem;
  transform: translateY(-50%) rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 24px rgba(215,164,90,.65);
}

.hero-line {
  margin: 0 0 .45rem;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}
.hero-copy { max-width: 34rem; margin: 0 0 2rem; color: rgba(255,255,255,.68); font-size: 1.05rem; }
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: #fff;
  font-size: .82rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.hero-link span { color: var(--blue); font-size: 1.15rem; }
.hero-credit {
  position: absolute;
  right: clamp(1.25rem, 3vw, 3rem);
  bottom: 1.5rem;
  margin: 0;
  color: rgba(255,255,255,.55);
  font-size: .75rem;
  letter-spacing: .04em;
}

.worlds {
  padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 7vw, 7.5rem);
  background:
    radial-gradient(circle at 20% 0%, rgba(22,78,130,.18), transparent 34%),
    var(--ink-soft);
}
.back-to-top {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: .65rem;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0 auto;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color .2s ease;
}
.back-to-top span {
  color: var(--blue);
  font-size: 1rem;
  transition: transform .2s ease;
}
.back-to-top:hover,
.back-to-top:focus-visible { color: #fff; }
.back-to-top:hover span,
.back-to-top:focus-visible span { transform: translateY(-.2rem); }
.section-heading { display: grid; max-width: 50rem; margin-bottom: 4rem; }
.section-heading h2, .studio h2, .about h2 { font-size: clamp(3rem, 6vw, 5.75rem); letter-spacing: -.035em; }
.section-heading > p:last-child { max-width: 42rem; color: var(--muted); font-size: 1.1rem; }

.world-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 1.25rem; }
.world-card {
  position: relative;
  display: flex;
  min-height: 31rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}
.world-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .75;
  transition: transform .55s ease, opacity .55s ease;
}
.world-card:hover::before { transform: scale(1.04); opacity: .95; }
.legends-card::before {
  background:
    linear-gradient(0deg, rgba(4,8,16,.96), rgba(4,8,16,.15) 75%),
    radial-gradient(circle at 75% 25%, rgba(59,136,211,.52), transparent 27%),
    linear-gradient(135deg, #071321, #19101a 70%, #4c1d24);
}
.kimberly-card::before {
  background:
    linear-gradient(0deg, rgba(4,8,16,.95), rgba(4,8,16,.08) 78%),
    radial-gradient(circle at 70% 18%, rgba(232,139,77,.45), transparent 30%),
    linear-gradient(140deg, #101a2d, #5d2941 63%, #ad6747);
}
.card-number {
  position: absolute;
  z-index: 1;
  top: 1.75rem;
  right: 2rem;
  color: rgba(255,255,255,.2);
  font-family: var(--serif);
  font-size: 4rem;
}
.card-copy { position: relative; z-index: 1; align-self: end; max-width: 38rem; padding: clamp(2rem, 5vw, 4rem); }
.card-kicker { margin: 0 0 1rem; color: var(--gold-soft); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; }
.world-card h3 { font-size: clamp(2.5rem, 4.5vw, 4.75rem); }
.world-card h3::after { content: ""; display: block; width: 4rem; height: 1px; margin: 1.5rem 0; background: var(--gold); }
.world-card p { color: rgba(255,255,255,.72); }
.card-detail { margin: 1.75rem 0 0; color: rgba(255,255,255,.46) !important; font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-top: 1.5rem;
  color: var(--gold-soft);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.card-link span { color: var(--blue); transition: transform .2s ease; }
.card-link:hover span,
.card-link:focus-visible span { transform: translateX(.25rem); }

.studio {
  display: grid;
  grid-template-columns: auto minmax(16rem, 1fr) minmax(16rem, .7fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 7vw, 7.5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #070b13;
}
.studio > p { color: var(--muted); font-size: 1.08rem; }
.studio-mark {
  display: grid;
  place-items: center;
  width: clamp(5rem, 9vw, 8rem);
  aspect-ratio: 1;
  transform: rotate(45deg);
  border: 1px solid var(--blue-deep);
  box-shadow: inset 0 0 30px rgba(106,185,255,.08), 0 0 30px rgba(106,185,255,.08);
}
.studio-mark span { width: 32%; aspect-ratio: 1; background: var(--gold); box-shadow: 0 0 24px rgba(215,164,90,.7); }
.studio .back-to-top {
  grid-column: 1 / -1;
  margin-top: 0;
  justify-self: end;
}

.about { max-width: 70rem; padding: clamp(6rem, 13vw, 12rem) clamp(1.25rem, 7vw, 7.5rem); }
.about h2 { max-width: 55rem; }
.about > p:last-child { max-width: 47rem; margin-top: 2rem; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); }

.resources {
  padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 7vw, 7.5rem);
  background:
    radial-gradient(circle at 80% 0%, rgba(106,185,255,.1), transparent 30%),
    #090e18;
}
.resources-heading {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(16rem, .65fr);
  column-gap: clamp(2rem, 8vw, 8rem);
  align-items: end;
  margin-bottom: 3.5rem;
}
.resources-heading .eyebrow { grid-column: 1 / -1; }
.resources-heading h2 { font-size: clamp(3rem, 6vw, 5.75rem); letter-spacing: -.035em; }
.resources-heading > p:last-child { color: var(--muted); font-size: 1.05rem; }
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.resource-grid article {
  min-height: 19rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.018);
}
.resource-grid article > span {
  display: block;
  margin-bottom: clamp(3rem, 7vw, 6rem);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.1rem;
}
.resource-grid h3 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
.resource-grid p { color: var(--muted); }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem clamp(1.25rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  color: rgba(255,255,255,.54);
}
footer p { margin: 0; font-size: .82rem; }

/* Kallista character page */
.character-page {
  background:
    linear-gradient(rgba(5,8,15,.94), rgba(5,8,15,.94)),
    repeating-linear-gradient(90deg, transparent 0 4rem, rgba(106,185,255,.025) 4rem 4.08rem),
    #04070d;
}
.character-header { position: absolute; z-index: 20; }
.character-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 58%) minmax(24rem, 42%);
  height: 100svh;
  min-height: 0;
  overflow: hidden;
  background: #02050a;
}
.character-hero::after {
  content: "";
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: var(--hero-edge-inset);
  left: 0;
  height: 1px;
  pointer-events: none;
  background: rgba(106,185,255,.38);
  box-shadow: 0 0 10px rgba(106,185,255,.2);
}
.character-hero-image {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 1;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #02050a;
}
.character-hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 45%, rgba(2,5,11,.42) 65%, rgba(2,5,11,.88) 100%),
    linear-gradient(0deg, rgba(2,5,11,.42), transparent 35%);
  pointer-events: none;
}
.character-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% top;
}
.character-hero-copy {
  position: absolute;
  top: clamp(7rem, 14vh, 10rem);
  left: 50%;
  right: 3.5%;
  z-index: 2;
  width: auto;
  padding: 0;
  text-align: center;
}
.character-hero h1 {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(2.7rem, 3.6vw, 4.7rem);
  letter-spacing: -.035em;
  line-height: .95;
  text-shadow: 0 6px 50px rgba(0,0,0,.65);
}
.character-hero-copy .brand-rule { margin-inline: auto; }
.character-title {
  margin: 0 0 2.5rem;
  color: rgba(244,239,229,.84);
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.3vw, 2.35rem);
  line-height: 1.25;
}
.character-title em { font-weight: 400; }
.character-quote {
  position: absolute;
  z-index: 3;
  left: 50%;
  right: 3.5%;
  top: 55%;
  transform: translateY(-50%);
  width: auto;
  margin: 0;
  color: rgba(244,239,229,.86);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.55vw, 1.65rem);
  font-style: italic;
  line-height: 1.38;
  text-align: center;
  text-shadow: 0 3px 22px rgba(0,0,0,.9);
}
.character-story-link {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(var(--hero-edge-inset) + 1rem);
  transform: translateX(-50%);
  white-space: nowrap;
}
.character-page main > section:not(:last-child) {
  margin-bottom: clamp(3rem, 5vw, 4.5rem);
}
.character-story {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(22rem, .95fr);
  min-height: 48rem;
  border-bottom: 1px solid rgba(106,185,255,.48);
  box-shadow: 0 4px 14px rgba(106,185,255,.12);
  background: #070b13;
}
.character-story > * { min-width: 0; }
.story-image {
  position: relative;
  min-height: 48rem;
  overflow: hidden;
}
.story-image::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 80px rgba(0,0,0,.38);
  pointer-events: none;
}
.story-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rage-story .story-image img { object-position: 52% center; }
.undying-story .story-image img { object-position: 45% center; }
.story-number {
  position: absolute;
  z-index: 1;
  top: 2rem;
  left: 2rem;
  color: rgba(255,255,255,.35);
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: .14em;
}
.story-copy {
  align-self: center;
  padding: clamp(4rem, 8vw, 8rem) clamp(1.5rem, 6vw, 6rem);
}
.gallery-heading h2 {
  font-size: clamp(3.6rem, 7vw, 7rem);
  letter-spacing: -.045em;
}
.story-copy > p {
  max-width: 40rem;
  color: #f3f0e9;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.3vw, 2.25rem);
  line-height: 1.28;
}
.story-lead {
  margin-bottom: 2rem;
  color: #f3f0e9 !important;
}
.story-copy .story-emphasis {
  margin: 2rem 0;
  color: #fff !important;
  font-size: clamp(1.65rem, 2.3vw, 2.25rem) !important;
}
.rage-story {
  background:
    radial-gradient(circle at 85% 30%, rgba(126,12,18,.15), transparent 36%),
    #090b11;
}
.undying-story {
  grid-template-columns: minmax(22rem, .95fr) minmax(0, 1.05fr);
  background:
    radial-gradient(circle at 15% 35%, rgba(22,78,130,.18), transparent 38%),
    #060b13;
}
.undying-story .story-number { right: 2rem; left: auto; }
.character-gallery {
  padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 6vw, 6rem);
  border-bottom: 1px solid rgba(106,185,255,.48);
  box-shadow: 0 4px 14px rgba(106,185,255,.12);
  background:
    linear-gradient(90deg, transparent 0 7%, rgba(216,169,92,.045) 7% 7.1%, transparent 7.1% 93%, rgba(216,169,92,.045) 93% 93.1%, transparent 93.1%),
    radial-gradient(circle at 50% 0%, rgba(34,92,145,.14), transparent 30%),
    #050810;
}
.gallery-heading {
  margin-bottom: 3.5rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  grid-template-rows: repeat(2, clamp(20rem, 34vw, 38rem));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}
.gallery-item::after {
  content: "View full image ↗";
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: .45rem .7rem;
  color: rgba(255,255,255,.8);
  background: rgba(3,6,12,.68);
  backdrop-filter: blur(8px);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-item:hover::after,
.gallery-item:focus-visible::after { opacity: 1; }
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease;
}
.gallery-item:hover img,
.gallery-item:focus-visible img { transform: scale(1.025); }
.gallery-wide img { object-position: center 28%; }
.gallery-close img { object-position: center; }
.gallery-library img { object-position: 58% center; }
.gallery-full img { object-position: center 18%; }



    /*----mobile section-----*/
    /*=====media 1: wide / short screens======*/
    
    
    

@media (min-width: 901px) and (max-height: 700px) {
  .character-hero-copy { top: 5.5rem; }
  .character-hero h1 { font-size: clamp(2.4rem, 3.2vw, 3.8rem); }
  .character-hero-copy .brand-rule { margin-block: 1.15rem; }
  .character-title {
    margin-bottom: 0;
    font-size: clamp(1.35rem, 1.8vw, 1.8rem);
  }
  .character-quote {
    top: 58%;
    font-size: clamp(1.05rem, 1.3vw, 1.35rem);
    line-height: 1.3;
  }
  .character-story-link { bottom: calc(var(--hero-edge-inset) + .75rem); }
}

@media (max-width: 900px) {
  .hero { min-height: 50rem; }
  .hero-art { object-position: 63% top; opacity: .88; }
  .hero-shade { background: linear-gradient(90deg, rgba(2,5,12,.91), rgba(2,5,12,.42) 44%, rgba(2,5,12,.08) 67%), linear-gradient(0deg, rgba(3,6,12,.84), transparent 45%); }
  .hero-content { width: min(36rem, 88vw); }
  .world-grid { grid-template-columns: 1fr; }
  .world-card { min-height: 26rem; }
  .studio { grid-template-columns: auto 1fr; }
  .studio > p { grid-column: 2; margin-top: -1rem; }
  .resources-heading { grid-template-columns: 1fr; align-items: start; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-grid article { min-height: auto; }
  .resource-grid article > span { margin-bottom: 2rem; }
  .character-hero {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
  }
  .character-hero-image {
    grid-column: 1;
    grid-row: 1;
    height: auto;
    min-height: 43rem;
    max-height: 52rem;
  }
  .character-hero-copy {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    padding: 5rem clamp(1.5rem, 8vw, 4rem) 6rem;
    text-align: left;
  }
  .character-hero-copy .brand-rule { margin-inline: 0; }
  .character-hero h1 {
    max-width: 12ch;
    white-space: normal;
  }
  .character-quote {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
    grid-column: 1;
    grid-row: 3;
    width: auto;
    margin: 0;
    padding: 0 clamp(1.5rem, 8vw, 4rem) 5rem;
    text-align: left;
  }
  .character-story-link {
      position: static;
      grid-column: 1;
      grid-row: 4;
      justify-self: center;
      transform: none;
      margin: -2rem 0 5rem;
}

  .character-story,
  .undying-story { grid-template-columns: 1fr; }
  .story-image { min-height: 38rem; }
  .undying-story .story-copy { order: 2; }
  .undying-story .story-image { order: 1; }
  .gallery-heading { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; grid-template-rows: repeat(4, min(80vw, 38rem)); }
}

@media (max-width: 640px) {
  :root { --hero-edge-inset: 4rem; }
  .site-header { align-items: flex-start; padding-top: 1.1rem; }
  .mini-brand { font-size: .85rem; }
  .site-header > .mini-brand span:last-child { display: none; }
  nav { gap: .75rem; }
  nav a { font-size: .68rem; letter-spacing: .04em; }
  .hero { min-height: 47rem; }
  .hero-art { object-position: 58% top; opacity: .62; }
  .hero-shade { background: linear-gradient(0deg, rgba(2,5,12,.98), rgba(2,5,12,.1) 70%), linear-gradient(90deg, rgba(2,5,12,.82), rgba(2,5,12,.05)); }
  .hero-content { align-self: end; padding: 7rem 1.25rem 6rem; }
  h1 { font-size: clamp(3.7rem, 21vw, 5.5rem); }
  h1 span:last-child { margin-left: .18em; }
  .hero-copy { max-width: 28rem; }
  .hero-credit { left: 1.25rem; right: auto; }
  .section-heading { margin-bottom: 2.5rem; }
  .world-card { min-height: 25rem; }
  .card-copy { padding: 2rem 1.5rem; }
  .studio { grid-template-columns: 1fr; }
  .studio-mark { width: 4.5rem; margin: 1rem; }
  .studio > p { grid-column: 1; margin: 0; }
  footer { align-items: flex-start; flex-direction: column; }
  .character-header nav a:first-child { display: none; }
  .character-hero { padding-top: 0; }
  .character-hero-image { min-height: 31rem; }
  .character-hero-image img { object-position: 30% top; }
  .character-hero-copy { padding: 4rem 1.25rem 5rem; }
  .character-hero h1 { font-size: clamp(3rem, 14vw, 4.8rem); }
  .character-title { font-size: 1.55rem; }
  .story-image { min-height: 29rem; }
  .story-copy { padding: 4.5rem 1.25rem; }
  .gallery-grid { grid-template-rows: repeat(4, 25rem); }
  .gallery-item::after { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .world-card::before { transition: none; }
  .gallery-item img,
  .gallery-item::after { transition: none; }
}
/* The Legends of the Cursed story page */
.legends-page .site-header { border-bottom: 0; box-shadow: none; background: linear-gradient(to bottom, rgba(5,8,16,.78), transparent); }
.legends-hero { position: relative; height: 100svh; min-height: 0; isolation: isolate; overflow: hidden; background: #03060c; }
.legends-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.legends-hero-copy { position: absolute; left: 58%; top: 26%; transform: translate(-50%, -50%); width: min(39vw, 36rem); text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,.9); }
.legends-hero h1, .legends-intro h2, .legends-characters h2 { margin: .2rem 0 1rem; font: 500 clamp(3rem, 5vw, 5.5rem)/.95 var(--serif); }
.legends-hero-copy .brand-rule { margin-inline: auto; }
.legends-hero-copy > p:not(.eyebrow) { margin: 1rem 0; font: italic clamp(1.1rem, 2vw, 1.7rem) var(--serif); color: var(--gold-soft); }
.legends-hero-copy .hero-link { margin-top: .4rem; }
.legends-intro, .legends-characters { padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 8vw, 8rem); border-top: 1px solid rgba(106,185,255,.38); }
.legends-intro { max-width: 90rem; margin: auto; }
.legends-intro h2 { max-width: 55rem; font-size: clamp(3rem, 6vw, 5.5rem); margin-bottom: 2.5rem; }
.legends-intro > p:not(.eyebrow) { max-width: 53rem; font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.8; color: var(--paper); }
.legends-intro > p:not(.eyebrow) + p { margin-top: 1.7rem; }
.legends-characters { background: var(--ink-soft); }
.legends-characters h2 { font-size: clamp(3rem, 6vw, 5.5rem); margin-bottom: 2.5rem; }
.legends-character-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 22rem)); gap: 1.5rem; }
.legends-character-card { display: block; text-decoration: none; border: 1px solid rgba(106,185,255,.38); background: #101725; transition: border-color .2s, transform .2s; }
.legends-character-card:hover, .legends-character-card:focus-visible { border-color: var(--blue); transform: translateY(-3px); }
.legends-character-portrait { display: block; width: 100%; aspect-ratio: 1; background-image: url("assets/loc-intro-16x9.png"); background-size: 500% auto; background-position: 50% 78%; }
.legends-character-card > span:last-child { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; font: 500 1.65rem/1.1 var(--serif); }
.legends-character-card > span:last-child span { color: var(--blue); }
@media (max-width: 800px) {
  .legends-hero { display: flex; flex-direction: column; justify-content: center; padding-top: 4rem; }
  .legends-hero > img { position: relative; width: 100%; height: auto; max-height: 56svh; object-fit: contain; }
  .legends-hero-copy { position: relative; left: auto; top: auto; transform: none; width: auto; padding: 1rem 1.25rem 0; }
  .legends-hero h1 { font-size: clamp(2.6rem, 9vw, 4rem); }
  .legends-hero-copy .eyebrow, .legends-hero-copy .brand-rule { display: none; }
}
@media (max-height: 650px) and (min-width: 801px) {
  .legends-hero-copy { top: 28%; }
  .legends-hero h1 { font-size: clamp(2.5rem, 4vw, 4rem); }
  .legends-hero-copy > p:not(.eyebrow) { margin: .4rem 0; }
}

.legends-intro-divider {
  height: 1px;
  width: 90%;
  margin: 3rem auto 0;
  background: rgba(106, 185, 255, .38);
  box-shadow: 0 0 10px rgba(106, 185, 255, .2);
}

/* Light blue frame at the outer edges of the story hero. */
.legends-hero::before,
.legends-hero::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
  background: rgba(106, 185, 255, .42);
  box-shadow: 0 0 10px rgba(106, 185, 255, .25);
}
.legends-hero::before { top: 0; }
.legends-hero::after { bottom: 0; }
/* Match the original site's visible hero frame placement. */
.legends-page .site-header {
  border-bottom: 1px solid rgba(106, 185, 255, .55);
  box-shadow: 0 1px 10px rgba(106, 185, 255, .28);
}
.legends-hero::before { display: none; }
.legends-hero::after {
  bottom: var(--hero-edge-inset);
  height: 1px;
  background: rgba(106, 185, 255, .55);
  box-shadow: 0 0 10px rgba(106, 185, 255, .3);
}
/* Introduction pairs the story text with Alliester's battlefield image. */
.legends-intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.legends-intro-copy > p:not(.eyebrow) { font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.8; }
.legends-intro-copy > p:not(.eyebrow) + p { margin-top: 1.5rem; }
.legends-intro-copy .eyebrow {
  text-align: center;
}
.legends-intro-image { margin: 0; }
.legends-intro-image img { display: block; width: 100%; height: auto; border: 1px solid rgba(106, 185, 255, .28); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
@media (max-width: 900px) {
  .legends-intro { grid-template-columns: 1fr; }
  .legends-intro-image { max-width: 44rem; }
}
.legends-intro h2 { font-size: clamp(2.9rem, 4vw, 4.5rem); }
/* Reuse the five circular portraits as they appear in the hero artwork. */
.legends-character-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; gap: clamp(.5rem, 2vw, 2rem); }
.legends-character-card { display: block; min-width: 0; text-align: center; background: transparent; border: 0; }
.legends-character-card:hover, .legends-character-card:focus-visible { border: 0; }
.legends-character-card:not(a):hover { transform: none; }
.legends-character-portrait { width: 100%; max-width: 14rem; margin: 0 auto; aspect-ratio: 1; border-radius: 50%; background-size: 836% auto; background-position-y: 80%; }
.portrait-one { background-position-x: 19.7%; }
.portrait-two { background-position-x: 34.6%; }
.portrait-three { background-position-x: 50%; }
.portrait-four { background-position-x: 65.2%; }
.portrait-five { background-position-x: 80.8%; }
.legends-character-card > .legends-character-name { justify-content: center; padding: .9rem .2rem; font-size: clamp(1.2rem, 1.6vw, 1.65rem); }
@media (max-width: 700px) {
  .legends-character-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1.8rem; }
}
.legends-character-card > .legends-character-portrait:last-child { display: block; padding: 0; }
.legends-intro > .back-to-top { grid-column: 1 / -1; }
.legends-characters > .back-to-top { display: inline-flex; margin-top: 3rem; }
