/* ReBentos — refino visual v2 */
:root {
  --bg: #f4f9fa;
  --bg-deep: #eaf3f4;
  --surface: #ffffff;
  --surface-2: #f8fcfc;
  --ink: #0c2730;
  --ink-2: #1d3e48;
  --muted: #5b7882;
  --line: #d7e6e8;
  --line-2: #c4dbde;
  --primary: #0a5c66;
  --primary-2: #0d6f79;
  --primary-3: #1098a6;
  --accent: #f3c969;
  --sand: #f5ead2;
  --coral: #e07a5f;
  --shadow-sm: 0 4px 14px rgba(10, 53, 62, 0.06);
  --shadow-md: 0 18px 44px rgba(9, 53, 62, 0.10);
  --shadow-lg: 0 32px 70px rgba(9, 53, 62, 0.14);
  --radius: 18px;
  --radius-lg: 28px;
  --max: 1200px;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Fraunces", "Source Serif Pro", Georgia, serif;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none }
img { max-width: 100%; display: block }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; color: var(--ink) }
p { margin: 0 0 1em }

.container { width: min(calc(100% - 36px), var(--max)); margin: 0 auto }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 249, 250, 0.88);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid rgba(12, 39, 48, 0.08);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 20px }
.brand { display: flex; align-items: center; gap: 14px; font-weight: 700 }
.brand img { width: 58px; height: auto }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.1 }
.brand .brand-text strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); letter-spacing: 0.01em }
.brand .brand-text small { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; margin-top: 2px }
.menu { display: flex; flex-wrap: wrap; gap: 22px; font-size: 0.94rem; color: var(--ink-2); font-weight: 500 }
.menu a { position: relative; padding: 6px 0; transition: color .18s ease }
.menu a:hover, .menu a.active { color: var(--primary) }
.menu a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--primary); border-radius: 2px;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 96px 0 80px;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(16, 152, 166, 0.18), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(10, 92, 102, 0.10), transparent 50%),
    linear-gradient(180deg, var(--bg-deep), var(--bg) 70%);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(13, 111, 121, 0.08) 1px, transparent 0);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.4), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  line-height: 1.04;
  margin: 18px 0 22px;
}
.hero h1 em {
  font-style: italic;
  color: var(--primary);
  font-weight: 500;
}
.hero p.lead {
  font-size: 1.12rem;
  color: var(--ink-2);
  max-width: 56ch;
  margin-bottom: 32px;
}
.hero-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(0.6deg);
}
.hero-card img { aspect-ratio: 4/3.2; object-fit: cover }
.hero-card .caption {
  padding: 18px 22px;
  color: var(--muted);
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.hero-stats {
  position: absolute;
  bottom: -28px; left: -28px;
  display: flex; gap: 0;
  background: var(--ink);
  color: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transform: rotate(-1deg);
}
.hero-stats > div { padding: 14px 18px; border-right: 1px solid rgba(255,255,255,0.1) }
.hero-stats > div:last-child { border-right: 0 }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.4rem; color: var(--accent); font-weight: 600 }
.hero-stats span { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.7) }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #e0f3ef;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary-3);
}

.actions { display: flex; flex-wrap: wrap; gap: 14px }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
}
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(10, 92, 102, 0.28) }
.btn.primary:hover { background: var(--primary-2); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(10, 92, 102, 0.36) }
.btn.secondary { background: #fff; border-color: var(--line-2); color: var(--ink) }
.btn.secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px) }
.btn.ghost { background: transparent; color: var(--ink) }
.btn.ghost:hover { color: var(--primary) }

/* ============ SECTIONS ============ */
section.block { padding: 80px 0 }
section.block.tight { padding: 56px 0 }
.section-head { max-width: 720px; margin-bottom: 44px }
.section-title { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; margin: 12px 0 14px }
.section-intro { color: var(--muted); font-size: 1.05rem; max-width: 70ch; margin: 0 }

.grid { display: grid; gap: 22px }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) }

/* ============ STATS STRIP ============ */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.stats-strip .stat {
  padding: 32px 24px;
  border-right: 1px solid var(--line);
  position: relative;
}
.stats-strip .stat:last-child { border-right: 0 }
.stats-strip .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--primary);
  margin-bottom: 6px;
}
.stats-strip .stat span {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.35;
  display: block;
}

/* ============ GT CARDS ============ */
.gt-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: all .25s ease;
  text-decoration: none;
  color: var(--ink);
}
.gt-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-2) }
.gt-card .gt-art {
  aspect-ratio: 5/3;
  position: relative;
  overflow: hidden;
}
.gt-card .gt-art svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block }
.gt-card .gt-body { padding: 20px 22px 24px }
.gt-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 6px;
  color: var(--ink);
}
.gt-card p { margin: 0; color: var(--muted); font-size: 0.94rem; line-height: 1.5 }
.gt-card .gt-meta {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary);
  font-size: 0.84rem; font-weight: 600;
}

/* Habitat backgrounds — gradients distintos por GT */
.gt-fsv .gt-art { background: linear-gradient(135deg, #2d8f6e, #6abf8a) }
.gt-praias .gt-art { background: linear-gradient(135deg, #e6c89a, #f3dcb0) }
.gt-costoes .gt-art { background: linear-gradient(135deg, #3a4d5c, #6c8395) }
.gt-mangue .gt-art { background: linear-gradient(135deg, #4a6b3b, #7d9b5e) }
.gt-rodolitos .gt-art { background: linear-gradient(135deg, #b65d6a, #e08a96) }
.gt-corais .gt-art { background: linear-gradient(135deg, #1098a6, #5fc7d3) }
.gt-estuarios .gt-art { background: linear-gradient(135deg, #0d6f79, #2da9b3) }
.gt-educacao .gt-art { background: linear-gradient(135deg, #d4a017, #f3c969) }

/* ============ SPLIT FEATURE ============ */
.split-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 38px 36px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.feature-card.dark {
  background: linear-gradient(150deg, var(--primary), var(--ink) 90%);
  color: #fff;
  border-color: transparent;
  position: relative;
  overflow: hidden;
}
.feature-card.dark::before {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(243, 201, 105, 0.25), transparent 65%);
}
.feature-card.dark h3 { color: #fff }
.feature-card.dark p { color: rgba(255,255,255,0.82) }
.feature-card h3 { font-size: 1.55rem; margin: 8px 0 14px }
.feature-card p { color: var(--muted); margin-bottom: 22px }
.feature-card .pubs-list { list-style: none; padding: 0; margin: 16px 0 24px; display: grid; gap: 10px }
.feature-card .pubs-list li {
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.96rem;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 12px;
}
.feature-card .pubs-list li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary-3); flex-shrink: 0;
}
.feature-card.dark .pubs-list li {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
}
.feature-card .footer-row { margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap }

/* ============ INSTITUTIONS ============ */
.institutions {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-sm);
}
.inst-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.inst-logo {
  aspect-ratio: 3/2;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--primary);
  font-size: 1.1rem;
  transition: all .2s ease;
}
.inst-logo:hover { background: #fff; border-color: var(--primary); transform: translateY(-2px) }

/* ============ FINAL CTA ============ */
.cta-banner {
  background:
    radial-gradient(ellipse at 90% 30%, rgba(243, 201, 105, 0.20), transparent 55%),
    linear-gradient(135deg, var(--primary), var(--ink));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  position: relative;
  overflow: hidden;
}
.cta-banner h2 { color: #fff; font-size: clamp(1.7rem, 2.6vw, 2.3rem); margin: 0 0 14px; max-width: 22ch }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 58ch; margin-bottom: 28px; font-size: 1.05rem }
.cta-banner .btn.primary { background: var(--accent); color: var(--ink); box-shadow: 0 8px 20px rgba(243, 201, 105, 0.35) }
.cta-banner .btn.primary:hover { background: #ffd97a }
.cta-banner .btn.secondary { background: transparent; border-color: rgba(255,255,255,0.3); color: #fff }
.cta-banner .btn.secondary:hover { border-color: #fff; background: rgba(255,255,255,0.08) }

/* ============ INTERIOR PAGES ============ */
.page-hero {
  padding: 80px 0 40px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(16, 152, 166, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg-deep), var(--bg) 80%);
  border-bottom: 1px solid var(--line);
}
.page-hero .breadcrumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 14px }
.page-hero .breadcrumbs a { color: var(--primary); border-bottom: 1px solid transparent; transition: border .15s }
.page-hero .breadcrumbs a:hover { border-bottom-color: var(--primary) }
.page-hero h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); margin: 14px 0 18px; line-height: 1.1 }
.page-hero p { color: var(--ink-2); font-size: 1.08rem; max-width: 64ch; margin: 0 }

.content { padding: 56px 0 80px }
.content h2 { font-size: 1.7rem; margin: 36px 0 12px }
.content h3 { font-size: 1.2rem; margin: 28px 0 10px }
.content p, .content li { color: var(--ink-2); font-size: 1.02rem }
.content ul, .content ol { padding-left: 1.4em }
.content blockquote {
  margin: 20px 0;
  padding: 18px 24px;
  border-left: 4px solid var(--primary-3);
  background: var(--surface-2);
  border-radius: 0 12px 12px 0;
  color: var(--ink-2);
  font-style: italic;
}

/* ============ FOOTER ============ */
.footer {
  margin-top: 64px;
  background: var(--ink);
  color: rgba(255,255,255,0.78);
  padding: 64px 0 32px;
}
.footer h4 { color: #fff; font-family: var(--font-display); font-size: 1rem; margin: 0 0 16px; letter-spacing: 0.02em }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.9fr 1fr;
  gap: 40px;
}
.footer a { color: rgba(255,255,255,0.78); transition: color .15s }
.footer a:hover { color: var(--accent) }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.94rem }
.footer .brand-foot { display: flex; align-items: center; gap: 12px; margin-bottom: 16px }
.footer .brand-foot img { width: 48px }
.footer .brand-foot strong { color: #fff; font-family: var(--font-display); font-size: 1.15rem }
.footer .small { font-size: 0.88rem; line-height: 1.5; color: rgba(255,255,255,0.6) }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}

/* ============ WAVE DIVIDER ============ */
.wave-divider { display: block; width: 100%; height: 60px; line-height: 0 }
.wave-divider svg { width: 100%; height: 100% }

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .cards-4 { grid-template-columns: repeat(3, 1fr) }
  .inst-grid { grid-template-columns: repeat(4, 1fr) }
  .footer-grid { grid-template-columns: 1fr 1fr }
}
@media (max-width: 880px) {
  .hero { padding: 64px 0 60px }
  .hero-grid { grid-template-columns: 1fr; gap: 36px }
  .hero-card { transform: none }
  .hero-stats { position: static; transform: none; margin-top: 24px; justify-content: flex-start }
  .split-feature { grid-template-columns: 1fr }
  .cards-4, .cards-3, .cards-2 { grid-template-columns: 1fr 1fr }
  .stats-strip { grid-template-columns: 1fr 1fr }
  .stats-strip .stat { border-right: 0; border-bottom: 1px solid var(--line) }
  .stats-strip .stat:nth-child(2) { border-right: 0 }
  .menu { display: none }
  section.block { padding: 56px 0 }
}
@media (max-width: 560px) {
  .cards-4, .cards-3, .cards-2, .inst-grid { grid-template-columns: 1fr }
  .stats-strip { grid-template-columns: 1fr }
  .stats-strip .stat { border-bottom: 1px solid var(--line) }
  .stats-strip .stat:last-child { border-bottom: 0 }
  .institutions, .feature-card, .cta-banner { padding: 32px 24px }
  .hero h1 { font-size: 2.2rem }
  .footer-grid { grid-template-columns: 1fr }
}
