/* Sections: the big page blocks, top to bottom.
   Mobile first. Nav and event rows switch at 50em (800px); the side-by-side
   hero and events layouts switch at 70em (1120px), below which they stack. */

/* Hero --------------------------------------------------------------------
   Stacked (phones, tablets): photo on top, fading into night, text below.
   The photo is sized by --photo-w so Colita stays centred and in proportion.
   Wide (70em+): photo fills the right side; night fades keep the left readable.
   Everything scales with the width so the composition matches Figma. */

.hero {
  --photo-w: min(205vw, 1100px);
  position: relative;
  overflow: hidden;
}

.hero__photo {
  position: relative;
  height: calc(var(--photo-w) * 0.56);
  overflow: hidden;
}

.hero__photo img {
  position: absolute;
  top: calc(var(--photo-w) * 0.024);
  left: calc(50% - var(--photo-w) * 0.49);
  width: var(--photo-w);
  max-width: none;
  height: auto;
}

/* Night fades over the photo: a short one at the top for the nav, a long one at the bottom into the text. */
.hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(28 30 74 / 0.8), transparent calc(var(--photo-w) * 0.14)),
    linear-gradient(to bottom, transparent 53%, rgb(28 30 74 / 0.85) 89%, var(--night) 100%);
}

.hero__content {
  position: relative;
  margin-top: calc(var(--photo-w) * -0.0975);
  padding: 0 var(--gutter) 3rem;
}

.hero__intro {
  max-width: 32.5rem;
  margin: 1.25rem 0 1.5rem;
}

.hero__credit {
  position: absolute;
  top: calc(var(--photo-w) * 0.424);
  right: var(--gutter);
  font-size: 0.6875rem;
  opacity: 0.7;
}

@media (min-width: 50em) {
  .hero__intro {
    font-size: 1.375rem;
    margin: 1.5rem 0 2.25rem;
  }
}

@media (min-width: 70em) {
  .hero {
    min-height: min(52.8vw, 54rem);
  }

  .hero__photo {
    position: absolute;
    inset: 0;
    height: auto;
  }

  .hero__photo img {
    top: -2vw;
    left: 7.6%;
    width: 118%;
  }

  .hero__photo::after {
    background:
      linear-gradient(to right,
        var(--night) 0%,
        rgb(28 30 74 / 0.9) 9%,
        rgb(28 30 74 / 0.72) 34%,
        rgb(28 30 74 / 0.15) 56%,
        transparent 66%,
        transparent 80.5%,
        rgb(28 30 74 / 0.35) 91%,
        rgb(28 30 74 / 0.75) 100%),
      linear-gradient(to bottom, rgb(28 30 74 / 0.7), transparent 9.7vw);
  }

  .hero__content {
    margin-top: 0;
    padding: 8.3vw var(--gutter) 6rem;
  }

  .hero__intro {
    max-width: min(32.5rem, 36vw);
    font-size: clamp(1.125rem, 1.53vw, 1.375rem);
  }

  .hero__credit {
    top: auto;
    bottom: 1.5rem;
    font-size: 0.8125rem;
  }
}

/* Page header ---------------------------------------------------------------
   The short night band on pages other than home: small wordmark and the nav. */

.site-header {
  position: relative;
  padding: 4rem 1.5rem 1.5rem;
}

.site-header .wordmark {
  display: inline-block;
  text-decoration: none;
}

@media (min-width: 50em) {
  .site-header {
    padding: 2rem var(--gutter);
  }

  .site-header .site-nav {
    top: 50%;
    transform: translateY(-50%);
  }
}

/* Contact ------------------------------------------------------------------- */

.contact {
  max-width: calc(40rem + 3rem);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.contact__intro {
  margin: 1.5rem 0;
}

/* Letterbird inserts an iframe; make it fill the column. */
.contact__form iframe {
  display: block;
  width: 100%;
  border: 0;
}

@media (min-width: 50em) {
  .contact {
    padding: 6rem 1.5rem 7.5rem;
  }

  .contact__intro {
    font-size: 1.1875rem;
  }
}

/* Upcoming events -----------------------------------------------------------
   Mobile: Boquita's head peeks in beside the heading.
   Desktop: the whole Boquita stands to the left of the list. */

.events {
  padding: 2.5rem var(--gutter) 4rem;
}

.events__boquita {
  display: none;
}

.events__heading-row {
  display: flex;
  align-items: flex-end;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.events__boquita-head {
  width: 3.75rem;
  height: auto;
}

.events__signup {
  margin-top: 2rem;
}

@media (min-width: 70em) {
  .events {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4.5rem;
    padding: 6rem var(--gutter) 7rem;
  }

  .events__boquita {
    display: block;
    flex: 0 1 26.25rem;
    min-width: 12rem;
    height: auto;
  }

  .events__column {
    flex: 0 1 46.25rem;
  }

  .events__boquita-head {
    display: none;
  }

  .events__heading-row {
    margin-bottom: 1.75rem;
  }

  .events__signup {
    margin-top: 2.5rem;
  }
}

/* Footer --------------------------------------------------------------------
   Email list on the left, tip jar on the right (stacked on phones). */

.site-footer {
  padding: 3.5rem 1.5rem 2.5rem;
  font-size: 1.0625rem;
}

.site-footer__columns {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.site-footer__heading {
  font-size: var(--size-subheading);
  margin-bottom: 0.75rem;
}

.site-footer__tip p {
  margin-bottom: 1.25rem;
}

.signup__lists {
  display: grid;
  gap: 0.625rem;
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}

.signup__lists legend {
  padding: 0;
  margin-bottom: 0.75rem;
}

.signup__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.signup__row .text-field {
  width: 100%;
}

.signup__thanks {
  font-size: 1.3125rem;
  color: var(--marigold);
}

.signup__thanks:focus {
  outline: none;
}

.site-footer__small {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(251 243 228 / 0.2);
  font-size: var(--size-small);
  line-height: 1.5;
  opacity: 0.65;
}

@media (min-width: 50em) {
  .site-footer {
    padding: 5.5rem var(--gutter) 3rem;
  }

  .site-footer__columns {
    flex-direction: row;
    justify-content: space-between;
    gap: 5rem;
    margin-top: 3.5rem;
  }

  .site-footer__email {
    max-width: 35rem;
  }

  .site-footer__tip {
    max-width: 18.75rem;
  }

  .signup__row {
    flex-direction: row;
    align-items: center;
  }

  .signup__row .text-field {
    width: 16.25rem;
  }

  .signup__thanks {
    font-size: 1.5rem;
  }

  .site-footer__small {
    margin-top: 3.5rem;
  }
}
