:root {
  --cream: #fffaf1;
  --paper: #fffdf8;
  --ink: #183f32;
  --brand-green: #24523e;
  --muted: #6d7b72;
  --green: #4f7c63;
  --green-deep: #24523e;
  --pink: #f493b5;
  --pink-soft: #fde3ec;
  --gold: #ffca4c;
  --blue: #27677f;
  --line: rgba(36, 82, 62, 0.16);
  --shadow: 0 22px 70px rgba(24, 63, 50, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

body.intro-active {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.brand-name {
  color: var(--brand-green);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 28%, rgba(244, 147, 181, 0.22), transparent 18rem),
    linear-gradient(180deg, #fffdf8 0%, #fff5e6 100%);
  transition: opacity 700ms ease, visibility 700ms ease;
}

.intro.is-done {
  opacity: 0;
  visibility: hidden;
}

.intro__inner {
  width: min(88vw, 21rem);
  text-align: center;
}

.intro__pieces {
  position: relative;
  width: min(78vw, 18rem);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  filter: drop-shadow(0 24px 40px rgba(36, 82, 62, 0.16));
}

.piece {
  position: absolute;
  width: 33.333%;
  height: 33.333%;
  background-image: url("/ayudalutalogo.jpg");
  background-repeat: no-repeat;
  background-size: 300% 300%;
  opacity: 0;
  transform: translate(var(--start-x), var(--start-y)) rotate(var(--start-rotate)) scale(0.82);
  animation: assemble 5200ms cubic-bezier(0.2, 0.9, 0.18, 1) forwards;
  animation-delay: var(--delay);
}

.piece--1 { left: 0; top: 0; background-position: 0 0; --start-x: -46vw; --start-y: -30vh; --start-rotate: -18deg; --delay: 260ms; }
.piece--2 { left: 33.333%; top: 0; background-position: 50% 0; --start-x: 2vw; --start-y: -42vh; --start-rotate: 12deg; --delay: 520ms; }
.piece--3 { left: 66.666%; top: 0; background-position: 100% 0; --start-x: 44vw; --start-y: -24vh; --start-rotate: 16deg; --delay: 780ms; }
.piece--4 { left: 0; top: 33.333%; background-position: 0 50%; --start-x: -50vw; --start-y: 2vh; --start-rotate: 22deg; --delay: 1040ms; }
.piece--5 { left: 33.333%; top: 33.333%; background-position: 50% 50%; --start-x: 0; --start-y: 38vh; --start-rotate: -10deg; --delay: 1300ms; }
.piece--6 { left: 66.666%; top: 33.333%; background-position: 100% 50%; --start-x: 48vw; --start-y: 4vh; --start-rotate: -22deg; --delay: 1560ms; }
.piece--7 { left: 0; top: 66.666%; background-position: 0 100%; --start-x: -38vw; --start-y: 35vh; --start-rotate: -14deg; --delay: 1820ms; }
.piece--8 { left: 33.333%; top: 66.666%; background-position: 50% 100%; --start-x: 4vw; --start-y: 48vh; --start-rotate: 18deg; --delay: 2080ms; }
.piece--9 { left: 66.666%; top: 66.666%; background-position: 100% 100%; --start-x: 40vw; --start-y: 34vh; --start-rotate: -18deg; --delay: 2340ms; }

@keyframes assemble {
  0% {
    opacity: 0;
    transform: translate(var(--start-x), var(--start-y)) rotate(var(--start-rotate)) scale(0.78);
  }
  28% {
    opacity: 1;
  }
  78% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
}

.intro__caption {
  margin: 1.1rem 0 0;
  color: var(--green-deep);
  font-size: clamp(0.78rem, 3.1vw, 0.88rem);
  font-weight: 900;
}

.intro__skip {
  margin-top: 1rem;
  min-height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--green-deep);
  padding: 0 1rem;
  font-weight: 800;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem clamp(0.75rem, 3.6vw, 3rem);
  border-bottom: 1px solid rgba(36, 82, 62, 0.1);
  background: rgba(255, 250, 241, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.56rem;
}

.brand img {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  object-fit: cover;
}

.brand span {
  display: grid;
  min-width: 0;
}

.brand strong {
  font-size: 0.94rem;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.header-action,
.button,
.market-card button,
.volunteer-card button,
.beta-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.header-action {
  background: var(--green-deep);
  color: white;
  min-height: 2.35rem;
  padding: 0 0.78rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.hero {
  position: relative;
  display: grid;
  min-height: auto;
  align-items: end;
  overflow: hidden;
  padding: clamp(0.9rem, 3.8vw, 3rem);
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.25), rgba(255, 250, 241, 1)),
    radial-gradient(circle at 12% 20%, rgba(39, 103, 127, 0.18), transparent 17rem),
    radial-gradient(circle at 92% 18%, rgba(244, 147, 181, 0.26), transparent 18rem);
}

.hero__media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0.16;
  overflow: hidden;
  pointer-events: none;
}

.hero__media img {
  width: min(88vw, 38rem);
  max-width: 100%;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100%, 54rem);
  padding-top: clamp(1.2rem, 4vh, 3.2rem);
  padding-bottom: clamp(1.1rem, 4vh, 3.2rem);
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  align-items: center;
  margin-bottom: 1rem;
}

.status-pill,
.timestamp {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  border-radius: 8px;
  padding: 0.34rem 0.58rem;
  font-size: clamp(0.62rem, 2.55vw, 0.72rem);
  font-weight: 900;
  line-height: 1.2;
}

.status-pill {
  background: var(--pink);
  color: #411527;
  text-transform: uppercase;
}

.timestamp {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--green-deep);
  max-width: 100%;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--blue);
  font-size: clamp(0.7rem, 2.8vw, 0.78rem);
  font-weight: 950;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  max-width: min(100%, 11.5ch);
  margin: 0;
  color: var(--green-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 10.5vw, 4.7rem);
  line-height: 0.98;
  text-wrap: balance;
}

.mission {
  max-width: 42rem;
  margin: 0.95rem 0 0;
  color: #385c4c;
  font-size: clamp(0.92rem, 3.7vw, 1.12rem);
  font-weight: 650;
  line-height: 1.56;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.button {
  min-width: min(100%, 12.5rem);
  padding: 0 1.1rem;
  line-height: 1.2;
  text-align: center;
}

.button--primary {
  background: var(--green-deep);
  color: white;
  box-shadow: 0 14px 30px rgba(36, 82, 62, 0.24);
}

.button--secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--green-deep);
}

.quick-nav {
  position: sticky;
  top: 3.6rem;
  z-index: 10;
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.58rem 0.8rem;
  border-bottom: 1px solid rgba(36, 82, 62, 0.1);
  background: rgba(255, 250, 241, 0.92);
  scrollbar-width: none;
}

.quick-nav::-webkit-scrollbar {
  display: none;
}

.quick-nav a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.5rem 0.68rem;
  color: var(--green-deep);
  font-size: clamp(0.7rem, 2.8vw, 0.78rem);
  font-weight: 900;
}

.section {
  padding: clamp(2.35rem, 8vw, 6rem) clamp(0.9rem, 4vw, 3rem);
}

.section--tinted {
  background:
    linear-gradient(180deg, rgba(244, 147, 181, 0.12), rgba(39, 103, 127, 0.08)),
    var(--paper);
}

.section__heading {
  max-width: 48rem;
  margin-bottom: 1.15rem;
}

.section__heading h2 {
  margin: 0;
  color: var(--green-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 7.6vw, 3.85rem);
  line-height: 1;
  text-wrap: balance;
}

.statement {
  max-width: 54rem;
  margin: 0;
  color: #304f43;
  font-size: clamp(1.08rem, 4.4vw, 2rem);
  font-weight: 760;
  line-height: 1.42;
}

.program-grid,
.market-grid,
.volunteer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.program-card,
.market-card,
.volunteer-card,
.artist-callout,
.beta-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 45px rgba(24, 63, 50, 0.08);
}

.program-card,
.volunteer-card {
  min-height: 0;
  padding: 1rem;
}

.volunteer-card {
  display: flex;
  flex-direction: column;
}

.volunteer-card__tag {
  display: inline-flex;
  align-self: flex-start;
  margin: 0;
  border-radius: 999px;
  background: var(--pink-soft);
  padding: 0.3rem 0.55rem;
  color: #704158;
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
}

.volunteer-intro {
  max-width: 44rem;
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-weight: 760;
  font-size: clamp(0.86rem, 3.4vw, 0.95rem);
  line-height: 1.5;
}

.volunteer-card button {
  width: 100%;
  margin-top: 1rem;
  background: var(--green-deep);
  color: white;
  font-size: 0.86rem;
}

.volunteer-card p:not(.volunteer-card__tag) {
  flex-grow: 1;
}

.program-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--gold);
  color: #3a2a00;
  font-size: 0.75rem;
  font-weight: 950;
}

.program-card h3,
.market-card h3,
.volunteer-card h3 {
  margin: 0.9rem 0 0.45rem;
  color: var(--green-deep);
  font-size: clamp(0.98rem, 4vw, 1.1rem);
  line-height: 1.18;
}

.program-card p,
.market-card p,
.volunteer-card p,
.artist-callout p {
  color: var(--muted);
  font-size: clamp(0.86rem, 3.4vw, 0.96rem);
  line-height: 1.5;
}

.marketplace {
  background: var(--cream);
}

.market-grid {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(min(78vw, 17rem), 1fr);
  overflow-x: auto;
  padding: 0 0.1rem 0.45rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.market-grid::-webkit-scrollbar {
  display: none;
}

.market-card {
  min-width: min(78vw, 17rem);
  overflow: hidden;
  scroll-snap-align: start;
}

.market-card__art {
  position: relative;
  min-height: clamp(7.6rem, 34vw, 9.5rem);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(244, 147, 181, 0.26), rgba(255, 202, 76, 0.3));
}

.market-card__art span,
.market-card__art::before,
.market-card__art::after {
  position: absolute;
  content: "";
  display: block;
}

.market-card__art span {
  inset: 1.5rem 2.2rem;
  border-radius: 50%;
  border: 0.7rem solid rgba(79, 124, 99, 0.75);
}

.market-card__art::before {
  width: 5rem;
  height: 5rem;
  left: 1.1rem;
  bottom: 1rem;
  border-radius: 999px 999px 999px 0;
  background: rgba(244, 147, 181, 0.9);
  transform: rotate(-18deg);
}

.market-card__art::after {
  width: 7rem;
  height: 1rem;
  right: 1rem;
  bottom: 2rem;
  border-radius: 999px;
  background: rgba(39, 103, 127, 0.74);
}

.market-card__art--photo {
  background: none;
}

.market-card__art--photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.market-card__art--photo span,
.market-card__art--photo::before,
.market-card__art--photo::after {
  display: none;
}

.market-card__badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 1;
  margin: 0;
  border-radius: 999px;
  background: rgba(24, 63, 50, 0.78);
  padding: 0.32rem 0.7rem;
  color: white;
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.market-card--headpieces .market-card__art {
  background: linear-gradient(135deg, rgba(244, 147, 181, 0.36), rgba(79, 124, 99, 0.22));
}

.market-card--garments .market-card__art {
  background: linear-gradient(135deg, rgba(39, 103, 127, 0.25), rgba(255, 202, 76, 0.32));
}

.market-card--crafts .market-card__art {
  background: linear-gradient(135deg, rgba(79, 124, 99, 0.28), rgba(244, 147, 181, 0.2));
}

.market-card--wellness .market-card__art {
  background: linear-gradient(135deg, rgba(39, 103, 127, 0.2), rgba(79, 124, 99, 0.28));
}

.market-card > :not(.market-card__art) {
  margin-left: 1rem;
  margin-right: 1rem;
}

.market-card__tag {
  display: inline-flex;
  margin-top: 1rem;
  margin-bottom: 0;
  border-radius: 999px;
  background: var(--pink-soft);
  padding: 0.3rem 0.55rem;
  color: #704158;
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
}

.market-card button {
  width: calc(100% - 2rem);
  margin: 0.5rem 1rem 1rem;
  background: var(--green-deep);
  color: white;
  min-height: 2.8rem;
  font-size: 0.86rem;
}

.marketplace-note {
  max-width: 44rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-weight: 760;
  font-size: clamp(0.86rem, 3.4vw, 0.95rem);
  line-height: 1.5;
}

.swipe-hint {
  display: none;
}

.artist-callout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 4vw, 2rem);
  align-items: start;
  margin: clamp(0.9rem, 4vw, 3rem);
  padding: clamp(1rem, 4vw, 2rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(253, 227, 236, 0.5)),
    var(--paper);
}

.artist-callout h2 {
  margin: 0;
  color: var(--green-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 7.8vw, 3.6rem);
  line-height: 1.02;
  text-wrap: balance;
}

.beta-form {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  box-shadow: none;
}

.beta-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--green-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.beta-form input,
.beta-form select,
.beta-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0.78rem 0.85rem;
  font-size: 1rem;
}

.beta-form textarea {
  resize: vertical;
}

.beta-form button {
  background: var(--pink);
  color: #411527;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.site-footer {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem clamp(0.9rem, 4vw, 3rem) calc(1.4rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(36, 82, 62, 0.1);
  background: var(--paper);
}

.site-footer img {
  width: 3rem;
  height: 3rem;
  border-radius: 8px;
  object-fit: cover;
}

.site-footer div {
  display: grid;
  gap: 0.15rem;
}

.site-footer span {
  color: var(--muted);
  font-size: 0.84rem;
}

.site-footer .footer-credit {
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 800;
}

.footer-credit span {
  color: var(--pink);
}

.footer-email {
  color: var(--green-deep);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-email-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1.1rem;
  color: var(--green-deep);
  font-size: clamp(0.9rem, 3.6vw, 1rem);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 2.75rem;
}

@media (max-width: 980px) {
  .program-grid,
  .volunteer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (min-width: 701px) {
  .site-header {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }

  .brand img {
    width: 2.9rem;
    height: 2.9rem;
  }

  .header-action {
    min-height: 2.8rem;
    padding: 0 1rem;
    font-size: 1rem;
  }

  .hero {
    min-height: calc(100svh - 4.55rem);
  }

  h1 {
    max-width: 11.8ch;
    font-size: clamp(4.8rem, 9.5vw, 7.6rem);
    line-height: 0.92;
  }

  .mission {
    font-size: clamp(1rem, 1.45vw, 1.22rem);
    line-height: 1.65;
  }

  .hero__media img {
    width: min(105vw, 55rem);
    max-width: none;
  }

  .quick-nav {
    top: 4.55rem;
  }

  .program-card {
    min-height: 15rem;
  }
}

@media (min-width: 981px) {
  .artist-callout {
    grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  }
}

@media (max-width: 700px) {
  .brand small {
    display: none;
  }

  /* Bring header action to full 44px touch target */
  .header-action {
    min-height: 2.75rem;
    font-size: 0.86rem;
  }

  .hero__actions {
    display: grid;
  }

  .button {
    width: 100%;
    min-height: 3rem;
  }

  .section {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  /* Quick-nav links: 32px → 44px touch target */
  .quick-nav a {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
  }

  .program-grid,
  .volunteer-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Larger photo art on mobile so the turtle shows well */
  .market-card__art--photo {
    min-height: 14rem;
  }

  /* Market and volunteer buttons: full 48px on mobile */
  .market-card button,
  .volunteer-card button {
    min-height: 3rem;
  }

  /* More breathing room inside form fields on mobile */
  .beta-form input,
  .beta-form select,
  .beta-form textarea {
    padding: 1rem;
  }

  .beta-form button {
    min-height: 3.2rem;
  }

  .artist-callout {
    margin: 0.9rem;
  }

  /* Swipe hint visible only on mobile */
  .swipe-hint {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 760;
    letter-spacing: 0.02em;
  }
}

@media (max-width: 360px) {
  .site-header {
    gap: 0.45rem;
  }

  .brand img {
    width: 2.1rem;
    height: 2.1rem;
  }

  .brand strong {
    font-size: 0.86rem;
  }

  .header-action {
    min-height: 2.2rem;
    padding: 0 0.62rem;
    font-size: 0.74rem;
  }

  h1 {
    font-size: clamp(2.05rem, 10vw, 2.3rem);
  }

  .mission {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .section__heading h2,
  .artist-callout h2 {
    font-size: 1.58rem;
  }

  .statement {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .intro {
    display: none;
  }

  body.intro-active {
    overflow: auto;
  }
}
