/* Grupo Estimação / SOS Animal — sky blue + warm sand */

:root {
  --sky: #4e9fd1;
  --sky-deep: #2f6f9c;
  --sky-soft: #cfe8f6;
  --sand: #e9dcc6;
  --sand-deep: #d4c2a4;
  --sand-light: #f7f0e4;
  --ink: #1c2d38;
  --ink-soft: #3d5160;
  --white: #fffcf8;
  --live: #2f9e5f;
  --pix: #1f7a4d;
  --pix-hover: #16603b;
  --danger-soft: #c45c3a;
  --header-h: 5.5rem;
  --pix-bar-h: 4.75rem;
  --font-display: "Nunito", "Segoe UI", sans-serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
  --radius: 0.35rem;
  --shadow: 0 12px 40px rgba(28, 45, 56, 0.12);
  --ease: 0.25s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--sky-soft), transparent 55%),
    radial-gradient(900px 500px at 100% 20%, rgba(233, 220, 198, 0.9), transparent 50%),
    linear-gradient(180deg, var(--sand-light) 0%, var(--white) 40%, var(--sand-light) 100%);
  padding-bottom: calc(var(--pix-bar-h) + 1rem);
}

img {
  max-width: 100%;
  display: block;
}

button,
a {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  min-height: var(--header-h);
  height: auto;
  /* solid enough without backdrop-filter (blur forces overflow clip in Chrome) */
  background: rgba(255, 252, 248, 0.96);
  border-bottom: 1px solid rgba(47, 111, 156, 0.12);
  transition: box-shadow var(--ease);
  overflow: visible;
}

.header.scrolled {
  box-shadow: 0 8px 24px rgba(28, 45, 56, 0.08);
}

.header-inner {
  min-height: var(--header-h);
  height: auto;
  width: min(1200px, calc(100% - 1.5rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  overflow: visible;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  overflow: visible;
  line-height: 0;
}

.brand-logo {
  display: block;
  height: 4.25rem;
  width: auto;
  max-height: 4.25rem;
  object-fit: contain;
  object-position: center top;
}

.hero-logo {
  display: block;
  height: clamp(4.5rem, 14vw, 7rem);
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-list {
  display: flex;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.4rem 0.15rem;
  border-bottom: 2px solid transparent;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--sky-deep);
  border-bottom-color: var(--sky);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  border: 2px solid var(--sky-deep);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--sky-deep);
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--sky-deep);
  color: var(--white);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--sky-deep);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.nav-toggle span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--sky-deep);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: calc(var(--header-h) + 2rem) 1.25rem 5rem;
  color: var(--white);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video,
.hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-fallback {
  z-index: 0;
  background:
    linear-gradient(135deg, #6bb3d9 0%, #3d7eab 45%, #c9b48e 100%);
  animation: heroShift 18s ease-in-out infinite alternate;
}

@keyframes heroShift {
  from { filter: saturate(1) brightness(1); transform: scale(1); }
  to { filter: saturate(1.1) brightness(1.05); transform: scale(1.04); }
}

.hero-video {
  z-index: 1;
  background: #1c2d38;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(20, 40, 55, 0.35) 0%, rgba(20, 40, 55, 0.55) 45%, rgba(20, 40, 55, 0.78) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(920px, 100%);
}

.hero-brand {
  margin: 0 0 1rem;
}

.hero-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 6.5vw, 4.25rem);
  line-height: 1.05;
  font-weight: 700;
  max-width: 16ch;
}

.hero-lead {
  margin: 0 0 1.75rem;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  max-width: 36ch;
  opacity: 0.95;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--ease), transform var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-pix {
  background: var(--pix);
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.03em;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  padding: 1rem 1.5rem;
  min-height: 3.5rem;
  box-shadow: 0 10px 28px rgba(31, 122, 77, 0.35);
}

.btn-pix:hover,
.btn-pix:focus-visible {
  background: var(--pix-hover);
}

.btn-pix--block {
  width: 100%;
  max-width: 28rem;
  margin-top: 1.5rem;
}

.btn-pix--small {
  min-height: 3rem;
  padding: 0.75rem 1.1rem;
  font-size: 1rem;
}

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  color: var(--sky-deep);
}

.section-lead {
  margin: 0 0 2rem;
  color: var(--ink-soft);
  font-size: 1.2rem;
  max-width: 42ch;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head .section-title {
  margin-bottom: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.about-photo {
  overflow: hidden;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  aspect-ratio: 5 / 4;
  background: var(--sand-deep);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-caption {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.about-text p {
  margin: 0 0 1.1rem;
  font-size: 1.2rem;
}

.estimate-badge {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--sky-deep);
  background: rgba(78, 159, 209, 0.16);
  border: 1px solid rgba(47, 111, 156, 0.28);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
}

.charts-note {
  margin-top: 0;
}

.section-supporter {
  padding-top: 0;
}

.supporter-panel {
  background:
    linear-gradient(135deg, rgba(78, 159, 209, 0.16), rgba(233, 220, 198, 0.55));
  border: 1px solid rgba(47, 111, 156, 0.18);
  border-radius: 0.75rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--shadow);
}

.supporter-text {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  max-width: 48ch;
}

.btn-apoia {
  background: var(--sky-deep);
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.03em;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  padding: 1rem 1.5rem;
  min-height: 3.5rem;
  margin-top: 0.75rem;
  box-shadow: 0 10px 28px rgba(47, 111, 156, 0.28);
  box-sizing: border-box;
}

.btn-apoia:hover,
.btn-apoia:focus-visible {
  background: #24587d;
}

.animals-cta-actions .btn-pix,
.animals-cta-actions .btn-apoia {
  margin-top: 0;
  min-height: 3.75rem;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-transform: uppercase;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.chart-card {
  margin: 0;
  background: rgba(255, 252, 248, 0.85);
  border: 1px solid rgba(47, 111, 156, 0.15);
  border-radius: 0.6rem;
  padding: 1rem 1rem 1.25rem;
  box-shadow: var(--shadow);
}

.chart-label {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--sky-deep);
  margin-bottom: 0.5rem;
}

.chart-card canvas {
  width: 100%;
  height: auto;
  display: block;
}

.chart-now {
  margin: 0.75rem 0 0;
  font-size: 1.1rem;
}

.section-animals {
  overflow: hidden;
}

.marquee {
  position: relative;
  overflow: hidden;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 1rem;
  touch-action: pan-y;
}

.marquee.is-js-marquee {
  touch-action: none;
}

.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.marquee.is-js-marquee .marquee-track {
  cursor: grab;
}

.marquee.is-js-marquee .marquee-track:active {
  cursor: grabbing;
}

.marquee-group {
  display: flex;
}

.marquee-item {
  flex: 0 0 auto;
  width: min(72vw, 280px);
  margin-right: 0.85rem;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
}

.marquee-thumb {
  position: relative;
  display: block;
  border-radius: 0.4rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.marquee-item img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

.marquee-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: rgba(28, 45, 56, 0.72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.marquee-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 0.55rem 0 0.55rem 0.95rem;
  border-color: transparent transparent transparent #fff;
}

.marquee-item-name {
  margin: 0.65rem 0 0;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}

.animals-cta {
  margin-top: 2.75rem;
  text-align: center;
}

.animals-cta-text {
  margin: 0 auto 1.35rem;
  font-size: 1.25rem;
  max-width: 40rem;
  color: var(--ink-soft);
}

.animals-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: center;
}

.marquee-control {
  display: none;
  position: absolute;
  top: 42%;
  z-index: 5;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid var(--sky-deep);
  background: rgba(255, 252, 248, 0.92);
  color: var(--sky-deep);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.marquee-control--prev { left: clamp(0.4rem, 2vw, 1rem); }
.marquee-control--next { right: clamp(0.4rem, 2vw, 1rem); }

@media (min-width: 901px) and (hover: hover) {
  .marquee-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

.expenses-bars {
  display: grid;
  gap: 1rem;
}

.expense-row {
  display: grid;
  gap: 0.35rem;
}

.expense-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.expense-track {
  height: 1.35rem;
  background: rgba(47, 111, 156, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.expense-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--sky), var(--sky-deep));
  border-radius: inherit;
  transition: width 0.8s ease;
}

.expenses-total {
  margin: 1.75rem 0 1rem;
  font-size: 1.45rem;
}

.expenses-note {
  margin: 0;
  max-width: 52ch;
  font-size: 1.2rem;
  color: var(--ink-soft);
}

.footer {
  background: #223846;
  color: #e8f3fa;
  padding: 3rem 0 calc(2rem + var(--pix-bar-h));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.footer a.footer-link {
  color: #e8f3fa;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  font-weight: 700;
}

.footer a.footer-link:hover,
.footer a.footer-link:focus-visible {
  color: #fff;
}

.footer h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.footer-copy {
  text-align: center;
  opacity: 0.7;
  margin: 2rem 0 0;
  font-size: 0.95rem;
}

.pix-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  min-height: var(--pix-bar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: rgba(28, 45, 56, 0.96);
  color: var(--white);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
}

.pix-bar-text {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--pix-bar-h) + 1rem);
  transform: translateX(-50%);
  z-index: 200;
  width: min(34rem, calc(100% - 1.5rem));
  background: var(--white);
  color: var(--ink);
  border: 3px solid var(--pix);
  border-radius: 0.6rem;
  padding: 1.1rem 1.25rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: var(--shadow);
  text-align: center;
}

.toast[hidden] {
  display: none;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 28, 36, 0.72);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(90vh, 880px);
  overflow: auto;
  background: var(--white);
  border-radius: 0.6rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.lightbox-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.lightbox-media {
  width: 100%;
  border-radius: 0.4rem;
  overflow: hidden;
  background: #111;
}

.lightbox-img,
.lightbox-video {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 0.4rem;
  background: var(--sand);
  display: block;
}

.lightbox-media.is-video .lightbox-video {
  aspect-ratio: 9 / 16;
  max-height: min(70vh, 640px);
  object-fit: contain;
  background: #000;
}

.lightbox-img[hidden],
.lightbox-video[hidden] {
  display: none;
}

.lightbox-copy h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--sky-deep);
}

.lightbox-copy p {
  margin: 0;
  font-size: 1.2rem;
}

.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  border: 0;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  z-index: 2;
}

.lightbox-nav {
  position: absolute;
  top: 42%;
  border: 2px solid var(--sky-deep);
  background: var(--white);
  color: var(--sky-deep);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
}

.lightbox-nav--prev { left: 0.5rem; }
.lightbox-nav--next { right: 0.5rem; }

.lightbox-counter {
  text-align: center;
  margin: 1rem 0 0;
  font-weight: 700;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid rgba(47, 111, 156, 0.15);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--ease), opacity var(--ease);
    padding: 1rem 1.25rem 1.25rem;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 0.35rem;
  }

  .nav-list a {
    display: block;
    padding: 0.85rem 0.25rem;
    font-size: 1.25rem;
  }

  .about-grid,
  .charts-grid,
  .footer-grid,
  .lightbox-body {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: center;
    padding-bottom: 6rem;
  }

  .pix-bar-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-fallback,
  .expense-fill {
    animation: none !important;
    transition: none !important;
  }
}

/* Scroll reveal */
@media (prefers-reduced-motion: no-preference) {
  .js-scroll .reveal {
    opacity: 0;
    transform: translateY(1.5rem);
    transition:
      opacity 0.75s ease,
      transform 0.75s ease;
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
  }

  .js-scroll .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .js-scroll .marquee.reveal {
    transform: translateY(1rem);
  }

  .js-scroll .marquee.reveal.is-visible {
    transform: translateY(0);
  }

  .js-scroll .chart-card.reveal {
    transform: translateY(1.75rem) scale(0.98);
  }

  .js-scroll .chart-card.reveal.is-visible {
    transform: translateY(0) scale(1);
  }

  #expensesBars .expense-fill {
    width: 0 !important;
    transition: width 1s ease;
  }

  #expensesBars.is-inview .expense-fill {
    width: var(--bar-w) !important;
  }
}
