/* ==========================================================================
   Feistafind — Meaningful Connections. New Beginnings.
   A front-end prototype for a dating & companionship platform for adults 50+.

   NOTE FOR DEVELOPERS:
   This is a front-end demonstration only. There is no backend. Data that
   appears to be "saved" is stored in the visitor's own browser via
   localStorage. Production deployment requires HTTPS, a secure server,
   real authentication with password hashing, server-side validation,
   CSRF/XSS protection, rate limiting, and a secure database.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Palette: warm ivory ground, deep navy ink, wine accent, soft gold */
  --cream: #f8f6f1;
  --ivory: #fffdf8;
  --card: #ffffff;
  --ink: #16213c;
  --ink-soft: #4a5470;
  --ink-faint: #6b7490;
  --wine: #7d2942;
  --wine-strong: #5e1e32;
  --wine-bright: #9a3554;
  --wine-tint: #f6e9ec;
  --gold: #c9a227;
  --gold-tint: #f7efda;
  --line: #e7dfd0;
  --line-strong: #d8cdb6;
  --success: #2e6b4f;
  --success-tint: #e6f2ec;
  --danger: #a33327;
  --danger-tint: #fae9e6;
  --info-tint: #e9eef7;

  --shadow-sm: 0 1px 2px rgba(22, 33, 60, 0.06), 0 2px 8px rgba(22, 33, 60, 0.05);
  --shadow-md: 0 4px 14px rgba(22, 33, 60, 0.08), 0 12px 32px rgba(22, 33, 60, 0.07);
  --shadow-lg: 0 10px 30px rgba(22, 33, 60, 0.12), 0 24px 60px rgba(22, 33, 60, 0.10);

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

  --font-display: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --container: 1140px;
  --section-pad: 96px;

  --focus-ring: 0 0 0 3px rgba(125, 41, 66, 0.35);
}

/* Dark theme (optional toggle — stored in localStorage) */
[data-theme="dark"] {
  --cream: #141a29;
  --ivory: #1a2133;
  --card: #1e2639;
  --ink: #f0ead9;
  --ink-soft: #c4cbe0;
  --ink-faint: #98a1bd;
  --wine: #d58aa0;
  --wine-strong: #e4a9bb;
  --wine-bright: #e4a9bb;
  --wine-tint: #33222c;
  --gold: #d8b84a;
  --gold-tint: #2d2a1d;
  --line: #2e3750;
  --line-strong: #3b4560;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;          /* 18px — comfortable for 50+ readers */
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.22;
  color: var(--ink);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1.1em; }
a { color: var(--wine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--wine-strong); }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* Visible focus everywhere (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--wine);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 10px 0;
  z-index: 2000;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.container--narrow { max-width: 820px; }

.section { padding-block: var(--section-pad); position: relative; }
.section--tint { background: var(--ivory); }
.section--wine { background: var(--wine-strong); color: #f6ecef; }
.section--wine h2, .section--wine h3 { color: #fff; }

.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head--center { margin-inline: auto; text-align: center; }

.kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 0.9rem;
}
.section--wine .kicker { color: var(--gold); }

.lede { font-size: 1.25rem; color: var(--ink-soft); }
.section--wine .lede { color: #e8d9de; }

/* Large decorative serif watermark anchoring sections */
.watermark {
  position: absolute;
  bottom: -0.35em;
  right: 2%;
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 9rem);
  font-weight: 700;
  color: rgba(125, 41, 66, 0.055);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  white-space: nowrap;
}
[data-theme="dark"] .watermark { color: rgba(213, 138, 160, 0.07); }

.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.95em 1.7em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease,
              border-color 0.25s ease, transform 0.15s ease;
  min-height: 52px; /* comfortable tap target */
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--wine); color: #fff; }
.btn--primary:hover { background: var(--wine-strong); color: #fff; }

.btn--outline {
  background: transparent;
  border-color: var(--wine);
  color: var(--wine);
}
.btn--outline:hover { background: var(--wine); color: #fff; }

.btn--light { background: #fff; color: var(--wine-strong); }
.btn--light:hover { background: var(--gold-tint); color: var(--wine-strong); }

.btn--ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink-soft); color: var(--ink); }

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #82281f; color: #fff; }

.btn--sm { padding: 0.55em 1.15em; min-height: 44px; font-size: 0.98rem; }
.btn--lg { padding: 1.05em 2.1em; font-size: 1.15rem; }
.btn--block { width: 100%; }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}
.card--pad-lg { padding: 40px; }

.notice {
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border: 1px solid var(--line-strong);
  background: var(--gold-tint);
  color: var(--ink);
}
.notice--info { background: var(--info-tint); border-color: #c4d2ea; }
.notice--success { background: var(--success-tint); border-color: #bcd8c9; }
.notice--danger { background: var(--danger-tint); border-color: #ecc3bc; }
.notice p:last-child { margin-bottom: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.3em 0.85em;
  border-radius: 999px;
  background: var(--wine-tint);
  color: var(--wine-strong);
}
.badge--gold { background: var(--gold-tint); color: #6d5710; }
[data-theme="dark"] .badge--gold { color: var(--gold); }
.badge--demo { background: var(--info-tint); color: #2c4a78; }
[data-theme="dark"] .badge--demo { color: #a9c2e8; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink);
  margin-right: auto;
}
.brand:hover { color: var(--wine); }
.brand svg { flex: none; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  padding: 0.55em 0.85em;
  border-radius: 10px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.02rem;
}
.main-nav a:hover { color: var(--wine); background: var(--wine-tint); }
.main-nav a[aria-current="page"] { color: var(--wine); background: var(--wine-tint); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover { color: var(--wine); border-color: var(--wine); }

.nav-toggle { display: none; }
.header-actions-mobile { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero__eyebrow { margin-bottom: 1.2rem; }
.hero h1 em { font-style: italic; color: var(--wine); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 2rem 0 2.4rem; }

.hero__media { position: relative; }
.hero__media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
  width: 100%;
}
.hero__media::before {
  content: "";
  position: absolute;
  inset: 8% -4% -4% 8%;
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0.55;
}
.hero__quote {
  position: absolute;
  left: -32px;
  bottom: 28px;
  max-width: 300px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 18px 22px;
  font-size: 0.98rem;
  line-height: 1.5;
}
.hero__quote p { margin: 0 0 0.4em; font-family: var(--font-display); font-style: italic; }
.hero__quote footer { color: var(--ink-faint); font-size: 0.88rem; }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.trust-strip li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin: 0;
}
.trust-strip svg { color: var(--wine); flex: none; }

/* ---------- Search card ---------- */
.search-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 34px;
  margin-top: -58px;
  position: relative;
  z-index: 5;
}
.search-card__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.search-card h2 { font-size: 1.45rem; margin-bottom: 1.1rem; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 4px; }
.field > label, .field-label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}
.field .hint { font-size: 0.9rem; color: var(--ink-faint); }
.field .error-text {
  display: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--danger);
}
.field.has-error .error-text { display: block; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--danger); }

input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="number"], input[type="search"],
input[type="tel"], input[type="file"], select, textarea {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--ivory);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.8em 1em;
  min-height: 52px;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-faint); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--wine);
  box-shadow: var(--focus-ring);
}
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%234a5470' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1em center;
  padding-right: 2.6em;
}

.checkbox, .radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
  margin-bottom: 12px;
}
.checkbox input, .radio input {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  accent-color: var(--wine);
  flex: none;
  cursor: pointer;
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 3.4em; }
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}
.password-toggle:hover { color: var(--wine); }

/* Interest chips (selectable) */
.chip-set { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 1.5px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.55em 1.15em;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  min-height: 46px;
  transition: all 0.2s ease;
}
.chip:hover { border-color: var(--wine); color: var(--wine); }
.chip[aria-pressed="true"] {
  background: var(--wine);
  border-color: var(--wine);
  color: #fff;
}

/* ---------- Steps (How it works) ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 18px; }
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wine-tint);
  border: 2px solid var(--wine);
  color: var(--wine);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.step h3 { margin-bottom: 0.35em; }
.step p { color: var(--ink-soft); margin: 0; }

/* ---------- Profile cards ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.profile-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.profile-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.profile-card__photo { position: relative; }
.profile-card__photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.profile-card__like {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  color: var(--wine);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.2s ease;
}
.profile-card__like:hover { transform: scale(1.08); }
.profile-card__like[aria-pressed="true"] { background: var(--wine); color: #fff; }
.profile-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.profile-card__name { font-size: 1.3rem; margin-bottom: 2px; }
.profile-card__meta { color: var(--ink-faint); font-size: 0.95rem; margin-bottom: 10px; }
.profile-card__bio { color: var(--ink-soft); font-size: 1rem; margin-bottom: 14px; }
.profile-card__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.profile-card__tags .badge { font-size: 0.78rem; }
.profile-card__actions { margin-top: auto; display: flex; gap: 10px; }
.profile-card__actions .btn { flex: 1; }

/* ---------- Safety ---------- */
.safety-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; list-style: none; padding: 0; margin: 0 0 2.2rem; }
.safety-list li { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.safety-list svg { flex: none; color: var(--gold); margin-top: 4px; }
.section--wine .safety-list li { color: #efe3e7; }

/* ---------- Stories ---------- */
.story-card { display: flex; flex-direction: column; }
.story-card img { border-radius: var(--radius-sm); aspect-ratio: 4/3; object-fit: cover; width: 100%; margin-bottom: 18px; }
.story-card blockquote {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--ink);
}
.story-card cite { font-style: normal; color: var(--ink-faint); font-size: 0.95rem; }

/* ---------- FAQ accordion ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item__q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: none;
  border: 0;
  padding: 1.35rem 4px;
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.faq-item__q:hover { color: var(--wine); }
.faq-item__q svg { flex: none; transition: transform 0.25s ease; color: var(--wine); }
.faq-item__q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq-item__a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item__a-inner { padding: 0 4px 1.5rem; color: var(--ink-soft); }
.faq-item__a-inner p:last-child { margin-bottom: 0; }

/* ---------- CTA ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 700px; margin-inline: auto; }
.cta-band .lede { max-width: 560px; margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ivory);
  border-top: 1px solid var(--line);
  padding: 64px 0 36px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}
.site-footer h2, .site-footer h3 {
  font-family: var(--font-body);
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--wine); text-decoration: underline; }
.site-footer__brand p { color: var(--ink-soft); font-size: 1rem; max-width: 300px; }
.social-row { display: flex; gap: 10px; margin-top: 18px; }
.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}
.social-row a:hover { color: var(--wine); border-color: var(--wine); }
.site-footer__legal {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  font-size: 0.92rem;
  color: var(--ink-faint);
}
.site-footer__legal p { margin-bottom: 0.5em; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1100;
  max-width: 720px;
  margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  display: none;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner h2 { font-size: 1.2rem; font-family: var(--font-body); font-weight: 700; }
.cookie-banner p { font-size: 0.98rem; color: var(--ink-soft); }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* ---------- Modals (age gate, report, block, generic) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(14, 20, 38, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
}
.modal--wide { max-width: 640px; }
.modal h2 { font-size: 1.6rem; }
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
}
.modal__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* Age gate is not dismissible by backdrop click */
.age-gate .modal { text-align: center; }
.age-gate .modal__actions { justify-content: center; }

/* ---------- Toasts / notifications ---------- */
.toast-region {
  position: fixed;
  top: 88px;
  right: 20px;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}
.toast {
  background: var(--ink);
  color: #f4f6fb;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--shadow-md);
  font-size: 0.98rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: toast-in 0.25s ease;
}
[data-theme="dark"] .toast { background: #000; border: 1px solid var(--line-strong); }
.toast svg { flex: none; margin-top: 2px; color: var(--gold); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Auth pages ---------- */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 76px);
}
.auth-aside {
  background: var(--wine-strong);
  color: #f3e6ea;
  padding: 72px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-aside h1 { color: #fff; font-size: clamp(2rem, 3vw, 2.75rem); }
.auth-aside .kicker { color: var(--gold); }
.auth-aside .watermark { color: rgba(255, 255, 255, 0.06); }
.auth-aside ul { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.auth-aside li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.auth-aside li svg { color: var(--gold); flex: none; margin-top: 4px; }
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
}
.auth-card { width: 100%; max-width: 480px; }
.auth-card__head { margin-bottom: 1.8rem; }
.auth-alt { margin-top: 1.6rem; text-align: center; color: var(--ink-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-section { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 22px; }
.form-section > h2 { font-size: 1.25rem; font-family: var(--font-body); font-weight: 700; }

/* ---------- Discover / browse ---------- */
.browse-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  align-items: start;
}
.filters-card { position: sticky; top: 100px; }
.filters-card h2 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 700; }
.filters-card fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.filters-card legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type="number"] { width: 90px; }
.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.results-count { color: var(--ink-soft); font-weight: 600; }
.empty-state {
  text-align: center;
  padding: 60px 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

/* ---------- Profile detail page ---------- */
.profile-hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 44px;
  align-items: start;
}
.profile-hero__photo img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 1/1;
  object-fit: cover;
  width: 100%;
}
.profile-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.profile-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.fact {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.fact dt { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.fact dd { margin: 0; font-weight: 600; }
.convo-starters { list-style: none; padding: 0; margin: 0; }
.convo-starters li {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 12px;
}

/* ---------- Messages ---------- */
.messages-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  min-height: 620px;
}
.convo-list { border-right: 1px solid var(--line); background: var(--ivory); display: flex; flex-direction: column; }
.convo-list__head { padding: 20px; border-bottom: 1px solid var(--line); }
.convo-list__head h2 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 700; margin: 0; }
.convo-list ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.convo-item {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
}
.convo-item:hover { background: var(--wine-tint); }
.convo-item[aria-current="true"] { background: var(--wine-tint); box-shadow: inset 4px 0 0 var(--wine); }
.convo-item img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.convo-item__name { font-weight: 700; color: var(--ink); display: block; }
.convo-item__preview { font-size: 0.9rem; color: var(--ink-faint); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.convo-item__time { margin-left: auto; font-size: 0.8rem; color: var(--ink-faint); flex: none; }

.chat { display: flex; flex-direction: column; min-width: 0; }
.chat__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.chat__head img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.chat__head-name { font-weight: 700; font-size: 1.1rem; }
.chat__status { font-size: 0.88rem; color: var(--ink-faint); display: flex; align-items: center; gap: 6px; }
.chat__status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); display: inline-block; }
.chat__head-actions { margin-left: auto; display: flex; gap: 8px; }
.chat__scroll { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 14px; background: var(--cream); }
.msg { max-width: 72%; }
.msg__bubble {
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 1.02rem;
  overflow-wrap: break-word;
}
.msg--them .msg__bubble { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg--me { align-self: flex-end; text-align: right; }
.msg--me .msg__bubble { background: var(--wine); color: #fff; border-bottom-right-radius: 6px; }
.msg__time { font-size: 0.78rem; color: var(--ink-faint); margin-top: 4px; }
.chat__composer { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); align-items: center; }
.chat__composer input { flex: 1; }

/* Emoji picker popover */
.emoji-pop {
  position: absolute;
  bottom: 76px;
  right: 20px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 12px;
  display: none;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  z-index: 50;
}
.emoji-pop.is-open { display: grid; }
.emoji-pop button {
  font-size: 1.4rem;
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
}
.emoji-pop button:hover { background: var(--wine-tint); }

/* ---------- Settings ---------- */
.settings-layout { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: start; }
.settings-nav { position: sticky; top: 100px; }
.settings-nav ul { list-style: none; margin: 0; padding: 0; }
.settings-nav a {
  display: block;
  padding: 0.7em 1em;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
}
.settings-nav a:hover, .settings-nav a[aria-current="true"] { background: var(--wine-tint); color: var(--wine); }
.settings-panel { display: none; }
.settings-panel.is-active { display: block; }

/* ---------- Legal / content pages ---------- */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.6rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.2rem; font-family: var(--font-body); font-weight: 700; margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.page-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--line); background: var(--ivory); }
.page-hero .lede { max-width: 640px; }
.updated-note { font-size: 0.92rem; color: var(--ink-faint); margin-top: 1.2rem; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.6rem; } .mt-4 { margin-top: 2.4rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.6rem; }
.text-soft { color: var(--ink-soft); }
.text-center { text-align: center; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root { --section-pad: 72px; }
  .hero__grid { gap: 40px; }
  .search-card__grid { grid-template-columns: repeat(3, 1fr); }
  .search-card__grid .btn { grid-column: 1 / -1; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .browse-layout { grid-template-columns: 260px 1fr; }
  .profile-hero { grid-template-columns: 320px 1fr; }
}

@media (max-width: 860px) {
  body { font-size: 1.0625rem; }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .header-actions .btn { display: none; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 2px; }
  .main-nav a { padding: 0.85em 1em; font-size: 1.1rem; }
  .main-nav .header-actions-mobile { display: flex; gap: 10px; padding: 12px 16px 4px; }
  .main-nav .header-actions-mobile .btn { flex: 1; }
  .site-header__inner { position: relative; }

  .hero { padding: 48px 0 72px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 560px; }
  .hero__quote { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .search-card { margin-top: 0; }
  .search-card__grid { grid-template-columns: 1fr 1fr; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .safety-list { grid-template-columns: 1fr; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .browse-layout { grid-template-columns: 1fr; }
  .filters-card { position: static; }
  .messages-layout { grid-template-columns: 1fr; min-height: auto; }
  .convo-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 320px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; }
  .settings-nav ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .profile-hero { grid-template-columns: 1fr; }
  .profile-hero__photo { max-width: 380px; }
  .profile-facts { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .search-card { padding: 24px 20px; }
  .search-card__grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: 1fr; }
  .card, .card--pad-lg { padding: 22px; }
  .modal { padding: 26px 22px; }
  .hero__actions .btn { width: 100%; }
  .msg { max-width: 88%; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; }
}

/* Reduced motion: honour user preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print: keep legal pages readable */
@media print {
  .site-header, .site-footer, .cookie-banner, .toast-region, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
