:root {
  --bg: #e6dfd4;
  --panel: #f5f1e8;
  --panel-soft: #f9f6ee;
  --ink: #1f1a15;
  --ink-muted: #5d564e;
  --brand: #131313;
  --accent: #cc9a2f;
  --line: #d8d0c2;
  --shadow-xl: 0 26px 80px rgba(43, 31, 19, 0.2);
  --shadow-md: 0 12px 30px rgba(43, 31, 19, 0.12);
  --radius-xl: 34px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 50% -8%, #f5f1e8 0, #e6dfd4 56%, #dfd5c7 100%);
  line-height: 1.6;
  padding: clamp(0.8rem, 2vw, 1.6rem);
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 52% 14%, rgba(204, 154, 47, 0.9), rgba(204, 154, 47, 0) 36%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.6), rgba(219, 208, 192, 0.6));
  z-index: -2;
}

.site-shell {
  max-width: 1180px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(245, 241, 232, 0.98), rgba(242, 236, 226, 0.98));
  border: 1px solid rgba(145, 130, 112, 0.18);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: clip;
}

.hero {
  padding: clamp(1rem, 2.2vw, 1.8rem) clamp(1rem, 2.3vw, 2rem) 0;
  background-image:
    linear-gradient(rgba(60, 45, 31, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 45, 31, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center;
}

.topbar {
  max-width: 780px;
  margin: 0 auto;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.35rem 0.4rem;
}

.brand {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0 0.75rem;
  white-space: nowrap;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.topbar-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  transition: background-color 0.22s ease, color 0.22s ease, transform 0.2s ease;
}

.topbar-links a:hover {
  background: #ece4d6;
  color: var(--ink);
  transform: translateY(-1px);
}

.anchor-tap {
  animation: anchorTap 0.34s ease;
}

.topbar-cta {
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  padding: 0.55rem 0.9rem;
  white-space: nowrap;
}

.hero-content {
  max-width: 760px;
  margin: clamp(2.5rem, 6vw, 4.2rem) auto 0;
  text-align: center;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
  color: #756859;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: -0.01em;
  margin-top: 0;
}

h1 {
  margin: 0.65rem 0 0.85rem;
  font-size: clamp(2.1rem, 6vw, 4.5rem);
  line-height: 0.95;
}

.lead {
  margin: 0 auto;
  max-width: 65ch;
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  color: var(--ink-muted);
}

.hero-actions,
.donation-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.45rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.78rem 1.18rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-secondary {
  background: #efebe2;
  border-color: #d7cebe;
  color: #2f2923;
}

.portada-frame {
  margin-top: clamp(1.8rem, 4vw, 2.8rem);
  padding: 0 0.8rem;
}

.portada-stack {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  max-width: 880px;
  margin: 0 auto;
  min-height: 240px;
  position: relative;
  padding-top: 0.5rem;
}

.portada-card {
  grid-row: 1;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: #d9cbb5;
  aspect-ratio: 4 / 3;
}

.portada-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portada-card:nth-child(1) {
  width: min(86%, 560px);
  justify-self: start;
  transform: rotate(-4deg) translateY(42px);
}

.portada-card:nth-child(2) {
  width: min(80%, 540px);
  justify-self: center;
  transform: translateY(0);
  z-index: 2;
}

.portada-card:nth-child(3) {
  width: min(86%, 560px);
  justify-self: end;
  transform: rotate(4deg) translateY(42px);
}

.section {
  padding: clamp(2rem, 4vw, 3.3rem) clamp(1rem, 2.2vw, 2rem);
  scroll-margin-top: 1.2rem;
}

.section.section-focus {
  animation: sectionFocus 0.9s ease;
}

.section h2 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  margin-bottom: 0.45rem;
}

.intro {
  max-width: 940px;
  margin: 0 auto;
}

.intro p {
  max-width: 70ch;
  color: #4f473f;
}

.donation {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr minmax(320px, 430px);
  align-items: start;
  background: linear-gradient(135deg, #eee5d5, #f6f1e9);
  border-top: 1px solid #d9ceb9;
  border-bottom: 1px solid #d9ceb9;
}

.donation-copy p {
  max-width: 60ch;
  color: #4f473f;
}

.donation-card {
  background: #fffaf3;
  border: 1px solid #ddd3c3;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1rem;
}

.donation-card h3 {
  margin-bottom: 0.45rem;
}

.donation-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.donation-card li {
  padding: 0.36rem 0;
  border-bottom: 1px dashed #ebdfcf;
  font-size: 0.95rem;
}

.donation-card li:last-child {
  border-bottom: 0;
}

.donation-card a {
  color: #2b251f;
  font-weight: 700;
}

.thanks {
  margin: 0.8rem 0 0;
  font-size: 0.93rem;
  color: #62574a;
}

.section-head {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.section-head p {
  margin: 0;
  color: #595147;
}

.gallery-sections {
  display: grid;
  gap: 1.6rem;
}

.gallery-group h3 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.gallery-item {
  position: relative;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #d7c9b4;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
  transform: scale(1);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.28s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item.is-pressing {
  animation: imagePress 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0;
  margin: 0;
  color: #fff;
  font-size: 0.84rem;
  padding: 0.84rem 0.72rem 0.62rem;
  background: linear-gradient(to top, rgba(20, 15, 9, 0.8), rgba(20, 15, 9, 0));
}

.footer {
  padding: 1.4rem 1rem 1.8rem;
  text-align: center;
  background: #1f1a15;
  color: #f4ede1;
}

.footer p {
  margin: 0.2rem;
}

.footer a {
  color: #ffcc72;
}

.lightbox {
  border: 0;
  padding: 0;
  width: min(94vw, 660px);
  background: transparent;
  overflow: visible;
}

.lightbox[open] .lightbox-card {
  animation: cardIn 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lightbox-card {
  position: relative;
  margin: 0;
  background: #f6f6f6;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 38px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
  padding: 0.9rem;
}

.lightbox-head {
  text-align: center;
  padding: 0.55rem 2rem 0.35rem;
}

.lightbox-head h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.65rem, 4.4vw, 2.2rem);
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.02em;
}

.lightbox-head p {
  margin: 0.16rem 0 0;
  color: #5e5e5e;
  font-size: 0.93rem;
}

.lightbox-media {
  border-radius: 30px;
  overflow: hidden;
  background: #d4d4d4;
  position: relative;
}

.lightbox-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 24%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0));
}

.lightbox-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 0.5rem 0.35rem;
}

.lightbox-status-dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: #56c174;
  box-shadow: 0 0 0 4px rgba(86, 193, 116, 0.22);
  flex-shrink: 0;
}

.lightbox-foot p {
  margin: 0;
  color: #303030;
  font-size: 0.92rem;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(3px);
}

.lightbox-close {
  position: absolute;
  top: 0.68rem;
  right: 0.9rem;
  border: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  color: #0f0f0f;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox img {
  width: 100%;
  max-height: min(62vh, 680px);
  object-fit: cover;
  display: block;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.2);
}

.reveal {
  opacity: 1;
  transform: none;
}

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.js-enabled .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes anchorTap {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(0.94);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes imagePress {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(0.96);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes sectionFocus {
  0% {
    background-color: rgba(255, 255, 255, 0);
  }
  42% {
    background-color: rgba(255, 255, 255, 0.56);
  }
  100% {
    background-color: rgba(255, 255, 255, 0);
  }
}

@keyframes cardIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1020px) {
  .donation {
    grid-template-columns: 1fr;
  }

  .donation-card {
    max-width: 540px;
  }
}

@media (max-width: 760px) {
  body {
    padding: 0.35rem;
  }

  .site-shell {
    border-radius: 22px;
  }

  .hero {
    background-size: 34px 34px;
  }

  .topbar {
    border-radius: 18px;
    padding: 0.58rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand {
    width: 100%;
    text-align: center;
    padding: 0;
  }

  .topbar-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .topbar-cta {
    width: 100%;
    text-align: center;
  }

  .portada-card {
    border-radius: 24px;
  }

  .portada-stack {
    max-width: 560px;
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.72rem;
    padding: 0;
  }

  .portada-card {
    grid-row: auto;
    width: 100% !important;
    transform: none !important;
    justify-self: auto !important;
  }

  .portada-card:nth-child(2) {
    grid-column: 1 / -1;
    order: -1;
  }

  .lightbox-card {
    border-radius: 28px;
    padding: 0.75rem;
  }

  .lightbox-media {
    border-radius: 22px;
  }

  .lightbox img {
    max-height: 58vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
