/* ==========================================================================
   Abrigo Santa Helena — design system
   Paleta e tipografia pensadas para idosos e familiares: alto contraste,
   texto grande, alvos de clique amplos, WCAG 2.2 AA.
   ========================================================================== */

:root {
  /* Paleta oficial da logo — papéis */
  --cor-destaque:  #D95B33;  /* laranja telhado — CTA/destaque */
  --cor-primaria:  #668973;  /* verde — identidade "Abrigo"/acolhimento */
  --cor-secundaria:#5092AF;  /* azul — "Santa Helena"/elementos secundários */
  --cor-estrutura: #4E90AE;  /* azul — construção/bordas/divisores */
  --cor-fundo:     #FFFFFF;

  /* Tokens de uso (mapeados aos papéis acima, com variantes de contraste AA) */
  --cyan:   #5092AF;   /* azul secundário (acentos/elementos) */
  --cyan-d: #3C6D83;   /* azul escuro: links/eyebrow (AA texto pequeno) */
  --green:  #668973;   /* verde marca */
  --green-d:#4C6656;   /* verde escuro: texto/ícone/botão verde (AA) */
  --orange: #D95B33;   /* laranja telhado (acento) */
  --orange-d:#B14A29;  /* laranja escuro: botão CTA com texto branco (AA 5.4:1) */
  --yellow: #E8A05A;   /* âmbar: destaques sobre fundo escuro (navy) */
  --blue:   #4E90AE;   /* azul estrutura: bordas/contorno de foco */
  --navy:   #29352F;   /* âncora escura oficial: títulos, seções escuras, rodapé */

  /* Superfícies e texto */
  --bg:       #ffffff;
  --bg-soft:  #F4F7F5;   /* fundo alternativo oficial */
  --bg-warm:  #FBEFE8;   /* tinta laranja bem clara p/ acolhimento */
  --ink:      #29352F;   /* texto principal oficial */
  --ink-soft: #51616B;
  --on-dark:  #eef3f8;
  --line:     #DCE5DF;   /* bordas oficiais */

  /* Tipografia */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Nunito Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* Escala fluida (clamp) — base generosa p/ legibilidade */
  --fs-xxl: clamp(2.6rem, 1.6rem + 4.2vw, 4.6rem);
  --fs-xl:  clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --fs-lg:  clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  --fs-md:  clamp(1.18rem, 1.08rem + 0.4vw, 1.3rem);
  --fs-sm:  1.02rem;

  --wrap: 1200px;
  --gap:  clamp(1.5rem, 1rem + 2vw, 3rem);
  --radius: 18px;
  --shadow: 0 14px 40px -18px rgba(42, 55, 89, .35);
  --shadow-sm: 0 6px 18px -10px rgba(42, 55, 89, .4);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--cyan-d); text-underline-offset: .18em; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; color: var(--navy); font-weight: 600; }
h1 { font-size: var(--fs-xxl); letter-spacing: -.01em; }
h2 { font-size: var(--fs-xl); letter-spacing: -.01em; }
h3 { font-size: var(--fs-lg); }
p  { max-width: 68ch; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------- buttons */
.btn {
  --_bg: var(--orange-d);
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 52px; padding: .85rem 1.7rem;
  font-family: var(--body); font-weight: 800; font-size: 1.1rem;
  color: #fff; background: var(--_bg);
  border: 2px solid var(--_bg); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(-1px); }
.btn--green { --_bg: var(--green-d); }
.btn--ghost {
  color: var(--navy); background: transparent; border-color: var(--navy);
}
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--light { color: var(--navy); background: #fff; border-color: #fff; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s, border-color .25s;
}
.site-header.is-scrolled { box-shadow: 0 8px 26px -18px rgba(42,55,89,.6); border-color: var(--line); }
/* Header ocupa a largura toda: logo na borda esquerda, redes na borda direita */
.site-header .wrap { width: auto; max-width: none; margin-inline: 0; padding-inline: clamp(1.25rem, 4vw, 4rem); }

/* 3 zonas: logo (esq) | menu (centro) | redes (dir) */
.nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 1rem; padding: .7rem 0;
}
.nav__brand { justify-self: start; display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.nav__brand img { height: 56px; width: auto; }
.nav__brand b { font-family: var(--display); color: var(--navy); font-size: 1.15rem; line-height: 1; }
.nav__brand span { display: block; font-size: .78rem; color: var(--ink-soft); font-weight: 700; letter-spacing: .02em; }

.nav__menu {
  justify-self: center; list-style: none; display: flex; gap: .35rem; padding: 0;
}
.nav__menu a {
  display: block; padding: .6rem 1.05rem; border-radius: 999px;
  color: var(--navy); font-weight: 800; text-decoration: none; font-size: 1.06rem;
  transition: background .18s, color .18s;
}
.nav__menu a:hover { background: var(--bg-soft); }
.nav__menu a[aria-current="page"] { color: var(--cyan-d); background: var(--bg-soft); }

.nav__social { justify-self: end; display: inline-flex; align-items: center; gap: .3rem; }
.nav__social a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--navy); transition: background .18s, color .18s, transform .18s;
}
.nav__social a:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }
.nav__social svg { width: 22px; height: 22px; }

.nav__toggle { display: none; }

/* --------------------------------------------------------------- generic */
.section { padding: clamp(3.5rem, 2rem + 6vw, 7rem) 0; }
.section--soft { background: var(--bg-soft); }
.section--warm { background: var(--bg-warm); }
.section--navy { background: var(--navy); color: var(--on-dark); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }
.eyebrow {
  display: inline-flex; align-items: baseline; gap: .6rem; font-weight: 800; color: var(--cyan-d);
  font-size: 1rem; margin-bottom: .6rem; letter-spacing: .02em;
}
.eyebrow::before { content: ""; align-self: center; flex: none; width: 1.7rem; height: 2px; background: currentColor; border-radius: 2px; }
.section--navy .eyebrow { color: var(--yellow); }
.lead { font-size: var(--fs-lg); color: var(--ink-soft); font-family: var(--body); font-weight: 400; }
.section--navy .lead { color: #cdd7e6; }

/* seção de duas colunas assimétricas (texto / imagem) */
.split {
  display: grid; gap: var(--gap); align-items: center;
  grid-template-columns: 1.05fr .95fr;
}
.split--flip .split__media { order: -1; }
.split__media img, .figure-stack img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 360px; object-fit: cover; display: block; }

/* --------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; background: var(--bg-soft); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 85% 10%, rgba(138,196,77,.28), transparent 60%),
    radial-gradient(55% 60% at 10% 90%, rgba(11,163,205,.22), transparent 60%);
  pointer-events: none;
}
.hero__grid {
  position: relative; display: grid; gap: var(--gap); align-items: center;
  grid-template-columns: 1.1fr .9fr; padding: clamp(3rem, 2rem + 5vw, 6rem) 0;
}
.hero h1 { margin-bottom: 1.1rem; }
.hero .lead { margin-bottom: 1.8rem; max-width: 34ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__media { position: relative; }
.hero__media img { border-radius: 26px; box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; width: 100%; display: block; }
.hero__badge {
  position: absolute; left: -1.2rem; bottom: 1.4rem;
  background: #fff; border-radius: 16px; padding: 1rem 1.3rem; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: .8rem;
}
.hero__badge .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(138,196,77,.25); }
.hero__badge b { font-family: var(--display); color: var(--navy); font-size: 1.1rem; }
.hero__badge span { display: block; font-size: .9rem; color: var(--ink-soft); }

/* --------------------------------------------------------------- pillars */
.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card__ico {
  width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center;
  margin-bottom: 1rem; background: var(--bg-soft); color: var(--cyan-d);
}
.card__ico svg { width: 30px; height: 30px; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-soft); }
.card--green .card__ico { background: #eef6e2; color: var(--green-d); }
.card--yellow .card__ico { background: #fff3d6; color: var(--orange-d); }
.card--blue .card__ico { background: #e7e8f6; color: var(--blue); }

/* ---------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); text-align: center; }
.stat b { font-family: var(--display); font-size: clamp(2.4rem, 1.5rem + 3vw, 3.6rem); color: var(--yellow); display: block; line-height: 1; }
.stat span { color: #cdd7e6; font-weight: 700; }
.stat .stat__word { font-family: var(--display); font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.4rem); color: var(--yellow); display: block; line-height: 1.05; }
.stat__desc { color: #b7c3d2; font-size: .85rem; font-weight: 600; line-height: 1.45; max-width: 24ch; margin: .45rem auto 0; }

/* --------------------------------------------------------------- CTA band */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 1rem; }
.cta-band .hero__cta { justify-content: center; }

/* -------------------------------------------------------------- contato */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
.info-list { list-style: none; padding: 0; display: grid; gap: 1.1rem; }
.info-list li { display: flex; gap: 1rem; align-items: flex-start; }
.info-list .card__ico { width: 50px; height: 50px; margin: 0; flex: none; }
.info-list b { display: block; color: var(--navy); font-family: var(--display); font-size: 1.15rem; }
.info-list a { font-weight: 700; }

.map-embed { border: 0; width: 100%; aspect-ratio: 16/10; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* Placeholder de foto (trocar por imagem real: <img>) */
.ph {
  position: relative; display: grid; place-items: center; gap: .6rem; text-align: center;
  color: #fff; padding: 2rem; min-height: 440px; border-radius: 26px;
  background: linear-gradient(135deg, var(--cyan), var(--blue)); box-shadow: var(--shadow);
}
.ph--green { background: linear-gradient(135deg, var(--green), var(--cyan)); }
.ph--warm  { background: linear-gradient(135deg, var(--yellow), var(--orange)); color: var(--navy); }
.ph svg { width: 54px; height: 54px; opacity: .92; }
.ph span { font-weight: 800; font-size: 1.05rem; opacity: .95; }
.split__media .ph { min-height: 360px; border-radius: var(--radius); }

/* -------------------------------------------------- Central de Ajuda */
.notice { background: #fff7e6; border: 1px solid #f0d08f; border-radius: 14px; padding: 1.1rem 1.3rem; color: #6b4e00; }
.notice strong { color: #5a4200; }
.notice--info { background: var(--bg-soft); border-color: #bfe0ec; color: #0b4f63; }
.notice--info strong { color: #083b4a; }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin: .3rem 0 1.2rem; }
.chip { border: 2px solid var(--line); border-radius: 999px; padding: .55rem 1.2rem; font-weight: 800; color: var(--navy); background: #fff; }
.chip-note { color: var(--ink-soft); font-size: .98rem; }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 1.1rem; margin-top: 1.4rem; }
.steps li { display: flex; gap: 1rem; align-items: flex-start; }
.steps li::before {
  counter-increment: step; content: counter(step);
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--cyan-d); color: #fff; font-weight: 800;
  display: grid; place-items: center; font-family: var(--body);
}

.pix-box { display: grid; grid-template-columns: auto 1fr; gap: 1.8rem; align-items: center; }
.pix-qr {
  width: 190px; height: 190px; border-radius: 16px; border: 1px solid var(--line);
  display: grid; place-items: center; gap: .5rem; text-align: center;
  color: var(--ink-soft); background: #fff; padding: 10px;
}
.pix-qr svg { width: 40px; height: 40px; opacity: .7; }
.pix-qr img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pix-field { display: grid; gap: .25rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.pix-field:last-child { border-bottom: 0; }
.pix-field span { color: var(--ink-soft); font-weight: 700; font-size: .95rem; }
.pix-field b { color: var(--navy); font-family: var(--display); font-size: 1.15rem; }
@media (max-width: 620px) { .pix-box { grid-template-columns: 1fr; } .pix-qr { margin-inline: auto; } }

/* ----- Cards mais autorais: ícone em fluxo (sem "caixinha") + acento de cor ----- */
.card { border-top: 4px solid var(--cyan); overflow: hidden; }
.card .card__ico { display: block; background: transparent; width: auto; height: auto; margin-bottom: .7rem; }
.card .card__ico svg { width: 46px; height: 46px; }
.card--green { border-top-color: var(--green); }
.card--yellow { border-top-color: var(--yellow); }
.card--blue { border-top-color: var(--blue); }

/* ----- Horário de funcionamento ----- */
.badge-status { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; padding: .45rem 1rem; border-radius: 999px; margin-bottom: 1rem; }
.badge-status .dot { width: 10px; height: 10px; border-radius: 50%; }
.badge-status.open { background: #e7f6e0; color: #2f6b12; }
.badge-status.open .dot { background: #3f9a1e; }
.badge-status.closed { background: #fdeaea; color: #b23b3b; }
.badge-status.closed .dot { background: #d9534f; }
.hours { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; max-width: 360px; }
.hours li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .8rem; border-radius: 10px; }
.hours li.is-today { background: var(--bg-soft); color: var(--navy); font-weight: 800; }
.hours .closed { color: #b23b3b; font-weight: 700; }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--navy); color: #c7d1e0; padding-top: clamp(3rem, 2rem + 4vw, 5rem); }
.footer-grid {
  display: grid; gap: var(--gap);
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  padding-bottom: 2.5rem;
}
.site-footer h4 { color: #fff; font-family: var(--display); font-size: 1.2rem; margin-bottom: 1rem; font-weight: 600; }
.site-footer a { color: #c7d1e0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: .6rem; }
.footer-brand img { height: 60px; background: #fff; padding: 8px 12px; border-radius: 12px; margin-bottom: 1rem; }
.footer-brand p { color: #a9b5c9; }
.footer-social { display: flex; gap: .5rem; margin-top: 1.1rem; }
.footer-social a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.footer-social a:hover { background: var(--cyan); }
.footer-social svg { width: 22px; height: 22px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 1.4rem 0;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  font-size: .95rem;
}
.footer-credit { display: inline-flex; align-items: center; gap: .55rem; }
.footer-credit img { height: 30px; width: auto; }

/* --------------------------------------------------------- animations */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .09s; }
.reveal[data-delay="2"] { transition-delay: .18s; }
.reveal[data-delay="3"] { transition-delay: .27s; }

@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-12px); } }
.hero__badge { animation: floaty 3.4s var(--ease) infinite alternate; }

/* --------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero__grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* menu vira painel */
  .nav { grid-template-columns: 1fr auto; }
  .nav__toggle {
    display: grid; place-items: center; justify-self: end; order: 3;
    width: 52px; height: 52px; border: 2px solid var(--line); border-radius: 12px;
    background: #fff; cursor: pointer; color: var(--navy);
  }
  .nav__toggle svg { width: 28px; height: 28px; }
  .nav__social { display: none; }
  .nav__menu {
    grid-column: 1 / -1; order: 4; flex-direction: column; gap: .2rem;
    max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); align-self: stretch;
  }
  .nav__menu.is-open { max-height: 420px; padding-bottom: .8rem; }
  .nav__menu a { padding: .9rem 1rem; font-size: 1.15rem; }
}

@media (max-width: 560px) {
  .grid--3, .grid--4, .stats, .footer-grid { grid-template-columns: 1fr; }
  .hero__badge { position: static; margin-top: 1rem; }
  .btn { width: 100%; justify-content: center; }
  .hero__cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
