/* Header Styles */

.frosted-container {
  position: fixed;
  top: 1.5em;
  left: 1.5em;
  right: 1.5em;
  z-index: 1001;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em 1.5em;
  background: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  pointer-events: auto;
}

@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  .frosted-container {
    background: rgba(255, 255, 255, 0.65);
  }
}

.logo img {
  height: 30px;
  width: auto;
  display: block;
}

.icon-bar {
  position: relative;
  top: 0;
  right: 0;
  gap: 0.75rem;
  display: flex;
  align-items: center;
  pointer-events: auto;
  z-index: auto;
}

.icon-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.icon-button img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.5s ease;
}

.icon-bar .contact-text {
  font-family: "NimbusRomNo9L-Reg", serif;
  font-weight: 500;
  color: black;
  font-size: 1.0625rem;
  white-space: nowrap;
  margin-right: -5px;
}

.menu-trigger,
.grim {
  display: grid !important;
}

.icon-bar .menu-trigger {
  align-self: center;
}

.content--fixed > .menu-trigger {
  position: fixed;
  top: 1.5em;
  right: 1.5em;
  pointer-events: auto;
  background: none;
  border: none;
  padding: 0;
}

.content--fixed > .menu-trigger img {
  width: 24px;
  height: 24px;
  display: block;
}

@media (max-width: 768px) {
  .contact-text {
    display: none;
  }
}

/* Grid Menu System */

.grim {
  display: grid;
  position: fixed;
  z-index: 1000;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  grid-template-columns: repeat(32, 3.125vw);
  grid-template-rows: repeat(32, 3.125vh);
  grid-template-rows: repeat(32, 3.125dvh);
  pointer-events: none;
}

.grim--open {
  pointer-events: auto;
}

.grim__item {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.grim__item:first-child {
  grid-area: 31 / 1 / 33 / 2;
  -webkit-grid-row: 31 / 33;
  -webkit-grid-column: 1 / 2;
}
.grim__item:nth-child(2) {
  grid-area: 31 / 2 / 33 / 3;
  -webkit-grid-row: 31 / 33;
  -webkit-grid-column: 2 / 3;
}
.grim__item:nth-child(3) {
  grid-area: 29 / 1 / 31 / 3;
  -webkit-grid-row: 29 / 31;
  -webkit-grid-column: 1 / 3;
}
.grim__item:nth-child(4) {
  grid-area: 29 / 3 / 33 / 5;
  -webkit-grid-row: 29 / 33;
  -webkit-grid-column: 3 / 5;
}
.grim__item:nth-child(5) {
  grid-area: 25 / 1 / 29 / 5;
  -webkit-grid-row: 25 / 29;
  -webkit-grid-column: 1 / 5;
}
.grim__item:nth-child(6) {
  grid-area: 25 / 5 / 33 / 9;
  -webkit-grid-row: 25 / 33;
  -webkit-grid-column: 5 / 9;
}
.grim__item:nth-child(7) {
  grid-area: 17 / 1 / 25 / 9;
  -webkit-grid-row: 17 / 25;
  -webkit-grid-column: 1 / 9;
}
.grim__item:nth-child(8) {
  grid-area: 17 / 9 / 33 / 17;
  -webkit-grid-row: 17 / 33;
  -webkit-grid-column: 9 / 17;
}
.grim__item:nth-child(9) {
  grid-area: 1 / 1 / 17 / 17;
  -webkit-grid-row: 1 / 17;
  -webkit-grid-column: 1 / 17;
}
.grim__item:nth-child(10) {
  grid-area: 1 / 17 / 33 / 33;
  -webkit-grid-row: 1 / 33;
  -webkit-grid-column: 17 / 33;
}

.grim__item-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  box-shadow: 0 0 0 2px currentColor;
  background: currentColor;
}

.grim__item-bg--1 {
  color: #555;
}
.grim__item-bg--2 {
  color: #444;
}
.grim__item-bg--3 {
  color: #000;
}
.grim__item-bg--4 {
  color: #333;
}
.grim__item-bg--5 {
  color: #222;
}
.grim__item-bg--6 {
  color: #555;
}
.grim__item-bg--7 {
  color: #444;
}
.grim__item-bg--8 {
  color: #333;
}
.grim__item-bg--9 {
  color: #222;
}
.grim__item-bg--10 {
  color: #000;
}

.grim__item-img {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-position: 50% 100%;
  background-color: currentColor;
}

.grim__item-img--1 {
  color: #fcfdff;
}
.grim__item-img--2 {
  color: #a9bdd6;
}
.grim__item-img--3 {
  color: #9ed4d4;
}
.grim__item-img--4 {
  color: #d0bebe;
}
.grim__item-img--5 {
  color: #df9e98;
}

.grim__item-content {
  position: relative;
  color: var(--color-link);
  overflow: hidden;
  transition: color 500ms ease;
  -webkit-transition: color 500ms ease;
}

.grim__item-content:hover {
  color: var(--color-link-hover);
}

.grim__item-inner {
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  opacity: 0;
}

.grim__item-title {
  font-family: "NimbusRomNo9L-Reg", serif;
  font-weight: 500;
  margin: 0;
  font-size: 2.25rem;
}

.grim__item:nth-child(-n + 6) .grim__item-title {
  font-size: 2vmax;
}

.grim__item:nth-child(5) .grim__item-title {
  color: #fff;
}

.grim__item-desc {
  font-family: "NimbusRomNo9L-Reg", serif;
  font-weight: 500;
  font-size: 0.95rem;
  margin: 0.5rem 0 0;
}

.grim__item-desc::after {
  content: "\2014";
  position: relative;
  display: block;
  font-size: 1.75rem;
  transform: scale(var(--after-scale, 0)) scaleX(var(--after-hover-scale, 1));
  -webkit-transform: scale(var(--after-scale, 0))
    scaleX(var(--after-hover-scale, 1));
  transform-origin: center;
  -webkit-transform-origin: center;
  transition: transform 0.5s ease-out;
  -webkit-transition: -webkit-transform 0.5s ease-out;
}

.grim__item--has-video::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  -webkit-transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.grim--open .grim__item--has-video::before {
  opacity: 1;
}

.grim__item video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-object-fit: cover;
  display: none;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s ease;
  -webkit-transition: opacity 0.5s ease;
}

/* Desktop */
@media screen and (min-width: 1141px) {
  .menu-trigger {
    display: inline-block;
    background: none;
    border: 0;
    grid-area: menu;
    justify-self: start;
    align-self: end;
    cursor: pointer;
    pointer-events: auto;
    font-family: inherit;
    color: inherit;
    position: relative;
    padding: 0;
    white-space: nowrap;
  }

  .menu-trigger--close {
    color: #fff;
    align-self: center;
    font-family: "NimbusRomNo9L-Reg", serif;
  }

  .grim__item {
    position: relative;
    overflow: hidden;
  }

  .grim__item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-object-fit: cover;
    display: none;
    z-index: 1;
    pointer-events: none;
  }

  .grim__item-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
  }

  .grim__item video {
    transition: opacity 0.5s ease;
    -webkit-transition: opacity 0.5s ease;
  }
}

/* Large Tablet */
@media screen and (max-width: 1140px) and (min-width: 821px),
  screen and (max-width: 820px) and (min-width: 768px),
  screen and (max-width: 767px) {
  .menu-trigger,
  .menu-trigger--close {
    display: inline-flex !important;
    background: none !important;
    border: none !important;
    padding: 0;
    margin: 0;
    color: #fff;
    font: inherit;
    outline: none;
  }

  .menu-trigger--close {
    font-size: 2rem;
    font-family: "NimbusRomNo9L-Reg", serif;
  }

  .grim {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto) auto;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    pointer-events: none;
  }

  .grim.grim--open {
    pointer-events: auto;
  }

  .grim__item:nth-child(1),
  .grim__item:nth-child(2),
  .grim__item:nth-child(4) {
    display: none !important;
  }

  .grim__item:nth-child(10) {
    grid-row: 1;
    grid-column: 1;
    -webkit-grid-row: 1;
    -webkit-grid-column: 1;
  }
  .grim__item:nth-child(9) {
    grid-row: 1;
    grid-column: 2;
    -webkit-grid-row: 1;
    -webkit-grid-column: 2;
  }
  .grim__item:nth-child(8) {
    grid-row: 2;
    grid-column: 1;
    -webkit-grid-row: 2;
    -webkit-grid-column: 1;
  }
  .grim__item:nth-child(7) {
    grid-row: 2;
    grid-column: 2;
    -webkit-grid-row: 2;
    -webkit-grid-column: 2;
  }
  .grim__item:nth-child(6) {
    grid-row: 3;
    grid-column: 1;
    -webkit-grid-row: 3;
    -webkit-grid-column: 1;
  }
  .grim__item:nth-child(5) {
    grid-row: 3;
    grid-column: 2;
    -webkit-grid-row: 3;
    -webkit-grid-column: 2;
  }

  .grim__item:nth-child(3) {
    grid-row: 4;
    grid-column: 1 / -1;
    -webkit-grid-row: 4;
    -webkit-grid-column: 1 / -1;
  }

  .grim__item:nth-child(3) .grim__item-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .grim__item-title {
    font-size: 3rem;
  }

  .grim__item:nth-child(-n + 6) .grim__item-title {
    font-size: 3rem;
  }

  .grim__item-desc {
    font-size: 1.5rem;
  }
}

/* Mobile only */
@media screen and (max-width: 767px) {
  .frosted-container {
    left: 0.7em;
    right: 0.7em;
  }

  .menu-trigger--close {
    font-size: 1.5rem;
    font-family: "NimbusRomNo9L-Reg", serif;
  }

  .logo img {
    content: url("/assets/envy-diamonds-logo.png");
  }

  .grim {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto) auto;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    pointer-events: none;
  }

  .grim.grim--open {
    pointer-events: auto;
  }

  .grim__item:nth-child(1),
  .grim__item:nth-child(2),
  .grim__item:nth-child(4) {
    display: none !important;
  }

  .grim__item:nth-child(10) {
    grid-row: 1;
    grid-column: 1;
    -webkit-grid-row: 1;
    -webkit-grid-column: 1;
  }
  .grim__item:nth-child(9) {
    grid-row: 1;
    grid-column: 2;
    -webkit-grid-row: 1;
    -webkit-grid-column: 2;
  }
  .grim__item:nth-child(8) {
    grid-row: 2;
    grid-column: 1;
    -webkit-grid-row: 2;
    -webkit-grid-column: 1;
  }
  .grim__item:nth-child(7) {
    grid-row: 2;
    grid-column: 2;
    -webkit-grid-row: 2;
    -webkit-grid-column: 2;
  }
  .grim__item:nth-child(6) {
    grid-row: 3;
    grid-column: 1;
    -webkit-grid-row: 3;
    -webkit-grid-column: 1;
  }
  .grim__item:nth-child(5) {
    grid-row: 3;
    grid-column: 2;
    -webkit-grid-row: 3;
    -webkit-grid-column: 2;
  }

  .grim__item:nth-child(3) {
    grid-row: 4;
    grid-column: 1 / -1;
    -webkit-grid-row: 4;
    -webkit-grid-column: 1 / -1;
  }

  .grim__item:nth-child(3) .grim__item-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .grim__item:nth-child(-n + 6) .grim__item-title {
    font-size: 1.75rem;
  }

  .grim__item-title {
    font-size: 1.75rem;
  }

  .grim__item-desc {
    font-size: 0.85rem;
  }
}

@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .grim {
    display: -webkit-grid;
    display: grid;
  }

  .frosted-container {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  .icon-bar {
    gap: 0.75rem;
    -webkit-gap: 0.75rem;
  }
}

@supports (-webkit-touch-callout: none) {
  .grim {
    height: 100vh;
    height: -webkit-fill-available;
  }

  body {
    height: 100vh;
    height: -webkit-fill-available;
  }
}