:root {
  color-scheme: light;
  --ink: #18382e;
  --muted: #52665d;
  --paper: #fbfaf6;
  --white: #fff;
  --line: #d9e1d9;
  --green-soft: #e8efe2;
  --green-light: #f0f4ed;
  --red-dark: #762d27;
  --red-soft: #faeee9;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--sans); }
a { color: inherit; }
button, textarea, input, select { font: inherit; }
input, select, textarea { min-width: 0; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #247956; outline-offset: 4px; }
[id] { scroll-margin-top: 1.25rem; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.1; }
p { margin: 0; }
.shell { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 10; inset: .5rem auto auto .5rem; transform: translateY(-200%); padding: .65rem 1rem; background: var(--white); }
.skip-link:focus { transform: none; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 4.65rem; }
.brand { display: inline-flex; align-items: center; gap: .28rem; text-decoration: none; font-size: 1.15rem; letter-spacing: -.04em; font-weight: 600; white-space: nowrap; }
.brand-icon { position: relative; display: inline-grid; width: 2rem; height: 2rem; margin-right: .38rem; place-items: center; border-radius: .65rem; background: var(--ink); color: #eff4df; }
.brand-icon i, .fallback-paw i { position: relative; display: block; width: 47%; height: 33%; margin-top: 28%; background: currentColor; border-radius: 56% 56% 43% 43%; }
.brand-icon i::before, .fallback-paw i::before { position: absolute; content: ""; inset: -71% auto auto 10%; width: 26%; height: 62%; background: currentColor; border-radius: 60%; box-shadow: .37em -.02em currentColor, -.26em .35em currentColor, .61em .35em currentColor; }
nav { display: flex; gap: 1.6rem; margin-inline: auto; }
nav a, .header-emergency, footer a { text-decoration: none; font-size: .92rem; font-weight: 650; }
nav a:hover, footer a:hover { text-decoration: underline; }
.header-emergency { color: var(--red-dark); background: var(--red-soft); border-radius: 2rem; padding: .5rem .85rem; white-space: nowrap; }
.header-emergency:hover { background: #f5ded5; }
.header-emergency span { margin-right: .2rem; }

.hero { background: #e7eee0; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(1.3rem, 5vw, 4.5rem); padding-block: clamp(2.3rem, 6vw, 5rem); }
.hero-label { display: flex; align-items: center; gap: .55rem; color: #335446; font-size: .71rem; font-weight: 750; letter-spacing: .12em; }
.hero-label span { width: .48rem; height: .48rem; border-radius: 50%; background: #527858; }
.hero h1 { max-width: 12ch; margin-top: 1rem; font-size: clamp(3rem, 6vw, 5.1rem); line-height: .99; letter-spacing: -.057em; }
.hero-copy p { max-width: 39ch; margin-top: 1.25rem; color: #3d554a; font-size: clamp(1rem, 1.7vw, 1.12rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-top: 1.55rem; }
.button { min-height: 2.85rem; display: inline-flex; justify-content: center; align-items: center; gap: .7rem; padding: .62rem 1.08rem; border: 1px solid transparent; border-radius: .6rem; text-decoration: none; font-weight: 650; font-size: .92rem; }
.button-primary { background: var(--ink); color: var(--white); }
.button-primary:hover { background: #285447; }
.button-primary:disabled { cursor: wait; opacity: .7; }
.button-quiet { background: transparent; border-color: #acbeb0; color: var(--ink); }
.button-quiet:hover { background: rgba(255, 255, 255, .5); }
.hero-visual { position: relative; display: grid; min-height: 17rem; aspect-ratio: 1.34; place-items: center; overflow: hidden; border-radius: 1.05rem; isolation: isolate; background: radial-gradient(ellipse at 65% 35%, #80977b 4%, #54745e 41%, #345849 77%); }
.hero-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fallback-paw { display: grid; place-items: center; width: 55%; aspect-ratio: 1; border: 1px solid #a4b99c; border-radius: 50%; color: #e5edcf; font-size: clamp(3.35rem, 8.3vw, 7.25rem); transform: rotate(-12deg); }

.urgent-band { background: var(--red-soft); color: var(--red-dark); border-bottom: 1px solid #efdcd4; }
.urgent-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding-block: 1rem; }
.alert-icon { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; align-self: start; border-radius: .6rem; background: #f4ddd3; font-weight: 750; }
.urgent-inner h2 { font: 750 .98rem/1.3 var(--sans); }
.urgent-inner p { margin-top: .14rem; color: #6b453d; font-size: .9rem; }
.urgent-inner strong { max-width: 20ch; font-size: .9rem; line-height: 1.35; }

.section { padding-block: clamp(2.85rem, 6.5vw, 5.3rem); }
.section-intro h2 { font-size: clamp(2.25rem, 4.6vw, 3.65rem); letter-spacing: -.045em; }
.section-intro p { max-width: 58ch; margin-top: .65rem; color: var(--muted); }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(0, 1fr); gap: 1.25rem; margin-top: 1.6rem; align-items: start; }
.form-card, .result-card, .visit-card { border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1.1rem, 3vw, 2rem); }
.form-card, .result-card { background: var(--white); }
.field { display: grid; gap: .38rem; }
.field label, legend { font-weight: 700; color: var(--ink); font-size: .92rem; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #b8c8be; border-radius: .55rem; background: var(--white); color: var(--ink); padding: .7rem .78rem; }
.field input::placeholder, .field textarea::placeholder { color: #617168; opacity: 1; }
.field textarea { resize: vertical; min-height: 7rem; }
.field-help, .form-scope { color: var(--muted); font-size: .86rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .65rem; margin-top: 1.2rem; }
fieldset { margin: 1.35rem 0 0; padding: 1rem 0 0; border: 0; border-top: 1px solid var(--line); }
legend { padding: 0 .55rem 0 0; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin-top: .7rem; }
.checks label { display: flex; align-items: center; gap: .58rem; min-height: 2.7rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: .5rem; color: #334e42; font-size: .84rem; cursor: pointer; }
.checks label:has(:checked) { border-color: #a35c52; color: var(--red-dark); background: var(--red-soft); }
.checks input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--ink); }
.local-alert { margin-top: .75rem; padding: .7rem .8rem; background: var(--red-soft); color: var(--red-dark); border-radius: .5rem; font-weight: 650; font-size: .89rem; }
.form-scope { margin-block: 1.2rem .8rem; }
.form-status { margin-top: .65rem; color: var(--muted); font-size: .88rem; }
.form-status:empty, .local-alert:empty { margin: 0; padding: 0; }
.form-status[data-error] { color: var(--red-dark); font-weight: 650; }
.result-column { display: grid; gap: 1rem; min-width: 0; }
.visit-card { background: var(--green-light); }
.visit-icon { display: grid; width: 2.55rem; height: 2.55rem; place-items: center; margin-bottom: .8rem; border-radius: .65rem; background: #dfebdb; font-size: 1.28rem; }
.visit-card h3, .result-card h3 { font-size: 1.75rem; letter-spacing: -.035em; }
.visit-card p, .result-card p, .result-card li { color: #3f5a4d; font-size: .94rem; }
.visit-card p, .result-card h3 + p { margin-top: .65rem; }
.result-card[data-urgencia="emergencia"] { border-color: #ae7267; background: #fff8f5; }
.result-card[data-urgencia="emergencia"] h3 { color: var(--red-dark); }
.result-card[data-urgencia="prioritaria"] { border-color: #a5894d; background: #fffaf0; }
.result-card .result-mode { margin-bottom: .55rem; font-weight: 700; font-size: .79rem; }
.result-card h4 { margin: 1rem 0 .25rem; font-size: .93rem; }
.result-card ul, .catalog-detail ul { margin: 0; padding-left: 1.3rem; }
.result-card li + li, .catalog-detail li + li { margin-top: .22rem; }
.related a, .catalog-detail a { text-underline-offset: .2em; overflow-wrap: anywhere; }

.catalog-section { background: var(--green-light); border-top: 1px solid var(--line); }
.catalog-heading { display: grid; grid-template-columns: minmax(0, 2fr) minmax(13rem, 1fr); gap: 1.3rem; align-items: end; }
.catalog-status { margin-block: 1.15rem .75rem; color: var(--muted); font-size: .88rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: .8rem; }
.catalog-card { background: var(--white); border: 1px solid var(--line); border-radius: .8rem; min-width: 0; }
.catalog-card summary { padding: 1.1rem; cursor: pointer; list-style: none; }
.catalog-card summary::-webkit-details-marker { display: none; }
.catalog-card summary:hover { background: #f7faf6; border-radius: inherit; }
.catalog-card summary:focus-visible { border-radius: inherit; }
.catalog-category { display: block; margin-bottom: .5rem; color: #436650; font-size: .75rem; font-weight: 700; }
.catalog-name { display: flex; align-items: baseline; gap: .45rem; justify-content: space-between; font: 500 1.45rem/1.15 var(--serif); overflow-wrap: anywhere; }
.catalog-name::after { content: '+'; color: #436650; font: 600 1.15rem var(--sans); }
.catalog-card[open] .catalog-name::after { content: '−'; }
.catalog-summary { display: block; margin-top: .65rem; color: var(--muted); font-size: .88rem; }
.catalog-detail { padding: 0 1.1rem 1.1rem; font-size: .88rem; }
.catalog-detail h3 { margin: .75rem 0 .28rem; font: 700 .91rem/1.4 var(--sans); }
.catalog-detail h3:first-child { padding-top: .7rem; border-top: 1px solid var(--line); }

footer { background: var(--ink); color: #edf2e8; }
.footer-inner { display: flex; min-height: 5.4rem; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.footer-inner p { color: #c3d5c8; font-size: .83rem; }
.footer-inner .brand-icon { background: #e4ecdc; color: var(--ink); }

@media (max-width: 880px) {
  .work-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .shell { width: min(100% - 2rem, 33rem); }
  .header-inner { gap: .65rem; min-height: 3.9rem; flex-wrap: wrap; justify-content: space-between; padding-block: .55rem; }
  nav { margin-inline: 0; gap: .75rem; }
  nav a, .header-emergency { font-size: .82rem; }
  .header-emergency { padding: .38rem .53rem; }
  .hero-inner, .work-grid, .catalog-heading { grid-template-columns: 1fr; }
  .hero-inner { gap: 1.45rem; }
  .hero-visual { min-height: 0; aspect-ratio: 1.65; }
  .urgent-inner { grid-template-columns: auto minmax(0, 1fr); gap: .5rem .75rem; }
  .urgent-inner strong { grid-column: 2; max-width: 100%; }
  .catalog-heading { gap: .9rem; }
  .footer-inner { flex-wrap: wrap; gap: .5rem 1rem; }
}
@media (max-width: 420px) {
  .header-inner nav { order: 3; width: 100%; }
  .header-inner { gap: .3rem .6rem; }
  .field-row { grid-template-columns: 1fr; }
  .checks, .catalog-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
