/* sections/legacy-dark.css
 *
 * Dark-theme primitives foundation. Despite the "legacy" name, this
 * file is the structural source for several `Ays*` components that
 * the light-theme redesigns OVERRIDE rather than replace:
 *
 *   .pillar         — AysPillar (Home + /about pillar cards)
 *   .invite-*       — AysInviteCard (the post-pricing invite card)
 *   .referral-*     — AysReferralBlock (orphan component today)
 *   .plan-*         — AysPlanCard (light /pricing overrides via .ays-light)
 *   .faq-item       — AysFaqItem accordion (the <details> item used
 *                     by /faq, /pricing FAQ, /home FAQ, and /support)
 *
 * The file's job is to ship the dark-theme defaults; light-theme
 * consumers re-style these under their own scopes (`.ays-light`,
 * `.ays-home-*`, etc.). When a primitive is no longer consumed by
 * ANY component, its rule belongs here as an orphan candidate for
 * removal — the file shouldn't accumulate dead CSS.
 *
 * Add new rules here only when adding a new dark-theme primitive.
 * Light-theme work belongs in components.css, home.css, or the
 * per-page section files.
 *
 * Load order in Layout.astro: 1st (defines primitives).
 */

/* ─────────────────────────────────────────
   PILLAR — AysPillar card primitive. Wrapping grids live per-consumer
   (`.ays-home-why-grid` in home.css, `.ays-about-*-pillars` in
   about.css) — this file only ships the card itself.
───────────────────────────────────────── */
.pillar {
  padding: 48px 40px;
  background: rgba(255, 255, 255, 0.02);
  border: 0.5px solid var(--border);
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
}
.pillar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.pillar:hover {
  background: rgba(255, 255, 255, 0.04);
}
.pillar:hover::before {
  transform: scaleX(1);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  display: block;
}

.pillar h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.pillar p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 300;
}

/* ─────────────────────────────────────────
   PLANS
───────────────────────────────────────── */
.plans {
  background: var(--dark2);
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}

.plans-intro {
  max-width: 560px;
  margin-bottom: 48px;
}

/* ── Plan Cards ── */
.plan-card {
  padding: 36px 32px;
  border-radius: 20px;
  border: 0.5px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}
.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(155, 56, 193, 0.14), 0 0 0 0.5px rgba(155, 56, 193, 0.18);
  background: rgba(155, 56, 193, 0.06);
}
.plan-card.featured {
  border-color: rgba(253, 78, 163, 0.4);
  background: rgba(253, 78, 163, 0.05);
}
.plan-card.featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(253, 78, 163, 0.16), 0 0 0 0.5px rgba(253, 78, 163, 0.25);
  background: rgba(253, 78, 163, 0.09);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  white-space: nowrap;
}

.plan-name {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.plan-tagline {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.plan-price {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 4px;
}
.plan-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
}

.plan-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  cursor: pointer;
  border: none;
}
.plan-btn:hover {
  opacity: 0.85;
  transform: scale(1.02);
}
.plan-btn-outline {
  background: transparent;
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
}
.plan-btn-fill {
  background: var(--grad);
  color: #fff;
}

/* ── Invite Card ── */
.invite-card {
  padding: 36px 32px;
  border-radius: 20px;
  position: relative;
  background:
    linear-gradient(135deg, rgba(155, 56, 193, 0.07), rgba(253, 78, 163, 0.07)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.invite-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 64px rgba(253, 78, 163, 0.22);
}

.invite-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.invite-headline {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
}

.invite-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.invite-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 20px 0 16px;
  padding: 16px 0;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  width: 100%;
}
.invite-stat-num {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.invite-stat-label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.invite-perks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  flex: 1;
  width: 100%;
}

.invite-perk {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}
.invite-perk::before {
  content: '';
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: rgba(253, 78, 163, 0.15);
  border: 0.5px solid rgba(253, 78, 163, 0.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpolyline points='4,8 7,11 12,5' stroke='%23fd4ea3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
}

.invite-card .plan-btn {
  width: 100%;
}

.invite-note {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  text-align: center;
  margin-top: 10px;
  width: 100%;
}

/* ── Referral Block ── */
.referral-block {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 20px;
  border: 0.5px solid rgba(253, 78, 163, 0.2);
  background: rgba(253, 78, 163, 0.04);
  max-width: 720px;
  margin-bottom: 48px;
  transition: border-color 0.3s, background 0.3s;
}
.referral-block:hover {
  border-color: rgba(253, 78, 163, 0.35);
  background: rgba(253, 78, 163, 0.07);
}

.referral-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(253, 78, 163, 0.1);
  border: 0.5px solid rgba(253, 78, 163, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.referral-body h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.referral-body p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 14px;
}
.referral-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--pink);
  text-decoration: none;
  transition: opacity 0.2s;
}
.referral-link:hover {
  opacity: 0.75;
}

/* ─────────────────────────────────────────
   FAQ ITEM — AysFaqItem accordion primitive (the `<details>` block
   used by every FAQ list in the site: /faq sections, /pricing FAQ,
   Home FAQ, /support quick-answers).

   This file ships the *structural* primitive (flex layout in
   summary, hidden marker, `+` chevron, dark-theme fallback colors).
   The canonical light-theme look (line-list dividers, flush-left
   summary + answer, brand-tinted marker) is componentized in
   `sections/components.css` under `.ays-light .faq-item`, so every
   consumer page gets the same component look without per-wrapper
   overrides. Wrapping list containers (`.ays-home-faq-list`,
   `.ays-support-faq-list`, etc.) only own layout (flex direction,
   gap) — never per-item visual treatment.
───────────────────────────────────────── */
.faq-item {
  border: 0.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s;
}
.faq-item[open] {
  background: rgba(255, 255, 255, 0.03);
}

.faq-item summary {
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 18px;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item summary:hover {
  color: var(--white);
}

.faq-item p {
  padding: 0 20px 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 300;
}
/* AysFaqItem wraps its slot in `<div class="bds-p2">` — typography
   comes from the BDS utility; we only own the layout (lateral inset
   to match the boxed accordion style, plus bottom breathing room
   before the item border). Pages that present the list as
   unboxed line-items (e.g. Home's `.ays-home-faq-list`) override the
   lateral padding back to 0. */
.faq-item .bds-p2 {
  padding: 0 20px 24px;
}

/* ─────────────────────────────────────────
   RESPONSIVE
   Only the .referral-block mobile stack remains here after the
   legacy-grid orphan cleanup. Component-scoped responsive rules
   live with their consumers (home.css, pricing.css, etc.).
───────────────────────────────────────── */
@media (max-width: 768px) {
  .referral-block {
    flex-direction: column;
    gap: 16px;
  }
}
