:root {
  --green: #194627;
  --green-dark: #173d26;
  --ink: #213c2a;
  --orange: #d87835;
  --cream: #faf7ee;
  --cream-deep: #f0e9c8;
  --line: #ded8c7;
  --muted: #5a665b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { color: var(--green); font-weight: 700; letter-spacing: -.045em; line-height: 1.1; }
h2 { font-size: clamp(34px, 3.8vw, 48px); }
h3 { font-size: 22px; font-weight: 700; letter-spacing: -.03em; line-height: 1.25; }
.skip { position: absolute; top: -100px; left: 15px; z-index: 30; padding: 12px; background: white; }
.skip:focus { top: 10px; }

header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(32, 60, 41, .08);
  background: var(--cream);
}
.brand { color: var(--green); font-size: 23px; font-weight: 800; letter-spacing: -.04em; line-height: 1.2; }
@font-face {
  font-family: 'CoopasulLogo';
  src: url('../fonts/coopasul.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
.logo-coopasul { font-family: 'CoopasulLogo', sans-serif !important; font-size: 40px !important; letter-spacing: 0 !important; color: #c62828 !important; line-height: 1 !important; font-weight: 400; white-space: nowrap; }
.brand .mark, .brand small { display: none; }
nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); color: #46574b; font-size: 13px; }
nav a:hover { color: var(--green); }
.nav-button { padding: 11px 20px; border: 1px solid var(--green); border-radius: 24px; background: var(--green); color: white; }
.nav-button:hover { background: #245a34; color: white; }
.menu { display: none; }

.section { padding: 92px 8vw; }
.eyebrow { margin: 0 0 19px; color: var(--orange); font-size: 10px; font-weight: 750; letter-spacing: 2px; }
.text-link { display: inline-block; margin-top: 18px; color: var(--green); font-size: 13px; font-weight: 700; }
.text-link:hover { text-decoration: underline; }
.button { display: inline-flex; align-items: center; gap: 16px; margin-top: 14px; padding: 13px 22px; border: 1px solid var(--orange); border-radius: 24px; background: var(--orange); color: white; font-size: 13px; font-weight: 650; }
.button:hover { border-color: #bd642d; background: #bd642d; }
.button.dark { border-color: var(--green); background: var(--green); }
.button.dark:hover { background: #245a34; }

/* Home hero and photo carousel */
.hero-home {
  position: relative;
  display: flex;
  min-height: 625px;
  align-items: center;
  overflow: hidden;
  padding: 0 8vw;
  background: var(--green-dark);
  color: #fff8e9;
}
.hero-home::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 52, 29, .89), rgba(20, 54, 31, .76) 43%, rgba(20, 54, 31, .12));
  content: "";
  pointer-events: none;
}
.hero-photo { position: absolute; z-index: 0; inset: 0; margin: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  filter: saturate(.88);
  opacity: 0;
  transition: opacity .8s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-content { position: relative; z-index: 2; max-width: 760px; padding: 100px 0 130px; }
.hero-home .eyebrow { margin-bottom: 23px; color: var(--orange); }
.hero-home h1 { max-width: 820px; margin-bottom: 24px; color: #fff8e9; font-size: clamp(46px, 5.3vw, 72px); font-weight: 750; line-height: 1.03; letter-spacing: -.045em; }
.hero-content > p:not(.eyebrow) { max-width: 600px; color: #f3eee1; font-size: 16px; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.hero-home .button { margin: 0; }
.hero-text-link { padding: 12px 20px; border: 1px solid rgba(255, 248, 233, .8); border-radius: 24px; color: #fff8e9; font-size: 13px; }
.hero-text-link:hover { background: rgba(255, 255, 255, .1); }
.hero-bottom { display: none; }
.carousel-controls { position: absolute; z-index: 3; right: 50%; bottom: 24px; display: flex; gap: 8px; transform: translateX(50%); }
.carousel-dot { width: 9px; height: 9px; padding: 0; border: 1px solid #fff8e9; border-radius: 50%; background: rgba(255, 248, 233, .55); transition: width .2s, background .2s; }
.carousel-dot.is-active { width: 27px; border-color: var(--orange); border-radius: 8px; background: var(--orange); }

/* Intro and cooperative information */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  grid-template-rows: auto 1fr;
  gap: 12px 6vw;
  align-items: start;
  background: var(--cream);
}
.about-photo { position: relative; grid-column: 1; grid-row: 1 / span 2; overflow: hidden; margin: 0; }
.about-photo img { display: block; width: 100%; height: 100%; min-height: 480px; max-height: 620px; object-fit: cover; object-position: center 48%; }
.about-photo figcaption { position: absolute; bottom: 14px; left: 14px; padding: 8px 12px; background: rgba(250, 247, 238, .94); color: #405644; font-size: 12px; }
.about-heading { grid-column: 2; grid-row: 1; }
.about-copy { grid-column: 2; grid-row: 2; }
.about h2 { margin-bottom: 15px; }
.about-copy .lead { color: #344f3a; font-size: 21px; font-weight: 600; line-height: 1.5; letter-spacing: -.025em; }
.about-copy > p:not(.lead), .territory > div:first-child > p:not(.eyebrow) { color: var(--muted); }

.band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 28px 7vw; background: var(--cream-deep); }
.band > div { min-height: 82px; padding: 2px 18px 2px 0; border-right: 1px solid #d2caa8; text-align: center; }
.band > div:last-child { padding-right: 0; border: 0; }
.band strong { display: block; color: var(--green); font-size: clamp(25px, 3vw, 40px); font-weight: 750; line-height: 1.12; letter-spacing: -.045em; white-space: nowrap; }
.band > div:last-child strong { font-size: clamp(13px, 1.45vw, 17px); font-weight: 700; letter-spacing: -.025em; white-space: normal; }
.band span { display: block; margin-top: 5px; color: #586457; font-size: 11px; line-height: 1.4; }

/* Products and photo gallery */
.production-section, .programs { background: #f5f1e4; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 38px; margin-bottom: 32px; }
.section-title h2 { margin-bottom: 0; }
.section-intro { max-width: 420px; margin-bottom: 0; color: #5c675a; font-size: 15px; line-height: 1.7; }
.produce { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.produce > a { position: relative; display: block; min-height: 230px; padding: 28px 30px; border: 1px solid var(--line); border-radius: 18px; background: #fffdf6; transition: transform .2s, box-shadow .2s; }
.produce > a:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(30, 64, 40, .09); }
.produce span, .catalog-grid article > span { color: #687063; font-size: 10px; letter-spacing: 1.6px; }
.produce h3 { margin: 25px 0 10px; color: var(--green); font-size: 24px; }
.produce p { color: #5c675a; font-size: 14px; }
.produce b { position: absolute; top: 22px; right: 24px; color: var(--orange); font-weight: 500; }
.gallery-section { background: var(--cream); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.gallery-card { overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 16px; background: #fffdf6; }
.gallery-card img { display: block; width: 100%; aspect-ratio: 1.2; object-fit: cover; object-position: center; transition: transform .3s; }
.gallery-card:hover img { transform: scale(1.025); }
.gallery-card figcaption { padding: 13px 16px; color: #3d5141; font-size: 13px; font-weight: 650; }

/* Public programs and territory */
.programs { display: block; color: var(--ink); }
.programs-heading { margin-bottom: 18px; }
.programs h2 { max-width: 680px; }
.programs-copy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.programs-copy .intro { grid-column: 1 / -1; max-width: 750px; margin-bottom: 12px; color: #596659; font-size: 15px; line-height: 1.7; }
.program { display: block; min-height: 195px; margin: 0; padding: 25px; border: 1px solid var(--line); border-radius: 19px; background: #fffdf6; }
.program strong { display: block; margin: 0 0 18px; color: var(--green); font-size: 22px; font-weight: 750; }
.program strong::before { display: block; width: 38px; height: 6px; margin-bottom: 17px; border-radius: 5px; background: var(--orange); content: ""; }
.program h3 { margin: 0 0 9px; color: #2c4734; font-size: 17px; }
.program p { margin: 0; color: #60695d; font-size: 13px; line-height: 1.6; }
.territory { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8vw; background: var(--cream); }
.territory h2 { max-width: 560px; }
.values { padding-left: 35px; border-left: 1px solid var(--line); }
.values h3 { color: var(--green); font-size: 23px; }
.values p { color: #586457; font-size: 14px; }
.values b { display: block; margin-bottom: 5px; color: #3e573e; font-size: 13px; }
.closing-note { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 8vw; background: var(--cream-deep); color: var(--green); }
.closing-note p { margin: 0; color: var(--green); font-size: 18px; font-weight: 650; }
.closing-note a { color: var(--green); font-size: 13px; font-weight: 700; }

/* Shared footer */
footer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 8vw; align-items: start; padding: 42px 5vw 26px; background: var(--green-dark); color: #f8f3e9; }
footer > .brand { grid-column: 1; grid-row: 1; color: white; font-size: 24px; }
footer > p { grid-column: 1; grid-row: 2; max-width: 460px; margin: 10px 0 20px; color: #dce4d7; font-size: 13px; }
footer address { grid-column: 2; grid-row: 1 / span 2; justify-self: end; align-self: center; margin: 0; color: #e8ebdf; font-size: 13px; font-style: normal; line-height: 1.75; text-align: right; }
footer > div { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 20px; margin-top: 10px; padding-top: 16px; border-top: 1px solid rgba(245, 245, 224, .25); color: #dce4d7; font-size: 11px; }

/* Secondary pages */
.page-heading { padding-top: 65px; padding-bottom: 55px; background: var(--cream); }
.page-heading h1, .portal h1 { max-width: 780px; font-size: clamp(42px, 5.5vw, 68px); }
.page-heading > p:last-child { max-width: 620px; color: var(--muted); }
.catalog { padding-top: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filters button { padding: 9px 18px; border: 1px solid var(--green); border-radius: 22px; background: transparent; color: var(--green); font-size: 13px; }
.filters button[aria-pressed="true"] { background: var(--green); color: white; }
#resultado { margin: 20px 0; color: var(--muted); font-size: 12px; }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.catalog-grid article { overflow: hidden; padding: 0 0 24px; border: 1px solid var(--line); border-radius: 16px; background: #fffdf6; }
.catalog-grid article img { display: block; width: 100%; aspect-ratio: 1.8; margin-bottom: 22px; object-fit: cover; }
.catalog-grid article > span, .catalog-grid article h2, .catalog-grid article p { margin-left: 24px; margin-right: 24px; }
.catalog-grid h2 { margin: 18px 0 8px; font-size: 26px; }
.catalog-grid article[hidden] { display: none; }
.catalog-grid p, .note { color: var(--muted); font-size: 14px; }
.note { max-width: 680px; margin-top: 25px; }
.portal { min-height: 65vh; background: var(--cream); }
.portal > p:not(.eyebrow) { max-width: 650px; color: var(--muted); }

@media (max-width: 760px) {
  header { height: 72px; padding: 0 6vw; }
  .brand { font-size: 20px; }
  .menu { display: block; padding: 8px 12px; border: 1px solid #b7c1ae; background: transparent; color: var(--green); }
  nav { position: absolute; top: 72px; right: 0; left: 0; z-index: 15; display: none; flex-direction: column; align-items: stretch; gap: 18px; padding: 22px 7vw; background: var(--cream); }
  nav.open { display: flex; }
  .section { padding: 66px 7vw; }
  .hero-home { min-height: 620px; padding: 0 7vw; }
  .hero-home::after { background: linear-gradient(90deg, rgba(18, 52, 29, .86), rgba(20, 54, 31, .42)), linear-gradient(0deg, rgba(20, 43, 29, .62), transparent 55%); }
  .hero-content { padding: 88px 0 115px; }
  .hero-home h1 { font-size: clamp(42px, 10vw, 60px); }
  .hero-content > p:not(.eyebrow) { font-size: 15px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 12px; }
  .carousel-controls { bottom: 22px; }
  .about { grid-template-columns: 1fr; grid-template-rows: auto; gap: 22px; }
  .about-photo, .about-heading, .about-copy { grid-column: auto; grid-row: auto; }
  .about-photo img { height: auto; min-height: 0; max-height: none; aspect-ratio: 1.12; object-position: center 45%; }
  .band { grid-template-columns: 1fr 1fr; gap: 17px 8px; padding: 22px 6vw; }
  .band > div { min-height: 70px; padding: 2px 9px 2px 0; border-right: 1px solid #d2caa8; }
  .band > div:nth-child(even) { padding-right: 0; border: 0; }
  .band > div:last-child { grid-column: 1 / -1; padding-top: 15px; border-top: 1px solid #d2caa8; }
  .band strong { font-size: 28px; }
  .band > div:last-child strong { font-size: 15px; }
  .section-title { display: block; }
  .section-intro { margin-top: 16px; }
  .produce, .catalog-grid { grid-template-columns: 1fr; }
  .programs-copy { grid-template-columns: 1fr; }
  .programs-copy .intro { grid-column: auto; }
  .program { min-height: 0; }
  .gallery-grid { grid-template-columns: 1fr; gap: 14px; }
  .gallery-card img { aspect-ratio: 1.35; }
  .territory { grid-template-columns: 1fr; gap: 34px; }
  .values { padding-left: 22px; }
  .closing-note { align-items: flex-start; flex-direction: column; padding: 25px 7vw; }
  footer { grid-template-columns: 1fr; padding: 34px 7vw 22px; }
  footer > .brand { grid-column: 1; grid-row: 1; }
  footer > p { grid-column: 1; grid-row: 2; }
  footer address { grid-column: 1; grid-row: 3; justify-self: start; margin-bottom: 18px; text-align: left; }
  footer > div { grid-column: 1; flex-wrap: wrap; margin-top: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slide, .carousel-dot, .produce > a, .gallery-card img { transition: none; }
}


/* Notícias oficiais e acesso discreto à administração */
.news-section { background: #fffdf6; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.news-card, .news-fallback { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--cream); }
.news-card > span, .news-fallback > span { color: #687063; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
.news-card h3, .news-fallback h3 { margin: 15px 0 9px; color: var(--green); font-size: 19px; line-height: 1.35; }
.news-card p, .news-fallback p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.news-card time { color: #687063; font-size: 12px; }
.admin-link { color: #829083; font-size: 10px; letter-spacing: .02em; }
.admin-link:hover { color: #fff8e9; text-decoration: underline; }
@media (max-width: 850px) { .news-grid { grid-template-columns: 1fr; } }
