.landing {
  overflow: hidden;
  background: var(--col-bg);
  color: var(--col-fg-on);
  padding: 0 0;
}
.landing section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 36px;
}

/* Hero */
.landing section.hero {
  padding-top: 28px;
}
.landing section.hero .inner {
  display: flex;
  position: relative;
  align-items: center;
  flex-direction: column;
  max-width: 1100px;
  & > .frame {
    display: flex;
    position: absolute;
    align-items: center;
    justify-content: center;
    top: min(35vw, 90%);
    right: -100px;
    width: 50%;
  }
  & > .glance {
    display: flex;
    position: absolute;
    align-items: center;
    justify-content: center;
    top: 0;
    right: 0;
    width: 45%;
    aspect-ratio: 1.2;
    border-radius: 10px;
    background: linear-gradient(
      to right,
      var(--col-outline-on),
      var(--col-outline-on),
      var(--col-outline-dim)
    );
    color: var(--col-fg);
    z-index: 8;
  }
  & > :not(.frame, .glance) {
    margin-right: 50%;
    padding-right: 6%;
    z-index: 8;
  }
  h1 {
    margin-top: 0;
    margin-bottom: 0.4rem;
    letter-spacing: 0.7px;
    font-family: montserr;
    font-size: 2.35rem;
    line-height: 1.35;
    color: var(--col-fg-on);
  }
  p {
    margin-top: 1rem;
    font-family: montserr;
    font-weight: normal;
    font-size: 1rem;
    line-height: 1.39;
    color: var(--col-fg-dim);
    b {
      font-weight: normal;
      font-family: manrope;
      letter-spacing: 0.8px;
      color: var(--col-fg-on);
    }
    i {
      font-style: normal;
      margin-left: 2px;
      margin-right: 4px;
    }
  }
  .cta {
    display: flex;
    justify-content: center;
    width: max(50%, 540px);
    margin-right: min(44%, calc(94% - 540px));
    margin-block: 1rem;
    & > .card {
      margin-top: 16px;
      height: 96px;
      width: 100%;
    }
    .button {
      padding: 16px;
      font-size: 1.35rem;
    }
  }
}
@media (width < 1322px) {
  .landing section.hero .inner {
    padding-bottom: 16px;
  }
}
@media (width < 1055px) {
  .landing section.hero .inner {
    padding-bottom: 24px;
  }
}
@media (width < 998px) {
  .landing section.hero .inner {
    padding-bottom: 108px;
    & > .frame {
      top: 65%;
    }
    & > .glance {
      width: 45%;
      aspect-ratio: 1;
    }
    & > :not(.frame, .glance) {
      margin-right: 45%;
      height: 50%;
      &:last-child {
        margin-right: 0;
      }
    }
    .cta > .card {
      position: absolute;
      top: auto;
      left: 0;
      right: 0;
      width: unset;
    }
    h1 {
      font-size: 2.15rem;
    }
  }
}
@media (width < 900px) {
  .landing section.hero {
    padding-top: 28px;
  }
  .landing section.hero .inner {
    & > .frame {
      --w: calc(50vw - var(--val-menubar-width));
      top: min(59vw, calc(var(--w) + 5rem), 65vh);
      right: -100px;
      width: 85%;
    }
    & > .glance {
      position: relative;
      top: 0;
      bottom: unset;
      max-height: 70vh;
      width: calc(100% - 24px);
      margin-inline: 12px;
      aspect-ratio: 1.65;
    }
    & > :not(.frame, .glance) {
      margin-right: 0;
      padding-right: 0;
      text-align: center;
    }
    h1 {
      max-width: 97.5%;
      margin-top: 96px;
    }
  }
}
@media (width < 720px) {
  .landing section.hero .inner {
    & > .frame {
      top: min(45vw, 63vh);
      right: -100px;
    }
    & > .glance {
      aspect-ratio: 1.65;
    }
  }
}
@media (width < 632px) {
  .landing section.hero .inner {
    & > .frame {
      width: 100%;
    }
  }
}

/* Hero - Catalog */
.landing section.hero .catalog {
  display: flex;
  position: absolute;
  align-items: center;
  height: 33%;
  width: min(75%, 355px);
  background-color: var(--col-surface);
  box-shadow: 0 2px 44px -1px #0009;
  border-radius: 6px;
  &:nth-child(1) {
    right: 16px;
    top: -16px;
  }
  &:nth-child(2) {
    right: -24px;
    top: auto;
  }
  &:nth-child(3) {
    right: 24px;
    bottom: -16px;
  }
}
@media (width < 900px) {
  .landing section.hero .catalog {
    height: min(50%, 33vh);
    &:nth-child(1) {
      right: unset;
      left: -10px;
      top: 16px;
    }
    &:nth-child(2) {
      right: -10px;
    }
    &:nth-child(3) {
      right: min(23%, 132px);
      bottom: 16px;
    }
  }
}
@media (width < 512px) {
  .landing section.hero .catalog {
    width: 85%;
    height: 55%;
    min-width: 100px;
    &:nth-child(1) {
      right: unset;
      left: -2%;
      top: 16px;
    }
    &:nth-child(2) {
      left: 8%;
      right: unset;
    }
    &:nth-child(3) {
      left: 18%;
      right: unset;
      bottom: 16px;
    }
  }
}

/* Tray */
.landing section.tray {
  position: relative;
  padding-top: 16px;
  padding-inline: 36px;
  padding-bottom: 48px;
  transition: margin 0.2s;
}
.landing section.tray .inner {
  display: flex;
  position: relative;
  align-items: center;
  flex-direction: row;
  max-width: 1100px;
  margin-top: 24px;
  width: 100%;
  gap: 20px;
  & > .frame {
    display: flex;
    position: absolute;
    align-items: center;
    justify-content: center;
    top: calc(100% - 16px);
    left: -100px;
    width: 40%;
  }
  & > :not(.frame) {
    z-index: 5;
  }
}
@media (width < 1350px) {
  .landing section.tray {
    --h: min(calc(100vw - 1301px), 24px);
    margin-top: max(var(--h), -68px);
    transition: none;
  }
}
@media (width < 1048px) {
  .landing section.tray {
    padding-inline: 24px;
    padding-bottom: 48px;
    padding-top: 24px;
  }
  .landing section.tray .inner {
    flex-direction: column;
    gap: 2.5rem;
  }
}
@media (width < 998px) {
  .landing section.tray {
    margin-top: 0;
  }
}
@media (width < 512px) {
  .landing section.tray {
    padding-inline: 20px;
  }
}

/* Tray Highlight */
.landing section.tray .highlight {
  display: flex;
  align-items: start;
  flex-direction: column;
  min-height: 100px;
  width: 33.33%;
  padding: 20px;
  padding-top: 0;
  background-color: var(--col-surface);
  border-radius: 6px;
  flex: 1;
  & > .icon {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    top: -1.5rem;
    width: 5.5rem;
    height: 4.5rem;
    margin-bottom: -1.5rem;
    font-size: 3.5rem;
    color: var(--col-fg);
    background-color: var(--col-bg);
    border-radius: 8px;
  }
  & .badge {
    margin-left: 4px;
    padding: 2px 4px;
    letter-spacing: 1.2px;
    font-family: manrope;
    font-weight: bold;
    font-size: 0.7rem;
    color: var(--col-black);
    background-color: var(--col-primary);
    border-radius: 4px;
  }
  & > .title {
    margin-top: 12px;
    font-size: 1.33rem;
    font-weight: bold;
    font-family: montserr;
    letter-spacing: 0.85px;
  }
  & > p {
    margin-top: 10px;
    font-size: 1rem;
    font-weight: normal;
    font-family: montserr;
    color: var(--col-fg-dim);
    line-height: 1.5;
    b {
      font-weight: normal;
      font-family: manrope;
      letter-spacing: 0.4px;
      color: var(--col-fg-on);
      cursor: pointer;
    }
    a > b {
      font-weight: bold;
      color: var(--col-primary-on);
    }
    a:hover > b {
      color: var(--col-primary);
    }
  }
}
@media (width < 1048px) {
  .landing section.tray .highlight {
    width: calc(100% - 48px);
    flex: unset;
  }
}
@media (width < 512px) {
  .landing section.tray .highlight {
    width: calc(100% - 40px);
    flex: unset;
  }
}

/* Grid */
.landing section.grid {
  position: relative;
  flex-direction: column;
  transition: margin 0.2s;
  margin-top: 40px;
}
.landing section.grid .inner {
  display: grid;
  align-items: start;
  width: 100%;
  max-width: 1100px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  column-gap: 3rem;
  row-gap: 4rem;
}
@media (width < 1301px) {
  .landing section.grid {
    margin-top: -24px;
  }
}
@media (width < 720px) {
  .landing section.grid .inner {
    padding-inline: 16px;
    row-gap: 3.4rem;
  }
}

/* Grid Info */
.landing section.grid .intro {
  display: block;
  position: relative;
  h3 {
    margin-block: 0.5rem;
    font-family: montserr;
    font-weight: normal;
    font-size: 1.8rem;
  }
  p {
    padding-block: 0;
    margin-block: 0;
    margin-bottom: 10px;
    font-size: 1rem;
    font-family: montserr;
    line-height: 1.5;
    color: var(--col-fg-dim);
  }
}
@media (width < 512px) {
  .landing section.grid .intro {
    padding-left: 1rem;
  }
}

/* Grid Element */
.landing section.grid .element {
  display: flex;
  position: relative;
  flex-direction: column;
  margin-right: -1rem;
  cursor: pointer;
  text-decoration: none;
  gap: 0.4rem;
  &::before {
    content: "";
    display: block;
    position: absolute;
    top: 0.8rem;
    left: 1rem;
    right: 0;
    bottom: -0.25rem;
    border-radius: 8px;
    background-color: var(--col-outline);
    transition: inset 0.2s;
  }
  &:hover::before {
    top: -0.8rem;
    left: -1rem;
    bottom: -2.35rem;
  }
  & > .article {
    position: relative;
    top: 0;
    left: 0;
    aspect-ratio: 2;
    width: calc(100% - 1rem);
    background-color: var(--col-outline-on);
    border-radius: 8px;
    z-index: 4;
  }
  & > .author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    z-index: 5;
    img {
      width: 3rem;
      height: 3rem;
      background-color: var(--col-fg);
      border-radius: 6px;
      overflow: hidden;
    }
    p {
      display: flex;
      flex-direction: column;
      align-items: start;
      gap: 4px;
    }
    p > span:first-child {
      letter-spacing: 0.5px;
      font-size: 1.1rem;
      font-family: manrope;
      color: var(--col-fg-on);
    }
    p > span:last-child {
      font-family: montserr;
      color: var(--col-fg-dim);
      transition: color 0.2s;
      &:hover {
        color: var(--col-fg);
      }
    }
  }
  & > .options {
    display: flex;
    position: absolute;
    bottom: -1.6rem;
    height: 1.6rem;
    width: 100%;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s;
    button {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 6px;
      height: 1.7rem;
      padding: 0 8px;
      font-size: 16px;
      color: var(--col-fg);
      background-color: var(--col-outline-on);
      border: none;
      border-radius: 6px;
      transition: all 0.2s;
      &:hover {
        color: var(--col-fg-on);
        background-color: var(--col-primary-off);
      }
      .span {
        line-height: 1;
      }
    }
  }
  &:hover > .options {
    opacity: 1;
    transform: unset;
  }
  & .launch {
    display: flex;
    position: absolute;
    align-items: center;
    justify-content: center;
    top: 0.8rem;
    right: 1.6rem;
    width: 32px;
    height: 32px;
    font-size: 24px;
    font-family: icons;
    text-decoration: none;
    color: var(--col-fg-off);
    border-radius: 4px; /* radius */
    background-color: var(--col-outline-on);
    box-shadow: 0 2px 2px 0 var(--col-shadow);
    transform: translateX(4px) translateY(-4px);
    transition: all 0.2s;
    opacity: 0;
    z-index: 8;
    scale: 1.1;
    &:hover {
      background-color: var(--col-primary-off);
    }
  }
  &:hover .launch {
    transform: unset;
    opacity: 1;
    scale: 1;
  }
}
