/* Home page layout. Visual styling lives in components.css and tokens.css. */

/* Hero */

.hero {
  padding-top: clamp(1rem, 0.4rem + 2.4vw, 2.5rem);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: var(--space-8);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.75rem;
  max-width: 600px;
}

.hero__copy .lead {
  max-width: 520px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__visual {
  width: 100%;
  max-width: 640px;
  justify-self: end;
}

@media (max-width: 1023px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-9);
  }

  .hero__visual {
    max-width: 560px;
    justify-self: center;
  }
}

@media (max-width: 480px) {
  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

/* Hero collage: percentages of a 640 × 600 frame so it scales as one piece. */

.collage {
  position: relative;
  width: 100%;
  aspect-ratio: 640 / 600;
}

.collage > * {
  position: absolute;
}

.collage__paper {
  left: 9.4%;
  top: 5%;
  width: 81.25%;
  height: 90%;
  border-radius: var(--radius-xl);
  transform: rotate(3deg);
}

.collage__a {
  left: 3.1%;
  top: 11.7%;
  width: 43.1%;
  --tilt: -7deg;
}

.collage__b {
  left: 50%;
  top: 1.7%;
  width: 41%;
  --tilt: 5deg;
}

.collage__c {
  left: 35.3%;
  top: 50%;
  width: 31.6%;
  --tilt: -2deg;
}

.collage .tape {
  height: 5%;
}

.collage__tape-a {
  left: 17.2%;
  top: 8.3%;
  width: 17.5%;
  --tilt: -14deg;
}

.collage__tape-b {
  left: 63%;
  top: -0.3%;
  width: 15.6%;
  --tilt: 9deg;
}

.collage__tape-c {
  left: 43.4%;
  top: 48%;
  width: 14.4%;
  --tilt: -4deg;
}

.collage__mascot {
  left: 67.5%;
  top: 62%;
  width: 33.4%;
}

.collage__heart-1 {
  left: 93%;
  top: 19%;
  width: 4.7%;
}

.collage__heart-2 {
  left: 0.6%;
  top: 2.7%;
  width: 3.4%;
}

.collage__spark {
  left: 0;
  top: 78%;
  width: 5.6%;
}

/* Templates */

.categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-7);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.75rem, 1rem + 2vw, 2.75rem) clamp(1rem, 0.5rem + 1.6vw, 1.75rem);
  margin-top: var(--space-9);
}

.gallery .template-card:nth-child(4n + 1) .polaroid {
  --tilt: -2deg;
}

.gallery .template-card:nth-child(4n + 2) .polaroid {
  --tilt: 1.5deg;
}

.gallery .template-card:nth-child(4n + 3) .polaroid {
  --tilt: -1deg;
}

.gallery .template-card:nth-child(4n + 4) .polaroid {
  --tilt: 2deg;
}

.gallery-cta {
  display: flex;
  justify-content: center;
  margin-top: var(--space-9);
}

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

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-9);
}

.paper-card:nth-child(1) .paper-card__tape {
  --tilt: -3deg;
}

.paper-card:nth-child(2) .paper-card__tape {
  --tilt: 2deg;
}

.paper-card:nth-child(3) .paper-card__tape {
  --tilt: -2deg;
}

.paper-card:nth-child(4) .paper-card__tape {
  --tilt: 3deg;
}

@media (max-width: 1100px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: var(--space-8);
  }
}

@media (max-width: 560px) {
  .features {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Calendar timeline */

.timeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-9);
}

.timeline__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  max-width: 540px;
}

.timeline__copy .checklist {
  margin-top: var(--space-2);
}

.timeline__visual {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 560px;
  justify-self: end;
}

.timeline__visual > .polaroid,
.timeline__visual > .calendar {
  grid-area: 1 / 1;
}

.timeline__photo {
  width: 52%;
  align-self: start;
  justify-self: start;
  --tilt: -4deg;
}

.timeline__visual .calendar {
  position: relative;
  z-index: 1;
  width: min(420px, 86%);
  margin-top: 34%;
  align-self: start;
  justify-self: end;
}

.timeline__spark {
  right: 2%;
  top: 6%;
  width: 34px;
}

@media (max-width: 1023px) {
  .timeline {
    grid-template-columns: minmax(0, 1fr);
  }

  .timeline__visual {
    justify-self: center;
  }
}

@media (max-width: 480px) {
  .timeline__visual .calendar {
    width: 94%;
    padding: var(--space-5);
  }
}

/* Closing call to action */

.cta-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-8);
  padding: clamp(2.5rem, 1.6rem + 4vw, 4.5rem) clamp(1.5rem, 0.5rem + 5vw, 5rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.cta-band__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  max-width: 640px;
}

.cta-band__art {
  position: relative;
  width: clamp(160px, 12rem + 4vw, 260px);
}

.cta-band__heart-1 {
  right: -6%;
  top: 4%;
  width: 16%;
}

.cta-band__heart-2 {
  left: -4%;
  top: 30%;
  width: 11%;
}

@media (max-width: 760px) {
  .cta-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-band__art {
    order: -1;
    width: 160px;
  }
}
