:root {
  --green-950: #032e2a;
  --green-900: #063c37;
  --green-800: #0b5149;
  --green-600: #4f7d70;
  --terracotta: #bd3e42;
  --terracotta-dark: #9f3034;
  --ochre: #c68a35;
  --cream: #f7f2ec;
  --paper: #fffdf9;
  --white: #ffffff;
  --ink: #102a29;
  --muted: #606b69;
  --line: #e6e1da;
  --shadow: 0 14px 38px rgba(4, 44, 40, .09);
  --font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: var(--font-size); }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ochre); outline-offset: 4px; }
[hidden] { display: none !important; }

.container { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -80px; left: 16px; z-index: 1000;
  padding: 12px 18px; color: var(--white); background: var(--green-950);
  border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }

.site-header { position: relative; z-index: 50; background: rgba(255, 253, 249, .98); border-bottom: 1px solid rgba(16, 42, 41, .06); }
.header-row { min-height: 114px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.brand img { width: 200px; height: 100px; object-fit: contain; mix-blend-mode: multiply; }
.brand span { display: block; max-width: 220px; font-size: .82rem; font-weight: 700; line-height: 1.28; }
.header-actions { min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 15px; }
.accessibility { display: flex; align-items: center; gap: 17px; font-size: .72rem; }
.accessibility button { padding: 2px; border: 0; background: transparent; font-size: .75rem; cursor: pointer; }
.main-nav { display: flex; align-items: center; gap: clamp(18px, 2.35vw, 36px); }
.main-nav a { position: relative; padding: 8px 0 13px; font-size: .83rem; font-weight: 700; }
.main-nav a::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: var(--terracotta); transform: scaleX(0); transition: transform .2s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--terracotta); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.menu-toggle { display: none; align-items: center; gap: 8px; padding: 9px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 19px; height: 2px; background: currentColor; transition: .2s ease; }
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }

.hero {
  position: relative; min-height: 515px; overflow: hidden;
  background-image: linear-gradient(90deg, rgba(255, 248, 238, .98) 0%, rgba(255, 248, 238, .89) 34%, rgba(255, 248, 238, .28) 59%, rgba(3, 46, 42, .08) 100%), url("../img/atibaia-panorama.jpg");
  background-position: center, center 46%; background-size: cover;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: rgba(255, 255, 255, .55); }
.hero-inner { min-height: 515px; display: flex; align-items: center; }
.hero-copy { width: min(820px, 72%); padding: 58px 0 66px; }
.eyebrow { margin-bottom: 3px; color: var(--green-950); font-size: .79rem; font-weight: 800; letter-spacing: .31em; }
.kicker { display: inline-block; margin-bottom: 21px; padding-bottom: 9px; border-bottom: 3px solid var(--terracotta); color: #495857; font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; }
h1 { max-width: 820px; margin-bottom: 20px; color: var(--green-950); font-size: clamp(2.75rem, 4vw, 3.85rem); line-height: 1.01; letter-spacing: -.043em; overflow-wrap: break-word; }
h1 span { display: block; color: var(--terracotta); }
.hero-description { max-width: 585px; margin-bottom: 0; color: #243634; font-size: .96rem; line-height: 1.55; }
.photo-credit { position: absolute; right: 20px; bottom: 10px; margin: 0; padding: 3px 7px; color: rgba(255, 255, 255, .92); background: rgba(3, 46, 42, .7); border-radius: 4px; font-size: .58rem; }

.metrics-section { position: relative; z-index: 3; padding: 27px 0 11px; background: var(--paper); }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { min-height: 120px; display: flex; align-items: center; gap: 18px; padding: 19px 20px; background: linear-gradient(135deg, #faf7f2, #f4eee7); border: 1px solid #f0ebe4; border-radius: 9px; }
.metric-icon { width: 60px; height: 60px; flex: 0 0 60px; display: grid; place-items: center; color: var(--white); background: var(--green-800); border-radius: 10px; font-family: Georgia, serif; font-size: 1.55rem; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.metric-card:nth-child(2) .metric-icon { background: var(--terracotta); }
.metric-card:nth-child(3) .metric-icon { background: var(--ochre); }
.metric-card:nth-child(4) .metric-icon { background: var(--green-600); }
.metric-value { display: block; margin-bottom: 4px; color: var(--green-900); font-family: Georgia, serif; font-size: 2.1rem; line-height: 1; }
.metric-card:nth-child(2) .metric-value { color: var(--terracotta); }
.metric-card:nth-child(3) .metric-value { color: var(--ochre); }
.metric-label { display: block; font-size: .76rem; font-weight: 700; line-height: 1.25; }
.metric-period { display: block; margin-top: 3px; color: var(--muted); font-size: .68rem; }
.data-status { margin: 9px 2px 0; color: var(--muted); font-size: .66rem; text-align: right; }
.demo-badge { display: inline-flex; align-items: center; padding: 3px 7px; color: var(--terracotta-dark); background: #f8e5e2; border-radius: 999px; font-size: .6rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

.updates-section { padding: 24px 0 54px; }
.updates-grid { display: grid; grid-template-columns: .95fr 1.12fr; gap: 42px; }
.section-heading { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.section-heading h2 { margin: 0; color: var(--green-950); font-size: clamp(1.35rem, 2vw, 1.65rem); line-height: 1.2; }
.heading-icon { color: var(--terracotta); font-family: Arial, sans-serif; font-size: 1.1em; }
.section-note { color: var(--terracotta); font-size: .7rem; font-weight: 700; }
.agenda-list { display: grid; gap: 8px; }
.agenda-card { min-height: 88px; display: grid; grid-template-columns: 76px 1fr; overflow: hidden; background: rgba(255, 255, 255, .58); border: 1px solid var(--line); border-radius: 8px; }
.agenda-date { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--terracotta); background: #f8f2ed; border-right: 1px solid var(--line); }
.agenda-date strong { font-family: Georgia, serif; font-size: 1.55rem; line-height: 1; }
.agenda-date span { margin-top: 4px; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.agenda-body { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 16px; }
.agenda-body h3 { margin-bottom: 5px; font-family: Arial, sans-serif; font-size: .81rem; line-height: 1.3; }
.agenda-meta { margin: 0; color: var(--muted); font-size: .7rem; }
.agenda-status { flex: 0 0 auto; padding: 6px 11px; color: #4f5957; background: #eef0ee; border-radius: 999px; font-size: .62rem; }
.news-grid { min-height: 280px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 15px 18px; }
.news-card { min-width: 0; display: grid; grid-template-columns: 86px 1fr; gap: 11px; align-items: start; }
.news-card:first-child { grid-row: span 3; display: block; }
.news-card img { width: 86px; height: 67px; object-fit: cover; border-radius: 7px; }
.news-card:first-child img { width: 100%; height: 157px; margin-bottom: 9px; }
.news-card h3 { margin: 0 0 4px; font-family: Arial, sans-serif; font-size: .79rem; line-height: 1.35; }
.news-card:first-child h3 { font-size: .96rem; }
.news-card time, .news-card small { display: block; color: var(--muted); font-size: .66rem; }
.news-card p { margin: 6px 0 0; color: #45504e; font-size: .7rem; line-height: 1.45; }

.governance-strip { padding: 37px 0; background: var(--cream); }
.governance-grid { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 70px; }
.section-overline { margin-bottom: 7px; color: var(--terracotta); font-size: .65rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.governance-grid h2 { max-width: 430px; margin: 0; color: var(--green-950); font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.12; }
.governance-grid > p { margin: 0; padding-left: 35px; color: #4f5957; border-left: 1px solid #c9b9aa; font-size: .89rem; }

.documents-section { padding: 48px 0 52px; background: var(--white); }
.section-heading-wide { align-items: end; margin-bottom: 22px; }
.section-heading-wide > p { max-width: 440px; margin: 0; color: var(--muted); font-size: .82rem; text-align: right; }
.documents-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.document-card { min-height: 118px; display: flex; flex-direction: column; justify-content: space-between; padding: 18px 19px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
a.document-card:hover { transform: translateY(-2px); border-color: var(--terracotta); box-shadow: var(--shadow); }
.document-type { color: var(--terracotta); font-size: .61rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.document-card h3 { margin: 7px 0 10px; font-family: Arial, sans-serif; font-size: .84rem; line-height: 1.35; }
.document-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .66rem; }

.areas-section { padding: 43px 0 54px; background: var(--paper); }
.flower { font-size: 1.3em; }
.areas-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; }
.area-card { position: relative; min-height: 142px; display: flex; align-items: flex-end; overflow: hidden; border-radius: 8px; isolation: isolate; }
.area-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 38%, rgba(3, 35, 32, .66)); }
.area-card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.area-card:hover img { transform: scale(1.04); }
.area-card strong { margin: 10px; padding: 6px 8px; color: var(--ink); background: rgba(255, 253, 249, .94); border-radius: 5px; font-size: .69rem; line-height: 1.2; }

.participation { position: relative; overflow: hidden; color: var(--white); background-image: linear-gradient(90deg, rgba(3, 46, 42, .95), rgba(3, 46, 42, .78)), url("../img/atibaia-espaco-cultural.webp"); background-position: center 56%; background-size: cover; }
.participation::before { content: ""; position: absolute; left: -55px; top: 18px; width: 150px; height: 150px; border: 2px solid var(--ochre); border-radius: 70% 0 70% 0; transform: rotate(24deg); opacity: .9; }
.participation-grid { position: relative; min-height: 205px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 70px; padding-top: 36px; padding-bottom: 36px; }
.light { color: #e7b55f; }
.participation-copy { max-width: 590px; padding-left: 60px; }
.participation h2 { max-width: 500px; margin-bottom: 10px; font-size: clamp(1.65rem, 2.5vw, 2.15rem); line-height: 1.16; }
.participation-copy > p:last-child { margin: 0; color: rgba(255, 255, 255, .88); font-size: .83rem; }
.participation-card { width: 350px; min-height: 112px; display: grid; grid-template-columns: 45px 1fr; align-items: center; gap: 13px; padding: 20px 23px; color: var(--ink); background: var(--cream); border-radius: 12px; box-shadow: 0 17px 35px rgba(0, 0, 0, .18); }
.participation-icon { display: grid; place-items: center; width: 45px; height: 45px; color: var(--green-900); border: 2px solid var(--green-900); border-radius: 50%; font-size: 1.4rem; }
.participation-card strong { display: block; font-size: .88rem; }
.participation-card p { margin: 4px 0 0; color: var(--muted); font-size: .7rem; }
.participation-link { grid-column: 2; color: var(--terracotta-dark); font-size: .72rem; font-weight: 800; }
.light-credit { background: rgba(3, 46, 42, .86); }

.site-footer { padding: 28px 0 17px; color: rgba(255, 255, 255, .93); background: var(--green-950); }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-size: .68rem; line-height: 1.28; }
.footer-brand img { width: 104px; height: 59px; object-fit: contain; background: rgba(255, 255, 255, .93); border-radius: 5px; }
.footer-brand strong { display: block; margin-bottom: 3px; font-size: .88rem; letter-spacing: .03em; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 20px; font-size: .67rem; }
.footer-nav a:hover, .footer-bottom a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding-top: 15px; color: rgba(255, 255, 255, .68); border-top: 1px solid rgba(255, 255, 255, .17); font-size: .61rem; }
.footer-bottom div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 17px; }
.noscript { padding: 12px; color: #fff; background: #8d2528; text-align: center; }

.high-contrast {
  --green-950: #001d19; --green-900: #002e27; --green-800: #004e41;
  --terracotta: #9d0000; --terracotta-dark: #780000; --ochre: #8d5700;
  --cream: #ffffff; --paper: #ffffff; --ink: #000000; --muted: #252525; --line: #555555;
}
.high-contrast .hero { background-image: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, .96) 48%, rgba(255, 255, 255, .2)), url("../img/atibaia-panorama.jpg"); }

@media (max-width: 1050px) {
  .header-row { min-height: 96px; gap: 20px; }
  .brand { gap: 8px; }
  .brand img { width: 135px; height: 76px; }
  .brand span { max-width: 165px; font-size: .7rem; }
  .main-nav { gap: 14px; }
  .main-nav a { font-size: .78rem; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .areas-grid { grid-template-columns: repeat(4, 1fr); }
  .area-card { min-height: 155px; }
}

@media (max-width: 780px) {
  .container { width: min(100% - 36px, 1180px); }
  .header-row { min-height: 82px; }
  .brand img { width: 122px; height: 68px; }
  .brand span { display: none; }
  .accessibility { display: none; }
  .menu-toggle { display: inline-flex; }
  .menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-bars::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-bars::after { top: 0; transform: rotate(-45deg); }
  .main-nav { position: fixed; top: 82px; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 25px 28px; background: var(--paper); transform: translateX(100%); transition: transform .22s ease; }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .main-nav a::after { display: none; }
  .hero, .hero-inner { min-height: 530px; }
  .hero { background-image: linear-gradient(90deg, rgba(255, 248, 238, .97), rgba(255, 248, 238, .82)), url("../img/atibaia-panorama.jpg"); background-position: center; }
  .hero-copy { width: 100%; padding: 50px 0 75px; }
  .kicker { display: block; max-width: 100%; white-space: normal; }
  h1 { font-size: clamp(2.55rem, 11vw, 3.65rem); }
  .updates-grid { grid-template-columns: 1fr; gap: 45px; }
  .governance-grid { grid-template-columns: 1fr; gap: 20px; }
  .governance-grid > p { padding-left: 18px; }
  .documents-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading-wide { align-items: flex-start; flex-direction: column; }
  .section-heading-wide > p { text-align: left; }
  .participation-grid { grid-template-columns: 1fr; gap: 25px; }
  .participation { background-position: center 52%; }
  .participation-copy { padding-left: 20px; }
  .participation-card { width: min(100%, 420px); }
  .footer-main, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .footer-nav, .footer-bottom div { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .container { width: min(100% - 28px, 1180px); }
  .metrics-section { padding-top: 14px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { min-height: 142px; align-items: flex-start; flex-direction: column; gap: 10px; padding: 13px; }
  .metric-icon { width: 42px; height: 42px; flex-basis: 42px; font-size: 1.1rem; }
  .metric-value { font-size: 1.65rem; }
  .updates-section { padding-top: 34px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .agenda-card { grid-template-columns: 64px 1fr; }
  .agenda-body { align-items: flex-start; flex-direction: column; gap: 7px; }
  .news-grid { grid-template-columns: 1fr; }
  .news-card:first-child { grid-row: auto; }
  .news-card:first-child img { height: 190px; }
  .documents-grid { grid-template-columns: 1fr; }
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .area-card { min-height: 145px; }
  .participation::before { display: none; }
  .participation-copy { padding-left: 0; }
  .participation-card { grid-template-columns: 40px 1fr; padding: 18px; }
  .participation-icon { width: 40px; height: 40px; }
  .footer-nav { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; }
  .photo-credit { right: 14px; left: 14px; max-width: none; padding: 0; background: transparent; text-align: right; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
