/* =========================================================================
   P. Saldamarco, LLC -- Site Stylesheet
   Loaded after Bootstrap 5 CDN. Overrides/extends Bootstrap defaults.
   Brand: Deep Navy primary, warm off-white background, charcoal body text,
   muted gold used only for thin rules / hover states / tiny accents.
   ========================================================================= */

:root {
  --color-navy: #153A5B;
  --color-navy-dark: #0E2740;
  --color-offwhite: #F7F3EC;
  --color-charcoal: #333333;
  --color-gold: #B08D57;
  --color-gold-light: #C9A96E;
  --color-white: #FFFFFF;

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-max: 1200px;
}

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

/*
 * Bootstrap 5.3 sets `:root { scroll-behavior: smooth }` under
 * prefers-reduced-motion:no-preference. That fights the scroll-linked hero
 * reveal (main.js reads scroll position every frame while the browser is
 * mid-animating a smooth scroll), so it's turned back off here. `:root` is
 * used (not `html`) to match Bootstrap's selector specificity -- this file
 * loads after Bootstrap's, so the cascade order gives it the win.
 */
:root {
  scroll-behavior: auto;
}

/*
 * Every font-size in this file is set in rem, so bumping the root size
 * scales body copy, nav, buttons, and cards together in one place -- more
 * readable across the board without upsetting any of the type-scale
 * relationships (headings still read as headings, labels still read as
 * labels). ~18% larger than the browser default.
 */
html {
  font-size: 118%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-charcoal);
  background-color: var(--color-offwhite);
  line-height: 1.65;
  /* Locks font rendering to one consistent mode. Without this, Mac browsers
     can silently switch a page between subpixel and grayscale antialiasing
     (e.g. when the GPU promotes an element to its own compositing layer, as
     hover/reveal transforms elsewhere on the page do) -- same font-weight,
     but text visibly looks thinner or thicker depending on which mode is
     active at that moment. Forcing grayscale everywhere removes the flicker. */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-navy);
  font-weight: 600;
  letter-spacing: 0.01em;
}

a {
  color: var(--color-navy);
  text-decoration: none;
}

a:hover {
  color: var(--color-gold);
}

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gold);
}

.rule-gold {
  width: 60px;
  height: 2px;
  background-color: var(--color-gold);
  border: none;
  margin: 1rem 0 1.5rem;
}

.rule-gold--center {
  margin-left: auto;
  margin-right: auto;
}

section {
  padding: 5rem 0;
}

@media (max-width: 767.98px) {
  section {
    padding: 3.25rem 0;
  }
}

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

.btn-navy {
  background-color: var(--color-navy);
  border: 1px solid var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  padding: 1rem 2.35rem;
  border-radius: 2px;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-navy:hover,
.btn-navy:focus {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-navy-dark);
}

.btn-outline-light-gold {
  background-color: transparent;
  border: 1px solid var(--color-gold);
  color: var(--color-white);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  padding: 1rem 2.35rem;
  border-radius: 2px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.btn-outline-light-gold:hover {
  background-color: var(--color-gold);
  color: var(--color-navy-dark);
}

/* -------------------------------------------------------------------------
   Navbar
   ------------------------------------------------------------------------- */

.site-navbar {
  background-color: var(--color-offwhite);
  border-bottom: 1px solid rgba(21, 58, 91, 0.12);
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.site-navbar .navbar-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-navbar .navbar-brand__name {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--color-navy);
}

.site-navbar .navbar-brand__tagline {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-charcoal);
}

.site-navbar .nav-link {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-charcoal);
  margin-left: 1.25rem;
  position: relative;
}

.site-navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background-color: var(--color-gold);
  transition: width 0.25s ease;
}

.site-navbar .nav-link:hover::after,
.site-navbar .nav-link.active::after {
  width: 100%;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
  color: var(--color-navy);
}

/* -------------------------------------------------------------------------
   Hero -- Sticky Scroll Building Reveal
   ------------------------------------------------------------------------- */

/*
 * The hero image is static and fully visible on load -- image, firm name,
 * and button all present immediately, no scroll-driven reveal. Scrolling
 * simply continues down the page.
 */
.hero-scroll-container {
  position: relative;
  height: 100vh;
  padding: 0; /* override the global section padding -- photo meets the nav */
}

.hero-sticky {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background-color: #f6efdc; /* fallback while the image loads, sampled from its background */
}

.hero-sticky__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/hero-building.jpg');
  background-size: cover;
  background-position: center 20%;
}

.hero-sticky__scrim {
  position: absolute;
  inset: 0;
  /* Darkness concentrated in the lower third, where the text sits against
     the white clapboard -- the upper body of the house stays bright. */
  background: linear-gradient(to top,
    rgba(14, 39, 64, 0.78) 0%,
    rgba(14, 39, 64, 0.45) 30%,
    rgba(14, 39, 64, 0.08) 58%,
    rgba(14, 39, 64, 0.02) 100%);
  pointer-events: none;
}

.hero-sticky__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 5rem;
  color: var(--color-white);
}

/* Left-aligned editorial text block, aligned to the same container gutter
   as the navbar logo. */
.hero-sticky__inner {
  max-width: 660px;
  text-align: left;
}

/* Soft drop shadow (no hard outline/stroke) -- keeps the white type
   readable over the bright clapboard while still looking like typography,
   not a stenciled effect. */
.hero-sticky__title,
.hero-sticky__subhead,
.hero-sticky__support {
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.55),
    0 6px 28px rgba(0, 0, 0, 0.45);
}

.hero-sticky__title {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.8vw, 3.5rem);
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 0.35rem;
  white-space: nowrap;
}

/* Safety net for the narrowest phones only -- allow the title to wrap
   rather than clip/overflow if it can't fit on one line at this width. */
@media (max-width: 420px) {
  .hero-sticky__title {
    white-space: normal;
  }
}

.hero-sticky__subhead {
  font-family: var(--font-sans);
  font-size: clamp(1.2rem, 2.8vw, 1.75rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 0.85rem;
}

.hero-sticky__support {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  margin-bottom: 1.75rem;
  color: rgba(255, 255, 255, 0.95);
}

/* -------------------------------------------------------------------------
   Intro band -- the "fifty years" editorial lead-in below the hero
   ------------------------------------------------------------------------- */

.intro-band {
  padding: 5.5rem 0 4.5rem;
}

.intro-band__lead {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.55;
  color: var(--color-navy);
  max-width: 780px;
  margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   How We Help
   ------------------------------------------------------------------------- */

.help-card {
  height: 100%;
  padding: 2.5rem 2rem;
  background-color: var(--color-white);
  border-top: 3px solid var(--color-gold);
}

.help-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.help-card ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  color: var(--color-charcoal);
}

.help-card ul li {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(21, 58, 91, 0.08);
}

.help-card ul li:last-child {
  border-bottom: none;
}

/* -------------------------------------------------------------------------
   Experience Matters
   ------------------------------------------------------------------------- */

.experience-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background-color: #d8d4cb;
}

.placeholder-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
  border: 1px dashed rgba(21, 58, 91, 0.35);
}

/* -------------------------------------------------------------------------
   Consultative Statement
   ------------------------------------------------------------------------- */

.statement-section {
  background-color: var(--color-white);
  text-align: center;
}

.statement-section blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-style: italic;
  color: var(--color-navy);
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.5;
}

/* -------------------------------------------------------------------------
   Closing CTA
   ------------------------------------------------------------------------- */

.cta-band {
  background-color: var(--color-navy);
  color: var(--color-white);
  text-align: center;
}

.cta-band h2 {
  color: var(--color-white);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 2rem;
}

.cta-contact-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.cta-contact-list a {
  color: var(--color-white);
  font-weight: 600;
  border-bottom: 1px solid var(--color-gold);
  padding-bottom: 2px;
}

.cta-contact-list a:hover {
  color: var(--color-gold-light);
}

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

.site-footer {
  background-color: var(--color-navy-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
}

.site-footer a:hover {
  color: var(--color-gold-light);
}

.site-footer h5 {
  color: var(--color-white);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.site-footer hr {
  border-color: rgba(255, 255, 255, 0.15);
  margin: 2rem 0 1.5rem;
}

/* -------------------------------------------------------------------------
   Interior page hero (About / Financing / Resources / Contact)
   ------------------------------------------------------------------------- */

.page-hero {
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: 6rem 0 4rem;
  text-align: center;
}

.page-hero h1 {
  color: var(--color-white);
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0.75rem auto 0;
}

/* -------------------------------------------------------------------------
   Program / resource cards (Financing, Resources pages)
   ------------------------------------------------------------------------- */

.program-card {
  background-color: var(--color-white);
  border-top: 3px solid var(--color-gold);
  padding: 2.25rem;
  height: 100%;
}

.program-card h3 {
  font-size: 1.4rem;
}

.program-card > a {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
}

/* -------------------------------------------------------------------------
   Article body (Resources posts)
   Typography for long-form post content -- headers, bold text, and
   numbered/bulleted lists all render through the site's existing brand
   colors (navy headings, gold accents) rather than browser defaults.
   ------------------------------------------------------------------------- */

.post-meta {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-charcoal);
  opacity: 0.7;
  margin-bottom: 0;
}

.post-body {
  font-size: 1.05rem;
  color: var(--color-charcoal);
  max-width: 760px;
}

.post-body h2,
.post-body h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-body h2:first-child,
.post-body h3:first-child {
  margin-top: 0;
}

.post-body p {
  margin-bottom: 1.5rem;
}

.post-body ul,
.post-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.post-body li {
  margin-bottom: 0.6rem;
  padding-left: 0.35rem;
}

.post-body ul li::marker {
  color: var(--color-gold);
}

.post-body ol li::marker {
  color: var(--color-navy);
  font-weight: 700;
}

.post-body strong {
  color: var(--color-navy);
  font-weight: 700;
}

.post-back-link {
  display: inline-block;
  font-weight: 600;
  margin-top: 1rem;
}

/* -------------------------------------------------------------------------
   Contact info card ("Get in Touch")
   ------------------------------------------------------------------------- */

.contact-info-card {
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: 2.5rem;
}

.contact-info-card a {
  color: var(--color-white);
}

.contact-info-card a:hover {
  color: var(--color-gold-light);
}

.contact-info-card .rule-gold {
  background-color: var(--color-gold);
}

/* -------------------------------------------------------------------------
   Team cards ("Who You'll Work With", Contact page)
   ------------------------------------------------------------------------- */

.team-card {
  text-align: center;
}

.team-card__name {
  margin-top: 1.25rem;
  margin-bottom: 0.15rem;
  font-size: 1.35rem;
}

.team-card__title {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-gold);
  margin-bottom: 0.9rem;
}

.team-card__contact {
  font-size: 0.9rem;
  margin-bottom: 0;
  margin-top: 0.9rem;
}

.team-card__contact a {
  color: var(--color-navy);
}

/* -------------------------------------------------------------------------
   Future-family placeholder block (About page)
   ------------------------------------------------------------------------- */

.future-placeholder {
  border: 1px dashed rgba(21, 58, 91, 0.35);
  background-color: rgba(21, 58, 91, 0.03);
  padding: 2.5rem;
  text-align: center;
  color: rgba(51, 51, 51, 0.7);
  font-style: italic;
}

/* -------------------------------------------------------------------------
   Scroll reveals -- gentle staggered fade/slide-in
   Elements tagged data-reveal are hidden ONLY once JS confirms it will
   reveal them (html.js-reveal, added in main.js), so no-JS visitors and
   prefers-reduced-motion visitors always see content immediately.
   data-reveal="1|2|3" adds a stagger step (~90ms each) for sibling groups.
   ------------------------------------------------------------------------- */

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.js-reveal [data-reveal="1"] { transition-delay: 0.09s; }
.js-reveal [data-reveal="2"] { transition-delay: 0.18s; }
.js-reveal [data-reveal="3"] { transition-delay: 0.27s; }

.js-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------------------------
   Micro-interactions -- restrained card hover lifts
   ------------------------------------------------------------------------- */

.help-card,
.program-card {
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.help-card:hover,
.program-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(21, 58, 91, 0.1);
}

/* Kill all motion for visitors who ask for it. */
@media (prefers-reduced-motion: reduce) {
  .help-card,
  .program-card {
    transition: none;
  }
  .help-card:hover,
  .program-card:hover {
    transform: none;
  }
}
