/* ============ MOBILE LAYER — loaded last on every page ============ */
html, body{ overflow-x: hidden; max-width: 100%; }
img{ max-width: 100%; }

/* ============ LIGHT GOLD ON DARK SURFACES ============
   On ink / espresso backgrounds, the brand gold reads as brown.
   Re-scope the gold tokens to a lighter champagne inside every dark surface. */
.marquee, .hero-vis .stamp, #contact, .foot-line, .cta-strip, footer,
#series, .inst2-cell.hero-cell, .path-row.head, .space-vis .badge, .ph.dark, .m-bar{
  --gold:   #e2c998;
  --gold-2: #efdcb4;
  --gold-3: #d9bf8c;
}
.foot-line, footer .foot-bottom, footer{ color: #cdb88e !important; }
.foot-line a, footer a{ color: inherit; }

/* Stamp — bigger year */
.hero-vis .stamp .stamp-year{ font-size: 32px !important; letter-spacing: 0.04em !important; }

/* ============ LOGO — cropped asset, shown large ============ */
.nav-brand img{ height: 104px !important; width: auto; margin: 0 !important; }
@media (max-width:1080px){ .nav-brand img{ height: 92px !important; } }
@media (max-width:600px){
  :root{ --nav-h: 104px; }
  .nav-brand img{ height: 86px !important; }
}

/* ============ FOUNDERS PAGE — same container & grid as "The Kingsburg Story" ============
   Kingsburg: section padding var(--pad-x) · .maxw max-width var(--maxw) · gap clamp(40px,6vw,100px)
   Founders: identical container + gutter, two equal columns (50/50).
   #electra  → [ TEXT ] [ IMAGE ]      #graciela (.reverse) → [ IMAGE ] [ TEXT ] */
.founder-body{ padding-left: var(--pad-x) !important; padding-right: var(--pad-x) !important; }
.founder-body .maxw{ max-width: var(--maxw) !important; width: 100%; margin: 0 auto; }
.fnd-grid, .fnd-grid.reverse{
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: clamp(40px, 6vw, 100px) !important;
  align-items: start !important;
}
/* Electra: text left, image right */
.fnd-grid:not(.reverse) .fnd-body{ order: 1 !important; }
.fnd-grid:not(.reverse) .fnd-vis { order: 2 !important; }
/* Graciela: image left, text right */
.fnd-grid.reverse .fnd-vis { order: 1 !important; }
.fnd-grid.reverse .fnd-body{ order: 2 !important; }

.fnd-body{ min-width: 0; }
.fnd-body p{ max-width: none !important; }
.fnd-vis{
  position: sticky !important; top: calc(var(--nav-h) + 28px) !important;
  width: 100% !important; max-width: none !important;
  height: auto !important; aspect-ratio: 2/3 !important;   /* tall portrait, minimal cropping */
  min-height: 0 !important; max-height: none !important;
  margin: 0 !important; justify-self: stretch !important;
  overflow: hidden;
}
.fnd-vis::after{ inset: 14px !important; }

@media (max-width: 900px){
  .founder-body{ padding-top: 32px !important; padding-bottom: 36px !important; }
  .fnd-grid, .fnd-grid.reverse{ display: flex !important; flex-direction: column; gap: 0 !important; }
  .fnd-grid .fnd-body, .fnd-grid.reverse .fnd-body{ display: contents; }
  .fnd-sig{ order: 1 !important; margin: 0 0 20px !important; padding-top: 0 !important; border-top: 0 !important; }
  .fnd-grid .fnd-vis, .fnd-grid.reverse .fnd-vis{
    order: 2 !important; position: relative !important; top: auto !important;
    width: 100% !important; aspect-ratio: 4/5 !important; margin: 0 0 28px !important;
  }
  .fnd-quote{ order: 3 !important; margin-bottom: 24px !important; padding-bottom: 22px !important; }
  .fnd-body p:not(.fnd-quote){ order: 4 !important; margin-bottom: 18px !important; }
  .fnd-sig .name{ font-size: 30px !important; }
}

/* ============ TIGHTER VERTICAL RHYTHM — all pages ============ */
:root{
  --sp-section:    clamp(2.25rem, 4vw, 4rem);   /* 36 → 64 */
  --sp-section-lg: clamp(2.5rem, 4.5vw, 4.5rem);
  --sp-block:      clamp(1.5rem, 2.5vw, 2.5rem);
  --sp-block-sm:   clamp(1rem, 1.8vw, 1.75rem);
}
.hero{ min-height: 0 !important; padding-bottom: var(--sp-section) !important; }
.page-hero{ padding-bottom: var(--sp-block) !important; }
@media (max-width:1000px){
  .hero-vis{ margin-top: 28px !important; margin-bottom: 28px !important; }
  .founders-pair{ gap: 44px !important; }
}

/* Sticky contact bar — mobile only */
.m-bar{ display: none; }

/* Collapsed menu: fully hidden (previously peeked out above the header) */
@media (max-width:1080px){
  nav.anchors{
    transform: translateY(calc(-100% - var(--nav-h) - 20px)) !important;
    visibility: hidden;
    transition: transform .35s ease, visibility 0s linear .35s !important;
  }
  nav.anchors.open{
    transform: translateY(0) !important;
    visibility: visible;
    transition: transform .35s ease, visibility 0s !important;
  }
}

@media (max-width: 1000px){
  /* Hero image: width-driven, never forces horizontal overflow */
  .hero-vis{
    width: 100%;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 4/5 !important;
  }
  .hero-vis .stamp{ right: -6px !important; bottom: -22px !important; width: 104px !important; height: 104px !important; }
}

@media (max-width: 900px){
  /* Our Space photo: true ratio of the image, full width, never cropped oddly */
  .space-vis{ position: relative !important; width: 100%; min-height: 0 !important; aspect-ratio: 802/968 !important; }
  .space-vis .badge{ top: 12px !important; left: 12px !important; }
  .hero-vis, .king-vis, .fdr-vis, .story-vis{ position: relative !important; }
}

@media (max-width: 760px){
  :root{ --pad-x: 22px; }
  body{ padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

  /* Comfortable tap targets */
  .btn{ min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
  .read-more, .contact-line a.v, nav.anchors a{ min-height: 44px; display: flex; align-items: center; }
  .read-more{ display: inline-flex; }
  .menu-btn{ padding: 12px; margin-right: -12px; }

  /* Header CTA is replaced by the bottom bar */
  .nav-cta .btn{ display: none; }

  /* Hero buttons full-width, stacked */
  .hero-cta{ flex-direction: column; align-items: stretch; }
  .hero-cta .btn{ width: 100%; }

  /* Prevent long words / handles from pushing layout */
  h1, h2, h3, p, a, span{ overflow-wrap: anywhere; }

  .m-bar{
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: #1e1509;
    border-top: 1px solid rgba(180,134,68,0.4);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .m-bar a{
    height: 64px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--mono, monospace); font-size: 11px; font-weight: 500;
    letter-spacing: 0.24em; text-transform: uppercase;
    color: #e8d6b0; text-decoration: none;
  }
  .m-bar a + a{ border-left: 1px solid rgba(180,134,68,0.3); background: #b48644; color: #1e1509; }
  .m-bar a:active{ opacity: .8; }
}
