/* ─────────────────────────────────────────────────────────────────
 * Boa Esperanca Group — shared site styles
 *
 * Loaded by every page. Contains:
 *   - Brand tokens (palette, type, spacing)
 *   - Global reset + body baseline
 *   - Reusable components: eyebrow, h1/h2, btn-primary, btn-ghost
 *   - Shared layout shell (nav, footer)
 *   - Personal-name visibility helpers (driven by config.js)
 *
 * Page-specific section styles live inline in each .html file —
 * keeps each page self-contained for compliance review and SEO.
 * ───────────────────────────────────────────────────────────────── */

:root {
  --stone:    #F4F3EF;
  --sage:     #E2E5DE;
  --olive:    #627254;
  --olive-dk: #4a5840;
  --olive-lt: #8fa07a;
  --charcoal: #2C2A26;
  --muted:    #5B5A55;
  --border:   rgba(98, 114, 84, 0.22);
  --radius:   2px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--stone);
  color: var(--charcoal);
  font-family: 'Lato', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  line-height: 1.15;
  color: var(--charcoal);
}
h1 { font-size: clamp(36px, 5vw, 64px); }
h2 { font-size: clamp(26px, 3vw, 40px); }
h1 em, h2 em { font-style: italic; color: var(--olive); }

.eyebrow {
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--olive);
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { display: none; }

/* ── Buttons ── */
.btn-primary {
  font-family: 'Lato', sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--stone);
  background: var(--charcoal);
  border: none;
  cursor: pointer;
  padding: 14px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--olive); transform: translateY(-1px); }

.btn-ghost {
  font-family: 'Lato', sans-serif;
  font-size: 12px; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--charcoal);
  background: transparent;
  border: 0.5px solid var(--olive);
  cursor: pointer;
  padding: 14px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, color 0.2s;
}
.btn-ghost:hover { background: var(--olive); color: var(--stone); }

/* ── Navigation bar (shared across all pages) ── */
.nav-bar {
  background: var(--stone);
  border-bottom: 0.5px solid var(--border);
  padding: 0 5vw;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav-logo-main {
  font-family: 'Playfair Display', serif;
  font-size: 14px; font-weight: 500;
  color: var(--charcoal);
  letter-spacing: 0.02em;
}
.nav-logo-sub {
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-link {
  font-size: 12px; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  position: relative;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover { color: var(--charcoal); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--charcoal); }
.nav-link.active::after { transform: scaleX(1); }

.nav-cta {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--stone);
  background: var(--charcoal);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  transition: background 0.2s;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--olive); }

/* Brand mark — small forest squircle with cream £ glyph.
   Inlined as a CSS gradient for the nav lockup; for hero use,
   prefer the inline <svg> so it scales cleanly. */
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: var(--charcoal);
  color: var(--stone);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Footer ── */
.site-footer {
  background: var(--charcoal);
  color: var(--stone);
  padding: 72px 5vw 40px;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute; top: 0; left: 5vw; right: 5vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--olive), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px 40px;
  margin-bottom: 56px;
}
.footer-brand-mark {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
  text-decoration: none;
}
.footer-brand-mark .brand-mark {
  background: var(--stone); color: var(--charcoal);
}
.footer-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.footer-brand-text-main {
  font-family: 'Playfair Display', serif;
  font-size: 13px; font-weight: 500;
  color: rgba(244, 243, 239, 0.9);
}
.footer-brand-text-sub {
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(244, 243, 239, 0.45);
}
.footer-desc {
  font-size: 13px; font-weight: 300;
  color: rgba(244, 243, 239, 0.55);
  line-height: 1.8;
  max-width: 280px;
  margin-bottom: 24px;
}
.footer-email {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--olive-lt);
  text-decoration: none;
  border-bottom: 0.5px solid rgba(98, 114, 84, 0.4);
  padding-bottom: 2px;
}
.footer-email:hover { color: var(--stone); }
.footer-col-title {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(244, 243, 239, 0.4);
  margin-bottom: 20px;
}
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-link {
  font-size: 13px; font-weight: 300;
  color: rgba(244, 243, 239, 0.65);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: rgba(244, 243, 239, 0.95); }
.footer-link.ext::after { content: ' \2197'; font-size: 10px; opacity: 0.5; }

.footer-bottom {
  border-top: 0.5px solid rgba(98, 114, 84, 0.2);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-size: 11px; font-weight: 300;
  color: rgba(244, 243, 239, 0.35);
  letter-spacing: 0.04em;
}
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal-link {
  font-size: 11px; font-weight: 300;
  color: rgba(244, 243, 239, 0.35);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-legal-link:hover { color: rgba(244, 243, 239, 0.65); }

/* ── Personal-name visibility helpers ──
   Default: anonymous-only renders, personal-only is hidden.
   When config.js sets html.show-names, the rule flips. */
.personal-only { display: none; }
html.show-names .personal-only { display: revert; }
.anonymous-only { display: revert; }
html.show-names .anonymous-only { display: none; }
/* For images specifically, prevent download-when-hidden bandwidth waste
   by hiding the element entirely; the URL stays in the source so view-
   source reveals it, which matches the "display-time hide" model. */
img.personal-only { display: none; }
html.show-names img.personal-only { display: block; }

/* ── Responsive defaults ── */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
}
@media (max-width: 560px) {
  .nav-cta { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .site-footer { padding: 56px 5vw 32px; }
}
@media (max-width: 400px) {
  .nav-logo-text { display: none; }
}
