/*
  v6 — softer blue-green buttons, dark gradient image placeholders,
       alternating section alignment (left → right → center rhythm).
  Mobile-first, no external dependencies. Fraunces + Inter via Google Fonts.
*/

/* ============================================================
   0. DESIGN TOKENS
   ============================================================ */
:root {
  /* Blue-green primary — softened, not bold */
  --color-primary:     #26566a;
  --color-primary-dk:  #1a414f;
  --color-primary-lt:  #e7eef1;
  --color-accent:      #3d8ba3;   /* lighter blue-green for buttons */
  --color-accent-dk:   #2f7190;
  --color-accent-lt:   #e6f0f2;
  --color-gold:        #b8923a;   /* used sparingly for eyebrows/dividers only */
  --color-text:        #1f2733;
  --color-text-muted:  #5f6b78;
  --color-bg:          #faf6ee;
  --color-bg-alt:      #f3ecdf;
  --color-border:      #e7ddca;
  --color-white:       #ffffff;

  /* Image placeholder gradient — light blue to gray diagonal, apes office photo tones */
  --img-placeholder-bg: linear-gradient(135deg, #dfe7ec 0%, #c5d0d8 40%, #aab5be 100%);
  --img-placeholder-overlay: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.35) 0%, transparent 60%);

  /* Typography */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.75rem;
  --space-lg:  3rem;
  --space-xl:  4.5rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;

  /* Shadows */
  --shadow-card: 0 4px 24px -10px rgba(26, 43, 68, 0.16);
  --shadow-soft: 0 18px 48px -24px rgba(26, 58, 92, 0.45);

  --max-w: 1040px;
}

/* ============================================================
   1. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 58px; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
}

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

a { color: var(--color-accent); }
a:hover { color: var(--color-primary); }

.container { width: min(100%, var(--max-w)); margin-inline: auto; padding-inline: var(--space-sm); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--color-primary); color: #fff;
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  text-decoration: none; z-index: 1000; font-size: 0.875rem;
}
.skip-link:focus { top: 1rem; }

/* ============================================================
   2. IMAGE PLACEHOLDERS — dark gray gradient, no real images
   ============================================================ */
.img-placeholder {
  background: var(--img-placeholder-bg);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--img-placeholder-overlay);
  pointer-events: none;
}
.img-placeholder .img-label {
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(60,75,90,0.3);
}

/* ============================================================
   3. STICKY NAV
   ============================================================ */
.sticky-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 6px rgba(26,58,92,0.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-sm); max-width: var(--max-w); margin-inline: auto;
  padding: 0.75rem var(--space-sm);
}
.nav-brand {
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 700;
  color: var(--color-primary); white-space: nowrap; flex-shrink: 0;
  letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 0; list-style: none; }
.nav-links a {
  display: block; padding: 0.35rem 0.7rem; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-muted);
  text-decoration: none; border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover, .nav-links a:focus {
  color: var(--color-primary); background: var(--color-primary-lt); outline: none;
}

/* Nav call button — softer blue-green */
.nav-call-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-dk) 100%);
  color: #fff; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.45rem 0.95rem; border-radius: 999px;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 6px 16px -8px rgba(45, 113, 144, 0.5);
  transition: filter 0.15s ease, box-shadow 0.2s ease;
}
.nav-call-btn:hover, .nav-call-btn:focus {
  filter: brightness(1.08); color: #fff; outline: none;
  box-shadow: 0 8px 20px -8px rgba(45, 113, 144, 0.65);
}
.nav-call-icon { font-size: 0.9rem; line-height: 1; }

.nav-toggle {
  display: flex; flex-direction: column; gap: 5px; background: none;
  border: none; cursor: pointer; padding: 0.4rem; flex-shrink: 0;
}
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--color-text); transition: opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }

@media (max-width: 699px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--color-white);
    border-bottom: 1px solid var(--color-border); padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(26,58,92,0.08);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 0.7rem var(--space-sm); border-radius: 0; border-bottom: 1px solid var(--color-border); text-transform: uppercase; }
  .nav-links li:last-child a { border-bottom: none; }
}
@media (min-width: 700px) { .nav-toggle { display: none; } }

/* ============================================================
   4. HERO — left-aligned, with placeholder image
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #21505f 0%, #2a6173 60%, #35707f 100%);
  color: var(--color-white);
  padding-block: var(--space-lg) var(--space-xl);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -5%; top: -10%;
  width: 55%; height: 130%; background: rgba(255,255,255,0.03);
  transform: skewX(-8deg); pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-layout { display: flex; flex-direction: column; gap: var(--space-md); }

.hero-eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--color-gold); margin-bottom: 0.75rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6.5vw, 3.4rem);
  font-weight: 400; line-height: 1.1; letter-spacing: -0.02em;
  color: var(--color-white); margin-bottom: var(--space-xs);
}
.hero-divider { width: 40px; height: 2px; background: var(--color-gold); margin-bottom: var(--space-md); }
.hero-value {
  font-size: clamp(0.95rem, 2.5vw, 1.08rem);
  color: rgba(255,255,255,0.75); line-height: 1.65; margin-bottom: 0.75rem;
}
.hero-trust {
  font-size: 0.82rem; color: rgba(255,255,255,0.55);
  padding: 0.5rem 0.8rem; border-left: 3px solid var(--color-gold);
  margin-bottom: var(--space-md); line-height: 1.7;
}
.hero-cta-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; }

/* Hero CTA — softer blue-green, NOT gold */
.btn-primary-call {
  display: inline-block;
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-dk) 100%);
  color: #fff; font-size: 0.92rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.95rem 2.2rem; border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 26px -10px rgba(45, 113, 144, 0.6);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}
.btn-primary-call:hover, .btn-primary-call:focus {
  color: #fff; filter: brightness(1.08); transform: translateY(-1px);
  box-shadow: 0 14px 30px -10px rgba(45, 113, 144, 0.75); outline: none;
}

.hero-offices-link {
  font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.7);
  text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 1px; transition: color 0.15s, border-color 0.15s; white-space: nowrap;
}
.hero-offices-link:hover, .hero-offices-link:focus {
  color: var(--color-white); border-bottom-color: var(--color-white); outline: none;
}

/* Hero portrait */
.hero-image-wrap { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.headshot-frame { position: relative; display: inline-block; }
.headshot-frame::before {
  content: ''; position: absolute; inset: -8px;
  border: 1px solid var(--color-gold); border-radius: var(--radius-md); opacity: 0.45;
}
.headshot-photo {
  width: min(76vw, 250px);
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  object-position: 50% 26%;
  border-radius: calc(var(--radius-md) + 4px);
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.55);
}

@media (min-width: 640px) {
  .hero-layout { flex-direction: row; align-items: center; gap: var(--space-xl); }
  .hero-text { flex: 1 1 0; }
  .hero-image-wrap { flex: 0 0 auto; order: 2; padding-top: 0.25rem; align-items: flex-start; }
  .headshot-photo { width: clamp(280px, 30vw, 330px); }
}

/* ============================================================
   5. TRUST BAND
   ============================================================ */
.trust-band { background: var(--color-bg-alt); border-bottom: 1px solid var(--color-border); padding-block: 1.25rem; }
.trust-items { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.trust-item { display: flex; flex-direction: column; gap: 0.1rem; }
.trust-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-gold); }
.trust-value { font-size: 0.85rem; font-weight: 600; color: var(--color-text); }
.trust-divider { display: none; }

@media (min-width: 640px) {
  .trust-items { flex-direction: row; align-items: stretch; gap: 0; }
  .trust-item { flex: 1 1 0; padding: 0.25rem 1.25rem; border-right: 1px solid var(--color-border); }
  .trust-item:first-child { padding-left: 0; }
  .trust-item:last-child { border-right: none; }
}

/* ============================================================
   6. SECTION COMMON — alternating alignment
   ============================================================ */
.section-eyebrow {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-gold); margin-bottom: 0.5rem;
}
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 400; line-height: 1.15; letter-spacing: -0.02em;
  color: var(--color-primary); margin-bottom: 0.6rem;
}
.section-lead {
  font-size: 0.97rem; color: var(--color-text-muted);
  max-width: 58ch; margin-bottom: var(--space-md); line-height: 1.7;
}

/* Alignment rhythm: hero=left, offices=center, services=right, about=left */
.section-center .section-eyebrow,
.section-center .section-heading,
.section-center .section-lead { text-align: center; }
.section-center .section-lead { margin-inline: auto; }

.section-right .section-eyebrow,
.section-right .section-heading,
.section-right .section-lead { text-align: right; }
.section-right .section-lead { margin-left: auto; }

.section-left .section-eyebrow,
.section-left .section-heading,
.section-left .section-lead { text-align: left; }

/* ============================================================
   7. SF OFFICES — center aligned, with office card images
   ============================================================ */
.sf-offices-section {
  padding-block: var(--space-lg) var(--space-xl);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.sf-offices-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
@media (min-width: 640px) { .sf-offices-grid { grid-template-columns: 1fr 1fr; } }

.office-card {
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-white); display: flex; flex-direction: column;
  gap: 0; box-shadow: var(--shadow-card); overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.office-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px -16px rgba(26, 43, 68, 0.24);
}
.office-card--secondary { max-width: 520px; }

/* Office card image placeholder — 4:3 landscape at top of card */
.office-card-img {
  width: 100%; aspect-ratio: 4/3; border-bottom: 1px solid var(--color-border);
}
.office-card-img .img-label { font-size: 0.65rem; }
.office-card-photo {
  display: block;
  height: auto;
  object-fit: cover;
  object-position: center;
}

.office-card-body { padding: var(--space-md); display: flex; flex-direction: column; gap: 0.85rem; }

.office-card-header {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding-bottom: 0.85rem; border-bottom: 1px solid var(--color-border);
}
.office-name {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 400;
  color: var(--color-primary); letter-spacing: -0.01em; line-height: 1.25;
}
.office-location {
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.04em;
  color: var(--color-text-muted); text-transform: none;
}
.office-availability { font-size: 0.875rem; color: var(--color-text-muted); line-height: 1.5; }
.office-address { font-size: 0.875rem; color: var(--color-text-muted); line-height: 1.5; }

.office-actions { display: flex; flex-direction: column; gap: 0.5rem; }

/* Call button — softer blue-green */
.btn-call {
  display: block; width: 100%; padding: 0.85rem 1rem;
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-dk) 100%);
  color: #fff; font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.01em; text-align: center; text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 8px 20px -10px rgba(45, 113, 144, 0.55);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}
.btn-call:hover, .btn-call:focus {
  color: #fff; filter: brightness(1.08); transform: translateY(-1px);
  box-shadow: 0 12px 26px -10px rgba(45, 113, 144, 0.7); outline: none;
}

.btn-email {
  display: block; width: 100%; padding: 0.65rem 1rem;
  background: transparent; color: var(--color-text-muted);
  font-size: 0.85rem; font-weight: 400; text-align: center;
  text-decoration: none; border: 1px solid var(--color-border);
  border-radius: 999px; word-break: break-all;
  transition: border-color 0.15s, color 0.15s;
}
.btn-email:hover, .btn-email:focus {
  border-color: #c5d3e0; color: var(--color-text); outline: none;
}

.office-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: center; }
.office-map-link, .office-site-link {
  font-size: 0.8rem; font-weight: 400; color: var(--color-text-muted);
  text-decoration: none;
}
.office-map-link:hover, .office-map-link:focus,
.office-site-link:hover, .office-site-link:focus {
  color: var(--color-accent); text-decoration: underline; outline: none;
}

/* ============================================================
   8. SERVICES — right-aligned intro
   ============================================================ */
.services-section {
  padding-block: var(--space-lg) var(--space-xl);
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
.services-grid {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  background: var(--color-border); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card);
}
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card { background: var(--color-white); padding: var(--space-md); transition: background 0.2s; }
.service-card:hover { background: var(--color-primary-lt); }
.service-number {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-gold); margin-bottom: 0.5rem;
}
.service-card h3 {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 400;
  color: var(--color-primary); margin-bottom: 0.5rem; letter-spacing: -0.01em;
}
.service-card p { font-size: 0.88rem; color: var(--color-text-muted); line-height: 1.7; }
.services-footnote { font-size: 0.82rem; color: var(--color-text-muted); margin-top: var(--space-md); font-style: italic; }

/* ============================================================
   9. ABOUT — left-aligned, with portrait placeholder
   ============================================================ */
.about-section {
  padding-block: var(--space-lg) var(--space-xl);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.about-layout { display: flex; flex-direction: column; gap: var(--space-md); }

@media (min-width: 640px) {
  .about-layout { flex-direction: row; align-items: flex-start; gap: var(--space-lg); }
  .about-body { flex: 2 1 0; }
  .about-aside { flex: 1 1 0; display: flex; flex-direction: column; gap: var(--space-md); }
}

.about-body h2 { margin-bottom: 0.75rem; }
.about-body p {
  font-size: 0.96rem; color: var(--color-text-muted);
  margin-bottom: 0.85rem; max-width: 65ch; line-height: 1.75;
}

/* About: no portrait — credentials sidebar fills the right column */
.about-aside { flex: 1 1 0; display: flex; flex-direction: column; gap: var(--space-md); }

.about-credentials {
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-md); background: var(--color-white);
  border-top: 3px solid var(--color-gold); box-shadow: var(--shadow-card);
}
.credentials-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.credentials-list li {
  font-size: 0.875rem; color: var(--color-text-muted);
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--color-border); line-height: 1.5;
}
.credentials-list li:last-child { border-bottom: none; padding-bottom: 0; }
.cred-label {
  display: block; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-gold); margin-bottom: 0.15rem;
}

/* ============================================================
   10. SAN RAMON — floated image to the right of the card
   ============================================================ */
.also-section {
  padding-block: var(--space-lg);
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
.also-layout {
  display: flex; flex-direction: column; gap: var(--space-md);
  align-items: stretch;
}
@media (min-width: 700px) {
  .also-layout { flex-direction: row; align-items: stretch; gap: var(--space-lg); }
  .also-image { flex: 0 0 38%; max-width: 340px; display: flex; }
  .also-card-wrap { flex: 1 1 0; display: flex; }
}
.also-image .img-placeholder {
  width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); align-self: center;
}
.also-image .img-label { font-size: 0.65rem; }
.also-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  align-self: center;
}
.also-card-wrap .office-card { width: 100%; }

/* ============================================================
   11. FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-primary-dk);
  color: rgba(255,255,255,0.55);
  padding-block: var(--space-lg) var(--space-md);
  font-size: 0.82rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: var(--space-sm);
  padding-bottom: var(--space-md); border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 2fr; align-items: start; } }

.footer-brand {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 400;
  color: var(--color-white); letter-spacing: -0.02em; margin-bottom: 0.25rem;
}
.footer-tagline { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-gold); margin-bottom: var(--space-sm); }
.footer-disclaimer { font-size: 0.79rem; color: rgba(255,255,255,0.35); line-height: 1.6; }
.footer-col-heading { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-gold); margin-bottom: 0.85rem; }

.footer-offices { display: grid; gap: var(--space-sm); }
@media (min-width: 640px) { .footer-offices { grid-template-columns: repeat(3, 1fr); gap: var(--space-md); } }
.footer-office { font-size: 0.8rem; line-height: 1.6; }
.footer-office strong { display: block; color: rgba(255,255,255,0.82); margin-bottom: 0.25rem; font-size: 0.82rem; }
.footer-office address { font-style: normal; color: rgba(255,255,255,0.45); }
.footer-office a { color: rgba(255,255,255,0.6); text-decoration: none; }
.footer-office a:hover, .footer-office a:focus { color: var(--color-white); }
.footer-office--secondary strong { color: rgba(255,255,255,0.6); }
.footer-bottom { padding-top: var(--space-sm); font-size: 0.74rem; color: rgba(255,255,255,0.3); line-height: 1.65; }
