@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  --brand-color: #ff352a;
  --primary-color: #372d2a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-image: url(/images/pexels-kostas-dimopoulos-119583302-29613938.jpg);
  background-position: center;
  background-size: cover;

  height: 100dvh;
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas: "nav" "heading" "main";
  overflow-x: hidden;
  font-family: Poppins, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

header {
  background-color: rgb(0 0 0 / 0.45);
}

main {
  grid-area: main;
  padding: min(3em, 10%);
  min-height: 0;
  min-width: 0;
  background-color: rgb(0 0 0 / 0.45);
}

h1 {
  grid-area: heading;
  display: flex;
  align-content: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  text-align: center;
  color: white;
}

nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2em;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.carousel {
  overflow-x: auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  margin: 0;
  display: flex;
  gap: 1em;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.card {
  scroll-snap-align: start;
  flex: 0 0 100%;
  aspect-ratio: 5 / 3;
  padding: 1em;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1em;
  border-radius: 0.5em;
}

.custom-scroll-btn {
  content: "";
  border: none;
  background-color: var(--brand-color);
  font-family: Consolas, monospace;
  font-size: 3rem;
  color: white;
  height: 60px;
  width: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  padding-bottom: 0.1em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.custom-scroll-btn.left {
  left: -20px;
}

.custom-scroll-btn.right {
  right: -20px;
}

.custom-scroll-btn:disabled {
  opacity: 0.3;
  cursor: auto;
}

.custom-scroll-markers {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  margin-top: 15px;
}

.custom-marker {
  height: 1em;
  width: 1em;
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: 200ms;
}

.custom-marker:hover {
  scale: 1.1;
}

.custom-marker.active {
  background-color: var(--brand-color);
}

li {
  list-style: none;
}

.card li > a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.c1 {
  grid-template-areas: "d1 d2 d3 d4" "d5 d6 d7 d8";
}

.c2 {
  grid-template-areas: "d9 d10 d11 d12" "d13 d14 d15 d16";
}

.c3 {
  grid-template-areas: "d17 d18 d19 d20" "d21 d22 d23 d24";
}

.d1 {
  grid-area: d1;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d2 {
  grid-area: d2;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d3 {
  grid-area: d3;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d4 {
  grid-area: d4;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d5 {
  grid-area: d5;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d6 {
  grid-area: d6;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d7 {
  grid-area: d7;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d8 {
  grid-area: d8;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d9 {
  grid-area: d9;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d10 {
  grid-area: d10;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d11 {
  grid-area: d11;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d12 {
  grid-area: d12;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d13 {
  grid-area: d13;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d14 {
  grid-area: d14;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d15 {
  grid-area: d15;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d16 {
  grid-area: d16;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d17 {
  grid-area: d17;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d18 {
  grid-area: d18;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d19 {
  grid-area: d19;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d20 {
  grid-area: d20;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d21 {
  grid-area: d21;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d22 {
  grid-area: d22;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d23 {
  grid-area: d23;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.d24 {
  grid-area: d24;
  border-radius: 0.5em;
  border: none;
  color: white;
  background-color: rgba(255, 74, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

a {
  display: block;
  font-family: Poppins, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 64px;
  font-weight: 600;
}

a:hover {
  cursor: pointer;
}

.lockup,
.podcast-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
  background-color: rgb(30 24 22 / 68%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lockup.hidden,
.podcast-screen.hidden {
  display: none;
}

.lockup-card,
.podcast-card {
  position: relative;
  display: flex;
  width: min(100%, 34rem);
  flex-direction: column;
  align-items: center;
  padding: 3.5rem 2.5rem 2.75rem;
  border: 1px solid rgb(55 45 42 / 12%);
  border-radius: 1.5rem;
  background: #fffdfa;
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 22%);
  text-align: center;
}

.lockup-card {
  width: min(100%, 26rem);
  gap: 1rem;
  padding: 2.5rem 2rem;
}

.lockup-icon {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--brand-color);
}

.lockup-text {
  color: var(--primary-color);
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
}

.podcast-load-error {
  position: fixed;
  z-index: 10000;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 2rem);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background-color: white;
  color: var(--brand-color);
  text-align: center;
}

.podcast-load-error.hidden {
  display: none;
}

.podcast-day {
  margin-bottom: 1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #fff0ed;
  color: var(--brand-color);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.podcast-title {
  max-width: 100%;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.podcast-duration {
  margin-bottom: 1.75rem;
  color: #766b67;
  font-size: 1rem;
}

.podcast-play-btn {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border: none;
  border-radius: 50%;
  background-color: var(--brand-color);
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease;
}

.podcast-play-btn:hover {
  transform: translateY(-2px);
  background-color: #e42a21;
}

.podcast-play-btn:focus-visible,
.podcast-screen-btn:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
}

.podcast-screen-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background-color: white;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.podcast-screen-btn:hover {
  background-color: #f3eeeb;
}

.podcast-icon {
  width: 1.8rem;
  height: 1.8rem;
  filter: brightness(0) invert(1);
}

.close-podcast-icon {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 900px) {
  main {
    padding: clamp(1rem, 4vw, 2rem);
  }

  .card {
    gap: clamp(0.6rem, 1.5vw, 1rem);
    padding: clamp(0.6rem, 1.5vw, 1rem);
  }

  .custom-scroll-btn {
    width: 3rem;
    height: 3rem;
    font-size: 2.5rem;
  }
}

@media (max-width: 600px) {
  h1 {
    padding: 1rem 0.75rem 0.5rem;
    font-size: clamp(1.7rem, 8vw, 2.6rem);
  }

  main {
    padding: 0.65rem;
  }

  .carousel {
    gap: 0.6rem;
  }

  .card {
    aspect-ratio: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    padding: 0.6rem;
  }

  .c1 {
    grid-template-areas:
      "d1 d2"
      "d3 d4"
      "d5 d6"
      "d7 d8";
  }

  .c2 {
    grid-template-areas:
      "d9 d10"
      "d11 d12"
      "d13 d14"
      "d15 d16";
  }

  .c3 {
    grid-template-areas:
      "d17 d18"
      "d19 d20"
      "d21 d22"
      "d23 d24";
  }

  a {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .custom-scroll-btn {
    width: 2.6rem;
    height: 2.6rem;
    font-size: 2rem;
  }

  .custom-scroll-btn.left {
    left: -0.3rem;
  }

  .custom-scroll-btn.right {
    right: -0.3rem;
  }

  .custom-scroll-markers {
    gap: 0.65rem;
    margin-top: 0.65rem;
  }

  .custom-marker {
    width: 0.75rem;
    height: 0.75rem;
  }

  .lockup,
  .podcast-screen {
    padding: max(1rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      max(1rem, env(safe-area-inset-bottom))
      max(1rem, env(safe-area-inset-left));
  }

  .lockup-card {
    width: min(100%, 26rem);
    gap: 0.85rem;
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
  }

  .lockup-icon {
    width: 3rem;
    height: 3rem;
  }

  .podcast-card {
    width: min(100%, 28rem);
    padding: 3.25rem 1.5rem 2rem;
    border-radius: 1.25rem;
  }

  .podcast-title {
    font-size: clamp(1.6rem, 7vw, 2.1rem);
  }

  .podcast-play-btn {
    width: 3.75rem;
    height: 3.75rem;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  h1 {
    padding: 0.4rem 0.75rem;
    font-size: clamp(1.5rem, 5vh, 2rem);
  }

  main {
    padding: 0.5rem;
  }

  .card {
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .custom-scroll-markers {
    margin-top: 0.4rem;
  }

  .lockup,
  .podcast-screen {
    padding: max(0.75rem, env(safe-area-inset-top))
      max(0.75rem, env(safe-area-inset-right))
      max(0.75rem, env(safe-area-inset-bottom))
      max(0.75rem, env(safe-area-inset-left));
  }

  .lockup-card {
    max-height: calc(100dvh - 1.5rem);
    gap: 0.75rem;
    overflow-y: auto;
    padding: 1.5rem;
  }

  .podcast-card {
    width: min(100%, 36rem);
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
    padding: 2.5rem 1.5rem 1rem;
  }

  .podcast-day {
    margin-bottom: 0.5rem;
  }

  .podcast-title {
    margin-bottom: 0.5rem;
    font-size: clamp(1.35rem, 4vh, 1.8rem);
  }

  .podcast-duration {
    margin-bottom: 0.5rem;
  }

  .podcast-play-btn {
    width: 3rem;
    height: 3rem;
  }
}
