/*
 Theme Name:   Keystone Private Wealth
 Theme URI:    https://keystoneprivatewealth.com
 Description:  Genesis child theme for Keystone Private Wealth
 Author:       Lawton Marketing Group
 Author URI:   https://lawtonmg.com
 Template:     genesis
 Version:      1.3.0
 License:      GPL-2.0-or-later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  keystone-private-wealth
*/

/* ==========================================================================
   Keystone Private Wealth — main.css
   Palette + type derived from logo: navy #0B2545, gold #B8892D
   Display: Playfair Display · Body: Hanken Grotesk (self-hosted variable)
   ========================================================================== */

/* ---------- Fonts ---------- */

@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/PlayfairDisplay-Variable.woff2') format('woff2-variations');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('assets/fonts/PlayfairDisplay-Italic-Variable.woff2') format('woff2-variations');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('assets/fonts/HankenGrotesk-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('assets/fonts/HankenGrotesk-Italic-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --navy: #0B2545;
  --navy-deep: #071A33;
  --navy-soft: #16345C;
  --ink-body: #3A4B60;
  --gold: #B8892D;
  --gold-deep: #96701F;
  --gold-text: #8A6516;
  --gold-soft: #C99C45;
  --mist: #F3F5F8;
  --hairline: #DCE2EA;
  --white: #FFFFFF;

  --font-display: 'Playfair Display', 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;

  --size-display: clamp(2.6rem, 5.2vw, 4rem);
  --size-h1: clamp(2.2rem, 4vw, 2.875rem);
  --size-h2: clamp(2.1rem, 3.8vw, 2.875rem);
  --size-h3: 1.625rem;
  --size-h4: 1.25rem;
  --size-body: 1.09375rem;
  --size-small: 1rem;
  --size-caption: 0.8125rem;

  --measure: 72ch;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(4.5rem, 9vw, 7.5rem);
  --wrap: 93.75rem;

  --ease: cubic-bezier(0.33, 1, 0.68, 1);
  --dur: 280ms;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: 340;
  line-height: 1.7;
  color: var(--ink-body);
  background: var(--white);
}

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

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 1.25rem;
  letter-spacing: 0.005em;
}
h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }
h4 {
  font-family: var(--font-body);
  font-size: var(--size-h4);
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.75rem;
}
p { margin: 0 0 1.35em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--navy); text-decoration-color: var(--gold); text-underline-offset: 3px; transition: color var(--dur) var(--ease); }
a:hover { color: var(--gold-deep); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Eyebrow ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--size-caption);
  font-weight: 640;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0 0 1.25rem;
}
.eyebrow::before {
  content: '';
  width: 2rem;
  height: 2px;
  background: var(--gold);
  flex: none;
}
.on-dark .eyebrow { color: var(--gold-soft); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-body);
  font-size: var(--size-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.9rem 1.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-soft); color: var(--white); }

.btn--gold { background: var(--gold); color: var(--navy-deep); }
.btn--gold:hover { background: var(--gold-soft); color: var(--navy-deep); }

.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }

.btn--outline-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.6); }
.btn--outline-light:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

/* ---------- Header / nav ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 320ms var(--ease), border-color 320ms var(--ease);
}
.site-header.is-scrolled,
.site-header--solid {
  background: var(--white);
  border-bottom-color: var(--hairline);
}
.site-header__bar {
  width: 100%;
  padding-inline: clamp(1.25rem, 3vw, 3.75rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5.25rem;
}

/* Transparent (over-hero) state: reverse the header to white.
   Navy paths go white; the gold inner icon stroke stays gold. */
.site-header:not(.is-scrolled):not(.site-header--solid) .site-logo { --logo-ink: #FFFFFF; }
.site-header:not(.is-scrolled):not(.site-header--solid) .site-nav__link { color: var(--white); }
.site-header:not(.is-scrolled):not(.site-header--solid) .nav-portal__toggle {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.65);
}
.site-header:not(.is-scrolled):not(.site-header--solid) .nav-portal__toggle:hover,
.site-header:not(.is-scrolled):not(.site-header--solid) .nav-portal.is-open .nav-portal__toggle {
  background: var(--white);
  color: var(--navy);
}
.site-header:not(.is-scrolled):not(.site-header--solid) .nav-toggle__line { background: var(--white); }

/* Solid-header pages (no hero): clear the fixed header */
body.no-hero main { padding-top: 8.5rem; }
.site-logo {
  position: relative;
  z-index: 110;
  display: inline-flex;
  flex: none;
}
.site-logo .logo-svg {
  display: block;
  width: clamp(190px, 24vw, 270px);
  height: auto;
}
.site-logo .logo-svg path { transition: fill 320ms var(--ease); }

.site-nav { display: flex; align-items: center; }
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
  padding: 0.5rem 0;
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 2px no-repeat;
  transition: background-size var(--dur) var(--ease), color var(--dur) var(--ease);
}
.site-nav__link:hover,
.site-nav__link[aria-current="page"] { color: var(--navy); background-size: 100% 2px; }

/* Client Portal dropdown */
.nav-portal { position: relative; }
.nav-portal__toggle {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--navy);
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-portal__toggle::after {
  content: '';
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--dur) var(--ease);
}
.nav-portal__toggle:hover,
.nav-portal.is-open .nav-portal__toggle { background: var(--navy); color: var(--white); }
.nav-portal.is-open .nav-portal__toggle::after { transform: rotate(225deg) translateY(-2px); }

.nav-portal__panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 13rem;
  background: var(--navy);
  border-top: 3px solid var(--gold);
  padding: 0.5rem 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
  box-shadow: 0 18px 40px rgba(7, 26, 51, 0.25);
}
.nav-portal.is-open .nav-portal__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s;
}
.nav-portal__panel a {
  display: block;
  padding: 0.7rem 1.4rem;
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 450;
  letter-spacing: 0.03em;
  text-decoration: none;
}
.nav-portal__panel a:hover { color: var(--gold-soft); }

/* Mobile nav */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 130;
  width: 2.75rem;
  height: 2.75rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.nav-toggle__line {
  display: block;
  width: 1.65rem;
  height: 2px;
  background: var(--navy);
  margin: 5px auto;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__line { background: var(--white); }
.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 63.99em) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: var(--navy);
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease), visibility 0s linear var(--dur);
  }
  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity var(--dur) var(--ease), visibility 0s;
  }
  .site-nav__list { flex-direction: column; gap: 2rem; text-align: center; }
  .site-nav__link { color: var(--white); font-size: 1.25rem; }
  .site-nav__link:hover, .site-nav__link[aria-current="page"] { color: var(--gold-soft); }
  .nav-portal__toggle { color: var(--white); border-color: rgba(255, 255, 255, 0.55); font-size: 1.05rem; }
  .nav-portal__panel {
    position: static;
    background: transparent;
    border-top: 0;
    box-shadow: none;
    min-width: 0;
    padding: 0.75rem 0 0;
  }
  .nav-portal__panel a { color: rgba(255, 255, 255, 0.85); padding: 0.45rem 0; text-align: center; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(88vh, 56rem);
  color: var(--white);
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(7, 26, 51, 0.5) 0%, rgba(7, 26, 51, 0) 24%),
    linear-gradient(to top, rgba(7, 26, 51, 0.82) 0%, rgba(7, 26, 51, 0.32) 45%, rgba(7, 26, 51, 0.12) 100%),
    linear-gradient(105deg, rgba(7, 26, 51, 0.55) 0%, rgba(7, 26, 51, 0) 60%);
}
.hero__content {
  width: 100%;
  padding: clamp(6rem, 12vw, 9rem) clamp(1.5rem, 5vw, 3.75rem) clamp(1.5rem, 5vw, 3.75rem);
}
.hero__headline {
  font-family: var(--font-display);
  font-weight: 540;
  font-size: var(--size-display);
  line-height: 1.12;
  color: var(--white);
  max-width: 21ch;
  margin: 0;
  text-wrap: balance;
}
.hero__rule {
  width: 4.5rem;
  height: 3px;
  background: var(--gold);
  border: 0;
  margin: 0 0 1.75rem;
}

/* Interior hero */
.hero--interior { min-height: min(52vh, 34rem); }
.hero--interior .hero__headline { font-size: var(--size-h1); }

/* ---------- Sections ---------- */

.section { padding-block: var(--section-pad); }

/* Long-form legal copy fills the full content column */
.prose-wide p { max-width: none; }
.section--mist { background: var(--mist); }
.section--navy { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); }
.section--navy, .section--navy h2, .section--navy h3 { color: var(--white); }

/* Editorial split: text + framed photo */
.split {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
@media (min-width: 64em) {
  .split { grid-template-columns: 6fr 5fr; }
  .split--flip > .split__media { order: -1; }
}

/* Text always fills its column — headings must never out-span their copy */
.split p { max-width: none; }
.list-hairline { max-width: none; }

/* Gold offset frame — echoes the inner gold stroke of the logo mark.
   The offset faces outward: right when the image sits right, left when left. */
.frame {
  position: relative;
  margin: 1.25rem;
  isolation: isolate;
}
.frame::before {
  content: '';
  position: absolute;
  inset: -1.25rem -1.25rem 1.25rem 1.25rem;
  border: 2px solid var(--gold);
  z-index: -1;
}
.split--flip .frame::before { inset: -1.25rem 1.25rem 1.25rem -1.25rem; }
.frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(7, 26, 51, 0.18);
}
.frame--tall img { aspect-ratio: 3 / 4; }

/* Image matches the height of the text column */
.split--stretch { align-items: stretch; }
.split--stretch .split__media { display: flex; }
.split--stretch .frame { flex: 1; display: flex; }
.split--stretch .frame img { height: 100%; aspect-ratio: auto; }

/* ---------- Quote band ---------- */

.quote-band { text-align: center; }
.quote-band blockquote { margin: 0; padding: 0; }
.quote-band .quote-mark {
  display: block;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 560;
  line-height: 0.5;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.quote-band p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.45;
  color: var(--white);
  max-width: 34ch;
  margin-inline: auto;
}
.quote-band cite {
  display: block;
  margin-top: 2rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--size-caption);
  font-weight: 620;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* ---------- Keystone tiles (signature) ---------- */

.tiles {
  display: grid;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
}
@media (min-width: 64em) {
  /* Stretch (the default) so all three cards share the tallest card's height. */
  .tiles { grid-template-columns: repeat(3, 1fr); }
}

/* 31rem is a floor, not a ceiling — the faces are stacked in a single grid
   cell below, so a card grows to fit its back copy at narrower widths
   instead of clipping it behind an internal scrollbar. */
.tile {
  perspective: 1800px;
  min-height: 31rem;
}
@media (max-width: 63.99em) { .tile { min-height: 24rem; } }

.tile__button {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: inherit;
  text-align: left;
  font-family: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
  transform-style: preserve-3d;
  transition: transform 720ms var(--ease);
}
.tile.is-open .tile__button { transform: rotateY(180deg); }

/* Both faces occupy the same grid cell, so the button's height is the taller
   of the two rather than a fixed box the copy has to fit inside. */
.tile__face {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  padding: 2.25rem 2rem;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.tile__face--front {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--gold);
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
  transition: box-shadow var(--dur) var(--ease);
}
.tile:hover .tile__face--front { box-shadow: 0 22px 48px rgba(7, 26, 51, 0.14); }
.tile__face--back {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-top: 3px solid var(--gold);
  transform: rotateY(180deg);
  overflow-y: auto;
}
.tile__face--back p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--white);
  max-width: none;
}

/* keystone glyph — trapezoid drawn from the logo mark */
.tile__mark {
  display: block;
  width: 2.15rem;
  height: 1.8rem;
  background: var(--navy);
  clip-path: polygon(0 0, 100% 0, 78% 100%, 22% 100%);
  transition: background-color var(--dur) var(--ease);
}
.tile:hover .tile__mark { background: var(--gold); }

.tile__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 560;
  line-height: 1.25;
  color: var(--navy);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  max-width: 18ch;
}
.tile__cue {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  position: relative;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.tile__cue::before, .tile__cue::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.7rem;
  height: 1.5px;
  background: var(--gold-deep);
  transform: translate(-50%, -50%);
  transition: background-color var(--dur) var(--ease);
}
.tile__cue::after { transform: translate(-50%, -50%) rotate(90deg); }
.tile:hover .tile__cue { background: var(--gold); }
.tile:hover .tile__cue::before, .tile:hover .tile__cue::after { background: var(--navy-deep); }

/* ---------- Checklist (Tier 3) ---------- */

.list-hairline {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  max-width: 60ch;
}
.list-hairline li {
  position: relative;
  padding: 1.15rem 0 1.15rem 2.25rem;
  border-bottom: 1px solid var(--hairline);
}
.list-hairline li:first-child { border-top: 1px solid var(--hairline); }
.list-hairline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.72rem;
  width: 0.85rem;
  height: 0.7rem;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 78% 100%, 22% 100%);
}
.section--navy .list-hairline li { border-color: rgba(255, 255, 255, 0.16); }

/* ---------- Pre-footer CTA ---------- */

.prefooter {
  position: relative;
  isolation: isolate;
  color: var(--white);
  text-align: center;
  padding-block: clamp(5rem, 11vw, 9rem);
}
.prefooter__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.prefooter__media img { width: 100%; height: 100%; object-fit: cover; }
.prefooter::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(7, 26, 51, 0.86), rgba(11, 37, 69, 0.78));
}
.prefooter h2 { color: var(--white); max-width: 50rem; margin-inline: auto; }
.prefooter p { max-width: 46rem; margin-inline: auto; color: rgba(255, 255, 255, 0.88); }
.prefooter .btn { margin-top: 2.25rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.78);
  padding-block: clamp(3.5rem, 7vw, 5.5rem) 2rem;
  font-size: var(--size-small);
}
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); }

.site-footer__grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
@media (min-width: 48em) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.site-footer__wordmark {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 560;
  color: var(--white);
  line-height: 1.2;
  margin: 0 0 0.35rem;
}
.site-footer__tag {
  font-size: var(--size-caption);
  font-weight: 620;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 1.5rem;
}
.site-footer h4 {
  color: var(--white);
  font-size: var(--size-caption);
  font-weight: 640;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.65rem; }
.site-footer address { font-style: normal; line-height: 1.8; }

.site-footer__legal {
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  font-size: var(--size-caption);
  color: rgba(255, 255, 255, 0.55);
}
.site-footer__disclosure {
  font-size: var(--size-caption);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  max-width: none;
  margin-top: 1.5rem;
}
.btn--crs { padding: 0.55rem 1.3rem; font-size: var(--size-caption); letter-spacing: 0.08em; }
/* Keep the gold CRS button's label navy on rest and hover — the generic
   footer link rules would otherwise turn it white, then gold-on-gold (invisible). */
.site-footer a.btn--crs { color: var(--navy-deep); }
.site-footer a.btn--crs:hover { color: var(--navy-deep); background: var(--gold-soft); }

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  gap: 2.5rem;
  list-style: none;
  padding: 0;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
}
@media (min-width: 48em) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .team-grid { grid-template-columns: repeat(3, 1fr); } }

.member { text-align: left; }
.member__photo {
  position: relative;
  margin: 0 0 1.5rem 1rem;
  isolation: isolate;
}
.member__photo::before {
  content: '';
  position: absolute;
  inset: 1rem 1rem -1rem -1rem;
  border: 2px solid var(--gold);
  z-index: -1;
}
.member__photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: none;
}

/* Summit headshots: match the Keystone team's size and render black & white */
.team-grid .member__photo { max-width: 19rem; }
.team-grid .member__photo img { filter: grayscale(1); }
.member h3 { font-size: 1.4rem; margin-bottom: 0.25rem; }
.member__title {
  font-size: var(--size-caption);
  font-weight: 620;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 1rem;
}
.member__bio { font-size: var(--size-small); }
.member__bio p { max-width: none; }

.bio-block { padding-block: 2.75rem; border-top: 1px solid var(--hairline); }
.bio-block:first-of-type { border-top: 0; padding-top: 0; }
.bio-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 64em) {
  .bio-grid { grid-template-columns: 320px 1fr; }
  .bio-grid .member__photo { position: sticky; top: 7rem; }
}

/* ---------- Wealth Management capability cards ---------- */

.cap-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 48em) { .cap-grid { grid-template-columns: repeat(3, 1fr); } }

.cap {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--gold);
  padding: 2.25rem 2rem;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cap:hover { box-shadow: 0 22px 48px rgba(7, 26, 51, 0.12); transform: translateY(-4px); }
.cap__mark {
  display: block;
  width: 2.15rem;
  height: 1.8rem;
  margin-bottom: 1.4rem;
  background: var(--navy);
  clip-path: polygon(0 0, 100% 0, 78% 100%, 22% 100%);
}
.cap:hover .cap__mark { background: var(--gold); }
.cap h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.cap p { font-size: var(--size-small); margin: 0; }

/* ---------- Contact ---------- */

.contact-layout {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (min-width: 64em) { .contact-layout { grid-template-columns: 1fr 1fr; } }

.contact-form {
  background: var(--mist);
  padding: clamp(1.75rem, 4vw, 3rem);
}

.form-field { margin-bottom: 1.5rem; }
.form-field label {
  display: block;
  font-size: var(--size-caption);
  font-weight: 640;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--size-small);
  font-weight: 380;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--hairline);
  border-bottom: 2px solid var(--navy);
  padding: 0.9rem 1rem;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.form-field textarea { min-height: 10rem; resize: vertical; }

.contact-layout aside h2 { font-size: var(--size-h3); }
.contact-info { font-style: normal; line-height: 2; }
.contact-info strong { color: var(--navy); font-weight: 600; }

.map-embed {
  margin-top: clamp(3rem, 6vw, 5rem);
  border: 1px solid var(--hairline);
}
.map-embed iframe {
  display: block;
  width: 100%;
  height: 24rem;
  border: 0;
  filter: grayscale(1);
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 640ms var(--ease), transform 640ms var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* No-JS + reduced motion: everything visible, nothing moves */
html.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Genesis structural resets
   Genesis wraps content in .site-container / .site-inner / .content-sidebar-wrap
   / .content. None of them may constrain width or add spacing — every section
   carries its own .wrap and vertical rhythm.
   ========================================================================== */

.site-container,
.site-inner,
.content-sidebar-wrap,
.content,
.entry,
.entry-content {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  float: none;
}

.entry-content > :last-child { margin-bottom: 0; }

/* Genesis emits an entry title we suppress in PHP; belt and braces. */
.entry-header .entry-title { display: none; }

/* ==========================================================================
   Gravity Forms — mapped onto the Keystone form styles
   Gravity Forms' own stylesheets are disabled; these rules reproduce the
   static site's .form-field treatment on GF's markup.
   ========================================================================== */

.contact-form .gform_wrapper form { margin: 0; }
.contact-form .gform_fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-form .gfield { margin: 0 0 1.5rem; }
.contact-form .gfield_label {
  display: block;
  font-size: var(--size-caption);
  font-weight: 640;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 0.5rem;
}
.contact-form .gfield_required {
  color: var(--gold-text);
  margin-left: 0.25rem;
  text-decoration: none;
}
.contact-form .gfield_required_text { display: none; }
.contact-form .ginput_container input[type="text"],
.contact-form .ginput_container input[type="email"],
.contact-form .ginput_container input[type="tel"],
.contact-form .ginput_container textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--size-small);
  font-weight: 380;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--hairline);
  border-bottom: 2px solid var(--navy);
  border-radius: 0;
  padding: 0.9rem 1rem;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.contact-form .ginput_container input:focus,
.contact-form .ginput_container textarea:focus {
  outline: none;
  border-color: var(--gold);
}
/* Gravity Forms sets rows="10"; the source form sized the box in CSS only.
   Left inline-block (the source default) so the baseline gap below it matches. */
.contact-form .ginput_container textarea { height: 10rem; min-height: 10rem; resize: vertical; }

.contact-form .gform_footer { margin: 0; padding: 0; }
.contact-form .gform_button {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-body);
  font-size: var(--size-small);
  font-weight: 600;
  /* The source markup used a <button>, which defaults to line-height: normal. */
  line-height: normal;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.9rem 1.9rem;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  background: var(--navy);
  color: var(--white);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.contact-form .gform_button:hover { background: var(--navy-soft); color: var(--white); }
.contact-form .gform_button:active { transform: translateY(1px); }

.contact-form .gfield_description.validation_message,
.contact-form .gform_validation_errors {
  font-size: var(--size-caption);
  line-height: 1.6;
  color: #9B2C2C;
  margin-top: 0.5rem;
}
.contact-form .gform_validation_errors { margin: 0 0 1.5rem; }
.contact-form .gform_validation_errors h2 { font-size: var(--size-h4); color: #9B2C2C; }
.contact-form .gfield_error .ginput_container input,
.contact-form .gfield_error .ginput_container textarea { border-color: #9B2C2C; }

.contact-form .gform_confirmation_message {
  font-size: var(--size-body);
  color: var(--ink-body);
  margin: 0;
}
.contact-form .gform_hidden,
.contact-form .gform_validation_container { display: none !important; }
.contact-form .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   404
   ========================================================================== */

.error404-body { text-align: center; }
.error404-body p { margin-inline: auto; }
.error404-body .btn { margin-top: 2rem; }
