/*
 Theme Name:   Newton One Advisors
 Theme URI:    https://newtonone.com
 Description:  Genesis child theme for Newton One Advisors
 Author:       Lawton Marketing Group
 Author URI:   https://lawtonmg.com
 Template:     genesis
 Version:      1.0.0
 License:      GPL-2.0-or-later
 Text Domain:  newton
*/

/* mfin1 — custom styles on top of Tailwind
   Placeholders replaced at build time: #18355B -> primary, #C0994E -> secondary */

:root {
  --color-primary: #18355B;
  --color-secondary: #C0994E;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Figtree', ui-sans-serif, system-ui, sans-serif;
  /* Offset for fixed header when jumping to anchors */
}

/* Header: scrolled state */
#site-header.scrolled {
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
#site-header.scrolled .logo-white { display: none; }
#site-header.scrolled .logo-color { display: block; }
#site-header.scrolled .nav-link,
#site-header.scrolled .menu-toggle { color: var(--color-primary); }
#site-header.scrolled .portal-btn {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
#site-header.scrolled .portal-btn:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

/* Mobile menu open state */
body.menu-open { overflow: hidden; }

/* ------------------------------------------------------------
   Top-level nav: animated gold bar under each link.
   - Hover/focus: bar scales in from center (scaleX 0 -> 1).
   - `.is-active` keeps the bar pinned for the current page.
   ------------------------------------------------------------ */
#site-header .nav-link {
  position: relative;
  padding-bottom: 6px;
}
#site-header .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
}
#site-header .nav-link:hover::after,
#site-header .nav-link:focus-visible::after,
#site-header .nav-link.is-active::after {
  transform: scaleX(1);
}

/* ------------------------------------------------------------
   Submenu: white card + staggered item entrance.
   Container visibility is handled by Tailwind utilities on the HTML
   (invisible/opacity-0 + group-hover:visible/group-hover:opacity-100).
   The card + per-item animations below trigger on `.nav-item:hover`.
   ------------------------------------------------------------ */
.nav-submenu-card {
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top center;
  transition: opacity 220ms ease-out, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-item:hover .nav-submenu-card,
.nav-item:focus-within .nav-submenu-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.nav-submenu-card > a {
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 300ms ease-out, transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), color 180ms ease-out, background-color 180ms ease-out;
}
.nav-item:hover .nav-submenu-card > a,
.nav-item:focus-within .nav-submenu-card > a {
  opacity: 1;
  transform: translateX(0);
}
.nav-item:hover .nav-submenu-card > a:nth-child(1),
.nav-item:focus-within .nav-submenu-card > a:nth-child(1) { transition-delay: 80ms, 80ms, 0ms, 0ms; }
.nav-item:hover .nav-submenu-card > a:nth-child(2),
.nav-item:focus-within .nav-submenu-card > a:nth-child(2) { transition-delay: 140ms, 140ms, 0ms, 0ms; }
.nav-item:hover .nav-submenu-card > a:nth-child(3),
.nav-item:focus-within .nav-submenu-card > a:nth-child(3) { transition-delay: 200ms, 200ms, 0ms, 0ms; }
.nav-item:hover .nav-submenu-card > a:nth-child(4),
.nav-item:focus-within .nav-submenu-card > a:nth-child(4) { transition-delay: 260ms, 260ms, 0ms, 0ms; }

/* Sub-item active state: gold text for the current page link. */
.nav-submenu-card > a.is-active {
  color: var(--color-secondary);
}

/* ------------------------------------------------------------
   Bio modal (<dialog> element).
   - Native <dialog> handles ESC + focus trap + body scroll lock.
   - @starting-style drives the elegant scale + fade entrance.
   ------------------------------------------------------------ */
dialog.bio-modal,
dialog.content-modal {
  max-width: 1200px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 4rem);
  padding: 0;
  border: none;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.45);
  overflow: visible;
}
dialog.content-modal {
  max-width: 800px;
}
dialog.bio-modal[open],
dialog.content-modal[open] {
  animation: bioModalIn 320ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
dialog.bio-modal::backdrop,
dialog.content-modal::backdrop {
  background: rgba(11, 31, 58, 0.72);
  backdrop-filter: blur(4px);
  animation: bioModalBackdropIn 320ms ease-out both;
}
@keyframes bioModalIn {
  from { opacity: 0; transform: scale(0.94) translateY(18px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes bioModalBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Shared modal internals — applies to bio-modal and content-modal */
.content-modal-body {
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  padding: 2rem;
}
@media (min-width: 768px) { .content-modal-body { padding: 3rem; } }
@media (min-width: 1024px) { .content-modal-body { padding: 4rem; } }

.content-modal-close {
  position: absolute;
  top: -1.25rem;
  right: -1.25rem;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  background: var(--color-primary);
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: transform 240ms cubic-bezier(0.2, 0.9, 0.3, 1), background-color 200ms ease-out, color 200ms ease-out;
}
.content-modal-close:hover,
.content-modal-close:focus-visible {
  background: var(--color-secondary);
  transform: rotate(90deg) scale(1.05);
  outline: none;
}

.content-modal-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: #f8fafc;
  color: var(--color-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

body:has(dialog.bio-modal[open]),
body:has(dialog.content-modal[open]) { overflow: hidden; }

/* Clickable headshot */
.team-card .headshot {
  cursor: pointer;
  transition: opacity 220ms ease-out, transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
.team-card .headshot:hover {
  opacity: 0.92;
  transform: translateY(-2px);
}

/* ------------------------------------------------------------
   Service cards
   ------------------------------------------------------------ */
.service-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 2.5rem 2rem;
  cursor: pointer;
  transition: transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 320ms ease-out, border-color 320ms ease-out;
  overflow: hidden;
}
.service-card:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 360ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(11, 31, 58, 0.25);
  border-color: transparent;
}
.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: #f8fafc;
  color: var(--color-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.75rem;
  transition: background-color 320ms ease-out, color 320ms ease-out, transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
.service-card:hover .service-icon {
  background: var(--color-primary);
  color: var(--color-secondary);
  transform: scale(1.05);
}

.service-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--color-primary);
  font-size: 11px;
  letter-spacing: 0.25em;
  font-weight: 600;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 220ms ease-out, gap 220ms ease-out;
}
.service-more-btn i {
  font-size: 10px;
  transition: transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
.service-more-btn:hover {
  color: var(--color-secondary);
  gap: 1rem;
}
.service-more-btn:hover i {
  transform: translateX(4px);
}

/* ------------------------------------------------------------
   Process steps — large numeral + title + description row.
   ------------------------------------------------------------ */
.process-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 2rem;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid #e2e8f0;
}
.process-step:last-child { border-bottom: 0; }

@media (min-width: 640px) {
  .process-step {
    padding: 2.5rem 0;
  }
}
@media (min-width: 1024px) {
  .process-step {
    grid-template-columns: minmax(140px, 200px) minmax(240px, 360px) 1fr;
    gap: 3rem;
    padding: 3rem 0;
  }
}

.step-number {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1;
  color: #cbd5e1;
  letter-spacing: 0.02em;
}
@media (min-width: 1024px) {
  .step-number { font-size: 5rem; }
}

.step-title {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-size: 1.5rem;
  color: var(--color-primary);
  line-height: 1.2;
}
@media (min-width: 1024px) {
  .step-title { font-size: 2rem; }
}

.step-description {
  color: #475569;
  line-height: 1.65;
  max-width: 640px;
}

/* ------------------------------------------------------------
   Contact form
   ------------------------------------------------------------ */
.contact-form {
  display: flex;
  flex-direction: column;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
}
.form-field--full { grid-column: 1 / -1; }

.form-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.6rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out, background-color 200ms ease-out;
  appearance: none;
  -webkit-appearance: none;
}
.form-field textarea {
  resize: vertical;
  min-height: 8rem;
}
.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
  border-color: #cbd5e1;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(193, 154, 91, 0.18);
  background: #ffffff;
}

.select-wrap { position: relative; }
.select-wrap select { padding-right: 2.75rem; cursor: pointer; }
.select-caret {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-primary);
  font-size: 11px;
  pointer-events: none;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.25rem;
  background: var(--color-primary);
  color: #ffffff;
  border: 0;
  font-size: 11px;
  letter-spacing: 0.25em;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  align-self: flex-start;
  transition: background-color 220ms ease-out, transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 220ms ease-out, gap 220ms ease-out;
}
.submit-btn i { font-size: 10px; transition: transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1); }
.submit-btn:hover {
  background: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(193, 154, 91, 0.6);
  gap: 1rem;
}
.submit-btn:hover i { transform: translateX(3px); }
.submit-btn:focus-visible {
  outline: 3px solid rgba(193, 154, 91, 0.35);
  outline-offset: 2px;
}

/* ------------------------------------------------------------
   Contact sidebar
   ------------------------------------------------------------ */
.contact-panel {
  background: #f8fafc;
  padding: 2.5rem 2rem;
  border-top: 4px solid var(--color-secondary);
}
@media (min-width: 1024px) {
  .contact-panel { padding: 3rem 2.5rem; }
}

.contact-info-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid #e2e8f0;
}
.contact-info-row--last { border-bottom: 0; }
.contact-info-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: #ffffff;
  color: var(--color-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.contact-info-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 0.35rem;
}
.contact-info-value {
  color: var(--color-primary);
  font-size: 0.95rem;
  line-height: 1.5;
}
.contact-info-link {
  display: inline-block;
  color: var(--color-primary);
  text-decoration: none;
  transition: color 180ms ease-out;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.contact-info-link:hover { color: var(--color-secondary); }

.contact-social { margin-top: 2rem; padding: 0 2rem; }
@media (min-width: 1024px) {
  .contact-social { padding: 0 2.5rem; }
}

/* Feature card: downward-pointing triangle notch at top-center */
.card-notch {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 14px solid #f1f5f9; /* slate-100, must match card bg */
}

/* ------------------------------------------------------------
   Hero background video (client's existing Vimeo hero) — the only
   extension to the template: its hero was image-only.
   ------------------------------------------------------------ */
.hero-video { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-video iframe {
  position: absolute; top: 50%; left: 50%;
  width: 177.78vh; height: 56.25vw; min-width: 100%; min-height: 100%;
  transform: translate(-50%, -50%); border: 0;
}
@media (prefers-reduced-motion: reduce) { .hero-video, .hero-video-toggle { display: none; } }

/* Pause/play control for the hero video (WCAG 2.2.2) */
.hero-video-toggle {
  position: absolute; z-index: 20; right: 1rem; bottom: 1rem;
  width: 2.75rem; height: 2.75rem; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.45); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: background-color 200ms ease-out;
}
.hero-video-toggle:hover { background: rgba(0, 0, 0, 0.7); }
.hero-video-toggle:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 3px; }
@media (min-width: 1024px) { .hero-video-toggle { right: 2.5rem; bottom: 2.5rem; } }

/* ------------------------------------------------------------
   Scroll reveal — progressive enhancement. JS adds `.reveal` ONLY to
   below-the-fold content blocks, so no-JS/reduced-motion show everything
   and above-fold content never flashes.
   ------------------------------------------------------------ */
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1);
  will-change: opacity, transform;
}
html.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ------------------------------------------------------------
   Load-time entrance — header bar + hero/page-hero content.
   JS tags the elements with .anim-header / .anim-hero. These use CSS
   @keyframes (not transitions): a keyframe animation carries its own
   from/to and plays as soon as the class is present, so it can't be
   skipped when the main thread is busy (blocking Tailwind CDN) and no
   opacity:0 "from" frame gets painted — the failure mode of the old
   transition + is-ready approach. `both` holds the hidden start state
   through the delay and the final state after. No-JS shows everything;
   reduced-motion disables it.
   ------------------------------------------------------------ */
html.js .anim-header {
  animation: nl-header-in 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
html.js .anim-hero {
  animation: nl-hero-in 0.9s cubic-bezier(0.2, 0.9, 0.3, 1) 0.22s both;
}
@keyframes nl-header-in {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes nl-hero-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .anim-header,
  html.js .anim-hero { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   Refinements (client round, July 15)
   ============================================================ */

/* Outlined button — matches the header/section CTAs. Used for all
   former arrow "text links" (Contact us, Lean more, Listen & Transcript). */
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.9rem 1.85rem;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
  font-size: 11px; letter-spacing: 0.25em; font-weight: 600; text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn-outline:hover, .btn-outline:focus-visible { background: var(--color-primary); color: #fff; }
.btn-outline i { font-size: 10px; }

/* Remove the section-feature triangle notch */
.card-notch { display: none !important; }

/* Service cards: "Lean more" becomes an outlined button pinned to the bottom
   so all cards' buttons align across a row. */
.service-card { display: flex !important; flex-direction: column; }
.service-more-btn {
  margin-top: auto; align-self: flex-start;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
  letter-spacing: 0.25em;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.service-more-btn i { display: none; }
.service-card:hover .service-more-btn { background: var(--color-primary); color: #fff; gap: 0; }

/* Team grid: centered (incl. a trailing partial row) with READ BIO buttons
   bottom-aligned across each row. */
.team-cards { display: flex; flex-wrap: wrap; justify-content: center; }
.team-cards > .team-card { flex: 0 1 300px; max-width: 360px; }
.team-cards { align-items: stretch; }
.team-card { display: flex; flex-direction: column; align-items: center; }
.team-card > a[aria-label] { width: 100%; }   /* photo link keeps full width */
.team-card .read-bio-btn { margin-top: auto; }

/* Process steps: top-align everything; number + title stick while the
   description scrolls past. */
.process-step { align-items: start; }
@media (min-width: 1024px) {
  .step-number, .step-title { position: sticky; top: 6.5rem; }
}

/* ============================================================
   Client revisions (July 16)
   ============================================================ */

/* Gold layering around section-split layering photos. A gold frame inset
   inside each photo — drawn above the image, not clipped by overflow. */
.section-split .grid > div:has(> img) { position: relative; }
.section-split .grid > div:has(> img)::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid var(--color-secondary);
  pointer-events: none;
  z-index: 2;
}

/* Flip tiles — front shows the title, back reveals the full copy on
   hover, focus, or tap. */
.flip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .flip-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}
@media (min-width: 1024px) {
  .flip-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.flip-tile {
  perspective: 1600px;
  min-height: 560px;
  cursor: pointer;
}
.flip-tile:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 3px; }

.flip-tile-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 560px;
  transition: transform 700ms cubic-bezier(0.2, 0.9, 0.3, 1);
  transform-style: preserve-3d;
}
.flip-tile:hover .flip-tile-inner,
.flip-tile:focus-within .flip-tile-inner,
.flip-tile.is-flipped .flip-tile-inner { transform: rotateY(180deg); }

.flip-tile-front,
.flip-tile-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  overflow-y: auto;
}
.flip-tile-front {
  justify-content: flex-end;
  background: #ffffff;
  padding: 2.5rem 2rem;
  border-top: 3px solid var(--color-secondary);
}
.flip-tile-front .flip-hint {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 11px;
  letter-spacing: 0.25em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-secondary);
}
.flip-tile-back {
  transform: rotateY(180deg);
  background: var(--color-primary);
  color: #ffffff;
  padding: 2rem;
}
.flip-tile-back h3 { color: #ffffff; }
/*.flip-tile-back .flip-rule { background: var(--color-secondary); }*/
.flip-tile-back p,
.flip-tile-back li { color: rgba(255, 255, 255, 0.88); }
.flip-tile-back .font-semibold { color: #ffffff; }

@media (prefers-reduced-motion: reduce) {
  .flip-tile-inner { transition: none; }
}

/* Homepage "Our Firm" service tiles: same card treatment as the
   /who-we-serve/ grid, centered around the icon, buttons bottom-aligned. */
.firm-services-grid > .firm-service-card { height: 100%; align-items: center; }
.firm-service-card .service-more-btn { align-self: center; }

/* Gold accents on the /how-we-serve/ process steps: a rule under each
   step title and a gold segment leading the divider between steps. */
.process-step { position: relative; }

.process-step .step-title::after {
  content: "";
  display: block;
  width: 1.5rem;
  height: 1px;
  background: var(--color-secondary);
  margin-top: 1rem;
}

.process-step::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 60%;
  height: 1px;
  background: var(--color-secondary);
}
.process-step:last-child::after { display: none; }

/* Thin gold border set 5px inside every service card, matching the
   "What's In Our Name" card on /our-firm/. */
.service-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--color-secondary);
  pointer-events: none;
  z-index: 1;
}

/* Full-bleed section-split photos: hold the image off the outer edge of
   the section. The gold frame shifts with it so it still hugs the photo. */
@media (min-width: 1024px) {
  .section-split .img-inset-left { padding-left: 60px; }
  .section-split .img-inset-right { padding-right: 60px; }
  .section-split .grid > div.img-inset-left::after { left: calc(60px + 12px); }
  .section-split .grid > div.img-inset-right::after { right: calc(60px + 12px); }
}

/* Image-beside-content splits: hold the whole section off the viewport edge. */
@media (min-width: 1024px) {
  .section-split:has(.img-inset-left),
  .section-split:has(.img-inset-right) {
    padding-left: 2em;
    padding-right: 2em;
  }
}

/* Offset navy frame behind each split photo — sitting up and to the outer
   corner (top-left for a left image, top-right for a right image). */
@media (min-width: 1024px) {
  .section-split .img-inset-left,
  .section-split .img-inset-right { overflow: visible; }

  .section-split .grid > div.img-inset-left::before,
  .section-split .grid > div.img-inset-right::before {
    content: "";
    position: absolute;
    background: var(--color-primary);
    pointer-events: none;
    z-index: -1;
  }
  .section-split .grid > div.img-inset-left::before {
    inset: -24px 24px 24px calc(60px - 24px);
  }
  .section-split .grid > div.img-inset-right::before {
    inset: -24px calc(60px - 24px) 24px 24px;
  }
}

/* /our-team/ headshots: overlaid with the same flat brand navy the page hero
   uses, at 40%, clearing to full color when the card is hovered or a link in
   it takes keyboard focus. Mouse-click focus is ignored so the overlay is
   restored when returning to the page with the browser's back button. */
.team-card > a:first-child {
  position: relative;
}
.team-card > a:first-child::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #18355B;
  opacity: 0.4;
  transition: opacity 400ms ease-out;
  pointer-events: none;
}
.team-card:hover > a:first-child::after,
.team-card:has(:focus-visible) > a:first-child::after {
  opacity: 0;
}

/* Body copy runs at 17px site-wide. Paragraphs that carry their own size
   utility (eyebrows, lead-ins, pull quotes) and fine print nested inside a
   sized block keep the scale they were given. */
p,
p.text-base { font-size: 17px; }

.text-xs p,
.text-sm p { font-size: inherit; }

/* /podcasts/ episodes: white card with the same thin gold border set 5px
   inside that the service cards use. */
.podcast-card {
  position: relative;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
}
.podcast-card::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--color-secondary);
  pointer-events: none;
}

/* Solid navy counterpart to .btn-outline (used for the Spotify links). */
.btn-solid {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.9rem 1.85rem;
  border: 1px solid var(--color-primary);
  color: #fff;
  background: var(--color-primary);
  font-size: 11px; letter-spacing: 0.25em; font-weight: 600; text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn-solid:hover, .btn-solid:focus-visible { background: transparent; color: var(--color-primary); }
.btn-solid i { font-size: 10px; }

/* Mobile + tablet hero heights */
@media (max-width: 1023px) {
  section.hero { min-height: 50vh; }
  section.page-hero { min-height: 320px; }
}
@media (max-width: 767px) {
  section.page-hero { min-height: 360px; }
  section.page-hero h1 { font-size: 2.1rem; }
}

/* Mobile: hold full-bleed section-split photos off the screen edges,
   matching the text column gutters. */
@media (max-width: 767px) {
  .section-split .img-inset-left,
  .section-split .img-inset-right {
    width: auto;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
  }
}
@media (min-width: 640px) and (max-width: 767px) {
  .section-split .img-inset-left,
  .section-split .img-inset-right {
    margin-left: 2.5rem;
    margin-right: 2.5rem;
  }
}

/* Desktop 1024–1200px: tighten primary nav spacing */
@media (min-width: 1024px) and (max-width: 1200px) {
  nav[aria-label="Primary"].gap-8 { gap: 1rem; }
}

/* ============================================================
   WordPress additions — Genesis structural + Gravity Forms skin.
   Everything above is the static site's styles.css verbatim;
   everything below adapts it to WP markup.
   ============================================================ */

/* Genesis structural wrappers must never constrain the full-width
   sections that page content is built from. */
.site-inner,
.content-sidebar-wrap,
.content,
.entry,
.entry-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Keep the fixed header from covering anchor targets and keyboard-focused
   elements scrolled into view (WCAG 2.4.11). Matches the header height:
   72px mobile, 88px desktop, plus breathing room. */
html { scroll-padding-top: 6rem; }
@media (min-width: 1024px) { html { scroll-padding-top: 7rem; } }

/* Genesis skip links — visually hidden until focused */
.genesis-skip-link { list-style: none; margin: 0; }
.genesis-skip-link .screen-reader-shortcut {
  position: absolute;
  top: -1000em;
  left: -1000em;
}
.genesis-skip-link .screen-reader-shortcut:focus {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  background: #ffffff;
  color: var(--color-primary);
  padding: 0.75rem 1.25rem;
  clip: auto !important;
}

/* M Financial page — center the Power-of-M feed's header logo (feed ships it
   display:block, margin 0, so it hangs left inside its own text-align:center
   wrap). Moved here from the static page's inline <style>. */
#pom1-feed-root .__2025__pom-wrap img { margin-inline: auto; }

/* ------------------------------------------------------------
   Gravity Forms — skin the form to match the static contact form
   (.form-grid / .form-field / .submit-btn styles above).
   ------------------------------------------------------------ */
.gform_wrapper .gform_fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem !important;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .gform_wrapper .gform_fields {
    grid-template-columns: repeat(12, 1fr);
    gap: 1.75rem !important;
  }
}
.gform_wrapper .gfield { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .gform_wrapper .gfield--width-half { grid-column: span 6; }
}

.gform_wrapper .gfield_label {
  display: block;
  font-size: 11px !important;
  letter-spacing: 0.22em;
  font-weight: 600 !important;
  text-transform: uppercase;
  color: var(--color-primary) !important;
  margin-bottom: 0.6rem;
}
.gform_wrapper .gfield_required,
.gform_wrapper .gform_required_legend {
  display: none;
}

.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper textarea {
  width: 100%;
  padding: 0.875rem 1rem !important;
  background: #ffffff;
  border: 1px solid #e2e8f0 !important;
  border-radius: 0 !important;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.95rem !important;
  line-height: 1.4;
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out, background-color 200ms ease-out;
  appearance: none;
  -webkit-appearance: none;
}
.gform_wrapper textarea {
  resize: vertical;
  min-height: 8rem;
}
.gform_wrapper input[type="text"]:hover,
.gform_wrapper input[type="email"]:hover,
.gform_wrapper input[type="tel"]:hover,
.gform_wrapper textarea:hover {
  border-color: #cbd5e1 !important;
}
.gform_wrapper input[type="text"]:focus,
.gform_wrapper input[type="email"]:focus,
.gform_wrapper input[type="tel"]:focus,
.gform_wrapper textarea:focus {
  outline: none;
  border-color: var(--color-secondary) !important;
  box-shadow: 0 0 0 3px rgba(193, 154, 91, 0.18);
  background: #ffffff;
}

.gform_wrapper .gform_footer { padding: 0 !important; margin: 0 !important; }
.gform_wrapper .gform_ajax_spinner { margin-left: 0.75rem; }

.gform_wrapper .validation_message,
.gform_wrapper .gform_submission_error {
  color: #b91c1c;
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

.gform_confirmation_message {
  margin-top: 1rem;
  color: #475569;
  font-size: 0.9rem;
}

/* ------------------------------------------------------------
   404 page
   ------------------------------------------------------------ */
.newton-404 {
  padding: 5rem 1.5rem;
  text-align: center;
}
.newton-404 h2 {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-size: 2.25rem;
  line-height: 1.2;
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.newton-404 p {
  color: #475569;
  line-height: 1.65;
  margin-bottom: 2rem;
}

#gform_submit_button_1 {
	display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.25rem;
  background: var(--color-primary);
  color: #ffffff;
  border: 0;
  font-size: 11px;
  letter-spacing: 0.25em;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  align-self: flex-start;
  transition: background-color 220ms ease-out, transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 220ms ease-out, gap 220ms ease-out;
}

#gform_submit_button_1 i { font-size: 10px; transition: transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1); }
#gform_submit_button_1:hover {
  background: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(193, 154, 91, 0.6);
  gap: 1rem;
}
#gform_submit_button_1:hover i { transform: translateX(3px); }
#gform_submit_button_1:focus-visible {
  outline: 3px solid rgba(193, 154, 91, 0.35);
  outline-offset: 2px;
}

