/*
  Global stylesheet — single source of truth for the site.

  Structure:
    1) Reset and base
    2) Design tokens (:root) — palette and typography are owned by the
       `brand-guidelines` skill. Spacing, radii, shadows, motion, and layout
       tokens are owned here.
    3) Layout primitives
    4) Components (site-wide reusable primitives only — page-specific
       styles live with their page builds, not here)
    5) Utilities
*/

/* ===== 1) Reset and base ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 2) Design tokens ===== */
/* Palette and typography are written by the `brand-guidelines` skill from
   `build-assets/0-the-brand/tokens.json`. Spacing, radii, shadows, and
   transitions are owned here. */
:root {
  /* Palette (brand-guidelines) — sourced from the live swingersnation.co.uk
     homepage's computed styles on 2026-09-03 (join CTA, footer, body text). */
  --color-bg: #f4f4f4;
  --color-surface: #ffffff;
  --color-surface-soft: #ececec;
  --color-text: #1d1d1f;
  --color-text-soft: #5f5f5f;
  --color-primary: #d70404;
  --color-primary-dark: #a80303;
  --color-primary-light: #f9d9d9;
  --color-accent: #c9a227;
  --color-focus: #d70404;

  /* Dark surfaces (hero overlay, footer band) — matches the live site's
     near-black hero/footer treatment. Role tokens, not a full dark theme. */
  --color-dark-surface: #0c0c0c;
  --color-dark-text: #fdfdfd;
  --color-dark-text-soft: color-mix(in srgb, #fdfdfd 70%, transparent);

  /* Typography — Poppins per user request (was Montserrat, sourced from the live
     site). Loaded via Google Fonts in <head> on every page; see decisions.md. */
  --font-heading: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Radii */
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(60, 64, 67, 0.12);
  --shadow-md: 0 4px 14px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 12px 32px rgba(17, 24, 39, 0.12);

  /* Motion */
  --transition-fast: 180ms ease;
  --transition-base: 260ms ease;

  /* Layout */
  --container-max: 72rem;

  /* Aesthetic dials — the `design-system` skill SETS these per brand to diverge
     the look (sharp vs soft, flat vs shadowed, square vs pill). Defaults below are
     a soft/rounded baseline; a brand's design stage should deliberately override
     them so two brands don't look like the same template reskinned. */
  --logo-height: 2.75rem;    /* prominent by default — the logo is a brand asset, not chrome */
  --logo-max-width: 22rem;   /* generous, so wide wordmarks stay tall (not width-starved) */
  --header-bg: var(--color-dark-surface);   /* header band — set black per user request (was --color-surface) */
  --header-fg: var(--color-dark-text);      /* header text/nav colour — flips for a coloured band */
  --btn-radius: var(--radius-pill);
  --card-radius: var(--radius-md);
  --card-shadow: var(--shadow-sm);
  --card-border: 1px solid color-mix(in srgb, var(--color-text) 6%, transparent);
  --chip-radius: var(--radius-pill);
}

/* Logo grows on wider screens — override the dial at the breakpoint, never per-page. */
@media (min-width: 1024px) {
  :root { --logo-height: 3.5rem; }
}

/* ===== 3) Layout primitives ===== */
.container {
  width: min(100% - 2rem, var(--container-max));
  margin-inline: auto;
}

.section {
  padding: var(--space-10) 0;
}

.grid {
  display: grid;
  gap: var(--space-4);
}

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

@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ===== 4) Components ===== */

/* Site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  color: var(--header-fg);
  border-bottom: 1px solid color-mix(in srgb, var(--header-fg) 15%, transparent);
}

.site-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* The header logo is an <img src="{{logo.src}}"> whose REAL file is injected by the CMS
   at upload — its aspect ratio is unknown at build time. HEIGHT is the primary driver
   (a generous --logo-height), so every logo renders at a consistent, prominent height
   regardless of ratio; --logo-max-width is a generous, viewport-relative safety cap that
   only clamps a very wide logo on small screens (it then scales down proportionally, never
   distorts). Never pin width AND height. Tune the dials per brand — never a per-page size. */
.site-logo img {
  height: auto;
  width: auto;
  max-height: var(--logo-height);
  max-width: min(var(--logo-max-width, 22rem), 55vw);
  object-fit: contain;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
}

.site-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* CMS-rendered menus — `{{menu.navigation}}` and `{{menu.footer}}` expand to
   <ul class="canvas-navigation-menu"> / <ul class="canvas-footer-menu"> with
   <li><a> children. Style the generated classes directly. */

.canvas-navigation-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.canvas-navigation-menu > li {
  margin: 0;
}

.canvas-navigation-menu a {
  color: var(--header-fg);
  font-weight: 600;
  font-size: 0.95rem;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.canvas-navigation-menu a:hover,
.canvas-navigation-menu a:focus-visible {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.canvas-footer-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

/* Footers can carry many links. With 8+ items, flow them into responsive columns
   (auto-fill grid) instead of one long, sprawling wrapping row — multi-column on wide
   screens, collapsing toward a single column on mobile. Short footer menus keep the
   inline row above. Where :has() is unsupported it harmlessly stays the flex row. */
.canvas-footer-menu:has(> li:nth-child(8)) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
  align-items: start;
  gap: var(--space-2) var(--space-5);
}

.canvas-footer-menu > li {
  margin: 0;
}

.canvas-footer-menu a {
  color: var(--color-text-soft);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.canvas-footer-menu a:hover,
.canvas-footer-menu a:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Canvas nav (menu.navigation.default) theming =====
   {{menu.navigation.default}} ships a complete responsive nav: desktop menu
   above 1024px, hamburger + right-slide drawer below it, built in — no
   custom hamburger/drawer needed here. The snippet emits its own <style>
   block inside <body>, AFTER this stylesheet, so equal-specificity
   overrides on `.hs-canvas-nav { ... }` are silently beaten. Every rule
   below targets the consumer selector directly with two classes (0,2,0)
   so it wins regardless of load order. See
   references/placeholders/menu.navigation.default.md. */

/* Primary CTA (Join) inside the drawer — snippet hardcodes black;
   match the brand red used for every other primary CTA on the site. */
.hs-canvas-nav .hs-canvas-nav__cta--primary {
  background: var(--color-primary);
  color: #fff;
}
.hs-canvas-nav .hs-canvas-nav__cta--primary:hover {
  background: var(--color-primary-dark);
}

/* Secondary CTA (Login) — the drawer itself stays white regardless of the
   (now black) header, so this needs its own explicit dark color. It used to
   rely on inheriting the header's text color, which broke once the header
   went black (white-on-white) — see the mobile-link fix below for the same
   bug in the menu links. */
.hs-canvas-nav .hs-canvas-nav__cta--secondary {
  color: var(--color-text);
  border-color: color-mix(in srgb, var(--color-text) 20%, transparent);
}

/* Drawer + desktop "More" dropdown shadow/border — match the site's card
   tokens instead of the snippet's default purple-tinted shadow. */
.hs-canvas-nav .hs-canvas-nav__drawer {
  box-shadow: var(--shadow-lg);
}

/* Close button (×) — a <button> doesn't inherit color by default in most
   browsers (renders in the system "buttontext" color), so pin it explicitly
   rather than gambling on that against a white drawer. */
.hs-canvas-nav .hs-canvas-nav__close {
  color: var(--color-text);
}

@media (min-width: 1024px) {
  .hs-canvas-nav .hs-canvas-nav__menu--desktop > .hs-canvas-nav__item > .hs-canvas-nav__details > .hs-canvas-nav__submenu {
    border-color: color-mix(in srgb, var(--color-text) 14%, transparent);
    box-shadow: var(--shadow-lg);
  }
}

/* Desktop menu links sit in the (black) header, so they read the header's
   light foreground token. */
.hs-canvas-nav .hs-canvas-nav__menu--desktop .hs-canvas-nav__link {
  color: color-mix(in srgb, var(--header-fg) 85%, transparent);
  font-weight: 600;
  transition: color var(--transition-fast);
}
.hs-canvas-nav .hs-canvas-nav__menu--desktop .hs-canvas-nav__link:hover {
  color: var(--color-primary);
}

/* Mobile menu links sit in the DRAWER, which stays white regardless of the
   header color — BUG FIX: these previously had no base color set at all and
   were inheriting the header's (white) --header-fg through the DOM, making
   them invisible white-on-white against the white drawer. Pin dark text
   explicitly, independent of the header. */
.hs-canvas-nav .hs-canvas-nav__menu--mobile .hs-canvas-nav__link,
.hs-canvas-nav .hs-canvas-nav__menu--mobile .hs-canvas-nav__summary {
  color: var(--color-text);
}
.hs-canvas-nav .hs-canvas-nav__menu--mobile .hs-canvas-nav__link:hover,
.hs-canvas-nav .hs-canvas-nav__menu--mobile .hs-canvas-nav__summary:hover {
  color: var(--color-primary);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--color-primary);
}

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

.breadcrumb-separator {
  color: var(--color-text-soft);
  opacity: 0.6;
}

.breadcrumb [aria-current="page"] {
  color: var(--color-text);
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--btn-radius);
  min-height: 2.75rem;
  padding: 0.78rem 1.4rem;
  font-size: 0.98rem;
  line-height: 1;
  letter-spacing: 0.01em;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline-offset: 3px; }

.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-primary) 28%, transparent);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--color-primary) 40%, transparent);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid color-mix(in srgb, var(--color-text) 16%, transparent);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--color-surface-soft) 75%, #fff);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid color-mix(in srgb, var(--color-text) 20%, transparent);
}

.btn-ghost:hover {
  background: color-mix(in srgb, var(--color-surface-soft) 65%, transparent);
}

/* Header CTAs follow the header foreground so they stay legible on a coloured band
   (no-op on the neutral default where --header-fg == --color-text). */
.site-header .btn-ghost {
  color: var(--header-fg);
  border-color: color-mix(in srgb, var(--header-fg) 20%, transparent);
}

.btn-sm {
  min-height: 2.2rem;
  padding: 0.55rem 1rem;
  font-size: 0.87rem;
}

.btn-lg {
  min-height: 3rem;
  padding: 0.9rem 1.7rem;
  font-size: 1.04rem;
}

.btn-block { width: 100%; }

.btn-icon {
  width: 2.75rem;
  min-width: 2.75rem;
  padding: 0;
  border-radius: 50%;
}

/* Card */
.card {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: var(--card-border);
  padding: var(--space-5);
}

.card-title {
  margin: 0 0 var(--space-2);
  font-size: 1.08rem;
}

.card-text {
  margin: 0;
  color: var(--color-text-soft);
}

/* Chip — pill-shaped tag */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--chip-radius);
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
}

.chip-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.chip-row--center {
  justify-content: center;
}

/* Site footer */
.site-footer {
  padding: var(--space-10) 0;
  color: var(--color-text-soft);
  font-size: 0.9rem;
  border-top: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
}

/* Member profile */
.profile-head {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-6);
}
.profile-avatar {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: var(--radius-pill);
  object-fit: cover;
}
.profile-id {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.profile-headline {
  font-size: 1.15rem;
  font-weight: 600;
}
.profile-bio {
  color: var(--color-text-soft);
  max-width: 60ch;
}
.profile-interests {
  margin-top: var(--space-3);
}

/* ===== 5) Utilities ===== */
.text-center { text-align: center; }
.muted { color: var(--color-text-soft); }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

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

/* Desktop-only header CTAs — hidden below the CMS nav's 1024px drawer
   breakpoint, since {{menu.navigation.default}}'s own drawer carries the
   mobile login/join CTAs. See references/placeholders/menu.navigation.default.md. */
@media (max-width: 1023px) {
  .desktop-only { display: none; }
}

/* ===== Homepage-specific components ===== */

/* Hero — full-width background image behind the CTA content */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 30rem;
  color: var(--color-dark-text);
  background: var(--color-dark-surface);
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    min-height: 38rem;
  }
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.35) 45%, var(--color-dark-surface) 96%);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--space-8) 0 var(--space-10);
  text-align: center;
}

.hero__content h1 {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
}

.hero__subhead {
  margin: 0 auto var(--space-6);
  max-width: 42rem;
  color: var(--color-dark-text-soft);
  font-size: 1.05rem;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-6);
  font-size: 0.95rem;
}

.hero__stat {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hero__stat strong {
  font-size: 1.1rem;
}

.hero__stars {
  letter-spacing: 0.05em;
  color: var(--color-accent);
}

/* Value props (the live site's rotating hero messages, flattened to a static strip) */
.value-props {
  background: var(--color-surface);
}

.value-props__item {
  text-align: center;
}

.value-props__media {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto var(--space-3);
  border-radius: var(--radius-pill);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.value-props__media svg {
  width: 2.25rem;
  height: 2.25rem;
}

.value-props__item h2 {
  font-size: 1.15rem;
  margin: 0 0 var(--space-2);
}

.value-props__item p {
  margin: 0;
  color: var(--color-text-soft);
}

/* How it works */
.steps {
  background: var(--color-surface-soft);
}

.steps__intro {
  max-width: 46rem;
  margin: 0 auto var(--space-6);
  text-align: center;
}

.steps__intro p {
  color: var(--color-text-soft);
}

/* Each step is a boxed card; alternating ".step-card--accent" gives the grid a
   dynamic, contrasting rhythm instead of four flat, uniform cards. */
.step-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: var(--color-surface);
  color: var(--color-text);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--space-5);
}

.step-card--accent {
  background: var(--color-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.step-card__eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.step-card--accent .step-card__eyebrow {
  color: color-mix(in srgb, #fff 80%, transparent);
}

.step-card__media {
  order: -1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: var(--space-2);
}

.step-card--accent .step-card__media {
  border: 2px solid color-mix(in srgb, #fff 25%, transparent);
}

.step-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.step-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.step-card p {
  margin: 0;
  color: var(--color-text-soft);
}

.step-card--accent p {
  color: color-mix(in srgb, #fff 85%, transparent);
}

.step-card__cta {
  margin-top: auto;
  padding-top: var(--space-2);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.step-card--accent .step-card__cta {
  color: #fff;
}

/* Features */
.features {
  background: var(--color-surface-soft);
}

.features__intro {
  max-width: 46rem;
  text-align: center;
  margin: 0 auto var(--space-6);
}

.features__intro p {
  color: var(--color-text-soft);
}

.feature-card h3 {
  margin: 0 0 var(--space-2);
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--color-text-soft);
}

/* aspect-ratio matches the image's real 1600x900 (16:9) intrinsic size, so the
   box scales proportionally at every screen width instead of hard-cropping via
   a fixed max-height — the full photo stays visible on every device. */
.features__media {
  margin-top: var(--space-8);
  border-radius: var(--card-radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.features__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* FAQ accordion — native <details>/<summary>, no JS */
.faq-media {
  max-width: 48rem;
  margin: 0 auto var(--space-6);
  border-radius: var(--card-radius);
  overflow: hidden;
  aspect-ratio: 8 / 3;
}

.faq-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.faq-list {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: var(--color-surface);
  color: var(--color-text);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--space-1) var(--space-5);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-4) 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

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

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--color-primary);
  transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: 0 0 var(--space-4);
  color: var(--color-text-soft);
}

/* Pre-footer CTA band — sits above the canonical <footer>, per the skill's
   "extra footer content goes in its own section" rule. Full-bleed background
   image behind the content, same pattern as .hero. */
.cta-band {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 22rem;
  background: var(--color-dark-surface);
  color: var(--color-dark-text);
  text-align: center;
  overflow: hidden;
}

.cta-band__media {
  position: absolute;
  inset: 0;
}

.cta-band__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-band__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, var(--color-dark-surface) 92%);
}

.cta-band .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.cta-band h2 {
  margin: 0 0 var(--space-5);
  font-size: 1.3rem;
}

.cta-band__copyright {
  margin: var(--space-5) 0 0;
  color: var(--color-dark-text-soft);
  font-size: 0.85rem;
}

/* ===== Member loops — see references/placeholders/members.loop.md =====
   Authored with data-members-styles="none": the CMS emits classes and no CSS. */

[data-members] .lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(11rem, calc(50% - 0.375rem)), 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: calc(6 * 14rem + 5 * 0.75rem);
}

[data-members] .mem-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-sizing: border-box;
  margin: 0;
  overflow: hidden;
  position: relative;
  padding: 0.5rem;
  background: var(--color-surface, #ffffff);
  border: var(--card-border, 1px solid #e3e1da);
  border-radius: var(--card-radius, 0.875rem);
  box-shadow: var(--card-shadow, none);
}

[data-members] .mem-card img,
[data-members] .mem-card__initial {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm, 0.5rem);
  flex: 0 0 auto;
}
[data-members] .mem-card img { display: block; object-fit: cover; object-position: 50% 30%; }
[data-members] .mem-card__initial {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-soft, #f2f0ea);
  color: var(--color-text, #1d2328);
  font-size: 1.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

[data-members] .mem-card__name,
[data-members] .mem-card__where {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-members] .mem-card__name {
  margin: 0.35rem 0 0;
  font-family: var(--font-heading, inherit);
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--color-text, inherit);
}
[data-members] .mem-card__where {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--color-text-soft, #6b6f85);
}
[data-members] .mem-card__name:empty,
[data-members] .mem-card__where:empty { display: none; }

[data-members] .mem-card__line {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-soft, #6b6f85);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

[data-members] .badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  max-width: calc(100% - 1.5rem);
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--chip-radius, 999px);
  color: var(--color-text, #1d2328);
  background: var(--color-primary-light, #e4f0ee);
}

[data-members] .mem-card__cta {
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--color-text, inherit);
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-members] a:focus-visible {
  outline: 3px solid var(--color-focus, #b4602c);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--color-surface, #ffffff);
}

[data-members] .mem-card--join { padding: 0; min-height: 8rem; }
[data-members] .mem-card--join .mem-card__cta {
  display: grid;
  place-items: center;
  height: 100%;
  margin: 0;
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
  background: var(--color-surface-soft, #f2f0ea);
  color: var(--color-text, #1d2328);
}

[data-members] .lp-members__empty {
  margin: 0;
  color: var(--color-text, inherit);
  font-size: 0.9rem;
  text-align: center;
}

/* Reusable utility: soft-tinted section background (was inline-styled — moved here) */
.section--soft {
  background: var(--color-surface-soft);
}

/* Reusable utility: black section background, alternated with .section--soft
   on info pages (features, FAQ) to make black + red the primary page colors,
   not just the header/hero/cta-band. */
.section--dark {
  background: var(--color-dark-surface);
  color: var(--color-dark-text);
}

.section--dark h2,
.section--dark h3 {
  color: var(--color-dark-text);
}

.section--dark .section-lede,
.section--dark .container > p,
.section--dark .info-block > p,
.section--dark .info-list {
  color: var(--color-dark-text-soft);
}

/* Reusable utility: centered lede/intro paragraph under a section heading */
.section-lede {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-text-soft);
}

/* Reusable utility: inline text link inside prose (not a nav item or button) */
.text-link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-link:hover {
  color: var(--color-primary-dark);
}

/* ===== Features page ===== */

/* Platform availability */
.platform-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 42rem;
  margin: 0 auto;
}

.platform-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  color: var(--color-text);
  border: var(--card-border);
  border-radius: var(--card-radius);
}

.platform-row__icon {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  color: var(--color-primary);
}

.platform-row__icon img,
.platform-row__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.platform-row__body {
  flex: 1 1 auto;
}

.platform-row__body h3 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
}

.platform-row__body p {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

.platform-row__availability {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 0.3rem 0.7rem;
  border-radius: var(--chip-radius);
  white-space: nowrap;
}

/* Membership tier cards */
.tier-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  color: var(--color-text);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--space-6);
}

.tier-card--vip {
  border-color: color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.tier-card--vip-plus {
  border-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-accent) 6%, var(--color-surface)), var(--color-surface));
}

.tier-card__name {
  margin: 0 0 var(--space-2);
  font-size: 1.3rem;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
}

.tier-badge svg {
  height: 1.6rem;
  width: auto;
  display: block;
}

.tier-badge--vip { color: var(--color-primary); }
.tier-badge--vip-plus { color: var(--color-accent); }

.tier-card__desc {
  margin: 0 0 var(--space-4);
  color: var(--color-text-soft);
  font-size: 0.92rem;
}

.tier-card__includes {
  margin: 0 0 var(--space-3);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.tier-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1 1 auto;
}

.tier-card__list li {
  padding-left: 1.4rem;
  position: relative;
  font-size: 0.92rem;
  line-height: 1.45;
}

.tier-card__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.tier-card__list li strong { color: var(--color-text); }

/* Comparison table */
.comparison-wrap {
  overflow-x: auto;
  border-radius: var(--card-radius);
  border: var(--card-border);
}

.comparison-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.88rem;
}

.comparison-table caption {
  caption-side: top;
  text-align: left;
  padding: var(--space-4) var(--space-4) 0;
  font-weight: 700;
}

.comparison-table th,
.comparison-table td {
  padding: var(--space-3) var(--space-4);
  text-align: center;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
  font-weight: 600;
}

.comparison-table thead th {
  background: var(--color-surface-soft);
  font-weight: 700;
}

.comparison-table thead th .tier-badge svg {
  height: 1.1rem;
}

.comparison-table td.yes {
  color: var(--color-primary);
  font-weight: 700;
}

.comparison-table td.no {
  color: var(--color-text-soft);
}

/* Matching algorithm / super match / safety blocks */
.info-block {
  max-width: 46rem;
  margin: 0 auto;
}

/* Widened from a 3:4 phone-mockup portrait to a 16:9 landscape box per user
   request — fills the .info-block's full width instead of a narrow column. */
.info-block__media {
  border-radius: var(--card-radius);
  overflow: hidden;
  max-width: 100%;
  margin: 0 auto var(--space-6);
  aspect-ratio: 16 / 9;
}

.info-block__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.info-block h2 {
  text-align: center;
  margin: 0 0 var(--space-2);
}

.info-block > p {
  color: var(--color-text-soft);
}

.info-list {
  margin: var(--space-3) 0 var(--space-5);
  padding-left: 1.2rem;
  color: var(--color-text-soft);
}

.info-list li {
  margin-bottom: var(--space-2);
  line-height: 1.5;
}

.info-block h3 {
  margin: var(--space-6) 0 var(--space-2);
  font-size: 1.05rem;
}

.safety-block {
  display: grid;
  gap: var(--space-6);
}

.safety-block__item h3 {
  margin: 0 0 var(--space-2);
}

.safety-block__item p {
  margin: 0;
  color: var(--color-text-soft);
}

/* ===== Safety page (site/safety.html) feature cards =====
   "Quiet confidence" per the page-type brief: muted palette, no drama. The
   "Protects you" line uses the gold accent (not the red primary CTA color)
   as its own distinct, adjacent accent per the brief's guidance. */
.safety-feature-card {
  background: var(--color-surface);
  color: var(--color-text);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--space-5);
}

.safety-feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-soft);
  font-size: 1.5rem;
  margin-bottom: var(--space-3);
}

.safety-feature-card__name {
  margin: 0 0 var(--space-2);
  font-size: 1.05rem;
}

.safety-feature-card__desc {
  margin: 0 0 var(--space-3);
  color: var(--color-text-soft);
}

.safety-feature-card__protects {
  margin: 0;
  padding-left: var(--space-3);
  border-left: 3px solid var(--color-accent);
  font-size: 0.92rem;
  color: var(--color-text);
}

.safety-feature-card__protects-label {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== Ticker (scrolling marquee) — see references/design-patterns.md =====
   Pure CSS, no JS. Standard trick is to duplicate the row's content once so
   -50% looks identical to 0%. On the homepage members ticker, the content is
   a live CMS member-loop block (`<section data-members>`), which must be
   authored empty — so the "duplicate" is a second identical loop block
   (aria-hidden) rather than duplicated static markup. */
.ticker {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.ticker-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  width: max-content;
  animation: ticker-scroll 60s linear infinite;
}

.ticker-row + .ticker-row { margin-top: var(--space-4); }

.ticker-row.is-reverse { animation-direction: reverse; }
.ticker-row.is-fast    { animation-duration: 35s; }
.ticker-row.is-slow    { animation-duration: 70s; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker:hover .ticker-row,
.ticker:focus-within .ticker-row {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-row {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }
}

/* Member loop, ticker context — the CMS's generated .lp-grid defaults to a
   responsive auto-fill GRID (see the member-loop baseline above); inside a
   .ticker it needs to be one continuous FLEX row instead, with fixed-width
   cards so both loop blocks measure identically for the -50% loop math. */
.ticker [data-members] {
  flex: 0 0 auto;
}

.ticker [data-members] .lp-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  max-width: none;
  width: max-content;
  margin: 0;
}

.ticker [data-members] .mem-card {
  flex: 0 0 9rem;
  width: 9rem;
}

/* ===== Articles (article page + articles landing) ===== */

/* Article page: text-only header (no hero image) — eyebrow tag + title +
   byline, on a soft band so it reads as a distinct block above the prose. */
.article-hero {
  background: var(--color-surface-soft);
}

.article-hero__eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  padding: 0.35rem 0.9rem;
  border-radius: var(--chip-radius);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-hero h1 {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}

.article-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  color: var(--color-text-soft);
  font-size: 0.92rem;
}

.article-byline__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--color-dark-surface);
  color: var(--color-dark-text);
  font-weight: 700;
  font-size: 0.85rem;
}

.article-byline__name {
  color: var(--color-text);
  font-weight: 600;
}

.article-byline__dot {
  color: var(--color-text-soft);
}

/* Article body — prose column, matches the .section-lede reading width */
.article-body {
  max-width: 42rem;
  margin: 0 auto;
}

.article-body h2 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

.article-body p {
  margin: 0 0 var(--space-4);
  color: var(--color-text);
  line-height: 1.7;
}

.article-body ul,
.article-body ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.4rem;
  color: var(--color-text);
  line-height: 1.7;
}

.article-body li { margin-bottom: var(--space-2); }

.article-body a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover { color: var(--color-primary-dark); }

.article-body blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--color-accent);
  background: var(--color-surface-soft);
  border-radius: 0 var(--card-radius) var(--card-radius) 0;
  color: var(--color-text-soft);
  font-style: italic;
}

.article-body blockquote p:last-child { margin-bottom: 0; }

/* Tag chips at the foot of an article — visual only, not filters */
.article-tags {
  max-width: 42rem;
  margin: var(--space-8) auto 0;
}

/* Related-articles / landing grid card — thumbnail is always a designed
   color-block (no hero images exist yet for this brand); never invented
   stock photography. */
.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.article-card__thumb {
  aspect-ratio: 16 / 9;
}

/* Related-article cards (no image supplied) render the thumb as a designed
   color-block span with initials. */
span.article-card__thumb {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--color-dark-surface), var(--color-primary-dark));
  color: var(--color-dark-text);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: 0.02em;
}

/* Articles-landing cards use a real placehold.co image placeholder instead —
   crop it consistently to the same 16:9 box. */
img.article-card__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: var(--space-5);
}

.article-card__meta {
  margin: 0 0 var(--space-2);
  color: var(--color-text-soft);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.article-card__title {
  margin: 0 0 var(--space-2);
  font-size: 1.1rem;
}

.article-card__excerpt {
  margin: 0 0 var(--space-4);
  color: var(--color-text-soft);
  font-size: 0.92rem;
  flex: 1 1 auto;
}

.article-card__link {
  margin-top: auto;
  align-self: flex-start;
}

/* Featured article (landing page only) — wider horizontal card on desktop */
.article-card--featured {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .article-card--featured {
    flex-direction: row;
  }
  .article-card--featured .article-card__thumb {
    flex: 0 0 45%;
    aspect-ratio: auto;
  }
  .article-card--featured .article-card__body {
    flex: 1 1 auto;
    justify-content: center;
  }
  .article-card--featured .article-card__title {
    font-size: 1.5rem;
  }
}

/* Articles landing hero */
.articles-hero {
  background: var(--color-dark-surface);
  color: var(--color-dark-text);
}

.articles-hero .section-lede {
  color: var(--color-dark-text-soft);
}
