/* ==========================================================================
   Muave — muave.app
   One stylesheet for all pages. Mobile-first, WCAG AA, no dependencies.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --purple: #8A63BD;        /* primary brand */
  --lilac: #B794D6;         /* lighter accent */
  --bg: #F7F4FB;            /* page background */
  --ink: #2A2436;           /* body text */
  --heading: #4A3575;       /* heading accent */
  --muted: #6B6577;         /* secondary text */
  --link: #6E46A6;          /* AA-contrast link color on light backgrounds */
  --card: #FFFFFF;
  --line: rgba(74, 53, 117, 0.14);
  --footer-bg: #2A2436;

  --grad-brand: linear-gradient(135deg, var(--purple), var(--lilac));
  --grad-deep: linear-gradient(135deg, #4A3575 0%, #8A63BD 60%, #B794D6 130%);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(42, 36, 54, 0.05), 0 4px 14px rgba(74, 53, 117, 0.08);
  --shadow: 0 2px 6px rgba(42, 36, 54, 0.06), 0 14px 36px rgba(74, 53, 117, 0.14);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";

  --container: 1080px;
  --space-section: clamp(3.5rem, 9vw, 6.5rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  color: var(--heading);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.25rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }

p {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--heading);
}

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--lilac);
  color: var(--ink);
}

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

.sr-only {
  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;
  top: -100%;
  left: 1rem;
  z-index: 100;
  background: var(--heading);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 251, 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--heading);
  text-decoration: none;
}

.brand:hover {
  color: var(--purple);
}

.brand-mark {
  width: 1.7rem;
  height: 1.7rem;
  flex: none;
  filter: drop-shadow(0 2px 4px rgba(138, 99, 189, 0.35));
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--heading);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  background: rgba(138, 99, 189, 0.12);
  color: var(--heading);
}

.site-nav a[aria-current="page"] {
  background: var(--grad-deep);
  color: #fff;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--heading);
  cursor: pointer;
}

.nav-toggle .icon-close { display: none; }

@media (max-width: 719px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.75rem 1.25rem 1.1rem;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .site-nav a {
    display: block;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
  }

  body.nav-open .site-nav { display: block; }
  body.nav-open .nav-toggle .icon-menu { display: none; }
  body.nav-open .nav-toggle .icon-close { display: block; }
}

/* ---------- Buttons & badges ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary {
  color: #fff;
  background-image: var(--grad-deep);
  box-shadow: 0 6px 20px rgba(138, 99, 189, 0.45);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(138, 99, 189, 0.55);
}

.btn-ghost {
  color: var(--heading);
  background: var(--card);
  border: 1.5px solid rgba(138, 99, 189, 0.45);
}

.btn-ghost:hover {
  color: var(--heading);
  background: rgba(138, 99, 189, 0.1);
  transform: translateY(-2px);
}

.btn-on-dark {
  color: var(--heading);
  background: #fff;
  box-shadow: 0 6px 20px rgba(42, 36, 54, 0.3);
}

.btn-on-dark:hover {
  color: var(--heading);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(42, 36, 54, 0.38);
}

.badge-store {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.9rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background-image: var(--grad-deep);
  color: #fff;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(4rem, 10vw, 7rem);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 34rem;
  height: 34rem;
  right: -12rem;
  top: -14rem;
  background: radial-gradient(circle, rgba(183, 148, 214, 0.5), transparent 65%);
}

.hero::after {
  width: 26rem;
  height: 26rem;
  left: -10rem;
  bottom: -12rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 65%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
  }
}

.hero .eyebrow {
  color: #E4D5F5;
}

.hero h1 {
  color: #fff;
  margin-bottom: 0.5em;
}

.hero .lede {
  font-size: clamp(1.1rem, 2.2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.94);
  max-width: 34em;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.hero-note {
  margin-top: 1.1rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-link {
  color: #fff;
  font-weight: 600;
}

.hero-link:hover {
  color: #E4D5F5;
}

/* Phone mockup */
.phone {
  justify-self: center;
  width: min(21rem, 100%);
  background: var(--bg);
  border-radius: 2.2rem;
  padding: 0.9rem;
  box-shadow: 0 30px 60px rgba(26, 18, 43, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  transform: rotate(2deg);
}

.phone-screen {
  background: #fff;
  border-radius: 1.6rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.phone-top {
  background-image: var(--grad-brand);
  color: #fff;
  padding: 1.1rem 1.2rem 1rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.phone-body {
  padding: 1.1rem 1.2rem 1.3rem;
}

.match-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.avatar {
  width: 3rem;
  height: 3rem;
  flex: none;
  border-radius: 50%;
  background-image: var(--grad-brand);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  display: grid;
  place-items: center;
}

.match-name {
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.match-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0;
  list-style: none;
}

.chip {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--heading);
  background: rgba(138, 99, 189, 0.13);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}

.icebreaker {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 0.95rem;
  font-size: 0.9rem;
  color: var(--ink);
}

.icebreaker strong {
  color: var(--purple);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-section) 0;
}

.section-alt {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 42em;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

.section-head p {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
}

/* How it works */
.steps {
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

.step {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background-image: var(--grad-deep);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}

.step h3 {
  margin-bottom: 0.35em;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Feature cards */
.cards {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(138, 99, 189, 0.13);
  color: var(--purple);
}

.card h3 {
  margin-bottom: 0.4em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.99rem;
}

/* Who it's for */
.audience {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 820px) {
  .audience { grid-template-columns: repeat(3, 1fr); }
}

.audience-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem 1.7rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.audience-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background-image: var(--grad-brand);
}

.audience-card h3 { margin-bottom: 0.4em; }

.audience-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.99rem;
}

.inclusion-note {
  margin-top: 2rem;
  padding: 1.3rem 1.5rem;
  background: rgba(138, 99, 189, 0.09);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--heading);
  font-weight: 600;
  text-align: center;
}

/* CTA band */
.cta-band {
  background-image: var(--grad-deep);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  box-shadow: var(--shadow);
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 38em;
  margin: 0 auto 1.8rem;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background-image: var(--grad-deep);
  color: #fff;
  padding: clamp(2.75rem, 7vw, 4.5rem) 0;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 0.3em;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 44em;
  margin: 0;
  font-size: 1.1rem;
}

.page-hero .meta {
  display: inline-block;
  margin-top: 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
}

/* ---------- Prose (legal pages) ---------- */
.prose {
  max-width: 46rem;
}

.prose h2 {
  font-size: 1.45rem;
  margin-top: 2.4em;
  padding-top: 1.2em;
  border-top: 1px solid var(--line);
}

.prose h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin-top: 1.6em;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
  margin: 0 0 1.2em;
}

.prose li {
  margin-bottom: 0.45em;
}

.prose li::marker {
  color: var(--purple);
}

.prose .callout {
  background: rgba(138, 99, 189, 0.09);
  border: 1px solid var(--line);
  border-left: 4px solid var(--purple);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.4em 0;
}

.prose .callout p {
  margin: 0;
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 46rem;
  display: grid;
  gap: 0.9rem;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  font-weight: 700;
  color: var(--heading);
  cursor: pointer;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: rgba(138, 99, 189, 0.13);
  color: var(--purple);
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.25s ease;
}

.faq details[open] summary::after {
  content: "–";
  transform: rotate(180deg);
}

.faq summary:hover {
  background: rgba(138, 99, 189, 0.06);
}

.faq .answer {
  padding: 0 1.3rem 1.2rem;
  color: var(--muted);
}

.faq .answer p:last-child {
  margin-bottom: 0;
}

/* Contact card */
.contact-card {
  max-width: 46rem;
  margin-top: 2.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.8rem 1.6rem;
}

.contact-card h2 {
  margin-bottom: 0.4em;
}

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

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--space-section);
  background: var(--footer-bg);
  color: #CFC8DC;
}

.footer-grid {
  display: grid;
  gap: 2.25rem;
  padding: 3.25rem 0 2.5rem;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3rem;
  }
}

.footer-brand .brand {
  color: #fff;
  margin-bottom: 0.6rem;
}

.footer-brand p {
  margin: 0;
  font-size: 0.96rem;
  max-width: 30em;
}

.site-footer h2 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

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

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 1.4rem 0;
  font-size: 0.9rem;
}

.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

/* ---------- Scroll reveal (JS adds .is-visible; hidden state only when JS runs) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .cards > .reveal:nth-child(2),
.js .steps > .reveal:nth-child(2),
.js .audience > .reveal:nth-child(2) { transition-delay: 0.08s; }

.js .cards > .reveal:nth-child(3),
.js .steps > .reveal:nth-child(3),
.js .audience > .reveal:nth-child(3) { transition-delay: 0.16s; }

.js .cards > .reveal:nth-child(4),
.js .steps > .reveal:nth-child(4) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Print (legal pages) ---------- */
@media print {
  .site-header,
  .site-footer,
  .page-hero .meta,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .page-hero {
    background: none;
    color: #000;
    padding: 0 0 1rem;
  }

  .page-hero h1,
  .page-hero p {
    color: #000;
  }

  a {
    color: #000;
  }
}
