/* ===== COLORS ===== */
:root {
  --orange: #f6d59a;

  /* poster sizes: small 840x945 -> big 960x1080 on hover */
  --poster-w: 550px;
  --poster-ratio: 840 / 945;
  --poster-zoom: 1.2;   /* 960 / 840 */
}

/* ===== GENERAL ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-snap-type: y mandatory;   /* always settle on one of the two sections */
  scroll-behavior: smooth;         /* smooth movement for jumps and anchor links */
}


body {
  margin: 0;
  overflow-x: hidden;                       /* the grown poster never causes a horizontal scroll */
  background-color: var(--orange);          /* shows while the image loads */
  background-image: url("./resources/background.png");
  background-size: cover;
  background-attachment: fixed;
}

/* ===== HERO: your face (ascii art) + big title ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;      /* fallback */
  height: 100svh;     /* visible screen height, without browser bars */
  background: url("./resources/miputacara.webp") center top / auto 100% repeat-x;

  scroll-snap-align: start;
}

.hero-title {
  position: absolute;
  top: 2%;
  left: 3%;
  width: 70%;
}

/* ===== POSTERS ===== */
.posters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  gap: 6vw 3vw;
  padding: 5vw 3vw 8vw;
  scroll-snap-align: start;        /* each section's top edge is a snap point */
}

.poster {
  display: block;
  width: min(var(--poster-w), 100%);
  aspect-ratio: var(--poster-ratio);
  transition: transform 0.25s ease;
}

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

/* grow only on devices that really have a mouse */
@media (hover: hover) {
  .poster:hover,
  .poster:focus-visible {
    transform: scale(var(--poster-zoom));
    position: relative;
    z-index: 1;                              /* grows over its neighbours */
  }
}

/* ===== PHONES: one poster per row ===== */
@media (max-width: 700px) {
  .posters {
    grid-template-columns: 1fr;
  }
}
