/* ============================================================
   Spay the Strays — Costa Rica cat & dog rescue
   Aesthetic: warm tropical sanctuary. Jungle green + terracotta
   + golden light on a sand-cream ground. Fraunces display serif.
   ============================================================ */

:root {
  /* palette */
  --sand:        #FBF5EA;
  --sand-2:      #F4E8D2;
  --cream-card:  #FFFCF6;
  --ink:         #25302A;
  --ink-soft:    #5C6B61;
  --jungle:      #1F6B4A;
  --jungle-deep: #134734;
  --jungle-soft: #E1EDE2;
  --clay:        #E0703B;
  --clay-deep:   #C75A29;
  --gold:        #F2B441;
  --leaf-line:   rgba(31,107,74,.16);

  /* type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;

  /* space + shape */
  --r-lg: 32px;
  --r-md: 20px;
  --r-sm: 12px;
  --shadow: 0 18px 50px -22px rgba(19,71,52,.45);
  --shadow-soft: 0 10px 30px -16px rgba(19,71,52,.35);
  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
html.lang-es .en { display: none; }
html:not(.lang-es) .es { display: none; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* faint topographic warmth + grain */
  background-image:
    radial-gradient(1200px 600px at 85% -5%, #FCEFD6 0%, rgba(252,239,214,0) 60%),
    radial-gradient(900px 500px at -10% 12%, #EAF1E6 0%, rgba(234,241,230,0) 55%);
  background-attachment: fixed;
}

/* grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; z-index: 2; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.04; letter-spacing: -.01em; color: var(--ink); }
.eyebrow {
  font-family: var(--body); font-weight: 800; font-size: .78rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--clay-deep);
  display: inline-flex; align-items: center; gap: .55em;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--clay); border-radius: 2px; }
.accent { color: var(--jungle); font-style: italic; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--clay); --fg: #fff;
  display: inline-flex; align-items: center; gap: .6em;
  background: var(--bg); color: var(--fg);
  font-family: var(--body); font-weight: 800; font-size: 1rem;
  padding: .92em 1.5em; border-radius: 999px; border: none; cursor: pointer;
  box-shadow: 0 12px 24px -12px rgba(224,112,59,.8);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -12px rgba(224,112,59,.85); background: var(--clay-deep); }
.btn:active { transform: translateY(-1px); }
.btn .heart { width: 1.05em; height: 1.05em; }
.btn--ghost { --bg: transparent; --fg: var(--jungle-deep); box-shadow: none; border: 2px solid rgba(31,107,74,.28); }
.btn--ghost:hover { background: var(--jungle); --fg: #fff; border-color: var(--jungle); box-shadow: var(--shadow-soft); }
.btn--green { --bg: var(--jungle); box-shadow: 0 12px 24px -12px rgba(31,107,74,.8); }
.btn--green:hover { background: var(--jungle-deep); }
.btn--lg { font-size: 1.08rem; padding: 1.05em 1.8em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px,4vw,40px);
  transition: background .3s, box-shadow .3s, padding .3s;
}
.site-header.scrolled {
  background: rgba(251,245,234,.86); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(31,107,74,.1), 0 12px 30px -24px rgba(19,71,52,.5);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; border-radius: 13px; box-shadow: var(--shadow-soft); }
.brand b { font-family: var(--display); font-weight: 600; font-size: 1.32rem; letter-spacing: -.01em; }
.brand b .g { color: var(--jungle); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-weight: 600; font-size: .98rem; color: var(--ink); position: relative; padding: 4px 0; transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--clay); border-radius: 2px; transition: width .25s var(--ease); }
.nav a:hover { color: var(--jungle); }
.nav a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 14px; }

/* language toggle */
.lang-toggle {
  display: inline-flex; background: rgba(31,107,74,.1); border-radius: 999px; padding: 3px; font-weight: 800; font-size: .82rem;
}
.lang-toggle button {
  border: none; background: transparent; cursor: pointer; color: var(--jungle-deep);
  padding: .35em .8em; border-radius: 999px; font-family: var(--body); font-weight: 800; letter-spacing: .03em; transition: .2s;
}
.lang-toggle button[aria-pressed="true"] { background: var(--jungle); color: #fff; box-shadow: var(--shadow-soft); }

.menu-btn { display: none; }

/* ---------- hero ---------- */
.hero { padding: clamp(28px,6vw,70px) 0 clamp(60px,8vw,110px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px,5vw,70px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin: 18px 0 0; }
.hero .lead { margin: 22px 0 30px; max-width: 30ch; font-size: 1.22rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { margin-top: 22px; display: inline-flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: .96rem; font-weight: 600; }
.hero-note .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(242,180,65,.25); }

/* hero photo cluster (placeholder panels) */
.hero-art { position: relative; min-height: 420px; }
.ph {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(150deg, var(--jungle-soft), #cfe3d3);
  box-shadow: var(--shadow); border: 6px solid #fff;
  display: grid; place-items: center;
}
.ph[data-label]::after {
  content: attr(data-label); position: absolute; bottom: 12px; left: 12px;
  font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--jungle-deep); background: rgba(255,255,255,.78); padding: .3em .7em; border-radius: 999px;
}
.ph::before {
  content: ""; position: absolute; inset: 0; opacity: .3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23134734'%3E%3Cellipse cx='32' cy='44' rx='13' ry='10'/%3E%3Cellipse cx='16.5' cy='32' rx='5' ry='6.6'/%3E%3Cellipse cx='25.5' cy='24.5' rx='5' ry='6.8'/%3E%3Cellipse cx='38.5' cy='24.5' rx='5' ry='6.8'/%3E%3Cellipse cx='47.5' cy='32' rx='5' ry='6.6'/%3E%3C/svg%3E") center / 40% no-repeat;
}
.ph svg.pawmark { width: 46%; opacity: .5; }
.ph.photo-filled { background-size: cover; background-repeat: no-repeat; }
.ph.photo-filled::before { display: none; }
.hero-art .a1.photo-filled { background-position: center 45%; }
.hero-art .a2.photo-filled { background-position: center; }
.ph--clay { background: linear-gradient(150deg, #F6D8BE, #EAB38C); }
.ph--clay::after { color: var(--clay-deep); }
.ph--gold { background: linear-gradient(150deg, #FBE6B4, #F2C463); }

.hero-art .a1 { position: absolute; top: 0; right: 4%; width: 62%; height: 300px; transform: rotate(2.5deg); z-index: 2; }
.hero-art .a2 { position: absolute; bottom: 0; left: 0; width: 52%; height: 230px; transform: rotate(-3deg); z-index: 3; }
.hero-art .a3 { position: absolute; bottom: 38%; right: 0; width: 30%; height: 120px; transform: rotate(4deg); z-index: 1; }
.badge-float {
  position: absolute; z-index: 5; bottom: 8%; right: 8%;
  background: #fff; border-radius: var(--r-md); padding: 14px 18px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px; transform: rotate(-2deg);
}
.badge-float .num { font-family: var(--display); font-weight: 700; font-size: 1.7rem; color: var(--clay); line-height: 1; }
.badge-float small { display: block; font-size: .72rem; font-weight: 700; color: var(--ink-soft); }

/* floating leaves */
.leaf { position: absolute; z-index: 1; pointer-events: none; opacity: .9; }
.leaf svg { width: 100%; height: 100%; }
.leaf.l1 { top: 6%; left: -40px; width: 150px; animation: sway 9s var(--ease) infinite; }
.leaf.l2 { bottom: -30px; right: -30px; width: 180px; transform: scaleX(-1); animation: sway 11s var(--ease) infinite reverse; }
@keyframes sway { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg); } }

/* ---------- section heading ---------- */
.sec-head { max-width: 640px; margin-bottom: 46px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 { font-size: clamp(2rem, 4vw, 3rem); margin-top: 14px; }
.sec-head p { margin-top: 16px; font-size: 1.1rem; color: var(--ink-soft); }
.pad { padding: clamp(56px,8vw,104px) 0; }

/* ---------- mission ---------- */
.mission .wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(30px,5vw,64px); align-items: center; }
.mission-card {
  background: var(--cream-card); border-radius: var(--r-lg); padding: clamp(26px,4vw,46px);
  box-shadow: var(--shadow); border: 1px solid rgba(31,107,74,.08); position: relative;
}
.mission-card .quote { font-family: var(--display); font-size: clamp(1.5rem,2.6vw,2.15rem); line-height: 1.3; color: var(--jungle-deep); }
.mission-card .quote .accent { font-style: italic; color: var(--clay); }
.mission-card .sign { margin-top: 22px; font-weight: 700; color: var(--ink-soft); }
.mission-art { position: relative; min-height: 340px; }
.mission-art .ph { position: absolute; inset: 0; height: 100%; }
.mission-art .stamp {
  position: absolute; z-index: 4; bottom: -22px; left: -18px;
  width: 92px; height: 92px; border-radius: 50%; background: var(--gold);
  display: grid; place-items: center; text-align: center; box-shadow: var(--shadow);
  font-family: var(--display); font-weight: 700; color: var(--jungle-deep); font-size: .82rem; line-height: 1.1;
  transform: rotate(-8deg);
}

/* ---------- what we do ---------- */
.cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.card {
  background: var(--cream-card); border-radius: var(--r-lg); padding: 34px 30px;
  box-shadow: var(--shadow-soft); border: 1px solid rgba(31,107,74,.08);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.card .ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--jungle-soft); margin-bottom: 22px; }
.card .ic svg { width: 32px; height: 32px; stroke: var(--jungle); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card:nth-child(2) .ic { background: #F6E0CF; } .card:nth-child(2) .ic svg { stroke: var(--clay-deep); }
.card:nth-child(3) .ic { background: #FBEEC8; } .card:nth-child(3) .ic svg { stroke: #B7891F; }
.card h3 { font-size: 1.4rem; margin-bottom: 10px; }
.card p { color: var(--ink-soft); }

/* ---------- impact strip ---------- */
.impact { background: var(--jungle-deep); color: #fff; border-radius: 0; overflow: hidden; position: relative; }
.impact::before, .impact::after { content: ""; position: absolute; border-radius: 50%; opacity: .5; }
.impact::before { width: 360px; height: 360px; background: radial-gradient(circle, rgba(242,180,65,.4), transparent 70%); top: -120px; right: -60px; }
.impact::after { width: 300px; height: 300px; background: radial-gradient(circle, rgba(224,112,59,.4), transparent 70%); bottom: -120px; left: -40px; }
.impact .wrap { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; position: relative; z-index: 2; }
.stat { text-align: center; padding: 8px; }
.stat .n { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem,5vw,3.6rem); color: var(--gold); line-height: 1; }
.stat .n .plus { color: #fff; }
.stat p { margin-top: 8px; font-weight: 700; color: rgba(255,255,255,.82); font-size: .98rem; }
.impact .disclaimer { grid-column: 1/-1; text-align: center; margin-top: 6px; font-size: .8rem; color: rgba(255,255,255,.5); }

/* ---------- rescues gallery ---------- */
.rescues .grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; }
.pet {
  background: var(--cream-card); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-soft); border: 1px solid rgba(31,107,74,.08);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.pet:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.pet .photo { aspect-ratio: 1/1; position: relative; }
.pet .photo.ph { border: none; border-radius: 0; }
.pet .tag {
  position: absolute; top: 12px; left: 12px; z-index: 3; background: var(--clay); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .32em .7em; border-radius: 999px;
}
.pet .photo.ph::after { content: none; }
.pet .body { padding: 18px 20px 22px; }
.pet .body h3 { font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
.pet .body h3 .sx { font-size: 1rem; }
.pet .meta { color: var(--ink-soft); font-size: .92rem; margin-top: 2px; }
.pet .more { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--jungle); font-size: .92rem; }
.pet .more svg { width: 16px; height: 16px; transition: transform .2s; }
.pet:hover .more svg { transform: translateX(4px); }
.rescues .foot { text-align: center; margin-top: 44px; }

/* ---------- ways to help ---------- */
.help { background: linear-gradient(180deg, var(--sand), var(--sand-2)); }
.help .grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: auto auto; gap: 20px; }
.help-tile {
  background: var(--cream-card); border-radius: var(--r-lg); padding: 30px;
  box-shadow: var(--shadow-soft); border: 1px solid rgba(31,107,74,.08);
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.help-tile:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.help-tile h3 { font-size: 1.4rem; }
.help-tile p { color: var(--ink-soft); }
.help-tile .ic { width: 50px; height: 50px; border-radius: 14px; background: var(--jungle-soft); display: grid; place-items: center; }
.help-tile .ic svg { width: 26px; height: 26px; stroke: var(--jungle); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.help-tile--feature {
  grid-row: 1/3; background: var(--jungle); color: #fff; justify-content: center; gap: 14px;
  position: relative; overflow: hidden;
}
.help-tile--feature::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(242,180,65,.35), transparent 70%); bottom: -90px; right: -60px; }
.help-tile--feature h3 { font-size: clamp(1.8rem,3vw,2.4rem); color: #fff; position: relative; }
.help-tile--feature p { color: rgba(255,255,255,.85); position: relative; }
.help-tile--feature .ic { background: rgba(255,255,255,.16); } .help-tile--feature .ic svg { stroke: #fff; }
.help-tile--feature .btn { position: relative; align-self: flex-start; }

/* ---------- contact / footer ---------- */
.contact .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px,5vw,64px); align-items: center; }
.contact h2 { font-size: clamp(2rem,4vw,3rem); }
.contact .lead { margin: 16px 0 28px; }
.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-list a, .contact-list span { display: inline-flex; align-items: center; gap: 14px; font-weight: 600; color: var(--ink); }
.contact-list .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--cream-card); box-shadow: var(--shadow-soft); display: grid; place-items: center; flex: 0 0 44px; }
.contact-list .ic svg { width: 22px; height: 22px; stroke: var(--jungle); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-list a:hover { color: var(--jungle); }
.contact-card {
  background: var(--jungle-deep); color: #fff; border-radius: var(--r-lg); padding: clamp(30px,4vw,48px);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.contact-card::before { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(224,112,59,.4), transparent 70%); top: -110px; left: -60px; }
.contact-card h3 { color: #fff; font-size: 1.8rem; position: relative; }
.contact-card p { color: rgba(255,255,255,.85); margin: 12px 0 24px; position: relative; }
.contact-card .btn { position: relative; }
.contact-card .leaf-deco { position: absolute; right: -10px; bottom: -10px; width: 150px; opacity: .25; }

footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 50px 0 30px; position: relative; z-index: 2; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
footer .brand b { color: #fff; }
footer .brand b .g { color: var(--gold); }
footer .fnav { display: flex; gap: 24px; flex-wrap: wrap; }
footer .fnav a:hover { color: #fff; }
footer .copy { width: 100%; border-top: 1px solid rgba(255,255,255,.12); margin-top: 14px; padding-top: 22px; font-size: .86rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

/* hero load animation */
.hero .anim { opacity: 0; transform: translateY(20px); animation: rise .9s var(--ease) forwards; }
.hero .anim.h2d { animation-delay: .12s; } .hero .anim.h3d { animation-delay: .22s; } .hero .anim.h4d { animation-delay: .32s; } .hero .anim.h5d { animation-delay: .42s; }
.hero-art { opacity: 0; animation: rise 1s var(--ease) .25s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero .wrap, .mission .wrap, .contact .wrap { grid-template-columns: 1fr; }
  .hero-art { min-height: 360px; order: -1; }
  .mission-art { min-height: 300px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .impact .wrap { grid-template-columns: 1fr 1fr; }
  .rescues .grid { grid-template-columns: 1fr 1fr; }
  .help .grid { grid-template-columns: 1fr 1fr; }
  .help-tile--feature { grid-row: auto; grid-column: 1/-1; }
  .nav { display: none; }
  .menu-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: none; background: rgba(31,107,74,.1); cursor: pointer; }
  .menu-btn svg { width: 24px; height: 24px; stroke: var(--jungle-deep); stroke-width: 2.2; }
  .site-header.nav-open { background: rgba(251,245,234,.96); backdrop-filter: blur(12px); box-shadow: var(--shadow-soft); }
  .site-header.nav-open .nav {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0; padding: 12px clamp(16px,4vw,40px) 22px;
    background: rgba(251,245,234,.98); backdrop-filter: blur(12px);
    box-shadow: 0 20px 30px -20px rgba(19,71,52,.5);
  }
  .site-header.nav-open .nav a { width: 100%; padding: 12px 0; font-size: 1.1rem; border-bottom: 1px solid rgba(31,107,74,.1); }
}
@media (max-width: 560px) {
  .cards, .impact .wrap, .rescues .grid, .help .grid { grid-template-columns: 1fr; }
  .brand b { font-size: 1.1rem; }
  .header-actions .btn { display: none; }
  .hero h1 { font-size: clamp(2.3rem,9vw,3rem); }
  footer .copy { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero .anim, .hero-art { opacity: 1; transform: none; }
}
