/* ==========================================================
   SANCTUARY 2.0 — LAYOUT
   Header sticky, footer, grid helpers, breakpoints
   ========================================================== */

/* ===== HEADER STICKY ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  padding-top: var(--safe-top);
  z-index: var(--z-header);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: transform var(--t-normal), background var(--t-normal);
}

.site-header.is-hidden { transform: translateY(-100%); }

.header__inner {
  max-width: 1280px;
  margin: 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--s-5);
  padding: 0 var(--s-5);
}

/* ===== BRAND ===== */
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--text-main);
}

.brand__icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad-dourado);
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px var(--halo-gold);
  animation: float 6s ease-in-out infinite;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand__sub {
  font-family: var(--font-cinzel);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--gold-sacred);
  text-transform: uppercase;
}

/* ===== NAV MENU (Desktop) ===== */
.nav-menu {
  display: flex;
  gap: var(--s-2);
  margin-left: var(--s-5);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: all var(--t-fast);
}

.nav-link:hover {
  background: var(--halo-gold-soft);
  color: var(--gold-sacred);
}

.nav-link i { font-size: 0.9rem; }

/* ===== NAV ACTIONS (ícones) ===== */
.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.icon-btn {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-main);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  transition: all var(--t-fast);
}

.icon-btn:hover {
  background: var(--halo-gold-soft);
  color: var(--gold-sacred);
  transform: translateY(-2px);
}

.icon-btn--gold {
  background: var(--grad-dourado);
  color: white;
  box-shadow: 0 4px 14px var(--halo-gold);
}

.icon-btn--gold:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px var(--halo-gold);
}

.icon-btn--lg {
  width: 56px; height: 56px;
  font-size: 1.2rem;
}

.badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--gold-sacred);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg-card);
}

.menu-toggle { display: none; }

/* ===== MAIN PADDING ===== */
.site-main {
  padding-top: calc(var(--header-h) + var(--safe-top) + var(--s-6));
  padding-bottom: 0;
  position: relative;
  z-index: var(--z-base);
}

@media (max-width: 767px) {
  .site-main {
    padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + var(--s-4));
  }
}

/* ===== FOOTER =====
   Sanctuary 2.0 — Rodapé contemplativo com versículo, marca,
   links, ações rápidas e créditos. Sempre visível e legível. */
.site-footer {
  position: relative;
  margin-top: var(--s-7);
  padding: var(--s-7) var(--s-5) var(--s-5);
  background: linear-gradient(180deg, transparent, var(--halo-gold-soft) 40%, var(--bg-card));
  border-top: 1px solid var(--border);
  text-align: center;
  z-index: var(--z-base);
}

.footer__inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-5);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-align: left;
}
.footer__brand-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad-dourado);
  color: white;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px var(--halo-gold);
}
.footer__brand-name {
  display: block;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
  line-height: 1.1;
}
.footer__brand-sub {
  display: block;
  font-family: var(--font-cinzel);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--gold-sacred);
  text-transform: uppercase;
  margin-top: 2px;
}

.footer__verse {
  font-family: var(--font-verse);
  font-style: italic;
  font-size: clamp(1.05rem, 2.3vw, 1.4rem);
  color: var(--text-main);
  line-height: 1.6;
  margin: 0;
  padding: 0 var(--s-3);
  max-width: 600px;
}
.footer__verse cite {
  display: block;
  margin-top: var(--s-2);
  font-family: var(--font-cinzel);
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0.2em;
  color: var(--gold-sacred);
  text-transform: uppercase;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-4);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.footer__links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer__links a:hover { color: var(--gold-sacred); }

.footer__social {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
}
.footer__social-link {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-main);
  display: grid;
  place-items: center;
  font-size: 1rem;
  transition: all var(--t-fast);
  cursor: pointer;
}
.footer__social-link:hover {
  background: var(--grad-dourado);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--halo-gold);
}

.footer__copy {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}
.footer__heart { color: #ef4444; }

/* ===== GRID HELPERS ===== */
.grid { display: grid; gap: var(--s-5); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }

/* ===== BREAKPOINTS RESPONSIVOS ===== */
@media (max-width: 1024px) {
  .nav-menu { display: none; }
  .menu-toggle { display: grid !important; }
}

@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .nav-actions .icon-btn:not(.menu-toggle) { display: none; }
  .nav-actions { margin-left: auto; }
  .brand__sub { display: none; }
  .brand__name { font-size: 1rem; }
  .brand__icon { width: 38px; height: 38px; font-size: 1rem; }
}
