/* ===========================================================================
   First Steps YCCI - lander (index.html)
   Four sections in order: hero, team, partners, ways to help, donate band.
   =========================================================================== */

/* -------------------------------- 1. hero -------------------------------- */
/* One screen tall, minus the sticky nav. One photograph at a time, swapped
   every 15 seconds by js/home.js, with dots to pick one directly.
   Brief section 7, full-bleed photo section. */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--nav-height));
  background: var(--color-ink);
  overflow: hidden;
}

.hero__mosaic {
  position: absolute;
  /* 10% of overscan top and bottom. js/scroll.js drifts this box against the
     scroll; without the bleed the parallax would expose the hero's ink ground
     at one edge or the other. */
  inset: -10% 0;
  z-index: -2;
  overflow: hidden;
  will-change: transform;
}

/* All slides stack in the same box; only .is-active is opaque, so the swap
   is a cross-fade rather than a jump. */
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms var(--ease-out);
}

.hero__slide.is-active { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: none; }
}

/* Neutral, not teal — the photographs carry their own colour. Heaviest
   behind the copy on the left, clearing off the right of the frame. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.52) 48%,
    rgba(0, 0, 0, 0.18) 100%
  );
}

/* --- slide dots --- */

.hero__dots {
  position: absolute;
  right: max(var(--space-6), calc((100vw - var(--container-max)) / 2 + var(--space-6)));
  bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hero__dot {
  /* 10px of ink inside a 44px target — the dot is the mark, not the button. */
  display: grid;
  place-items: center;
  width: var(--button-min-target);
  height: var(--button-min-target);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.hero__dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--color-ink-inverse);
  background: transparent;
  transition: background var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}

.hero__dot:hover::before { background: rgba(255, 255, 255, 0.45); }

.hero__dot.is-active::before {
  background: var(--color-ink-inverse);
  transform: scale(1.15);
}

.hero__content {
  padding-block: var(--space-9) var(--space-10);
  color: var(--color-ink-inverse);
}

/* Gold as punctuation, not a surface - the single accent on this screen. */
.hero__eyebrow {
  color: var(--color-ink-inverse);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.hero__eyebrow::before {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--color-fill-gold);
}

.hero__title {
  margin-top: var(--space-5);
  max-width: 20ch;
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 500;
  line-height: var(--leading-tight);
  color: var(--color-ink-inverse);
  text-wrap: balance;
}

.hero__mission {
  margin-top: var(--space-5);
  max-width: 56ch;
  font-size: var(--text-lead);
  line-height: 1.55;
  color: var(--color-ink-inverse);
}

.hero__actions {
  margin-top: var(--space-7);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero__cue {
  position: absolute;
  left: 50%;
  bottom: var(--space-6);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--button-min-target);
  padding-inline: var(--space-3);
  color: var(--color-ink-inverse);
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  text-decoration: none;
}
.hero__cue:hover .hero__cue-arrow { transform: translateY(4px); }
.hero__cue-arrow { transition: transform var(--dur-base) var(--ease-out); }

@media (max-width: 900px) {
  /* Below the container's own width the dots just take the page gutter. */
  .hero__dots { right: var(--space-5); }
}

@media (max-width: 600px) {
  /* A 22px lead plus a 36px title does not fit one phone screen. Drop the
     mission to body size and tighten the padding so the hero still ends
     where the first scroll begins. */
  .hero__content { padding-block: var(--space-7) var(--space-8); }
  /* Display steps down to 36px under 600px. Brief section 5.3. */
  .hero__title { font-size: 2.25rem; max-width: 16ch; margin-top: var(--space-4); }
  .hero__mission { font-size: var(--text-body); margin-top: var(--space-4); }
  .hero__actions { gap: var(--space-3); margin-top: var(--space-6); }
  .hero__actions .btn { width: 100%; }
  /* On touch the swipe is the affordance; the cue would crowd the buttons. */
  .hero__cue { display: none; }
}

/* -------------------------------- 2. team -------------------------------- */
/* Photo card. Hover, focus, or tap blurs the photo and lifts the blurb over
   it. The blur is a backdrop-filter on the overlay rather than a filter on
   the image, so nothing has to be scaled to hide soft edges. */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--space-6) var(--space-5);
}

.team-card__media {
  /* The white mat from brief section 7: 12px padding, hairline, square corners. */
  background: var(--image-mat-bg);
  padding: var(--image-mat-pad);
  border: var(--image-mat-border);
  border-radius: var(--radius-image);
}

.team-card__photo-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
}

.team-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-image);
}

.team-card__reveal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: var(--space-4);
  background: var(--color-scrim);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}

.team-card__blurb {
  margin: 0;
  color: var(--color-ink-inverse);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

/* The trigger covers the photo. It exists for touch and keyboard - pointer
   users get the same reveal from hovering the card. */
.team-card__trigger {
  position: absolute;
  inset: 0;
  width: 100%;
  border-radius: var(--radius-image);
}

.team-card:hover .team-card__reveal,
.team-card:focus-within .team-card__reveal,
.team-card.is-open .team-card__reveal {
  opacity: 1;
}

.team-card__meta { margin-top: var(--space-3); }

.team-card__name {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: 600;
  line-height: 1.35;
}

.team-card__role {
  margin-top: var(--space-1);
  font-size: var(--text-caption);
  line-height: 1.5;
  color: var(--color-ink-secondary);
}

/* On a coarse pointer there is no hover, so the blurb stays hidden until the
   card is tapped. Prompt for it. */
@media (hover: none) {
  .team-card__meta::after {
    content: "Tap the photo to read more";
    display: block;
    margin-top: var(--space-2);
    font-size: var(--text-caption);
    color: var(--color-ink-muted);
  }
  .team-card.is-open .team-card__meta::after { content: "Tap again to close"; }
}

/* ------------------------------ 3. partners ------------------------------ */

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
}

.partner-card {
  display: grid;
  place-items: center;
  min-height: 128px;
  padding: var(--space-5);
  background: var(--color-surface);
  border: var(--border-hairline) solid var(--color-border);
  border-radius: var(--radius-md);
}

.partner-card__link {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.partner-card__logo {
  max-height: 64px;
  width: auto;
}

/* ---------------------------- 4. ways to help ---------------------------- */
/* Three large panels. The whole panel is the target; it inverts on hover. */

.ways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
}

.way {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 260px;
  padding: var(--space-6);
  background: var(--color-surface);
  border: var(--border-hairline) solid var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-ink);
  text-decoration: none;
  transition: background-color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}

.way__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: var(--leading-snug);
  color: inherit;
}

.way__desc {
  color: var(--color-ink-secondary);
  font-size: var(--text-small);
  line-height: var(--leading-small);
  transition: color var(--dur-base) var(--ease-out);
}

.way__action {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-top: var(--space-4);
  font-size: var(--text-small);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.way:hover {
  transform: translateY(-4px);
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-ink-inverse);
}
.way:hover .way__desc { color: var(--color-ink-inverse); }

/* ----------------------------- 5. donate band ---------------------------- */

.donate-band {
  background: var(--color-surface-warm);
  border-top: var(--border-hairline) solid var(--color-border);
  padding-block: var(--space-8);
}

.donate-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.donate-band__copy { flex: 1 1 420px; }

.donate-band__title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: 1.18;
  max-width: 24ch;
  text-wrap: balance;
}

.donate-band__body {
  margin-top: var(--space-4);
  color: var(--color-ink-secondary);
}

/* The band already closes the page; the footer follows it directly. */
.donate-band + .site-footer { margin-top: 0; }
