@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond.ttf") format("truetype");
  font-weight: 400 800;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat.ttf") format("truetype");
  font-weight: 100 900;
}

body {
  background: #F9F9F9;
  margin: 0;
  font-family: "Montserrat", sans-serif;
}

h1 {
  font-family: "EB Garamond", serif;
  color: #121212;
}

p {
  font-family: "Montserrat", sans-serif;
  color: #4D4D4D;
  font-size: 16px;
}

header {
  position: relative;
  text-align: center;
  padding: 35px 16px;
  border-bottom: 1px solid #E5E5E5;
}

header img {
  width: 350px;
  max-width: 100%;
  height: auto;
}

/* Browse Catalog button */
.shop-button {
  position: absolute;
  top: 24px;
  right: 40px;
  padding: 10px 22px;
  border: 1px solid #4D4D4D;
  color: #4D4D4D;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s;
}

.shop-button:hover {
  background: #4D4D4D;
  color: #F9F9F9;
}

nav {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

nav a {
  font-family: "EB Garamond", serif;
  font-size: 15px;
  font-weight: 500;
  color: #1F3550;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

nav a:hover {
  opacity: 0.5;
}

h2 {
  font-family: "EB Garamond", serif;
  color: #121212;
  font-size: 22px;
  font-weight: 400;
  text-align: center;
  margin: 0 0 24px;
}

.collections {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.tile {
  text-decoration: none;
  text-align: center;
}

.tile-photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.tile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.tile:hover .tile-photo img {
  transform: scale(1.05);
}

.tile span {
  display: inline-block;
  position: relative;
  margin-top: 12px;
  font-family: "EB Garamond", serif;
  font-size: 16px;
  letter-spacing: 1px;
  color: #1F3550;
}

/* Arrow */
.arrow {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 12px;
  width: 18px;
  height: 0;
  border-top: 1px solid currentColor;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.arrow::after {
  content: "";
  position: absolute;
  right: 1px;
  top: -4px;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

.tile:hover .arrow {
  width: 25px;
}

/* Six collections */
.tiles-six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tiles-six .tile-photo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.tiles-six .tile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0) scale(1);
  transition: transform 0.6s ease;
  backface-visibility: hidden;
  will-change: transform;
}

.tiles-six .tile:hover .tile-photo img {
  transform: translateZ(0) scale(1.05);
}

@media (max-width: 760px) {
  .tiles-six {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* Footer */
footer {
  border-top: 1px solid #E5E5E5;
  margin-top: 20px;
  padding: 120px 120px 0;
  text-align: center;
}

footer a {
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #4D4D4D;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

footer a:hover {
  opacity: 0.5;
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 15px;
  max-width: 1100px;
  margin: 0 auto;
}

.social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.social img {
  width: 14px;
  height: 22px;
  display: block;
}

.copyright {
  margin: 120px -16px 0;
  padding: 10px 16px;
  border-top: 1px solid #E5E5E5;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  color: #767676;
}

@media (max-width: 760px) {
  footer {
    padding-top: 64px;
  }

  .copyright {
    margin-top: 64px;
  }
}

/* Phone and tablet header */
/* Menu parts: hidden only on desktop */
.menu-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 961px) {
  .burger,
  .close,
  .overlay {
    display: none;
  }
}

/* Phone and tablet header */
@media (max-width: 960px) {

  header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
  }

  .logo {
    flex: 1;
    text-align: center;
  }

  header .logo img {
    width: 90px;
  }

  /* Three lines */
  .burger {
    display: flex;
    flex: 0 0 26px;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    cursor: pointer;
  }

  .burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #1F3550;
  }

  /* Browse Catalog button in two lines */
  .shop-button {
    position: static;
    margin: 0;
    padding: 6px 12px;
    font-size: 8px;
    line-height: 1.3;
    text-align: center;
    width: min-content;
    white-space: normal;
  }

  /* Dark background behind the panel */
  .overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
  }

  /* The sliding panel */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85%;
    margin: 0;
    padding: 90px 40px 40px;
    box-sizing: border-box;
    background: #fff;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 28px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 20;
  }

  nav a {
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: #4D4D4D;
  }

  /* Close cross */
  .close {
    display: block;
    position: absolute;
    top: 24px;
    right: 24px;
    width: 28px;
    height: 28px;
    cursor: pointer;
  }

  .close::before,
  .close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #4D4D4D;
  }

  .close::before { transform: rotate(45deg); }
  .close::after  { transform: rotate(-45deg); }

  /* When the checkbox is on, show the panel */
  .menu-toggle:checked ~ nav {
    transform: translateX(0);
  }

  .menu-toggle:checked ~ .overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Phones */
@media (max-width: 420px) {
  header .logo img {
    width: 90px;
  }

  .shop-button {
    padding: 6px 12px;
    font-size: 8px;
  }
}

/* Very narrow phones */
@media (max-width: 360px) {
  header .logo img {
    width: 80px;
  }

  .shop-button {
    padding: 5px 8px;
    font-size: 7px;
  }
}

nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}