/* ==========================================================================
   Astral Match — Design System
   Meaningful Relationships Begin with Compatibility.
   ========================================================================== */

/* -------------------- Fonts -------------------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* -------------------- Design Tokens -------------------- */
:root {
  /* Brand palette (source of truth) */
  --rose:        #E96A8D;
  --rose-dark:   #D14E72;
  --rose-tint:   #FCE9EE;
  --maroon:      #6A1F3B;
  --maroon-dark: #4F1729;
  --maroon-tint: #F0E1E7;
  --gold:        #D8B36A;
  --gold-dark:   #BD9750;
  --gold-tint:   #F7EFDD;
  --ivory:       #FFF8F8;
  --charcoal:    #2B2B2B;
  --white:       #FFFFFF;

  /* Semantic roles */
  --color-bg:            var(--ivory);
  --color-surface:       var(--white);
  --color-text:          var(--charcoal);
  --color-text-muted:    #6B6060;
  --color-heading:       var(--maroon);
  --color-cta:           var(--rose);
  --color-cta-hover:     var(--rose-dark);
  --color-accent:        var(--gold);
  --color-border:        #EDE0DE;
  --color-focus:         var(--maroon);

  /* Type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  1.875rem;
  --fs-3xl:  2.5rem;
  --fs-4xl:  3.5rem;
  --fs-5xl:  clamp(3rem, 5.5vw, 5rem);

  --lh-tight: 1.15;
  --lh-snug:  1.35;
  --lh-body:  1.65;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-8: 3rem;
  --sp-10: 4rem;
  --sp-12: 5rem;
  --sp-16: 7rem;
  --sp-20: 8.5rem;

  /* Layout */
  --container-max: 1200px;
  --container-pad: clamp(1.25rem, 4vw, 2.5rem);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Shadows — soft, never harsh, per brief */
  --shadow-sm: 0 2px 8px rgba(106, 31, 59, 0.07);
  --shadow-md: 0 8px 24px rgba(106, 31, 59, 0.12);
  --shadow-lg: 0 16px 48px rgba(106, 31, 59, 0.16);

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------------------- Reset -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); color: var(--color-heading); font-weight: 600; line-height: var(--lh-tight); }
p { margin: 0; }

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

/* -------------------- Focus states (accessibility) -------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2.5px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------- Typography scale -------------------- */
h1, .h1 { font-size: var(--fs-5xl); letter-spacing: -0.02em; }
h2, .h2 { font-size: var(--fs-3xl); letter-spacing: -0.01em; }
h3, .h3 { font-size: var(--fs-2xl); }
h4, .h4 { font-size: var(--fs-xl); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--maroon);
}
.lede { font-size: var(--fs-lg); line-height: var(--lh-snug); color: var(--color-text-muted); }
.text-muted { color: var(--color-text-muted); }

@media (max-width: 768px) {
  h1, .h1 { font-size: var(--fs-4xl); }
  h2, .h2 { font-size: var(--fs-2xl); }
  h3, .h3 { font-size: var(--fs-xl); }
}

/* -------------------- Layout -------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.section { padding-block: var(--sp-16); }
.section--tight { padding-block: var(--sp-10); }
.section--tinted { background: var(--rose-tint); }
.section--maroon { background: var(--maroon); color: var(--white); }
.section--maroon h1, .section--maroon h2, .section--maroon h3 { color: var(--white); }

.stack { display: flex; flex-direction: column; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); }
.grid { display: grid; gap: var(--sp-6); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .section { padding-block: var(--sp-10); }
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 700;
  border: 1.5px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-cta); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--color-cta-hover); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--maroon); border-color: var(--maroon); }
.btn-secondary:hover { background: var(--maroon); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.6rem 1.25rem; font-size: var(--fs-xs); }

/* -------------------- Cards -------------------- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: var(--rose-tint);
  color: var(--maroon);
  margin-bottom: var(--sp-4);
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: var(--sp-2); }

/* -------------------- Hero glow (signature motif) --------------------
   Soft, slow-drifting gradient blobs behind the hero content — quiet
   ambient motion, no literal iconography (no hearts/rings/circles/zodiac). */
.hero { position: relative; overflow: hidden; }
.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 140%;
  pointer-events: none;
  z-index: 0;
}
.hero-glow::before, .hero-glow::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: drift 22s ease-in-out infinite alternate;
}
.hero-glow::before {
  width: 480px; height: 480px;
  top: -8%; left: 8%;
  background: radial-gradient(circle, var(--rose) 0%, transparent 70%);
}
.hero-glow::after {
  width: 420px; height: 420px;
  bottom: -12%; right: 6%;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  animation-delay: -8s;
  animation-duration: 26s;
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, -24px) scale(1.08); }
  100% { transform: translate(-20px, 18px) scale(0.96); }
}
.hero > .container { position: relative; z-index: 1; }

/* Full first-screen hero — SaaS landing page energy */
.hero--full {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-block: var(--sp-16);
}
@media (max-width: 700px) {
  .hero--full { min-height: auto; padding-block: var(--sp-12) var(--sp-10); }
}

.btn-hero {
  padding: 1.15rem 2.5rem;
  font-size: 1.0625rem;
  box-shadow: 0 12px 32px rgba(233, 106, 141, 0.35);
}
.btn-hero:hover { box-shadow: 0 16px 40px rgba(233, 106, 141, 0.45); }

/* Numbered step marker — used only for genuine sequences (e.g. How It Works) */
.step-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--maroon);
  color: var(--white);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--sp-4);
}

/* -------------------- Trust card (premium product-UI mock) -------------------- */
.trust-showcase {
  position: relative;
  padding: var(--sp-8);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  box-shadow: var(--shadow-lg);
}
.trust-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}
.trust-card__top { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.trust-card__avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--gold));
  flex-shrink: 0;
}
.trust-card__name { font-weight: 700; color: var(--charcoal); }
.trust-card__handle { font-size: var(--fs-xs); color: var(--color-text-muted); }
.trust-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--rose-tint);
  color: var(--maroon);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.trust-badge svg { width: 13px; height: 13px; }
.trust-card__row {
  display: flex; justify-content: space-between; align-items: center;
  padding-block: var(--sp-3);
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-sm);
}
.trust-card__row:first-of-type { border-top: none; }
.trust-card__row span:first-child { color: var(--color-text-muted); }
.trust-card__row span:last-child { font-weight: 700; color: var(--charcoal); }
.trust-principle {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--color-border);
}
.trust-principle:first-child { border-top: none; padding-top: 0; }
.trust-principle-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--gold-tint); color: var(--gold-dark);
}
.trust-principle-icon svg { width: 20px; height: 20px; }

/* -------------------- Header / Nav -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--sp-4);
}
.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--maroon);
  letter-spacing: -0.01em;
}
.logo span { color: var(--rose); }

.main-nav { display: flex; align-items: center; gap: var(--sp-8); }
.nav-links { display: flex; gap: var(--sp-6); }
.nav-links a {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--charcoal);
  padding-block: var(--sp-2);
  position: relative;
  transition: color var(--transition);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--maroon); }
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--rose);
  border-radius: var(--radius-pill);
}

.nav-cta { display: none; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--sp-2);
  color: var(--maroon);
}
.menu-toggle svg { width: 26px; height: 26px; }

@media (min-width: 901px) {
  .main-nav { display: flex; }
  .nav-cta.btn { display: inline-flex; }
}
@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: 0 0 0 30%;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--sp-20) var(--sp-6) var(--sp-6);
    gap: var(--sp-6);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .main-nav.is-open { transform: translateX(0); }
  .nav-links { flex-direction: column; gap: var(--sp-5); width: 100%; }
  .nav-links a { display: block; font-size: var(--fs-lg); }
  .nav-cta.btn { display: inline-flex; width: 100%; }
  .menu-toggle { display: inline-flex; }
  .menu-toggle .icon-close { display: none; }
  .menu-toggle.is-open .icon-menu { display: none; }
  .menu-toggle.is-open .icon-close { display: inline-flex; }
}

/* -------------------- Footer -------------------- */
.site-footer {
  background: var(--maroon);
  color: rgba(255,255,255,0.85);
  padding-block: var(--sp-12) var(--sp-6);
}
.site-footer a { color: rgba(255,255,255,0.85); transition: color var(--transition); }
.site-footer a:hover { color: var(--gold); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-8);
  padding-bottom: var(--sp-10);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-grid h4 { color: var(--white); font-size: var(--fs-sm); margin-bottom: var(--sp-4); font-family: var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; }
.footer-grid ul { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-grid .logo { color: var(--white); }
.footer-grid .logo span { color: var(--gold); }
.footer-tagline { margin-top: var(--sp-3); font-size: var(--fs-sm); max-width: 32ch; color: rgba(255,255,255,0.7); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  justify-content: space-between; align-items: center;
  padding-top: var(--sp-6);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.6);
}
.social-icons { display: flex; gap: var(--sp-3); }
.social-icons a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
}
.social-icons svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* -------------------- Forms -------------------- */
.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.field label { font-size: var(--fs-sm); font-weight: 700; color: var(--maroon); }
.field-hint { font-size: var(--fs-xs); color: var(--color-text-muted); }
input[type="text"], input[type="email"], input[type="search"], select, textarea {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px var(--maroon-tint);
  outline: none;
}
.checkbox-field { display: flex; align-items: flex-start; gap: var(--sp-3); }
.checkbox-field input { width: auto; margin-top: 3px; accent-color: var(--rose); }
.checkbox-field label { font-weight: 500; font-size: var(--fs-sm); color: var(--color-text); }
.form-success, .form-error {
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.form-success { background: #E7F5EC; color: #1E6B3E; }
.form-error { background: #FBEAEC; color: #A6293F; }

/* -------------------- Badges / tags -------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--gold-tint);
  color: var(--gold-dark);
}
.badge--soon { background: var(--maroon-tint); color: var(--maroon); }

/* -------------------- Breadcrumbs -------------------- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--color-text-muted); margin-bottom: var(--sp-6); }
.breadcrumbs a { color: var(--maroon); font-weight: 600; }
.breadcrumbs .sep { color: var(--color-border); }

/* -------------------- Hero visual (CSS-only, no photo dependency) --------------------
   A layered aurora-style gradient composition — warm, abstract, premium.
   Deliberately not literal (no stars/zodiac/rings) to stay clear of any
   astrology or fortune-telling visual language. */
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-dark) 65%);
  box-shadow: var(--shadow-lg);
}
.hero-visual__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: drift 24s ease-in-out infinite alternate;
}
.hero-visual__orb--1 {
  width: 300px; height: 300px;
  top: -60px; left: -40px;
  background: radial-gradient(circle, var(--rose) 0%, transparent 70%);
}
.hero-visual__orb--2 {
  width: 260px; height: 260px;
  bottom: -60px; right: -30px;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  animation-delay: -10s;
  animation-duration: 28s;
}
.hero-visual__orb--3 {
  width: 220px; height: 220px;
  top: 38%; left: 32%;
  background: radial-gradient(circle, var(--rose-dark) 0%, transparent 70%);
  opacity: 0.4;
  animation-delay: -5s;
  animation-duration: 20s;
}
.hero-visual__texture {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1px);
  background-size: 24px 24px;
  mix-blend-mode: overlay;
}
.hero-visual__wordmark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: var(--sp-6);
}
.hero-visual__wordmark span {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.01em;
}
.hero-visual__wordmark span em {
  font-style: normal;
  color: var(--gold);
}

/* -------------------- Hero media (photography) -------------------- */
.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--rose-tint), var(--gold-tint));
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* -------------------- Methodology note --------------------
   Low-key mention of BaZi / Qi Men Dun Jia — introduced quietly, after
   compatibility/trust have already made the case. Never the lead. */
.methodology-note {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-md);
  background: var(--gold-tint);
  border: 1px solid rgba(216, 179, 106, 0.35);
  font-size: var(--fs-sm);
  color: var(--maroon-dark);
}
.methodology-note svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--gold-dark); }

/* -------------------- Utility -------------------- */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.max-w-content { max-width: 68ch; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--maroon); color: var(--white);
  padding: var(--sp-3) var(--sp-5); z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* -------------------- Lazy image fade-in -------------------- */
img[loading="lazy"] { opacity: 0; transition: opacity 400ms ease; }
img[loading="lazy"].is-loaded { opacity: 1; }
