.features-page-shell {
  display: grid;
  gap: 24px;
}

.features-hero {
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
  gap: 22px;
  align-items: start;
}

.features-hero-copy {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.features-kicker,
.feature-card-kicker,
.features-panel-kicker {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.features-title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 900;
  color: #fff4cd;
  text-shadow:
    0 0 2px rgba(255, 247, 208, 0.9),
    0 0 12px rgba(255, 211, 111, 0.78),
    0 0 28px rgba(255, 175, 47, 0.34);
}

.features-lead,
.feature-gallery-lead {
  margin: 0;
  max-width: 60ch;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.82;
  text-wrap: pretty;
}

.features-quick-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-quick-pill,
.feature-chip {
  min-height: 34px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(160, 185, 226, 0.16);
  background:
    linear-gradient(180deg, rgba(28, 39, 60, 0.96), rgba(13, 21, 36, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(194, 217, 255, 0.06),
    0 12px 24px rgba(2, 5, 12, 0.26);
  color: var(--text-soft);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.features-hero-panel-shell {
  padding: 20px 20px 18px;
  border-radius: 26px;
  border: 1px solid rgba(160, 185, 226, 0.14);
  background: var(--surface-muted);
  box-shadow: var(--shadow-soft);
}

.features-hero-panel-shell h2,
.feature-card h2,
.feature-gallery-copy h2 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.22;
  font-weight: 900;
}

.features-hero-panel-shell {
  display: grid;
  gap: 16px;
  min-height: 100%;
}

.features-highlight-list,
.feature-bullet-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
}

.features-highlight-list li,
.feature-bullet-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.68;
}

.features-highlight-list li::before,
.feature-bullet-list li::before {
  content: "";
  position: absolute;
  top: 0.67em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe38f 0%, #ff9f21 100%);
  box-shadow: 0 0 12px rgba(255, 182, 67, 0.36);
}

.features-highlight-list strong {
  color: var(--text-main);
}

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

.feature-card {
  padding: 22px 22px 20px;
  display: grid;
  gap: 15px;
}

.feature-card-summary {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.72;
}

.feature-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-chip {
  font-size: 0.68rem;
}

.feature-card-footer {
  padding-top: 2px;
  display: flex;
  justify-content: flex-start;
}

.feature-learn-more {
  min-width: 126px;
}

.feature-gallery-shell {
  padding: 24px;
  display: grid;
  gap: 22px;
}

.feature-gallery-copy {
  display: grid;
  gap: 12px;
  max-width: 64rem;
}

.feature-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-gallery-item,
.feature-gallery-empty {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(160, 185, 226, 0.14);
  background: var(--surface-muted);
  box-shadow: var(--shadow-soft);
}

.feature-gallery-item {
  min-height: 250px;
}

.feature-gallery-image {
  width: 100%;
  height: 100%;
  min-height: 250px;
  display: block;
  object-fit: cover;
  background:
    radial-gradient(circle at top, rgba(97, 132, 196, 0.2), transparent 42%),
    linear-gradient(145deg, rgba(23, 33, 51, 0.96), rgba(10, 16, 29, 0.94));
}

.feature-gallery-caption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(165, 186, 222, 0.18);
  background: rgba(8, 15, 28, 0.82);
  color: #f4f8ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.feature-gallery-remove {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(160, 185, 226, 0.24);
  background: rgba(9, 16, 31, 0.78);
  color: #f6f9ff;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(215, 228, 248, 0.08),
    0 10px 24px rgba(1, 4, 10, 0.34);
  backdrop-filter: blur(12px);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.feature-gallery-remove:hover,
.feature-gallery-remove:focus-visible {
  transform: translateY(-1px);
  outline: none;
  border-color: rgba(255, 186, 91, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(215, 228, 248, 0.08),
    0 0 0 4px rgba(255, 177, 66, 0.12),
    0 12px 26px rgba(1, 4, 10, 0.38);
}

.feature-gallery-empty {
  min-height: 230px;
  padding: 24px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
}

.feature-gallery-empty strong {
  font-size: 1rem;
  font-weight: 900;
}

.feature-gallery-empty span {
  max-width: 32ch;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.6;
}

.feature-upload-panel {
  margin-top: 6px;
}

.feature-progress-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.feature-progress-card {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(160, 185, 226, 0.14);
  background: linear-gradient(145deg, rgba(13, 20, 34, 0.94), rgba(23, 33, 49, 0.92));
  box-shadow:
    inset 1px 1px 0 rgba(196, 220, 255, 0.06),
    inset -1px -1px 0 rgba(1, 4, 10, 0.56);
}

.feature-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-main);
}

.feature-progress-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-progress-track {
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(97, 116, 150, 0.32);
}

.feature-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe08a 0%, #eb8f0d 100%);
  transition: width 0.18s ease, background 0.18s ease;
}

.feature-progress-bar[data-tone="success"] {
  background: linear-gradient(90deg, #8ce6be, #1f9a62);
}

.feature-progress-bar[data-tone="error"] {
  background: linear-gradient(90deg, #f7a9b1, #bb4c57);
}

.feature-progress-status {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 0.74rem;
  line-height: 1.55;
}

.feature-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.feature-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.feature-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 9, 18, 0.72);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.26s ease;
}

.feature-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px 24px 22px;
  display: grid;
  gap: 18px;
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  transition:
    opacity 0.28s ease,
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-modal.is-visible .feature-modal-backdrop {
  opacity: 1;
}

.feature-modal.is-visible .feature-modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.feature-modal-stage {
  display: grid;
  gap: 18px;
  transform-origin: center center;
}

.feature-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(160, 185, 226, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(28, 39, 60, 0.96), rgba(13, 21, 36, 0.96));
  color: var(--text-main);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.feature-modal-close:hover,
.feature-modal-close:focus-visible {
  transform: translateY(-1px);
  outline: none;
  border-color: rgba(255, 186, 91, 0.48);
  box-shadow:
    0 0 0 4px rgba(255, 177, 66, 0.12),
    var(--shadow-soft);
}

.feature-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-right: 56px;
}

.feature-modal-counter-wrap {
  display: flex;
  align-items: center;
}

.feature-modal-counter {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(160, 185, 226, 0.16);
  background:
    linear-gradient(180deg, rgba(28, 39, 60, 0.96), rgba(13, 21, 36, 0.96));
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.feature-modal-title {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(1.56rem, 3.2vw, 2.34rem);
  line-height: 1.02;
  font-weight: 900;
}

.feature-modal-lead {
  margin: 0;
  max-width: 60ch;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.78;
}

.feature-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(240px, 0.82fr);
  gap: 18px;
}

.feature-modal-section {
  padding: 18px 18px 16px;
  border-radius: 24px;
  border: 1px solid rgba(160, 185, 226, 0.14);
  background: var(--surface-muted);
  box-shadow: var(--shadow-soft);
}

.feature-modal-section h3 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 900;
}

.feature-modal-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.72;
}

.feature-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feature-modal-footer .button-secondary,
.feature-modal-footer .button-primary {
  min-width: 116px;
}

.feature-modal-footer .button-secondary:disabled,
.feature-modal-footer .button-primary:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow:
    inset 0 1px 0 rgba(194, 217, 255, 0.04),
    inset 0 -1px 0 rgba(1, 4, 10, 0.42);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .features-hero {
    grid-template-columns: 1fr;
  }

  .features-title {
    max-width: 16ch;
  }
}

@media (max-width: 860px) {
  .features-capability-grid,
  .feature-gallery-grid {
    grid-template-columns: 1fr;
  }

  .feature-modal-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .features-hero,
  .feature-gallery-shell,
  .feature-card {
    padding: 20px;
  }

  .features-title {
    font-size: clamp(1.86rem, 9vw, 2.56rem);
  }

  .features-lead,
  .feature-gallery-lead {
    font-size: 0.92rem;
  }

  .feature-gallery-image,
  .feature-gallery-item {
    min-height: 220px;
  }

  .feature-modal {
    padding: 14px;
  }

  .feature-modal-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 20px);
    padding: 20px 18px 18px;
  }

  .feature-modal-head,
  .feature-modal-footer {
    flex-direction: column;
    align-items: flex-start;
    padding-right: 0;
  }

  .feature-modal-close {
    top: 12px;
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature-modal,
  .feature-modal-backdrop,
  .feature-modal-dialog,
  .feature-gallery-remove,
  .feature-modal-close,
  .feature-modal-footer .button-secondary,
  .feature-modal-footer .button-primary {
    transition: none;
  }
}
