/* features.css — Features page */

/* ── Page header ─────────────────────────────────────────────────────────── */

.feat-page-header {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.feat-page-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.feat-page-intro {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 56ch;
  margin: 0 auto;
}

/* ── Chip nav ────────────────────────────────────────────────────────────── */

.feat-chip-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 0.5rem 0;
}

.feat-chip-scroll {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 1rem;
  scrollbar-width: none;
}

.feat-chip-scroll::-webkit-scrollbar { display: none; }

.feat-chip {
  flex-shrink: 0;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  border: 1px solid var(--color-border);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.feat-chip:hover { color: var(--color-text); border-color: var(--color-text-muted); }

.feat-chip--active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ── Feature sections ────────────────────────────────────────────────────── */

.feat-section {
  padding: 5rem 0;
}

.feat-section--odd  { background: transparent; }
.feat-section--even { background: var(--color-surface); }

.feat-section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.feat-section--even .feat-section-inner .feat-media { order: -1; }

.feat-text h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.feat-lead {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.feat-bullets {
  padding-left: 1.3rem;
  margin: 0 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.feat-plans-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
}

.feat-plans-link:hover { text-decoration: underline; }

.feat-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-raised);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-slot-wrap img,
.media-slot-wrap video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

/* ── Coming soon pill ────────────────────────────────────────────────────── */

.coming-soon-pill {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  vertical-align: middle;
  margin-left: 0.3rem;
  letter-spacing: 0.02em;
}

/* ── Question types grid ─────────────────────────────────────────────────── */

.feat-qt-section {
  padding: 5rem 0;
  background: var(--color-surface);
}

.feat-qt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.feat-qt-tile {
  padding: 1.4rem;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.feat-qt-tile svg {
  display: block;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.feat-qt-tile h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.feat-qt-tile p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

.feat-qt-note {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ── Also included ───────────────────────────────────────────────────────── */

.feat-also-section {
  padding: 5rem 0;
}

.feat-also-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 2rem;
  margin-top: 2rem;
  padding-left: 1.3rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 999px) {
  /* Section chips wrap onto 2–3 centred rows instead of a clipped sideways scroll */
  .feat-chip-scroll {
    flex-wrap: wrap;
    overflow-x: visible;
    row-gap: 0.4rem;
  }

  .feat-qt-grid { grid-template-columns: repeat(2, 1fr); }

  /* Question-type tiles: icon and name on one line, description below */
  .feat-qt-tile {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    align-content: start;
    -moz-column-gap: 0.5rem;
         column-gap: 0.5rem;
    row-gap: 0.3rem;
  }

  .feat-qt-tile svg { margin-bottom: 0; }

  .feat-qt-tile h3 { margin: 0; }

  .feat-qt-tile p { grid-column: 1 / -1; }

  /* Feature sections: one column, always ordered title → media → lead →
     bullets → link. .feat-text is flattened so its children can be ordered
     around the media; spacing comes from each element's own margins. */
  .feat-section-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .feat-text { display: contents; }

  .feat-text h2 { order: 1; }

  .feat-section .feat-section-inner .feat-media {
    order: 2;
    margin-bottom: 1.2rem;
    min-height: 0; /* hug the image/video instead of a 200px box */
  }

  .feat-lead         { order: 3; }
  .feat-bullets      { order: 4; }
  .feat-plans-link   { order: 5; justify-self: start; }

  .feat-also-list { grid-template-columns: 1fr; }
}

@media (max-width: 599px) {
  /* Compact chips so two fit per row → 3 rows on a phone */
  .feat-chip-scroll {
    padding: 0.25rem 0;
    -moz-column-gap: 0.35rem;
         column-gap: 0.35rem;
  }

  .feat-chip {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }

  .feat-qt-grid { grid-template-columns: 1fr; }

  .feat-page-header { padding: 2.5rem 0 1.5rem; }

  .feat-section { padding: 3rem 0; }
}
