@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&family=Playfair+Display:wght@500;600&display=swap");

:root {
  --background: #f4f1eb;

  --text: #171717;

  --muted: #6f6b63;

  --line: #d6d1c8;

  --card: #ebe7df;
}

* {
  margin: 0;

  padding: 0;

  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);

  color: var(--text);

  font-family: "DM Sans", sans-serif;

  line-height: 1.5;
}

a {
  color: inherit;

  text-decoration: none;
}

/* HEADER */

.site-header {
  width: 100%;

  padding: 28px 5vw;

  display: flex;

  justify-content: space-between;

  align-items: center;

  border-bottom: 1px solid var(--line);
}

/* BRAND */

.brand {
  display: inline-flex;

  align-items: center;

  text-decoration: none;
}

.brand-ellipse {
  position: relative;

  width: 178px;

  height: 42px;

  display: flex;

  align-items: center;

  justify-content: center;

  transform: rotate(-4deg);
}

/* Main ellipse */

.brand-ellipse::before {
  content: "";

  position: absolute;

  inset: 0;

  border: 1px solid #171717;

  border-radius: 50%;
}

/* Heavy / dark side */

.brand-ellipse::after {
  content: "";

  position: absolute;

  width: 48px;

  height: 38px;

  left: -2px;

  top: 2px;

  border-left: 5px solid #171717;

  border-radius: 50%;

  transform: rotate(-2deg);
}

/* Title */

.brand-title {
  position: relative;

  z-index: 2;

  font-family: "DM Sans", sans-serif;

  font-size: 10px;

  font-weight: 500;

  letter-spacing: 0.16em;

  color: #171717;

  transform: rotate(4deg);
}

/* Thin glowing side */

.brand-ellipse span::after {
  content: "";

  position: absolute;

  width: 32px;

  height: 26px;

  right: -7px;

  top: 8px;

  border-right: 1px solid rgba(23, 23, 23, 0.35);

  border-radius: 50%;

  box-shadow:
    4px 0 6px rgba(23, 23, 23, 0.14),
    8px 0 15px rgba(23, 23, 23, 0.07);
}

.navigation {
  display: flex;

  gap: 30px;
}

.navigation a {
  font-size: 13px;

  color: var(--muted);

  transition: color 0.2s ease;
}

.navigation a:hover {
  color: var(--text);
}

/* HERO */

.hero {
  min-height: 78vh;
  padding: 110px 10vw 90px 5vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  font-size: 11px;

  font-weight: 500;

  letter-spacing: 0.16em;

  color: var(--muted);
}

.hero h1 {
  margin-top: 25px;
  font-family: "Playfair Display", serif;
  font-size: clamp(70px, 8.5vw, 125px);
  font-weight: 500;
  line-height: 0.84;
  letter-spacing: -0.055em;
  max-width: 42vw;
}

.hero h1 span {
  font-style: italic;
}

.hero-intro {
  max-width: 500px;

  margin-top: 55px;

  font-size: 17px;

  line-height: 1.7;

  color: var(--muted);
}

.explore-link {
  width: fit-content;

  margin-top: 35px;

  padding-bottom: 7px;

  border-bottom: 1px solid var(--text);

  font-size: 13px;
}

.explore-link span {
  margin-left: 12px;
}

/* LIBRARY */

.library {
  padding: 110px 5vw;

  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;

  justify-content: space-between;

  align-items: flex-end;

  margin-bottom: 55px;
}

.library-controls {
  display: flex;

  align-items: center;

  gap: 10px;
}

.library-controls label {
  font-size: 12px;

  color: var(--muted);
}

.edition-input {
  width: 48px;

  height: 28px;

  padding: 4px 6px;

  border: 1px solid var(--line);

  border-radius: 0;

  background: transparent;

  color: var(--text);

  font-family: "DM Sans", sans-serif;

  font-size: 12px;

  text-align: center;

  outline: none;
}

.edition-input:focus {
  border-color: var(--text);
}

.edition-input::-webkit-inner-spin-button,
.edition-input::-webkit-outer-spin-button {
  margin: 0;
}

.section-heading h2 {
  margin-top: 8px;

  font-family: "Playfair Display", serif;

  font-size: clamp(48px, 6vw, 80px);

  font-weight: 500;

  line-height: 1;

  letter-spacing: -0.04em;
}

.series-count {
  font-size: 12px;

  color: var(--muted);
}

/* SERIES */

.series-grid {
  display: flex;

  gap: 18px;

  overflow-x: auto;

  overflow-y: hidden;

  padding-bottom: 12px;

  scrollbar-width: thin;

  scrollbar-color: var(--muted) transparent;
}

.series-grid::-webkit-scrollbar {
  height: 6px;
}

.series-grid::-webkit-scrollbar-track {
  background: transparent;
}

.series-grid::-webkit-scrollbar-thumb {
  background: var(--muted);

  border-radius: 10px;
}

.series-card {
  flex: 0 0 calc((100% - 36px) / 3);

  min-width: 0;
  min-height: 470px;

  padding: 30px;
  position: relative;
  overflow: hidden;
  background: var(--card);

  display: flex;

  flex-direction: column;

  border: 1px solid transparent;

  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.series-card:hover {
  transform: translateY(-5px);

  background: #e5e1d8;

  border-color: var(--line);
}
.edition-card-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 65%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.edition-card-meta {
  position: absolute;
  right: 30px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.edition-article-count {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.edition-release-date {
  font-size: 11px;
  color: var(--muted);
}
.card-hover-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 30px;
  background: rgba(23, 23, 23, 0.94);
  color: #f4f1eb;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  z-index: 3;
}

.series-card:hover .card-hover-content {
  transform: translateY(0);
}

.hover-label {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: #aaa59b;
}

.card-hover-content h4 {
  margin-top: 8px;
  font-family: "Playfair Display", serif;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.15;
}

.hover-description {
  margin-top: 10px;
  color: #d6d1c8;
  font-size: 12px;
  line-height: 1.5;
}
.series-number {
  font-family: "Playfair Display", serif;

  font-size: 90px;

  line-height: 0.8;

  color: #aaa59b;
}

.series-info {
  margin-top: auto;
}

.series-label {
  font-size: 10px;

  letter-spacing: 0.15em;

  color: var(--muted);
}

.series-info h3 {
  margin-top: 12px;

  font-family: "Playfair Display", serif;

  font-size: 34px;

  font-weight: 500;

  line-height: 1.05;
}

.series-info p:not(.series-label) {
  max-width: 350px;

  margin-top: 18px;

  color: var(--muted);

  font-size: 14px;

  line-height: 1.65;
}

.read-link {
  display: inline-block;

  margin-top: 28px;

  padding-bottom: 5px;

  border-bottom: 1px solid var(--text);

  font-size: 12px;
}

/* ABOUT */

.about {
  padding: 140px 10vw;

  border-top: 1px solid var(--line);

  display: grid;

  grid-template-columns: 1.1fr 0.9fr;

  gap: 10vw;
}

.about-heading h2 {
  max-width: 650px;

  margin-top: 20px;

  font-family: "Playfair Display", serif;

  font-size: clamp(45px, 5.5vw, 78px);

  font-weight: 500;

  line-height: 0.98;

  letter-spacing: -0.045em;
}

.about-text {
  padding-top: 30px;
}

.about-text p {
  margin-bottom: 25px;

  color: var(--muted);

  font-size: 16px;

  line-height: 1.8;
}

/* FOOTER */

.site-footer {
  padding: 35px 5vw;

  border-top: 1px solid var(--line);

  display: flex;

  justify-content: space-between;

  font-size: 10px;

  letter-spacing: 0.1em;

  color: var(--muted);
}

/* RESPONSIVE */

@media (max-width: 850px) {
  .hero {
    padding: 90px 7vw 70px;
  }

  .series-grid {
    flex-direction: column;

    max-height: calc(400px * 3 + 36px);

    overflow-x: hidden;

    overflow-y: auto;

    padding-right: 10px;

    padding-bottom: 0;

    scrollbar-width: thin;

    scrollbar-color: var(--muted) transparent;
  }

  .series-card {
    flex: 0 0 auto;

    min-height: 400px;

    width: 100%;
  }

  .about {
    grid-template-columns: 1fr;

    gap: 30px;

    padding: 100px 7vw;
  }
}

@media (max-width: 550px) {
  .site-header {
    padding: 22px 6vw;
  }

  .navigation {
    gap: 18px;
  }

  .hero {
    min-height: 75vh;

    padding: 75px 6vw;
  }

  .hero h1 {
    font-size: 68px;
  }

  .hero-intro {
    margin-top: 40px;

    font-size: 15px;
  }

  .library {
    padding: 80px 6vw;
  }

  .section-heading {
    margin-bottom: 35px;
  }

  .series-grid {
    max-height: calc(390px * 3 + 36px);
  }

  .series-card {
    min-height: 390px;

    padding: 25px;
  }

  .library-controls {
    flex-wrap: wrap;

    justify-content: flex-end;

    gap: 7px;
  }

  .series-number {
    font-size: 75px;
  }

  .about {
    padding: 90px 6vw;
  }

  .site-footer {
    padding: 30px 6vw;

    flex-direction: column;

    gap: 8px;
  }
}

/* ========================================

    PAGE LOAD / SCROLL ANIMATIONS

    ======================================== */

/* Initial elements visible when the page loads */

.site-header,
.hero .eyebrow,
.hero h1,
.hero-intro,
.explore-link {
  opacity: 0;

  animation: fadeIn 0.9s ease forwards;
}

/* Initial animation timing */

.site-header {
  animation-delay: 0.05s;
}

.hero .eyebrow {
  animation-delay: 0.15s;
}

.hero h1 {
  animation-delay: 0.3s;
}

.hero-intro {
  animation-delay: 0.5s;
}

.explore-link {
  animation-delay: 0.7s;
}

/* Scroll-reveal elements */

.reveal {
  opacity: 0;

  transform: translateY(45px);

  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;

  transform: translateY(0);
}

/* Stagger the magazine cards */

.series-card:nth-child(1) {
  transition-delay: 0.05s;
}

.series-card:nth-child(2) {
  transition-delay: 0.15s;
}

.series-card:nth-child(3) {
  transition-delay: 0.25s;
}

/* Fade-in animation */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ========================================

   HERO EDITORIAL SLIDESHOW

   ======================================== */

.hero {
  position: relative;

  overflow: hidden;
}

/* Main slideshow */

.hero-slideshow {
  position: absolute;

  left: 53%;

  top: 13%;

  width: 49vw;

  max-width: none;

  z-index: 1;

  opacity: 0;

  animation: fadeIn 1s ease forwards;

  animation-delay: 0.45s;
}

/* Image frame */

.slideshow-frame {
  position: relative;

  width: 100%;

  height: 58vh;

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.28);

  background: #151515;

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

/* Images */

.slide-image {
  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  object-fit: cover;

  opacity: 0;

  transition: opacity 1.2s ease;
}

.slide-image.active {
  opacity: 1;
}

/* ========================================

   GLASS EFFECT

   ======================================== */

.glass-sheen {
  position: absolute;

  inset: 0;

  pointer-events: none;

  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.12) 0%,

    rgba(255, 255, 255, 0.035) 18%,

    rgba(255, 255, 255, 0) 42%,

    rgba(255, 255, 255, 0.035) 78%,

    rgba(255, 255, 255, 0.09) 100%
  );

  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 45px rgba(255, 255, 255, 0.035);

  backdrop-filter: blur(0.5px);
}

/* ========================================

   ARROW BUTTONS

   ======================================== */

.slide-button {
  position: absolute;

  top: 50%;

  transform: translateY(-50%);

  z-index: 5;

  width: 42px;

  height: 42px;

  display: flex;

  align-items: center;

  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.35);

  border-radius: 50%;

  background: rgba(20, 20, 20, 0.22);

  color: white;

  font-family: Arial, sans-serif;

  font-size: 28px;

  font-weight: 300;

  line-height: 1;

  cursor: pointer;

  backdrop-filter: blur(8px);

  opacity: 0;

  transition:
    opacity 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.slideshow-frame:hover .slide-button {
  opacity: 1;
}

.slide-button:hover {
  background: rgba(20, 20, 20, 0.48);

  transform: translateY(-50%) scale(1.05);
}

.slide-prev {
  left: 18px;
}

.slide-next {
  right: 18px;
}

/* ========================================

   DOTS

   ======================================== */

.slide-dots {
  width: 100%;

  margin-top: 18px;

  display: flex;

  justify-content: center;

  align-items: center;

  gap: 7px;
}

.slide-dot {
  width: 5px;

  height: 5px;

  padding: 0;

  border: 0;

  border-radius: 10px;

  background: rgba(23, 23, 23, 0.28);

  cursor: pointer;

  transition:
    width 0.5s ease,
    background 0.5s ease;
}

.slide-dot.active {
  width: 28px;

  background: #171717;
}

/* ========================================

   MOBILE

   ======================================== */

@media (max-width: 850px) {
  .hero-slideshow {
    position: relative;
    left: auto;
    top: auto;
    width: calc(100% + 50px);
    max-width: none;
    margin-left: -25px;
    margin-top: 65px;
  }

  .slideshow-frame {
    height: 350px;
  }

  .slide-button {
    opacity: 1;
  }
}

/* ========================================

   FINAL CAROUSEL ADJUSTMENTS

   ======================================== */

.hero-slideshow {
  left: 51%;

  top: 12%;

  width: 47vw;

  max-width: 760px;

  opacity: 0;

  animation: fadeIn 1s ease forwards;

  animation-delay: 0.45s;
}

/* IMAGE */

.slideshow-frame {
  height: 60vh;

  border-radius: 18px;

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.3);

  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.09);
}

/* GLASS EFFECT */

.glass-sheen {
  border-radius: 18px;
}

/* ARROWS */

.slide-button {
  width: 38px;

  height: 38px;

  background: rgba(20, 20, 20, 0.28);

  backdrop-filter: blur(8px);

  border: 1px solid rgba(255, 255, 255, 0.32);
}

.slide-prev {
  left: 14px;
}

.slide-next {
  right: 14px;
}

/* ========================================
   DOTS BELOW IMAGE
   ======================================== */

.slide-dots {
  position: relative;

  width: 170px;
  height: 20px;

  margin: 14px auto 0;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 6px;

  overflow: hidden;
}

/* ========================================
   15 FIXED DOTS
   ======================================== */

.slide-dot {
  flex-shrink: 0;

  width: 5px;
  height: 5px;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background: rgba(23, 23, 23, 0.28);

  cursor: pointer;
}

/* ========================================
   ACTIVE DOT
   ======================================== */

.slide-dot.active {
  width: 5px;
  height: 5px;

  border-radius: 10px;

  background: #171717;

  animation: dotProgress 5.4s linear forwards;
}

/* ========================================
   2.7s EXTEND
   2.7s SHRINK
   ======================================== */

@keyframes dotProgress {
  0% {
    width: 5px;
  }

  50% {
    width: 28px;
  }

  100% {
    width: 5px;
  }
}
@media (max-width: 850px) {
  .hero-slideshow {
    width: 100vw !important;
    max-width: none !important;
    left: 50%;
    margin-left: 0;
    transform: translateX(-50%);
  }

  .slide-dots {
    width: 100% !important;
  }
}
@media (max-width: 550px) and (orientation: portrait) {
  .slide-image {
    object-position: left center;
  }
}
/* MOBILE LIBRARY CARD IMAGE FIX */

@media (max-width: 850px) {
  .series-card:has(.edition-card-image) {
    padding-top: 25px;
  }

  .edition-card-image {
    position: relative;
    top: auto;
    right: auto;

    width: calc(100% - 50px);
    height: auto;
    aspect-ratio: 1 / 1;

    margin-left: 25px;
    object-fit: cover;
  }
  .series-card:has(.edition-card-image) .series-number {
    margin-top: 15px;
    margin-bottom: 20px;
  }
}
@media (min-width: 551px) and (max-width: 1024px) and (orientation: landscape) {
  .series-card:has(.edition-card-image) {
    padding-top: 25px;
  }

  .edition-card-image {
    position: relative;
    top: auto;
    right: auto;

    width: calc(100% - 50px);
    height: auto;
    aspect-ratio: 1 / 1;

    margin-left: 25px;
    object-fit: cover;
  }

  .series-card:has(.edition-card-image) .series-number {
    margin-top: 15px;
    margin-bottom: 20px;
  }
}
