:root {
  --bg: #f7c4e5;
  --text: #8b212b;
  --black: #151515;
}

* {
  box-sizing: border-box;
}

@font-face {
  font-family: "Nectarine";
  src: url("nectarine.ttf") format("truetype");
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	display: flex;
	justify-content: center;
  
	font-family: "new-kansas", sans-serif;
	font-weight: 400;
	font-style: normal;
}

.page {
  width: min(100%, 760px);
  padding: 28px 20px 60px;
  text-align: center;
}

h1 {
  margin: 0 0 28px;
  font-size: clamp(2rem, 7vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  font-family: "Nectarine", sans-serif;
}


/* =========================
   CAROUSEL
   ========================= */

.carousel {
  width: 100%;
  margin-bottom: 36px;
}

/*
  This is the visible area.

  The active image sits in front.
  The previous and next images sit
  behind it and stick out at the sides.
*/
.carousel-track {
  position: relative;
  width: 100%;
  height: clamp(260px, 52vw, 420px);
  overflow: visible;
}


/* Base slide */

.slide {
  position: absolute;
  top: 50%;
  left: 50%;

  width: min(52vw, 350px);
  aspect-ratio: 1 / 1.05;

  transform-origin: center;

  transition:
    transform 400ms ease,
    opacity 400ms ease;

  user-select: none;
}

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

  border: 2px solid var(--black);
  background: #eee;
}


/* =========================
   ACTIVE / FOREGROUND IMAGE
   ========================= */

.slide.active {
  z-index: 3;

  transform:
    translate(-50%, -50%)
    scale(1);

  opacity: 1;
}


/* =========================
   PREVIOUS IMAGE
   ========================= */

.slide.prev {
  z-index: 1;

  transform:
    translate(-135%, -50%)
    scale(0.72);

  opacity: 1;
  cursor: pointer;
}


/* =========================
   NEXT IMAGE
   ========================= */

.slide.next {
  z-index: 1;

  transform:
    translate(35%, -50%)
    scale(0.72);

  opacity: 1;
  cursor: pointer;
}


/* All other images */

.slide.hidden {
  z-index: 0;

  transform:
    translate(-50%, -50%)
    scale(0.5);

  opacity: 0;
  pointer-events: none;
}


/* =========================
   LINK SECTION
   ========================= */

.links {
  width: min(100%, 420px);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.intro {
  margin: 0 0 10px;
  font-size: 1rem;
  line-height: 1.5;
}

.link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  min-height: 54px;
  padding: 12px 20px;

  border: 2px solid var(--text);
  color: var(--text);

  text-decoration: none;
  font-size: 1rem;

  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.link:hover {
  background: var(--text);
  color: var(--bg);
  transform: translateY(-2px);
}

.link i {
  font-size: 1.25rem;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 600px) {
  h1 {
    font-size: clamp(2rem, 14vw, 10rem);
  }

  .page {

    padding-inline: 10px;
  }

  .carousel-track {
    height: 72vw;
    min-height: 260px;
  }

  .slide {
    width: 64vw;
  }

  .slide.prev {
    transform:
      translate(-100%, -50%)
      scale(0.32);
  }

  .slide.next {
    transform:
      translate(0%, -50%)
      scale(0.32);
  }
}