/* =========================================================
   BeFinances — Editorial Advertorial Design System
   Palette:  #1D1D1F (dark) · #F5C518 (yellow) · #FAF9F6 (cream)
   Type:     Fraunces (display serif) + Inter (body sans)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Brand core */
  --dark: #1D1D1F;
  --yellow: #F5C518;
  --cream: #FAF9F6;

  /* Derived neutrals */
  --cream-alt: #F1EDE3;
  --border: #E2DDCF;
  --border-strong: #CFC8B4;
  --muted: #6B675F;
  --muted-on-dark: #C9C6BC;
  --dark-soft: #33322E;
  --yellow-ink: #C79A0E; /* for text-on-cream that needs to read as "yellow" but stay legible */

  /* Type scale */
  --fs-eyebrow: 0.8125rem;
  --fs-body: 1.0625rem;
  --fs-lede: clamp(1.125rem, 1.1vw + 0.8rem, 1.375rem);
  --fs-h1: clamp(2.25rem, 4.4vw + 1rem, 3.75rem);
  --fs-h2: clamp(1.65rem, 2vw + 1rem, 2.375rem);
  --fs-num: clamp(3.25rem, 7vw, 5.5rem);

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(3rem, 8vw, 6rem);
  --radius-sm: 3px;
  --radius-md: 4px;
  --max-content: 1180px;
  --max-read: 46rem;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--dark);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; }

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--dark);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.wrap {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img {
  height: 34px;
  width: auto;
}
.site-header__logo a { display: inline-flex; }
.ad-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}

/* ---------- Hero / Intro ---------- */
.hero {
  padding: clamp(2.75rem, 8vw, 5.5rem) 0 clamp(2rem, 6vw, 3.5rem);
  border-bottom: 1px solid var(--border);
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow-ink);
  margin-bottom: 1.1rem;
}
.hero__eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--yellow);
  display: inline-block;
}
.hero h1 {
  max-width: 25.5ch;
  font-size: var(--fs-h1);
}
.hero__lede {
  margin-top: 1.4rem;
  max-width: 42rem;
  font-size: var(--fs-lede);
  color: var(--dark-soft);
  line-height: 1.6;
}
.hero__meta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero__meta span::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yellow);
}
.hero__media {
  margin-top: 2.25rem;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--cream-alt);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
  display: block;
}
@media (min-width: 700px) {
  .hero__media { max-width: 40rem; }
}

/* Desktop: heading stays full width; paragraph and photo sit side by side beneath it */
@media (min-width: 1000px) {
  .hero__row {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 3rem;
    align-items: stretch;
    margin-top: 1.75rem;
  }
  .hero__lede { max-width: none; margin-top: 0; margin-bottom: 0; }
  .hero__media { margin-top: 0; max-width: none; position: relative; }
  .hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }
}

/* ---------- Benefits list ---------- */
.benefits { }
.benefit {
  padding: clamp(2.75rem, 7vw, 5rem) 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 1.75rem;
  grid-template-areas:
    "head"
    "media"
    "body";
}
.benefit:last-child { border-bottom: none; }

.benefit__head {
  grid-area: head;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: left;
}
.benefit__num {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: var(--fs-num);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--border-strong);
  flex-shrink: 0;
}
.benefit__heading { min-width: 0; max-width: 34rem; }
.benefit h2 {
  font-size: var(--fs-h2);
}

.benefit__media {
  grid-area: media;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--cream-alt);
}
.benefit__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.benefit__body {
  grid-area: body;
  max-width: 40rem;
}
.benefit__body p { color: var(--dark-soft); }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
  background: var(--yellow);
  color: var(--dark);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--yellow);
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}
.cta__arrow { transition: transform 0.18s var(--ease); }
.cta:hover {
  background: var(--dark);
  color: var(--cream);
  border-color: var(--dark);
}
.cta:hover .cta__arrow { transform: translateX(3px); }
.cta:active { transform: scale(0.98); }

/* ---------- Tablet & desktop: stay single-column, just widen the reading area ---------- */
@media (min-width: 700px) {
  .benefit {
    max-width: 40rem;
    margin: 0 auto;
  }
  .benefit__media img { aspect-ratio: 16 / 10; }
}

@media (min-width: 1000px) {
  .benefit {
    max-width: 46rem;
    padding: clamp(3.5rem, 6vw, 5.5rem) 0;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: var(--cream);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr; gap: 3rem 4rem; }
}
.footer-group h2 {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 0.85rem;
}
.footer-group p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted-on-dark);
  margin-bottom: 0.9em;
}
.footer-group + .footer-group { margin-top: 2.25rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin-top: 0.25rem;
}
.footer-links a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--yellow);
  padding-bottom: 1px;
}
.footer-links a:hover { color: var(--yellow); }
.footer-contact dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.9375rem;
  margin: 0;
}
.footer-contact dt { color: var(--muted-on-dark); }
.footer-contact dd {
  margin: 0;
  color: var(--cream);
}
.footer-contact a { color: var(--cream); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.footer-contact a:hover { color: var(--yellow); }
.footer-divider {
  border: none;
  border-top: 1px solid rgba(245, 249, 246, 0.14);
  margin: 2.5rem 0 1.5rem;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--muted-on-dark);
}
.footer-bottom a { color: var(--muted-on-dark); text-decoration: none; }
.footer-bottom a:hover { color: var(--yellow); }

/* ---------- Legal pages ---------- */
.legal-main { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 8vw, 5rem); }
.legal-header { max-width: var(--max-read); margin: 0 auto clamp(2rem, 5vw, 3rem); }
.legal-header .hero__eyebrow { margin-bottom: 1rem; }
.legal-header h1 { font-size: clamp(2rem, 3.4vw + 1rem, 3rem); }
.legal-updated { margin-top: 0.9rem; color: var(--muted); font-size: 0.9375rem; }
.legal-body {
  max-width: var(--max-read);
  margin: 0 auto;
}
.legal-body h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.legal-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.legal-body p { color: var(--dark-soft); }
.legal-body ul { margin: 0 0 1.1em; padding-left: 1.35em; color: var(--dark-soft); }
.legal-body li { margin-bottom: 0.5em; }
.legal-body strong { color: var(--dark); }
.legal-body a { color: var(--yellow-ink); text-decoration: underline; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  margin-bottom: 1.75rem;
}
.back-link:hover { color: var(--yellow-ink); }
