/* Scoped cinematic composition: the hero and Character Preview keep their styles. */
.path-features {
  width: 100%;
  margin: 0;
  padding: 0;
}
.path-introduction {
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  z-index: 2;
  width: min(820px, calc(100% - 96px));
  margin: 0 auto;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
  /* The shared introduction has no controls; gestures reach the slide below it. */
  pointer-events: none;
}
.path-introduction h2 {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  font-weight: 400;
  line-height: 1.15;
}
.path-introduction p { margin: 0; color: var(--muted); font: 1rem/1.8 var(--font-ui); }
.feature-carousel {
  position: relative;
  background: #071a14;
}
.feature-slides[data-enhanced] { display: grid; }
.feature-slides[data-enhanced] .feature-slide { grid-area: 1 / 1; transition: opacity 180ms ease; }
/* Hidden slides still reserve their geometry, but leave focus and the AX tree.
   Keeping both layers painted briefly allows the outgoing artwork to crossfade. */
.feature-slides[data-enhanced] .feature-slide[hidden] {
  display: flex !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 0s 180ms;
}
.feature-slide {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(760px, 56.25vw, 1080px);
  padding: 220px 0 100px;
}
.feature-artwork { position: absolute; inset: 0; margin: 0; z-index: -2; }
.feature-artwork img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}
.feature-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(3, 19, 14, 0.84), rgba(3, 19, 14, 0.55) 140px, transparent 300px),
    linear-gradient(90deg, rgba(3, 19, 14, 0.94), rgba(3, 19, 14, 0.83) 24%, rgba(3, 19, 14, 0.48) 43%, rgba(3, 19, 14, 0.06) 63%, transparent 76%),
    linear-gradient(0deg, var(--bg), transparent 22%);
}
.feature-copy {
  width: min(46%, 540px);
  margin-left: max(48px, calc((100% - 1320px) / 2));
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.feature-slide--combat { align-items: flex-start; padding-top: 240px; }
.feature-slide--combat .feature-artwork img { object-position: 55% 50%; }
.feature-slide--combat .feature-copy { width: min(44%, 560px); margin-left: auto; margin-right: max(48px, calc((100% - 1320px) / 2)); }
.feature-slide--combat .feature-copy h3 { font-size: clamp(2rem, 2.7vw, 2.7rem); }
/* Keep the distant lighthouse above the spellcaster in wide desktop crops. */
.feature-slide--progression .feature-artwork img { object-position: 70% 10%; }
.feature-slide--combat::before {
  background:
    linear-gradient(180deg, rgba(3, 19, 14, 0.84), rgba(3, 19, 14, 0.55) 140px, transparent 300px),
    linear-gradient(0deg, var(--bg), transparent 22%),
    radial-gradient(ellipse at 90% 0%, rgba(3, 19, 14, 0.94), rgba(3, 19, 14, 0.74) 28%, rgba(3, 19, 14, 0.28) 48%, transparent 68%);
}
.feature-number { margin: 0 0 12px; color: var(--muted); font: 0.7rem/1.5 var(--font-ui); letter-spacing: 0.18em; }
.feature-system { margin: 0 0 18px; color: var(--gold); font: 0.75rem/1.5 var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; }
.feature-copy h3 { margin: 0 0 20px; color: var(--gold-bright); font-size: clamp(2rem, 3.2vw, 3rem); font-weight: 400; line-height: 1.14; }
.feature-subheading { margin: 0 0 20px; color: var(--text); font-size: 1.15rem; font-style: italic; line-height: 1.55; }
.feature-description { margin: 0; color: #e0e5da; font: 0.95rem/1.8 var(--font-ui); }
.feature-navigation {
  position: absolute;
  inset: auto 20px 16px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.feature-arrow, .feature-indicator {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 48px;
  min-height: 48px;
  padding: 8px;
  color: var(--gold-bright);
  background: rgba(3, 19, 14, 0.6);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.feature-arrow { font-size: 1.25rem; }
.feature-arrow:disabled { opacity: 0.45; cursor: default; }
.feature-arrow:not(:disabled):hover, .feature-indicator:hover { border-color: var(--gold); background: var(--forest); }
.feature-indicators { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.feature-indicator { border-color: transparent; }
.feature-indicator::before { content: ""; width: 7px; height: 7px; border: 1px solid var(--gold); border-radius: 50%; }
.feature-indicator[aria-current="true"]::before { background: var(--gold); }
.feature-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Keep vertical scrolling and pinch zoom; horizontal gestures change available slides. */
.feature-slides[data-swipe-enabled] { touch-action: pan-y pinch-zoom; }
@media (max-width: 1100px) {
  /* A taller scenic band keeps the shared introduction above the principal subjects.
     Individual focal crops preserve the alchemist, sword clash and Air magic. */
  .path-introduction { top: 32px; width: calc(100% - 64px); max-width: 820px; }
  .path-introduction h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
  .path-introduction p { font-size: 0.95rem; line-height: 1.65; }
  .feature-slide, .feature-slide--combat { min-height: 0; padding: 0; align-items: flex-start; }
  .feature-artwork { bottom: auto; height: 640px; }
  .feature-artwork img { height: 100%; object-fit: cover; object-position: 74% 50%; }
  .feature-slide--combat .feature-artwork img { object-position: 58% 50%; }
  .feature-slide--progression .feature-artwork img { object-position: 70% 50%; }
  .feature-slide::before, .feature-slide--combat::before {
    background:
      linear-gradient(180deg, rgba(3, 19, 14, 0.86), rgba(3, 19, 14, 0.5) 160px, transparent 280px),
      linear-gradient(0deg, var(--bg), transparent 15%),
      linear-gradient(180deg, transparent 360px, rgba(7, 26, 20, 0.12) 430px, rgba(7, 26, 20, 0.92) 560px, #071a14 640px);
  }
  .feature-copy, .feature-slide--combat .feature-copy {
    width: calc(100% - 64px);
    max-width: none;
    margin: 0 auto;
    padding: 540px 0 100px;
  }
}
@media (max-width: 767px) {
  .path-introduction { top: 24px; width: calc(100% - 40px); }
  .path-introduction h2 { font-size: clamp(1.6rem, 5.6vw, 2rem); }
  .path-introduction p { font-size: 0.875rem; line-height: 1.6; }
  .feature-copy, .feature-slide--combat .feature-copy { width: calc(100% - 40px); padding: 540px 0 96px; }
  .feature-copy h3, .feature-slide--combat .feature-copy h3 { font-size: clamp(1.85rem, 7.4vw, 2.5rem); }
  .feature-number { font-size: 0.65rem; margin-bottom: 10px; }
  .feature-system { font-size: 0.7rem; margin-bottom: 16px; }
  .feature-subheading { font-size: 1.1rem; }
  .feature-description { font-size: 0.925rem; }
  /* Five 48px controls fit in one row even at 320px, including a scrollbar. */
  .feature-navigation { inset: auto 16px 16px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .feature-arrow, .feature-indicator,
  .feature-slides[data-enhanced] .feature-slide,
  .feature-slides[data-enhanced] .feature-slide[hidden] { transition: none; }
}
