/*
 * Feature pages stylesheet.
 *
 * Deliberately hand-authored rather than reusing the app's Tailwind bundle:
 * Tailwind only emits classes it finds while scanning src/, and the built CSS
 * filename is content hashed, so a static page cannot link to it reliably.
 *
 * Every color here comes from the brand guide (sections 8 and 9). Do not add
 * new hues. Rose appears in exactly three places: the primary button, the
 * At a glance card, and focus rings.
 */

:root {
  --ground: hsl(40 14% 98%);
  --surface: hsl(0 0% 100%);
  --ink: hsl(0 0% 18%);
  --muted: hsl(0 0% 42%);
  --line: hsl(20 13% 90%);
  --line-soft: hsl(20 20% 94%);
  --rose: hsl(344 25% 62%);
  --rose-deep: hsl(344 25% 40%);
  --rose-wash: hsl(344 25% 95%);
  --radius: 0.75rem;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shell: 72rem;
  --pad: 1.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  background: var(--surface);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------------------------------------------------------------- header */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 1rem var(--pad);
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
}

.masthead__nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.masthead__nav a {
  text-decoration: none;
  color: var(--muted);
}

.masthead__nav a:hover {
  color: var(--ink);
}

.button {
  display: inline-block;
  background: var(--rose);
  color: hsl(0 0% 100%);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.4;
}

.masthead__nav .button,
.button:hover {
  color: hsl(0 0% 100%);
}

.button:hover {
  background: var(--rose-deep);
}

.button--lg {
  padding: 0.8rem 1.75rem;
  font-size: 1.0625rem;
}

/* ----------------------------------------------------------- breadcrumbs */

.crumbs {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0.5rem var(--pad) 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crumbs li + li::before {
  content: '/';
  margin-right: 0.4rem;
  color: var(--line);
}

.crumbs a {
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

.crumbs [aria-current='page'] {
  color: var(--rose-deep);
}

/* ------------------------------------------------------------ page head */

.page-head {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 1.5rem var(--pad) 0;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}

.lede {
  margin: 0;
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 46rem;
}

.deep-dive {
  margin: 0.85rem 0 0;
  font-size: 0.9375rem;
}

.deep-dive a {
  color: var(--rose-deep);
  font-weight: 500;
}

/* --------------------------------------------------------------- layout */

.layout {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 2rem var(--pad) 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ------------------------------------------------ the At a glance card */

.glance {
  background: var(--rose-wash);
  border: 1px solid hsl(344 25% 88%);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.glance__title {
  margin: 0 0 0.85rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.glance dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.glance__row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.glance dt {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.glance dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --------------------------------------------------------- contents nav */

.toc {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.toc__title {
  margin: 0 0 0.75rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9375rem;
}

.toc a {
  text-decoration: none;
  color: var(--muted);
}

.toc a:hover {
  color: var(--ink);
}

/* ------------------------------------------------------------- document */

.doc {
  min-width: 0;
}

.doc__section {
  scroll-margin-top: 1.5rem;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.doc__section:first-child,
.doc > .shot + .doc__section {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.doc h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.4rem, 3.4vw, 1.75rem);
  line-height: 1.25;
  margin: 0 0 1rem;
}

.doc h3 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.doc p {
  margin: 0 0 1rem;
  max-width: 44rem;
}

.group-blurb {
  color: var(--muted);
  margin-top: -0.25rem;
}

.bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 44rem;
}

.bullets li {
  position: relative;
  padding-left: 1.4rem;
}

.bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 44rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

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

/* --------------------------------------------------------------- tables */

.spec,
.plans {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec th,
.spec td,
.plans th,
.plans td {
  text-align: left;
  padding: 0.85rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}

.spec tr:last-child th,
.spec tr:last-child td,
.plans tbody tr:last-child th,
.plans tbody tr:last-child td {
  border-bottom: 0;
}

.spec th {
  font-weight: 600;
  width: 34%;
}

.spec td,
.plans td {
  color: var(--muted);
}

.plans thead th {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--line-soft);
  font-weight: 600;
}

.plans thead th span {
  display: block;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  font-size: 0.8125rem;
}

.plans tbody th {
  font-weight: 500;
}

/* The free-with-five-couples line, sitting under the Pro price. */
.plans__free {
  display: block;
  margin-top: 0.15rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--rose-deep);
}

/* Small screens hide the table head, so the prices are repeated here. Hidden
   on desktop, where the head carries them. aria-hidden because it duplicates
   the table head for sighted users only. */
.plan-strip {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.plan-strip em {
  font-style: normal;
  font-weight: 600;
  color: var(--rose-deep);
}

@media (min-width: 40rem) {
  .plan-strip {
    display: none;
  }
}

.note {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* The free-subscription milestone. Rendered by the template on every page, so
   it can never be forgotten or reworded page to page. Marked out from the
   page's own note because it is a standing commercial offer, not page copy. */
.standing {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--rose-wash);
  border: 1px solid hsl(344 25% 88%);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--ink);
  max-width: 44rem;
}

/* ------------------------------------------------------- related cards */

.related {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.related a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  text-decoration: none;
  height: 100%;
}

.related a:hover {
  border-color: var(--rose);
}

.related__name {
  display: block;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.related__blurb {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ------------------------------------------------------------------ faq */

.faq {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 44rem;
}

.faq__item h3 {
  scroll-margin-top: 1.5rem;
}

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

/* -------------------------------------------------------------- figures */

.shot {
  margin: 0 0 2rem;
}

.shot img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.shot figcaption {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* --------------------------------------------------------------- closer */

.closer {
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.closer h2 {
  margin-top: 0;
}

.closer p {
  color: var(--muted);
}

.updated {
  margin: 1.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* --------------------------------------------------------------- footer */

.site-footer {
  background: hsl(0 0% 12%);
  color: hsl(0 0% 72%);
  padding: 3rem var(--pad) 2rem;
  font-size: 0.9375rem;
}

.site-footer__inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

.site-footer h2 {
  color: hsl(0 0% 100%);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.85rem;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: hsl(0 0% 100%);
}

.site-footer__name {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: hsl(0 0% 100%);
  margin: 0.5rem 0 0.35rem;
}

.site-footer__brand p:last-child {
  margin: 0;
  max-width: 20rem;
}

.site-footer__legal {
  max-width: var(--shell);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(0 0% 22%);
  font-size: 0.8125rem;
}

/* ---------------------------------------------------------- breakpoints */

@media (min-width: 40rem) {
  :root {
    --pad: 2rem;
  }

  .related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 56.25rem) {
  .layout {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
  }

  .rail {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
  }

  .page-head {
    padding-top: 2.5rem;
  }

  .site-footer__inner {
    grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  }
}

/* Below 40rem the plan table stacks: each row becomes its own block and the
   column headings are restated per cell, so nothing scrolls sideways. */
@media (max-width: 39.99rem) {
  .plans thead {
    display: none;
  }

  .plans,
  .plans tbody,
  .plans tr,
  .plans th,
  .plans td {
    display: block;
    width: auto;
  }

  .plans tr {
    border-bottom: 1px solid var(--line-soft);
    padding: 0.35rem 0;
  }

  .plans tbody tr:last-child {
    border-bottom: 0;
  }

  .plans tbody th {
    font-weight: 600;
    padding-bottom: 0.25rem;
    border-bottom: 0;
  }

  .plans td {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
    border-bottom: 0;
  }

  .plans td::before {
    content: attr(data-label) ': ';
    color: var(--ink);
  }

  .spec th,
  .spec td {
    display: block;
    width: auto;
  }

  .spec th {
    border-bottom: 0;
    padding-bottom: 0.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
