/*
 Theme Name:   Forward Financial
 Theme URI:    https://www.forwardfinancial.net/
 Description:  Genesis child theme for Forward Financial
 Author:       Lawton Marketing Group
 Author URI:   https://lawtonmg.com
 Template:     genesis
 Version:      1.0.0
 License:      GPL-2.0-or-later
 Text Domain:  forward-financial
*/

/* ==========================================================================
   Forward Financial — Stylesheet
   Palette: white #FFFFFF, grey #DDE3E8, navy #0F294C, light blue #A5B9C9
   Fonts: Montserrat (headline bold / body regular), Noto Serif (regular/italic)
   ========================================================================== */

/* ------------------------------ Fonts ----------------------------------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/montserrat-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/montserrat-bold.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/notoserif-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/notoserif-italic.woff2") format("woff2");
}

/* ------------------------------ Tokens ---------------------------------- */
:root {
  --white: #ffffff;
  --grey: #dde3e8;
  --navy: #0f294c;
  --light-blue: #a5b9c9;
  --page-bg: #f7f5f0;

  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;

  --maxw: 1300px;
  --gutter: 2rem;

  /* Height of the sticky navigation; refined at runtime by main.js */
  --nav-h: 169px;
}

/* ------------------------------ Reset ----------------------------------- */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--navy);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--navy);
  text-decoration: none;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* Visually hidden, still read by screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------- Typography --------------------------------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--light-blue);
  margin: 0 0 1.25rem;
}

h1,
h2,
h3 {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  margin: 0;
}

h1 {
  font-size: clamp(2.375rem, calc(6vw - 0.125rem), 3.875rem);
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.875rem, calc(4.5vw - 0.125rem), 2.875rem);
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.125rem;
  letter-spacing: 0.01em;
}

/* Italicised words in headlines play off the logo's "financial" styling */
h1 em,
h2 em {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
}

/* ------------------------------ Header ---------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #F7F5F0;
  /* The is-scrolled toggle shrinks this element's own height; without this,
     the browser's scroll anchoring "corrects" scrollY to compensate, which
     can re-cross the JS toggle's threshold and loop. */
  overflow-anchor: none;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4rem;
  padding-bottom: 4rem;
  max-width: var(--maxw);
  transition: max-width 0.35s ease;
}
/* On scroll the container widens so the logo and nav ease outward,
   in step with the hairline extending edge to edge. */
.site-header.is-scrolled .container {
  max-width: 1440px;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

/* Hairline under the nav — inset until the page is scrolled a little */
.nav-rule {
  height: 1px;
  background: var(--grey);
  max-width: var(--maxw);
  margin: 0 auto;
  transition: max-width 0.35s ease;
}
.site-header.is-scrolled .nav-rule {
  max-width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
}
.brand img {
  height: 48px;
  width: auto;
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover,
.main-nav a:focus-visible {
  border-bottom-color: var(--navy);
}
/* Mobile nav toggle — shown only at small widths */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: 0;
  padding: 0.5rem 0;
  margin: 0;
  cursor: pointer;
  color: var(--navy);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 4px;
}
.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 14px;
}
.nav-toggle-icon span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-open .nav-toggle-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-open .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}
.nav-open .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.login-link {
  display: inline-flex;
  align-items: center;
  color: var(--navy);
}
.login-link svg {
  width: 21px;
  height: 21px;
}

/* ------------------------------ Hero ------------------------------------ */
.hero {
  text-align: center;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
  position: relative;
}
/* Jump arrow pinned near the bottom of the section rather than in the centred group */
.hero .tier-jump,
.tier-intro .tier-jump {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(1.5rem, 4vh, 2.5rem);
  padding: 0;
  z-index: 3;
}
.hero .hero-tagline {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(0.875rem, 1.75vw, 1.125rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 1.5rem 0 0;
}
.hero .hero-sub {
  max-width: 46rem;
  margin: 1.75rem auto 0;
  font-size: 0.875rem;
  color: var(--navy);
}
.hero h1 {
  margin: 0.75rem 0 0;
  text-transform: uppercase;
}
.hero h1 em {
  text-transform: none;
  color: var(--light-blue);
}

/* thin hairline under the hero */
.hairline {
  height: 1px;
  background: var(--grey);
  border: 0;
  margin: 0;
}

/* --------------------------- Section shell ------------------------------ */
.tier {
  padding: 0;
}

/* Jump link (icon) at the bottom of each tier */
.tier-jump {
  display: flex;
  justify-content: center;
  padding: clamp(2rem, 5vw, 3.5rem) 0 0;
}
.tier-jump a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}
.tier-jump img {
  height: 36px;
  width: auto;
  transition: transform 0.25s ease;
}
.tier-jump a:hover img,
.tier-jump a:focus-visible img {
  transform: translateY(6px);
}

/* ------------------------------ Tier 1 ---------------------------------- */
.tier-intro {
  position: relative;
  overflow: hidden;
  /*min-height: calc(100vh - 120px);*/
  display: flex;
  flex-direction: column;
  justify-content: center;
      padding: 6rem 0 10rem;
}
.tier-intro .container {
  position: relative;
  z-index: 2;
}
.tier-intro .tier-copy {
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
}
.tier-intro .tier-copy p {
  margin: 1.5rem 0 0;
}
.tier-intro h2 {
  margin: 0.5rem 0 1.25rem;
}
.tier-intro h2 em {
  color: var(--light-blue);
}

/* ---------------------------- Tiers 2 & 3 ------------------------------- */
.tier-details {
  padding: 5rem 0;
}
.tier-details h2 em {
  color: var(--light-blue);
}
.tier-details .tier-head {
  max-width: 60rem;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
.tier-details .tier-head h2 {
  margin-bottom: 1.25rem;
}
.tier-details .tier-head p {
  margin: 1rem 0 0;
  color: var(--navy);
}
.tier-details .tier-head .eyebrow {
  margin: 0 0 1.25rem;
  color: var(--light-blue);
}

/* Clips the hairlines that fall on the outer edges of the grid, so only the
   interior dividers show whatever the column count is */
.detail-grid-wrap {
  overflow: hidden;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Overshoot by 2px (not just the 1px border width) so the far-right and
     bottom-row hairlines stay fully inside the clipped overflow even after
     browser subpixel rounding on fractional fr-track widths */
  margin: 0 -2px -2px 0;
}
.detail-grid.is-trio {
  grid-template-columns: repeat(3, 1fr);
}
/* A row of four, then a row of three that still spans the full width: a
   12-column track lets the first four span 3 each and the last three span 4 */
.detail-grid.is-four-three {
  grid-template-columns: repeat(12, 1fr);
}
.detail-grid.is-four-three > .detail-cell {
  grid-column: span 3;
}
.detail-grid.is-four-three > .detail-cell:nth-last-child(-n + 3) {
  grid-column: span 4;
}
.detail-cell {
  position: relative;
  padding: 2.5rem 1.75rem;
}
.detail-cell h3 {
  margin: 0 0 1rem;
  font-size: 1.025rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}
.detail-cell p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--navy);
}
.detail-cell p.cell-link {
  margin-top: 1rem;
}
.detail-cell p.cell-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  border-bottom: 1px solid var(--grey);
}
.detail-cell p.cell-link a:hover,
.detail-cell p.cell-link a:focus-visible {
  border-bottom-color: var(--navy);
}
.detail-cell p.cell-link svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
/* Hairline dividers: segments stop short of the corners so no lines touch */
.detail-cell::before,
.detail-cell::after {
  content: "";
  position: absolute;
  z-index: 2;
  background: var(--grey);
}
/* vertical line, right edge of each cell */
.detail-cell::after {
  top: 1.5rem;
  bottom: 1.5rem;
  right: 0;
  width: 1px;
}
/* horizontal line, bottom edge of each cell */
.detail-cell::before {
  left: 1.5rem;
  right: 1.5rem;
  bottom: 0;
  height: 1px;
}

/* ------------------------------ Footer ---------------------------------- */
.site-footer {
  background: var(--page-bg);
  color: var(--navy);
  border-top: 1px solid var(--grey);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
}
.footer-icon img {
  /* 1000x145 wordmark: 441px wide at 64px tall; shrink proportionally on narrow screens */
  width: 441px;
  max-width: 100%;
  height: auto;
}
.footer-offices {
  font-size: 0.8125rem;
  line-height: 1.9;
  color: var(--navy);
}
.footer-office {
  margin: 0;
}
.office-phone a {
  color: var(--navy);
  border-bottom: 1px solid var(--grey);
  transition: border-color 0.2s ease;
}
.office-phone a:hover,
.office-phone a:focus-visible {
  border-bottom-color: var(--navy);
}
.footer-btn {
  display: inline-block;
  border: 1px solid var(--navy);
  color: var(--navy);
  padding: 0.9rem 2.75rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}
.footer-btn:hover,
.footer-btn:focus-visible {
  background: var(--navy);
  color: var(--page-bg);
}
.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}
.footer-legal a {
  color: var(--navy);
  border-bottom: 1px solid transparent;
}
.footer-legal a:hover,
.footer-legal a:focus-visible {
  border-bottom-color: var(--navy);
}

/* Disclosures below the footer */
.disclosures {
  border-top: 1px solid var(--grey);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
}
.disclosures p {
  margin: 0 0 1.25rem;
  font-size: 0.6875rem;
  line-height: 1.7;
  color: var(--navy);
}
.disclosures p:last-child {
  margin-bottom: 0;
}

/* --------------------------- Interior page ------------------------------ */
.page-head {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2rem, 4vw, 3rem);
}
.article {
  padding: 0 0 clamp(4rem, 8vw, 6rem);
}
.article .prose {
  margin-top: 3rem;
}
.article .prose > p {
  margin: 0 0 1.25rem;
}
.article .prose h2 {
  font-size: 1.375rem;
  margin: 2.5rem 0 1rem;
}
.article .prose ul {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}
.article .prose li {
  margin-bottom: 0.4rem;
}
.article .prose .intro {
  color: var(--navy);
}
.article .prose .meta {
  line-height: 1.9;
  border-left: 2px solid var(--grey);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 0 0 1.25rem;
}

/* Coming Soon (About / Insights placeholders) */
.article .prose .coming-soon {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 3rem) 0;
}
.article .prose .coming-soon .eyebrow {
  margin-bottom: 1rem;
}
.article .prose .coming-soon-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.875rem, 4.5vw, 2.875rem);
  line-height: 1.1;
  color: var(--navy);
  margin: 0 0 1.25rem;
}
.article .prose .coming-soon p:last-child {
  margin: 2rem 0 0;
}

/* Accordion
.article .prose .accordion {
  border-top: 1px solid var(--grey);
}
.article .prose .accordion:last-of-type {
  border-bottom: 1px solid var(--grey);
}
.article .prose .accordion > summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 1.25rem 2.25rem 1.25rem 0;
}
.article .prose .accordion > summary::-webkit-details-marker {
  display: none;
}
.article .prose .accordion > summary h2 {
  display: inline;
  margin: 0;
}
.article .prose .accordion > summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0.25rem;
  transform: translateY(-50%);
  font-size: 1.375rem;
  line-height: 1;
  color: var(--navy);
}
.article .prose .accordion[open] > summary::after {
  content: "\2212";
}
.article .prose .accordion > summary:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.article .prose .accordion-body {
  padding: 0 0 1.5rem;
}
.article .prose .accordion-body h3 {
  font-size: 1.025rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--navy);
}
.article .prose .accordion-body > *:first-child {
  margin-top: 0;
}

/* ---------------------------- Responsive -------------------------------- */
/* Large screens: a touch more measure and type size so copy doesn't read tiny */
@media (min-width: 1536px) {
  :root {
    --maxw: 1400px;
  }
  body {
    font-size: 0.9375rem;
  }
  .hero .hero-sub {
    font-size: 1rem;
    max-width: 50rem;
  }
  .tier-intro .tier-copy {
    max-width: 64rem;
  }
  .tier-details .tier-head {
    max-width: 64rem;
  }
  .detail-cell p {
    font-size: 0.875rem;
  }
  .detail-cell {
    padding: 3rem 2.25rem;
  }
  .footer-offices {
    font-size: 0.875rem;
  }
}

/* Tablets / small laptops: shorter header, FAQ grid to two columns (four is too cramped) */
@media (max-width: 1100px) {
  .site-header .container {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  .site-header.is-scrolled .container {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
  }
  .detail-grid:not(.is-trio):not(.is-four-three) {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .detail-grid,
  .detail-grid.is-trio,
  .detail-grid.is-four-three {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-grid.is-four-three > .detail-cell,
  .detail-grid.is-four-three > .detail-cell:nth-last-child(-n + 3) {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  /* Compact header: logo + menu button; links open in a panel below */
  .site-header .container,
  .site-header.is-scrolled .container {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    gap: 1.5rem;
  }
  /* Wordmark is 248px wide at 36px tall; let it shrink so it never crowds the menu button */
  .brand {
    flex: 0 1 248px;
    min-width: 0;
  }
  .brand img {
    width: 100%;
    max-width: 248px;
    height: auto;
  }
  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--page-bg);
    border-bottom: 1px solid var(--grey);
    padding: 0.5rem var(--gutter) 1.25rem;
    box-shadow: 0 16px 32px -20px rgba(15, 41, 76, 0.25);
  }
  .site-header.nav-open .main-nav {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .main-nav li + li {
    border-top: 1px solid var(--grey);
  }
  .main-nav a {
    display: block;
    padding: 1rem 0;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    border-bottom: 0;
  }
  .main-nav a:hover,
  .main-nav a:focus-visible {
    color: #4a5d78;
  }
  .main-nav .current-menu-item > a,
  .main-nav .current_page_parent > a {
    color: #4a5d78;
  }

  /* Tiers: even rhythm — copy → 3rem → jump icon → 3rem → next tier's copy */
  .hero {
    min-height: 0;
    padding: 2.5rem 0 0;
  }
  .tier-jump,
  .hero .tier-jump,
  .tier-intro .tier-jump {
    position: static;
    padding: 3rem 0 0;
  }
  .tier-jump img {
    height: 32px;
  }
  .tier-intro,
  .tier-details {
    padding: 3rem 0 0;
  }
  .tier:not(:has(.tier-jump)) {
    padding-bottom: 3rem;
  }
  .tier-intro .tier-copy .eyebrow {
    margin-top: 0;
  }
  .tier-details .tier-head {
    margin-bottom: 1.5rem;
  }

  /* FAQ: no "Read the deep dive" link on phones */
  .detail-cell p.cell-link {
    display: none;
  }

  /* Footer: stack each office's phone under its address */
  .office-sep {
    display: none;
  }
  .office-place,
  .office-phone {
    display: block;
  }
  .footer-office + .footer-office {
    margin-top: 1rem;
  }
  .footer-offices {
    line-height: 1.7;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 1.25rem;
  }
  body {
    font-size: 0.9375rem;
  }
  .hero .hero-sub {
    font-size: 0.9375rem;
    margin-top: 1.5rem;
  }
  .hero .hero-tagline {
    letter-spacing: 0.1em;
  }
  .detail-grid,
  .detail-grid:not(.is-trio):not(.is-four-three),
  .detail-grid.is-trio,
  .detail-grid.is-four-three {
    grid-template-columns: 1fr;
  }
  .detail-cell {
    padding: 2rem 0;
  }
  .detail-cell::before {
    left: 0;
    right: 0;
  }
  .detail-cell p {
    font-size: 0.875rem;
  }
  .site-footer {
    padding: 3rem 0;
  }
  .footer-btn {
    width: 100%;
    text-align: center;
    padding: 1rem 1.5rem;
  }
  .footer-legal {
    line-height: 1.8;
  }
  .footer-legal a {
    display: inline-block;
    padding: 0.35rem 0;
  }
  .disclosures p {
    font-size: 0.75rem;
  }
}

/* Landscape phones: the hero's height comes from a short 100vh while its type
   still scales off the (wide) viewport width, so centred copy can grow taller
   than the space the vh-based min-height leaves for the icon below it. Drop
   the min-height and let the icon flow after the copy instead of pinning it
   to the bottom, so it can never overlap. */
@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    min-height: 0;
    padding: 2.5rem 0;
  }
  .hero .tier-jump {
    position: static;
    padding: 2rem 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .tier-jump img,
  .nav-rule {
    transition: none;
  }
}

/* --------------------------- Cookie consent (lmg-consent) ---------------- */
/* Rebrand the banner via its --mc-* variables (scoped to the banner root so it beats the
   plugin's own :root defaults, which load after this file) */
.m-consent,
.m-consent-float {
  --mc-primary:       var(--navy);
  --mc-primary-hover: #1b3a66;
  --mc-accent:        var(--light-blue);
  --mc-text:          var(--navy);
  --mc-text-muted:    #4a5d78;
  --mc-bg:            var(--page-bg);
  --mc-bg-soft:       #efece6;
  --mc-border:        var(--grey);
  --mc-shadow:        0 10px 40px -12px rgba(15, 41, 76, 0.25);
  --mc-radius:        0;
  --mc-font:          var(--sans);
}

/* --------------------------- WordPress admin bar ------------------------ */
.admin-bar .site-header {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}
