/*
 * Feature pages — /features and /features/<slug>.
 *
 * These are marketing pages, not documentation, so they get a component kit rather than a
 * single prose column: a hero, alternating media rows, stat bands, checklists, comparison
 * tables, quotes, FAQs and closing CTAs. A feature page long enough to rank is long enough
 * to become a wall of text, and the way out is varying the shape every few hundred words,
 * not writing less.
 *
 * Shares the page frame with the legal/help pages (background, brand bar) and defines its
 * own typography on top.
 */
@import url('/css/legal.css');

:root {
  --feat-max: 1080px;
  --feat-measure: 40rem;
}

.feat-wrapper {
  max-width: var(--feat-max);
  margin: 0 auto;
  padding: 3rem var(--legal-pad) 5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.feat-eyebrow {
  margin: 0;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-on-surface);
  background: var(--surface-dim);
  border: 1px solid var(--border-accent);
  border-radius: 9999px;
  padding: 0.4rem 0.8rem;
}

/* ── Index ─────────────────────────────────────────────────────────────── */

.feat-index-hero {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.feat-index-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.feat-lede {
  margin: 0;
  max-width: 44rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
}

.feat-lede a {
  color: var(--accent, currentColor);
}

.feat-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.feat-jump a {
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: var(--surface-dim);
  border: 1px solid var(--legal-card-border);
  border-radius: 9999px;
  padding: 0.4rem 0.85rem;
}

.feat-jump a:hover {
  border-color: var(--accent, var(--border-accent));
}

.feat-category {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-margin-top: 5rem;
}

.feat-category__head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.feat-category__head p {
  margin: 0;
  color: var(--muted);
}

.feat-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 0.9rem;
}

.feat-card a {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  text-decoration: none;
  color: var(--text);
  background: var(--legal-card-bg);
  border: 1px solid var(--legal-card-border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease;
}

.feat-card a:hover,
.feat-card a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent, var(--border-accent));
}

.feat-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.feat-card p {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.feat-card__more {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent, currentColor);
}

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

.feat-wrapper--page {
  gap: 2rem;
}

.feat-page > * {
  margin-inline: auto;
}

/* Hero: the claim, the one-line explanation, the CTA, and a screenshot. */
.feat-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 0.5rem;
}

.feat-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 22ch;
}

.feat-hero__lede {
  margin: 0;
  max-width: var(--feat-measure);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--muted);
}

.feat-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.feat-hero__note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Alternating text/screenshot rows — the main rhythm of a feature page. */
.feat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.feat-row--reverse .feat-row__media {
  order: -1;
}

.feat-row__copy h2 {
  margin: 0 0 0.6rem;
  font-size: 1.55rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.feat-row__copy p {
  margin: 0 0 0.85rem;
  line-height: 1.7;
}

.feat-row__copy p:last-child {
  margin-bottom: 0;
}

.feat-shot {
  margin: 0;
}

.feat-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--legal-card-border);
  box-shadow: var(--shadow);
}

.feat-shot--phone img {
  max-width: 300px;
  margin-inline: auto;
}

.feat-shot figcaption {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* A full-width screenshot when the detail matters more than the pairing. */
.feat-wide {
  margin: 0;
}

.feat-wide img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--legal-card-border);
  box-shadow: var(--shadow);
}

.feat-wide figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* Numbers. Three or four beats a paragraph making the same claim. */
.feat-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  padding: 1.5rem;
  border: 1px solid var(--legal-card-border);
  border-radius: var(--radius-md);
  background: var(--surface-dim);
}

.feat-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.feat-stat strong {
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.feat-stat span {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Checklist — scannable capability list. */
.feat-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0.6rem 1.5rem;
}

.feat-checks li {
  position: relative;
  padding-left: 1.6rem;
  line-height: 1.55;
}

.feat-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent, var(--border-accent));
}

/* Pull quote / emphasis band. */
.feat-quote {
  margin: 0;
  padding: 1.4rem 1.6rem;
  border-left: 3px solid var(--accent, var(--border-accent));
  background: var(--surface-dim);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

.feat-quote p {
  margin: 0;
}

/* Side-by-side comparison. */
.feat-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.feat-compare th,
.feat-compare td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--legal-card-border);
  text-align: left;
  vertical-align: top;
}

.feat-compare thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.feat-compare tbody td:first-child {
  font-weight: 600;
}

.feat-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--legal-card-border);
  border-radius: var(--radius-md);
  background: var(--legal-card-bg);
}

/* Numbered how-it-works strip. */
.feat-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
  counter-reset: feat-step;
}

.feat-steps li {
  counter-increment: feat-step;
  background: var(--legal-card-bg);
  border: 1px solid var(--legal-card-border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
}

.feat-steps li::before {
  content: counter(feat-step);
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-bottom: 0.5rem;
  border-radius: 9999px;
  background: var(--surface-dim);
  border: 1px solid var(--border-accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.feat-steps h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.feat-steps p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

/* FAQ — real questions, and good for the long tail. */
.feat-faq {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.feat-faq details {
  border: 1px solid var(--legal-card-border);
  border-radius: var(--radius-md);
  background: var(--legal-card-bg);
  padding: 0.9rem 1.1rem;
}

.feat-faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.feat-faq summary::-webkit-details-marker {
  display: none;
}

.feat-faq summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}

.feat-faq details[open] summary::after {
  content: "–";
}

.feat-faq p {
  margin: 0.7rem 0 0;
  line-height: 1.65;
  color: var(--muted);
}

/* Plan availability note — one line, always linked to pricing. */
.feat-plan {
  margin: 0;
  padding: 0.8rem 1rem;
  border: 1px dashed var(--legal-card-border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--muted);
}

.feat-plan a {
  color: var(--accent, currentColor);
}

/* Related pages + closing CTA. */
.feat-related h2 {
  margin: 0 0 0.8rem;
  font-size: 1.2rem;
}

.feat-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 0.75rem;
}

.feat-related a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--legal-card-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  background: var(--legal-card-bg);
}

.feat-related a:hover {
  border-color: var(--accent, var(--border-accent));
}

.feat-related span {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.feat-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-align: center;
  padding: 2.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--legal-card-border);
  background: var(--surface-dim);
}

.feat-cta h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

.feat-cta p {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
}

.feat-cta a:not(.btn) {
  color: var(--accent, currentColor);
}

.feat-cta .btn + .btn {
  margin-left: 0.5rem;
}

/* Shared prose defaults inside a feature page. */
.feat-page h2 {
  scroll-margin-top: 5rem;
}

.feat-page p,
.feat-page li {
  line-height: 1.7;
}

.feat-page a:not(.btn) {
  color: var(--accent, currentColor);
  text-underline-offset: 0.15em;
}

.feat-prose {
  max-width: var(--feat-measure);
}

.feat-prose h2 {
  margin: 0 0 0.6rem;
  font-size: 1.55rem;
  letter-spacing: -0.015em;
}

.feat-prose p {
  margin: 0 0 0.9rem;
}

.feat-prose p:last-child {
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .feat-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* On one column the screenshot always follows its copy — an image before the text it
     illustrates is just an unexplained picture. */
  .feat-row--reverse .feat-row__media {
    order: 0;
  }
}

@media (max-width: 720px) {
  .feat-wrapper {
    padding: 2.5rem var(--legal-pad) 4rem;
    gap: 2.25rem;
  }

  .feat-stats {
    padding: 1.15rem;
  }
}
