/* Landing page: the news backdrop carries the portal artwork into Historia. */
.updates.section-wrap {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: none;
  padding: clamp(76px, 7vw, 134px) max(5%, calc((100% - 1240px) / 2)) clamp(88px, 8vw, 150px);
  background:
    linear-gradient(to bottom, var(--paper) 0, transparent clamp(60px, 6vw, 112px)),
    linear-gradient(to top, #ccb88d 0, transparent clamp(58px, 6vw, 108px)),
    radial-gradient(ellipse at 50% 30%, #564735, #2f281f 78%);
  color: #f4e9d2;
}

.updates::before,
.updates::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset-block: 5%;
  width: min(37%, 600px);
  background-repeat: no-repeat;
  background-size: cover;
  filter: grayscale(1) sepia(.55);
  opacity: .28;
  pointer-events: none;
}

.updates::before {
  left: 0;
  background-image: url('portal/assets/tempskron.jpg');
  background-position: 65% center;
  mask-image: radial-gradient(ellipse 105% 52% at left center, #000 20%, transparent 98%);
}

.updates::after {
  right: 0;
  background-image: url('portal/assets/morion.jpg');
  background-position: 20% center;
  mask-image: radial-gradient(ellipse 105% 52% at right center, #000 20%, transparent 98%);
}

.updates .eyebrow { color: #e0c38e; }
.updates .news-card { color: var(--ink); box-shadow: 0 12px 30px #211b1680; }

.story {
  --story-trim: clamp(20px, 2.5vw, 48px);
  position: relative;
  isolation: isolate;
  overflow: clip;
  background:
    linear-gradient(to bottom, #4a3a2a, transparent 230px, transparent calc(100% - 190px), #2b3228),
    radial-gradient(ellipse at center, #4b3d30, #29231d 80%);
}

/* The source is 559 px tall, with the carving in the first or last 60 px. */
.story::before,
.story::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  height: var(--story-trim);
  z-index: 2;
  background-repeat: repeat-x;
  background-size: auto calc(var(--story-trim) * 559 / 60);
  pointer-events: none;
}

.story::before {
  top: 0;
  background-image: url('assets/fondo-historia2.jpg');
  background-position: center top;
}

.story::after {
  bottom: 0;
  background-image: url('assets/fondo-historia1.jpg');
  background-position: center bottom;
}

.story .chapter-copy {
  position: relative;
  z-index: 1;
  isolation: isolate;
  background: none;
}

.story .chapter-copy::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url('assets/fondo-papel-historia.jpg') center / 100% 100% no-repeat;
  mask-image:
    linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent),
    linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 12px), transparent);
  mask-composite: intersect;
}

.story .chapter-art img {
  mask-image:
    linear-gradient(to right, transparent, #000 6%, #000 94%, transparent),
    linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
  mask-composite: intersect;
}

@media (max-width: 800px) {
  .updates::before,
  .updates::after { width: 50%; opacity: .17; }
}
.story .section-heading { color: #f1e2c5; }
.story .section-heading .eyebrow { color: #d7b986; }
.story .chapter { position: relative; border-bottom-color: #d5b67d2e; }
.story .chapter-art { position: relative; z-index: 1; }

.story .chapter::before,
.story .chapter::after {
  content: '';
  position: absolute;
  z-index: 0;
  inset-block: -10%;
  width: clamp(220px, 36vw, 640px);
  background: var(--story-sketch-left) center / contain no-repeat;
  filter: grayscale(1) invert(1) contrast(1.35) brightness(1.45) sepia(.35);
  mix-blend-mode: screen;
  opacity: .34;
  mask-image: radial-gradient(ellipse at center, #000 26%, transparent 73%);
  pointer-events: none;
}

.story .chapter::before { left: min(0px, calc((100% - 100vw) / 2)); }
.story .chapter::after {
  right: min(0px, calc((100% - 100vw) / 2));
  background-image: var(--story-sketch-right);
}

.story .chapter-1 {
  --story-sketch-left: url('assets/historia-bocetos/pt-tempskrons-sketch.jpg');
  --story-sketch-right: url('assets/historia-bocetos/pt-knight-sketch.jpg');
}
.story .chapter-2 {
  --story-sketch-left: url('assets/historia-bocetos/pt-mechanician-sketch1.jpg');
  --story-sketch-right: url('assets/historia-bocetos/pt-fighter-sketches.jpg');
}
.story .chapter-3 {
  --story-sketch-left: url('assets/historia-bocetos/pt-pikeman-sketches.jpg');
  --story-sketch-right: url('assets/historia-bocetos/pt-atalanta-sketch.jpg');
}
.story .chapter-4 {
  --story-sketch-left: url('assets/historia-bocetos/pt-magician-sketch.jpg');
  --story-sketch-right: url('assets/historia-bocetos/pt-shaman-sketch.jpg');
}
.story .chapter-5 {
  --story-sketch-left: url('assets/historia-bocetos/pt-priestess-sketch.jpg');
  --story-sketch-right: url('assets/historia-bocetos/pt-fighter-sketch.jpg');
}

@media (max-width: 800px) {
  .story .chapter::before,
  .story .chapter::after { opacity: .21; }
}
.features .feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.features .feature-card {
  padding: 0;
  overflow: hidden;
}

.features .feature-card > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #142624;
  border-bottom: 1px solid #c9ae7640;
}

.features .feature-copy {
  padding: 22px 18px 24px;
}

.features .feature-copy h3 { margin: 0 0 12px; }
.features .feature-copy p { margin: 0; }

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

@media (max-width: 520px) {
  .features .feature-grid { grid-template-columns: minmax(0, 1fr); }
}