/* =========================================================================
   Serpa Downtown Gaia — Shared chrome
   Tokens de design, header, footer, page transitions. Partilhado entre
   todas as páginas do site standalone (index.html, guia-bairro.html).
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --surface-warm: #F5F1E9;
  --text: #1F1D1A;
  --text-soft: #6B6862;
  --text-mute: #908B82;
  --border: #E8E4DC;
  --border-strong: #D9D2C5;
  --accent: #8C3D2C;
  --accent-soft: #B8775F;
  --accent-deep: #4A1F17;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-card: 0 1px 2px rgba(31,29,26,.04), 0 8px 24px rgba(31,29,26,.06);
  --shadow-lift: 0 2px 8px rgba(31,29,26,.06), 0 18px 40px rgba(31,29,26,.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ---------- Page transition (fade-in without flash) ---------- */
html.sh-pre-fade { opacity: 0; }
html.sh-fade-ready { opacity: 1; transition: opacity .3s cubic-bezier(.22,.61,.36,1); }
html.sh-leaving { opacity: 0; transition: opacity .22s cubic-bezier(.22,.61,.36,1); }
@media (prefers-reduced-motion: reduce) {
  html.sh-pre-fade, html.sh-fade-ready, html.sh-leaving { opacity: 1 !important; transition: none !important; }
}

/* =========================================================================
   HEADER — sticky on top, full width, brand left + lang switcher right
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease, border-color .25s ease;
}
.site-header.scrolled {
  box-shadow:
    0 2px 6px rgba(31, 29, 26, 0.06),
    0 8px 28px rgba(31, 29, 26, 0.08);
  border-bottom-color: transparent;
}

.site-header .header-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
@media (max-width: 900px) {
  .site-header .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "shortcuts shortcuts";
    row-gap: 0;
    column-gap: 12px;
    padding: 12px 20px 0;
    align-items: center;
  }
  .site-header .brand {
    grid-area: brand;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .site-header .header-right {
    grid-area: actions;
    flex-shrink: 0;
  }
  .site-header .header-shortcuts { grid-area: shortcuts; }
}
@media (max-width: 420px) {
  .site-header .brand { font-size: 18px; gap: 4px; }
}

/* Brand / logo */
.site-header .brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.005em;
  color: var(--accent);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  min-width: 0;
}
.site-header .brand .brand-mark {
  font-style: italic;
  font-weight: 500;
  color: var(--accent-soft);
  font-size: 0.82em;
}
.site-header .brand .brand-locale {
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding-left: 9px;
  margin-left: 6px;
  border-left: 1px solid var(--border-strong);
  align-self: center;
}
@media (max-width: 600px) {
  .site-header .brand { font-size: 19px; gap: 5px; }
  .site-header .brand .brand-locale { display: none; }
}
@media (max-width: 360px) {
  .site-header .brand { font-size: 17px; }
}

/* Right side of the header — icon links + lang switcher */
.site-header .header-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.site-header .header-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--text-soft);
  border: 1px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.site-header .header-icon-link:hover {
  color: var(--accent);
  border-color: var(--border);
  background: var(--surface);
}
.site-header .header-icon-link.is-current {
  color: var(--accent);
  background: rgba(140, 61, 44, 0.08);
}
.site-header .header-icon-link svg {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0;
}

/* ---------- Language switcher ---------- */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
}
.lang-switcher .lang-current {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px;
  padding: 8px 10px 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  transition: color .2s, border-color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
  white-space: nowrap;
}
.lang-switcher .lang-current:hover,
.lang-switcher.is-open .lang-current {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}
.lang-switcher .lang-current-code {
  letter-spacing: 0.06em;
  display: inline-block;
}
/* Chevron — explicit size to avoid 300×150 default if CSS not yet applied */
.lang-switcher .lang-chevron {
  width: 12px !important;
  height: 12px !important;
  flex-shrink: 0;
  transition: transform .22s ease;
  opacity: 0.8;
}
.lang-switcher.is-open .lang-chevron {
  transform: rotate(180deg);
}

.lang-switcher .lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(31, 29, 26, .05), 0 12px 32px rgba(31, 29, 26, .10);
  min-width: 180px;
  max-height: 360px;
  overflow-y: auto;
  z-index: 100;
}
.lang-switcher .lang-menu li { margin: 0; }
.lang-switcher .lang-menu a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.lang-switcher .lang-menu a:hover {
  color: var(--text);
  background: var(--surface-warm);
}
.lang-switcher .lang-menu a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

/* =========================================================================
   FOOTER — minimalist, contact-focused
   ========================================================================= */
.site-footer {
  margin-top: 88px;
  padding: 56px 32px 40px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
}
@media (max-width: 720px) {
  .site-footer { padding: 44px 24px 32px; margin-top: 64px; }
}
.site-footer .footer-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.site-footer .footer-brand em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent-soft);
  font-size: 0.82em;
}
.site-footer .footer-tagline {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 15px;
  color: var(--text-soft);
  margin-bottom: 22px;
}
.site-footer .footer-links {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.site-footer .footer-link {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-soft);
  transition: color .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.site-footer .footer-link:hover { color: var(--accent); }
.site-footer .footer-link svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.site-footer .footer-copy {
  margin-top: 28px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--text-mute);
}
