:root {
  --ink: #222e66;
  --blue: #28388a;
  --accent: #415dae;
  --sky: #91bfe8;
  --pale: #edf5fb;
  --paper: #fff;
  --muted: #46577a;
  --line: #d6e1ef;
  --display: Fredoka, 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: Poppins, system-ui, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  color: var(--ink);
  font: 400 100%/1.65 var(--body);
  scroll-padding-top: 5.75rem;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
a { color: inherit; }
p, h1, h2, h3, h4 { margin: 0; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
section[tabindex]:focus { outline: none; }
.wrap { width: min(100% - 5rem, 73rem); margin-inline: auto; }
.skip { position: fixed; z-index: 10; left: .75rem; top: .75rem; background: white; padding: .75rem; }
.skip:not(:focus) { clip-path: inset(50%); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-header { position: sticky; z-index: 5; top: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar { min-height: 4.8rem; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; flex-shrink: 0; text-decoration: none; color: var(--blue); font: 700 .94rem/1.16 var(--body); }
.brand img { width: 3.15rem; height: auto; }
nav { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 2.35rem); scroll-target-group: auto; }
nav a { display: flex; align-items: center; min-height: 2.75rem; white-space: nowrap; font-size: .875rem; font-weight: 600; text-decoration: none; color: var(--muted); }
nav a:is([aria-current="location"], :target-current), nav a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: .38rem; }
.menu-toggle { background: white; color: var(--blue); border: 1px solid var(--line); border-radius: 999px; min-height: 2.75rem; padding-inline: 1rem; font-weight: 600; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 3rem; padding: .77rem 1.25rem; border-radius: 999px; border: 1px solid transparent; text-align: center; text-decoration: none; font-weight: 600; font-size: .875rem; line-height: 1.4; transition: background-color .16s ease, color .16s ease; }
.button-dark { background: var(--blue); color: white; }
.button-dark:hover { background: #1d286c; }
.button-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.button-outline:hover { background: #fff; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.text-link { font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: .24em; overflow-wrap: anywhere; }
.text-link:hover { text-decoration-thickness: 2px; }
.section-action { margin-top: 1.15rem; }

.hero { position: relative; isolation: isolate; background: var(--pale); }
.hero-inner { min-height: clamp(32rem, 47vw, 42rem); display: grid; align-items: center; padding-block: clamp(3rem, 6vw, 6.5rem); }
.hero-media { position: absolute; inset: 0 0 0 34%; overflow: clip; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--pale), #edf5fb 4%, #edf5fb00 36%); }
.hero-copy { max-width: 53%; }
.kicker { color: var(--accent); font-size: .875rem; letter-spacing: .085em; font-weight: 700; line-height: 1.45; text-transform: uppercase; }
h1, h2, h3, h4 { font-family: var(--body); font-weight: 700; letter-spacing: -.035em; line-height: 1.12; }
h1 { color: var(--blue); font-family: var(--display); font-size: clamp(3.2rem, 1.4rem + 4.25vw, 6.2rem); line-height: .98; margin-block: .7rem 1.1rem; }
h1 em { display: block; color: var(--accent); font-style: normal; }
.hero-copy > p:not(.kicker) { max-width: 28rem; }
.hero .actions { margin-top: 1.45rem; }

.ways { background: white; border-bottom: 1px solid var(--line); }
.ways-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-block: 1.35rem; }
.way { display: flex; flex-direction: column; gap: .15rem; justify-content: center; padding: .55rem clamp(1.15rem, 3.3vw, 2.55rem); border-inline-start: 1px solid var(--line); background: white; text-decoration: none; font-size: .875rem; color: var(--muted); }
.way:first-child { border: 0; padding-inline-start: 0; }
.way:last-child { padding-inline-end: 0; }
.way-name { color: var(--blue); font-weight: 700; font-size: 1.02rem; text-decoration: underline; text-decoration-color: #8399c9; text-underline-offset: .22rem; }
.way:hover .way-name { text-decoration-color: var(--blue); }

.section { padding-block: clamp(3.4rem, 6.6vw, 6.2rem); }
h2 { font-size: clamp(2rem, 1.05rem + 2.5vw, 3.85rem); margin: .43rem 0 1rem; text-wrap: balance; }
h3 { font-size: clamp(1.25rem, 1rem + .85vw, 1.85rem); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .98fr); align-items: center; gap: clamp(1.8rem, 6.5vw, 6.2rem); }
.split p + p { margin-top: .8rem; }
.project { background: white; }
.project-media { aspect-ratio: 1.12; overflow: hidden; border-radius: 1.25rem; background: var(--pale); }
.project-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.section-pale { background: var(--pale); }
#places-title { font-size: clamp(2rem, 1.25rem + 1.65vw, 3.3rem); }
.note { color: var(--muted); }
.check-card { background: white; padding: clamp(1.15rem, 3vw, 2.2rem); border: 1px solid var(--line); border-radius: 1.25rem; }
.check-card > p { margin-top: .45rem; }
fieldset { display: grid; gap: .48rem; margin: .9rem 0 0; padding: 0; border: 0; min-width: 0; }
fieldset label { display: flex; align-items: flex-start; gap: .68rem; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: .65rem; cursor: pointer; }
fieldset label:has(:checked) { background: var(--pale); border-color: var(--accent); }
fieldset input { width: 1.15rem; height: 1.15rem; flex: none; margin: .2rem 0 0; accent-color: var(--blue); }
fieldset strong { display: block; line-height: 1.4; margin-bottom: .13rem; }
fieldset span { font-size: .875rem; }
.check-progress { margin-top: .88rem; }
progress { height: .53rem; width: 100%; border: none; border-radius: 999px; background: #e6edf9; accent-color: var(--blue); }
progress::-webkit-progress-bar { background: #e6edf9; border-radius: 999px; }
progress::-webkit-progress-value { background: var(--blue); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--blue); border-radius: 999px; }
#check-status { margin-top: .2rem; color: var(--blue); font-size: .875rem; font-weight: 600; }

.choices { display: flex; flex-wrap: wrap; gap: .45rem; }
.choices button { color: var(--blue); font-size: .875rem; font-weight: 600; border: 1px solid var(--line); background: white; padding: .5rem .92rem; min-height: 2.75rem; border-radius: 999px; }
.choices button:hover { background: #dce9fa; border-color: var(--accent); }
.choices button[aria-pressed="true"] { background: var(--blue); color: white; border-color: var(--blue); }
.adoption-intro { margin-bottom: 1.55rem; }
.adoption-intro h2 { font-family: var(--display); font-size: clamp(2.65rem, 1.25rem + 3.75vw, 5.1rem); line-height: 1; max-width: 14ch; }
.adoption-intro p:not(.kicker) { max-width: 39rem; }
.catalog-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem 1rem; margin-bottom: .9rem; padding-block: .65rem; border-top: 1px solid var(--line); }
.animal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.animal { min-width: 0; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 1.1rem; }
.animal img { aspect-ratio: 2 / 1; width: 100%; height: auto; object-fit: cover; object-position: center 44%; background: var(--pale); }
.animal[data-species="gato"] img { object-position: center 52%; }
.animal-body { padding: clamp(.9rem, 2.3vw, 1.45rem); }
.animal-body h4 { font-size: clamp(1.1rem, .95rem + .8vw, 1.55rem); }
details { margin-top: .35rem; }
summary { padding-block: .6rem; min-height: 2.75rem; cursor: pointer; color: var(--blue); font-size: .875rem; font-weight: 600; }
details p { padding-bottom: .25rem; }
.photo-note { color: var(--muted); font-size: .875rem; margin-top: .6rem; }

.donation { padding-top: 0; padding-bottom: 0; }
.donation-banner { display: grid; grid-template-columns: 1.06fr .94fr; position: relative; isolation: isolate; border-radius: 1.35rem; overflow: hidden; background: var(--pale); }
.donation-content { padding: clamp(1.35rem, 4.5vw, 3.65rem); }
.donation-content .choices { margin-block: 1.05rem .8rem; }
.donation-options { display: grid; gap: .65rem; min-height: 7rem; }
.donation-options h3 { font-size: 1.035rem; letter-spacing: -.01em; margin-bottom: .35rem; }
.donation-visual { position: relative; min-width: 0; }
.donation-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.donation-media[data-donation="insumos"][aria-hidden="true"] { opacity: 0; }
.contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 1.5rem 3rem; }
.contact h2 { margin-top: 0; text-wrap: initial; }
.contact-inner p { max-width: 39rem; }
.contact .actions { flex-direction: column; align-items: flex-start; }
.phone { font-size: .9rem; padding: .35rem .3rem; }

.site-footer { background: #e4eff9; color: var(--ink); border-top: 1px solid var(--line); }
.footer-brand { display: flex; width: fit-content; gap: clamp(.65rem, 2vw, 1.7rem); margin-inline: auto; padding-block: clamp(1.7rem, 4.5vw, 3.5rem); font-size: clamp(1.45rem, .8rem + 3.35vw, 3.4rem); }
.footer-brand img { width: clamp(4.45rem, 13vw, 11rem); }
.footer-inner { border-top: 1px solid #c3d3eb; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem 1.5rem; padding-block: 1.1rem; font-size: .875rem; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes reveal-copy {
    from { opacity: .65; transform: translateY(.85rem); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes hero-photo {
    from { opacity: .62; transform: scale(1.04); }
    to { opacity: 1; transform: scale(1); }
  }

  [data-reveal] {
    transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
  }

  [data-reveal-pending] {
    opacity: .82;
    transform: translateY(.5rem);
    transition: none;
  }

  [data-reveal]:focus-within {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero[data-hero-enter] .hero-copy > * { animation: reveal-copy 600ms var(--ease-out) backwards; }
  .hero[data-hero-enter] .hero-copy > h1 { animation-delay: 55ms; }
  .hero[data-hero-enter] .hero-copy > p:not(.kicker) { animation-delay: 110ms; }
  .hero[data-hero-enter] .hero-copy > .actions { animation-delay: 165ms; }
  .hero[data-hero-enter] .hero-media img { animation: hero-photo 600ms var(--ease-out) backwards; }

  .donation-visual[data-photo-transition] .donation-media[data-donation="insumos"] {
    transition: opacity 200ms var(--ease-out);
  }
}

@media (max-width: 61rem) {
  .wrap { width: calc(100% - 3rem); }
  .topbar { gap: .8rem; }
  .header-action { padding-inline: .85rem; white-space: nowrap; }
  .hero-inner { min-height: clamp(27rem, 52vw, 32rem); padding-block: 2.5rem; }
  .hero-copy { max-width: 47%; }
  h1 { font-size: clamp(2.75rem, .9rem + 4vw, 4.2rem); }
}
@media (max-width: 53rem) {
  .header-action { display: none; }
}
@media (max-width: 48rem) {
  :root { scroll-padding-top: 5.35rem; }
  .wrap { width: calc(100% - 2.15rem); }
  .topbar { flex-wrap: wrap; min-height: 4.3rem; padding-block: .45rem; }
  nav { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0 .6rem; }
  .hero { display: flex; flex-direction: column; }
  .hero-inner { order: -1; min-height: 0; padding-block: 2.15rem 1.2rem; }
  .hero-copy { max-width: min(100%, 34rem); }
  .hero-media { position: relative; z-index: auto; inset: auto; aspect-ratio: 1.24; }
  .hero-media img { object-position: center; }
  .hero-media::after { background: linear-gradient(var(--pale), #edf5fb00 20%); }
  .hero .actions { margin-top: 1rem; }
  .ways-grid { padding-block: .35rem; grid-template-columns: 1fr; }
  .way, .way:first-child, .way:last-child { padding: .7rem 0; border-inline-start: 0; border-top: 1px solid var(--line); }
  .way:first-child { border-top: 0; }
  .split, .donation-banner, .contact-inner { grid-template-columns: 1fr; }
  .donation-visual { grid-row: 1; aspect-ratio: 1.65; }
  .contact .actions { flex-direction: row; align-items: center; }
}
@media (max-width: 28rem) {
  h1 { font-size: clamp(2.75rem, 1.35rem + 6.7vw, 3.2rem); }
  .animal-grid { grid-template-columns: 1fr; }
  .hero .button { padding-inline: .88rem; }
}
