/*
  Lar dos Velhinhos do Caparaó-ES — versão portátil
  Design: Warmth & Heritage. Creme acolhedor, marrom terroso, dourado suave,
  tipografia serifada para títulos e sans-serif para leitura confortável.
*/

@import url('https://fonts.googleapis.com/css2?family=Lora:wght@500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --cream: #faf7ef;
  --cream-deep: #f3eddf;
  --brown: #7f4930;
  --brown-dark: #5e3424;
  --gold: #d6a875;
  --gold-soft: #ead7b8;
  --green: #759b72;
  --ink: #443a35;
  --muted: #756b65;
  --white: #ffffff;
  --line: rgba(127, 73, 48, .14);
  --shadow: 0 18px 45px rgba(91, 54, 36, .12);
  --radius: 18px;
  --ease: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: 'Poppins', sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 18px rgba(80, 44, 24, .05);
}
.header-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand-text { display: grid; line-height: 1.2; }
.brand-text strong { color: var(--brown); font-size: .88rem; }
.brand-text span { color: var(--muted); font-size: .7rem; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav-link { display: inline-flex; align-items: center; padding: 9px 15px; border-radius: 999px; font-size: .84rem; font-weight: 600; transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.nav-link:hover { transform: translateY(-2px); color: var(--brown); background: rgba(214,168,117,.18); }
.nav-link.active { color: var(--white); background: var(--brown); box-shadow: 0 7px 17px rgba(127,73,48,.18); }
.nav-link.outline { border: 1px solid rgba(127,73,48,.35); color: var(--brown); }
.nav-link.active.outline { color: var(--white); border-color: var(--brown); background: var(--brown); }
.menu-button { display: none; width: 42px; height: 42px; border: 0; border-radius: 12px; color: var(--brown); background: transparent; cursor: pointer; }
.menu-button:hover { background: var(--cream-deep); }
.menu-icon { display: block; position: relative; width: 20px; height: 14px; margin: auto; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.menu-icon::after { content: ''; position: absolute; left: 0; right: 0; top: 5px; border-top: 2px solid currentColor; }

.hero { padding: 82px 0 96px; }
.hero-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 72px; align-items: center; }
.eyebrow { display: inline-flex; padding: 5px 12px; border-radius: 999px; color: #c18d4f; background: rgba(234,215,184,.48); font-size: .76rem; font-weight: 700; }
h1, h2, h3 { margin: 0; color: var(--brown); font-family: 'Lora', serif; font-weight: 600; line-height: 1.14; }
h1 { font-size: clamp(2.65rem, 5vw, 4.2rem); letter-spacing: -.035em; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: 1.35rem; }
.hero h1 { margin: 22px 0 24px; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 570px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; font-size: .86rem; font-weight: 700; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease); }
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(91,54,36,.14); }
.button:active { transform: scale(.98); }
.button.primary { color: var(--white); background: var(--brown); }
.button.secondary { color: var(--brown); border-color: rgba(127,73,48,.38); background: transparent; }
.button.light { color: var(--brown); background: var(--white); }
.hero-photo { height: 430px; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.wave { height: 70px; margin-top: -1px; background: var(--gold); clip-path: ellipse(75% 75% at 50% 0%); }
.wave.cream { background: var(--cream); }
.section { padding: 88px 0; }
.section.soft { background: rgba(255,255,255,.36); }
.centered { text-align: center; }
.centered .lead { margin-inline: auto; }
.section-heading { margin-bottom: 42px; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { padding: 28px; border: 1px solid rgba(127,73,48,.09); border-radius: var(--radius); background: var(--white); box-shadow: 0 10px 30px rgba(91,54,36,.06); }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card { transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 12px; color: var(--brown); background: var(--gold-soft); font-size: 1.25rem; }
.card:nth-child(2) .card-icon { color: #527d56; background: #dcebd9; }
.card:nth-child(3) .card-icon { color: #8b6454; background: #eaded6; }
.card p { margin: 10px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.65; }
.cta-band { padding: 75px 0; color: var(--white); background: var(--brown); text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { max-width: 560px; margin: 14px auto 26px; color: rgba(255,255,255,.82); }

.page-intro { padding: 58px 0 72px; }
.back-link { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 48px; color: var(--brown); font-size: .85rem; font-weight: 600; }
.back-link:hover { text-decoration: underline; }
.page-intro .lead { max-width: 790px; margin-top: 22px; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 68px; align-items: center; }
.story-grid + .story-grid { margin-top: 78px; }
.story-grid.reverse .story-image { order: 2; }
.story-copy p { color: var(--muted); }
.story-image { min-height: 360px; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.story-image img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }
.timeline { position: relative; max-width: 820px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 17px; width: 2px; background: var(--gold-soft); }
.timeline-item { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 20px; padding-bottom: 34px; }
.timeline-dot { width: 36px; height: 36px; display: grid; place-items: center; z-index: 1; border: 5px solid var(--cream); border-radius: 50%; color: var(--white); background: var(--brown); font-size: .7rem; }
.timeline-content { padding: 2px 0 0 4px; }
.timeline-content strong { color: var(--brown); font-family: 'Lora', serif; font-size: 1.35rem; }
.timeline-content p { margin: 7px 0 0; color: var(--muted); }

.stats-grid, .docs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; }
.stat strong { display: block; margin-top: 10px; color: var(--brown); font-size: 2rem; font-weight: 700; }
.stat span { color: var(--muted); font-size: .84rem; }
.docs-grid { grid-template-columns: repeat(2, 1fr); }
.doc { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.doc h3 { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 700; }
.doc p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.doc a { flex: 0 0 auto; color: var(--brown); font-weight: 700; font-size: .8rem; }
.financial { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.financial-row { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.financial-row strong { color: var(--brown); }

.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.contact-card h3 { margin-bottom: 12px; font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 700; }
.contact-card p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.7; }
.contact-card a { color: var(--brown); font-weight: 600; }
.form-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--brown); font-size: .84rem; font-weight: 700; }
.form-group input, .form-group textarea { width: 100%; padding: 12px 14px; border: 1px solid rgba(127,73,48,.2); border-radius: 10px; outline: none; color: var(--ink); background: var(--white); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,168,117,.18); }
.form-group textarea { min-height: 145px; resize: vertical; }
.form-message { display: none; margin-top: 14px; padding: 12px 14px; border-radius: 10px; color: #416143; background: #e5f1e2; font-size: .84rem; }
.form-message.visible { display: block; }

.site-footer { padding: 58px 0 24px; color: rgba(255,255,255,.82); background: var(--brown); }
.footer-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 42px; }
.site-footer h3 { margin-bottom: 14px; color: var(--white); font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 700; }
.site-footer p { margin: 0; font-size: .8rem; line-height: 1.65; }
.institution { margin-top: 18px; color: rgba(255,255,255,.76); font-size: .76rem; line-height: 1.55; }
.institution p { margin: 3px 0; }
.footer-list { display: grid; gap: 10px; }
.footer-list a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 38px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.18); font-size: .75rem; }
.footer-bottom nav { display: flex; gap: 20px; }
.footer-bottom a:hover { color: var(--white); }

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.visible { opacity: 1; transform: translateY(0); transition: opacity .65s var(--ease), transform .65s var(--ease); }

@media (max-width: 900px) {
  .hero-grid, .story-grid, .form-layout { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { height: 360px; }
  .story-grid.reverse .story-image { order: 0; }
  .stats-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .container { width: min(100% - 32px, 600px); }
  .header-inner { min-height: 66px; }
  .brand img { width: 40px; height: 40px; }
  .brand-text { display: none; }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; padding: 14px 16px 18px; flex-direction: column; align-items: stretch; gap: 8px; background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line); box-shadow: 0 15px 25px rgba(80,44,24,.08); }
  .nav.open { display: flex; }
  .nav-link { justify-content: flex-start; border-radius: 10px; padding: 12px 14px; }
  .menu-button { display: block; }
  .hero { padding: 52px 0 66px; }
  .hero h1 { font-size: clamp(2.35rem, 12vw, 3.2rem); }
  .hero-photo { height: 340px; }
  .section, .page-intro { padding: 62px 0; }
  .values-grid, .financial, .docs-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
