/* ============================================================
   DivorceParty — RFP Window Stylesheet
   Single CSS file for the static institutional surface.
   Mirrors the main codebase's Geist + Fraunces + OKLCH palette
   so the design language matches when the surfaces are unified.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Palette — pulled from app/globals.css of the main codebase */
  --background:       oklch(0.99 0.005 120);
  --foreground:       oklch(0.15 0.01 250);
  --card:             oklch(1 0 0);
  --muted:            oklch(0.965 0.005 120);
  --muted-foreground: oklch(0.52 0.02 250);
  --border:           oklch(0.9 0.01 250);
  --accent:           oklch(0.65 0.24 350);
  --accent-foreground:oklch(0.99 0 0);
  --destructive:      oklch(0.6 0.22 25);
  --primary:          oklch(0.28 0.08 260);
  --primary-foreground:oklch(0.99 0 0);

  --radius: 0.75rem;

  --font-sans: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  --container-max: 1280px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01';
  color: var(--foreground);
  background: var(--background);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- Display type — Fraunces for all headings ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 80;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  margin: 0;
  font-weight: 600;
  color: var(--foreground);
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
@media (min-width: 640px)  { .container { padding-inline: 2rem; } }
@media (min-width: 1024px) { .container { padding-inline: 4rem; } }

.section { padding-block: 5rem; }
@media (min-width: 768px)  { .section { padding-block: 7rem; } }

.section--muted   { background: color-mix(in oklch, var(--muted) 50%, transparent); border-block: 1px solid color-mix(in oklch, var(--border) 60%, transparent); }
.section--bordered{ border-block: 1px solid color-mix(in oklch, var(--border) 60%, transparent); }
.section--accent  { background: color-mix(in oklch, var(--accent) 4%, transparent); }

/* ---------- Site header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklch, var(--background) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}
.header__brand { display: inline-flex; align-items: center; }
.header__logo {
  height: 32px;
  width: auto;
  display: block;
}
@media (min-width: 768px) {
  .header__logo { height: 36px; }
}
.header__nav { display: none; align-items: center; gap: 2rem; }
.header__cta { display: none; }
.header__nav-link { font-size: 0.875rem; font-weight: 500; color: var(--muted-foreground); transition: color 0.15s; font-family: var(--font-sans); }
.header__nav-link:hover { color: var(--foreground); }
.header__nav-link--active { color: var(--foreground); }
.header__menu { background: none; border: 0; padding: 0.5rem; border-radius: 0.375rem; color: var(--foreground); display: inline-flex; }
.header__menu:hover { background: var(--muted); }

@media (min-width: 768px) {
  .header__nav, .header__cta { display: inline-flex; align-items: center; gap: 0.75rem; }
  .header__menu { display: none; }
}

.mobile-menu { display: none; background: var(--background); border-top: 1px solid color-mix(in oklch, var(--border) 60%, transparent); }
.mobile-menu.is-open { display: block; }
.mobile-menu .container { display: flex; flex-direction: column; gap: 0.25rem; padding-block: 1rem; }
.mobile-menu a { padding: 0.5rem 0.75rem; border-radius: 0.375rem; font-size: 0.875rem; font-weight: 500; }
.mobile-menu a:hover { background: var(--muted); }
@media (min-width: 768px) { .mobile-menu, .header__menu { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: calc(var(--radius) - 0.25rem);
  border: 1px solid transparent;
  transition: all 0.15s;
  text-align: center;
  white-space: nowrap;
}
.btn--primary  { background: var(--primary); color: var(--primary-foreground); }
.btn--primary:hover  { background: color-mix(in oklch, var(--primary) 90%, white); }
.btn--outline  { background: var(--background); border-color: var(--border); color: var(--foreground); }
.btn--outline:hover  { background: var(--muted); }
.btn--accent   { background: var(--accent); color: var(--accent-foreground); }
.btn--accent:hover   { background: color-mix(in oklch, var(--accent) 90%, white); }
.btn--lg { padding: 0.625rem 1.5rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Hero patterns ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 5rem;
}
@media (min-width: 768px) { .hero { padding-block: 7rem; } }
.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    color-mix(in oklch, var(--muted) 30%, transparent) 0%,
    var(--background) 70%);
  z-index: 0;
}
.hero__content { position: relative; z-index: 1; max-width: 48rem; margin-inline: auto; text-align: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: color-mix(in oklch, var(--background) 80%, transparent);
  font-size: 0.75rem; font-weight: 500;
  color: var(--muted-foreground);
  font-family: var(--font-sans);
}
.hero__eyebrow-dot { width: 0.375rem; height: 0.375rem; border-radius: 9999px; background: var(--accent); }
.hero__title {
  margin-top: 1.5rem;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
  text-wrap: balance;
}
.hero__lede {
  margin: 1.5rem auto 0;
  max-width: 38rem;
  color: var(--muted-foreground);
  font-size: 1rem;
  text-wrap: pretty;
}
@media (min-width: 768px) { .hero__lede { font-size: 1.125rem; } }
.hero__actions {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.75rem; margin-top: 2rem;
}
@media (min-width: 640px) { .hero__actions { flex-direction: row; } }

/* ---------- Section heading ---------- */
.section-heading { max-width: 48rem; }
.section-heading--center { margin-inline: auto; text-align: center; }
.section-heading__eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted-foreground);
  font-family: var(--font-sans);
}
.section-heading__title {
  margin-top: 0.75rem;
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  line-height: 1.1;
}
.section-heading__lede {
  margin-top: 1rem;
  color: var(--muted-foreground);
  font-size: 1rem;
  line-height: 1.65;
  text-wrap: pretty;
}

/* ---------- Cards / capability grid ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--cols-2 { grid-template-columns: 1fr; }
.grid--cols-3 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--card);
  border: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card__icon-bg {
  display: inline-flex;
  width: 2.5rem; height: 2.5rem;
  align-items: center; justify-content: center;
  border-radius: 0.5rem;
  background: color-mix(in oklch, var(--accent) 10%, transparent);
  color: var(--accent);
  margin-bottom: 1rem;
}
.card__title { font-size: 1.125rem; }
.card__body { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.65; font-family: var(--font-sans); }
.card__tier { margin-top: 1rem; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); font-family: var(--font-sans); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat__n { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; color: var(--foreground); font-family: var(--font-display); }
.stat__label { margin-top: 0.25rem; font-size: 0.75rem; color: var(--muted-foreground); font-family: var(--font-sans); }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 1.25rem; font-family: var(--font-sans); }
.form-row { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field__label { font-size: 0.875rem; font-weight: 500; color: var(--foreground); }
.field__label .req { color: var(--accent); margin-inline-start: 0.125rem; }
.field__optional { font-size: 0.75rem; font-weight: 400; color: var(--muted-foreground); }
.field__help { font-size: 0.75rem; color: var(--muted-foreground); }
.field__error { font-size: 0.75rem; color: var(--destructive); }
.input, .textarea, .select {
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 0.25rem);
  color: var(--foreground);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 20%, transparent);
}
.textarea { min-height: 5.5rem; resize: vertical; font-family: var(--font-sans); }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 0.625rem center; padding-right: 2rem; }
.consent {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
  background: color-mix(in oklch, var(--muted) 30%, transparent);
  border-radius: calc(var(--radius) - 0.25rem);
}
.consent input[type="checkbox"] { margin-top: 0.125rem; width: 1rem; height: 1rem; accent-color: var(--accent); }
.consent label { font-size: 0.75rem; line-height: 1.65; color: var(--muted-foreground); }

/* ---------- Beta page path sections ---------- */
.path-section { scroll-margin-top: 5rem; padding-block: 4rem; border-bottom: 1px solid color-mix(in oklch, var(--border) 60%, transparent); }
@media (min-width: 768px) { .path-section { padding-block: 5rem; } }
.path-section--warm { background: color-mix(in oklch, var(--accent) 4%, transparent); }
.path-section__grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 1024px) { .path-section__grid { grid-template-columns: 1fr 1.2fr; } }
.path-section__intro { max-width: 36rem; }
.path-section__title { margin-top: 0.75rem; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.1; }
.path-section__lede { margin-top: 1rem; color: var(--muted-foreground); line-height: 1.65; text-wrap: pretty; }
.path-section__form-wrap {
  background: var(--card);
  border: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
  border-radius: calc(var(--radius) + 0.25rem);
  padding: 1.5rem;
}
@media (min-width: 768px) { .path-section__form-wrap { padding: 2rem; } }
.privacy-note {
  margin-top: 2rem;
  padding: 0.75rem 1rem;
  background: color-mix(in oklch, var(--background) 60%, transparent);
  border: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--muted-foreground);
}
.privacy-note a { color: var(--foreground); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Anchor pill nav ---------- */
.anchor-nav {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 2rem;
}
.anchor-pill {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--background);
  border-radius: 9999px;
  font-family: var(--font-sans);
  transition: border-color 0.15s;
}
.anchor-pill:hover { border-color: color-mix(in oklch, var(--foreground) 40%, transparent); }

/* ---------- Success state ---------- */
.success {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.75rem; padding: 2rem; text-align: center;
  border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
  background: color-mix(in oklch, var(--accent) 6%, transparent);
  border-radius: var(--radius);
}
.success__icon { color: var(--accent); }
.success__title { font-size: 1.125rem; }
.success__body { font-size: 0.875rem; color: var(--muted-foreground); max-width: 28rem; line-height: 1.65; font-family: var(--font-sans); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
  background: color-mix(in oklch, var(--muted) 30%, transparent);
  padding-block: 3rem;
}
.footer__grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: repeat(3, 1fr); } }
.footer__brand { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; font-family: var(--font-sans); }
.footer__tagline { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); max-width: 24rem; line-height: 1.65; font-family: var(--font-sans); }
.footer__heading { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); font-family: var(--font-sans); }
.footer__list { list-style: none; padding: 0; margin: 0.75rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem; font-family: var(--font-sans); }
.footer__list a { color: color-mix(in oklch, var(--foreground) 80%, transparent); }
.footer__list a:hover { color: var(--foreground); }
.footer__legal {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
  display: flex; flex-direction: column; gap: 0.75rem;
  font-size: 0.75rem; color: var(--muted-foreground);
  font-family: var(--font-sans);
}
@media (min-width: 768px) { .footer__legal { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer__legal-links { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* ---------- Misc utility ---------- */
.text-balance { text-wrap: balance; }
.text-pretty  { text-wrap: pretty; }
.muted        { color: var(--muted-foreground); }
