:root {
  --ink: #07100b;
  --screen-dark: #13241a;
  --screen-mid: #243f2e;
  --sepulkrant-green: #8ede75;
  --sepulkrant-green-deep: #4a8d56;
  --focus: #d9ff8a;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100dvh;
  background: var(--screen-dark);
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  font-family: Impact, "Arial Black", Haettenschweiler, sans-serif;
  letter-spacing: 0;
  background-color: var(--screen-dark);
  background-image: url("assets/tall/background.jpg");
  background-attachment: fixed;
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-shell {
  width: min(100%, 118rem);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2.5rem);
  display: grid;
  grid-template-areas:
    "brand"
    "device"
    "dialogue";
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 2rem);
}

.brand-area,
.device-area,
.dialogue-area {
  min-width: 0;
}

.brand-area {
  grid-area: brand;
  display: grid;
  place-items: center;
}

.brand-logo {
  display: block;
  width: min(76vw, 22rem);
  max-height: 34dvh;
  object-fit: contain;
  filter: drop-shadow(0 0.35rem 0.4rem rgb(0 0 0 / 0.22));
}

.device-area {
  grid-area: device;
  display: grid;
  place-items: center;
}

.device {
  position: relative;
  width: min(96vw, 46rem);
  aspect-ratio: 1031 / 883;
  filter: drop-shadow(0 1rem 0.75rem rgb(0 0 0 / 0.18));
}

.device-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.demo-screen {
  position: absolute;
  z-index: 1;
  left: 27.3%;
  top: 10.1%;
  width: 51.7%;
  height: 42.5%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0.18rem solid #07110c;
  background:
    linear-gradient(90deg, rgb(142 222 117 / 0.09) 1px, transparent 1px),
    linear-gradient(rgb(142 222 117 / 0.07) 1px, transparent 1px),
    radial-gradient(circle at 35% 34%, rgb(142 222 117 / 0.19), transparent 34%),
    linear-gradient(135deg, var(--screen-mid), var(--screen-dark));
  background-size: 0.75rem 0.75rem, 0.75rem 0.75rem, cover, cover;
}

.demo-screen span {
  max-width: 80%;
  color: var(--sepulkrant-green);
  font-size: clamp(0.8rem, 3vw, 1.25rem);
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 0 0.4rem rgb(142 222 117 / 0.45);
}

.device-button {
  position: absolute;
  z-index: 5;
  width: 10.6%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.device-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.device-button:focus-visible {
  outline: 0.18rem solid var(--focus);
  outline-offset: 0.12rem;
}

.device-button--top-left {
  left: 42.8%;
  top: 64.5%;
}

.device-button--top-right {
  left: 52.6%;
  top: 64.5%;
}

.device-button--bottom-left {
  left: 42.8%;
  top: 75%;
}

.device-button--bottom-right {
  left: 52.6%;
  top: 75%;
}

.dialogue-area {
  grid-area: dialogue;
  display: grid;
  align-items: stretch;
  position: relative;
  width: min(100%, calc(100vw - 1.5rem));
  margin-inline: auto;
}

.dialogue-area::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 9%;
  right: 8%;
  top: -8%;
  height: 28%;
  background: url("assets/tall/deco.png") center / contain no-repeat;
  pointer-events: none;
}

.dialogue-box {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 20rem;
  aspect-ratio: 991 / 536;
  isolation: isolate;
}

.dialogue-box::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-style: solid;
  border-width: clamp(4.25rem, 16vw, 7.5rem) clamp(2.2rem, 8vw, 4.75rem)
    clamp(3rem, 10vw, 5.25rem);
  border-image-source: url("assets/tall/dialogue-box.png");
  border-image-slice: 128 88 98 88 fill;
  border-image-repeat: stretch;
  pointer-events: none;
}

.dialogue-box::after {
  content: "";
  position: absolute;
  right: 6.6%;
  top: 58%;
  width: 1.5%;
  height: 22%;
  background: url("assets/shared/scroll-bar.png") center / contain no-repeat;
  opacity: 0.85;
  pointer-events: none;
}

.link-list {
  position: absolute;
  left: 8%;
  right: 10%;
  top: 36%;
  bottom: 8%;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: clamp(0.42rem, 1.6vw, 0.8rem);
  align-content: stretch;
}

.link-list a {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0.22rem clamp(0.75rem, 3vw, 1.1rem) 0.32rem;
  color: var(--ink);
  font-size: clamp(1.35rem, 7vw, 2.55rem);
  line-height: 0.9;
  text-transform: uppercase;
  text-decoration: none;
  background: rgb(142 222 117 / 0.62);
  border: 0.2rem solid rgb(7 16 11 / 0.82);
  box-shadow: 0.28rem 0.28rem 0 rgb(7 16 11 / 0.28);
  transition:
    transform 120ms ease,
    background-color 120ms ease,
    box-shadow 120ms ease;
}

.link-list a:hover,
.link-list a:focus-visible {
  background: rgb(217 255 138 / 0.72);
}

.link-list a:focus-visible {
  outline: 0.18rem solid var(--focus);
  outline-offset: 0.16rem;
}

.link-list a:active {
  transform: translate(0.16rem, 0.16rem);
  box-shadow: 0.12rem 0.12rem 0 rgb(7 16 11 / 0.28);
}

@media (min-width: 900px) and (min-aspect-ratio: 4 / 3) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  body {
    background-image: url("assets/wide/background.jpg");
    background-attachment: scroll;
    background-position: center;
  }

  .site-shell {
    --wide-device-width: min(68vw, calc(85dvh * 1031 / 883), 52rem);
    --dialogue-gap: clamp(0.75rem, 1.4vw, 1.5rem);
    --dialogue-right: clamp(0.4rem, 1vw, 1.2rem);
    --dialogue-preferred-width: min(31vw, 27rem);
    width: 100%;
    height: 100dvh;
    min-height: 0;
    max-width: none;
    padding: 0;
    display: block;
    position: relative;
    overflow: hidden;
  }

  .brand-area {
    position: absolute;
    z-index: 1;
    left: clamp(1rem, 2.5vw, 2.25rem);
    top: 50%;
    display: block;
    transform: translateY(-50%);
  }

  .brand-logo {
    width: auto;
    height: clamp(39rem, 95dvh, 66rem);
    max-width: none;
    max-height: 96dvh;
  }

  .device-area {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: block;
    pointer-events: none;
  }

  .device {
    position: absolute;
    left: calc(50% - (var(--wide-device-width) * 0.5315));
    top: 50%;
    width: var(--wide-device-width);
    max-width: none;
    max-height: none;
    transform: translateY(-50%);
    pointer-events: auto;
  }

  .dialogue-area {
    position: absolute;
    z-index: 2;
    left: max(
      calc(100vw - var(--dialogue-preferred-width) - var(--dialogue-right)),
      calc(50% + (var(--wide-device-width) * 0.4685) + var(--dialogue-gap))
    );
    right: var(--dialogue-right);
    top: 50%;
    display: block;
    width: auto;
    height: min(96dvh, 57rem);
    margin-inline: 0;
    transform: translateY(-50%);
  }

  .dialogue-area::before {
    left: 7%;
    right: 24%;
    top: 3%;
    width: auto;
    height: 14%;
    background-image: url("assets/wide/deco.png");
    background-position: center top;
    background-size: contain;
  }

  .dialogue-box {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
  }

  .dialogue-box::before {
    border-width: min(8.8vh, 5.6rem) min(3.5vw, 2.7rem) min(8vh, 5rem)
      min(3.5vw, 2.7rem);
    border-image-source: url("assets/wide/dialogue-box.png");
    border-image-slice: 142 38 118 32 fill;
  }

  .dialogue-box::after {
    right: 5.8%;
    top: 40%;
    width: 3.2%;
    height: 16.6%;
  }

  .link-list {
    left: 9%;
    right: 10%;
    top: 49.5%;
    bottom: 7.5%;
    gap: clamp(0.48rem, 1.25vh, 0.8rem);
  }

  .link-list a {
    padding: 0.18rem clamp(0.55rem, 0.9vw, 0.85rem) 0.26rem;
    font-size: clamp(1.15rem, 2.3vw, 2.2rem);
    border-width: clamp(0.12rem, 0.28vw, 0.2rem);
  }
}

@media (max-width: 899px) {
  .brand-area {
    min-height: 28dvh;
  }

  .device {
    margin-top: -6dvh;
  }

  .dialogue-box {
    margin-top: -5dvh;
  }
}

@media (max-width: 520px) {
  .site-shell {
    padding-inline: 0.8rem;
  }

  .brand-logo {
    width: min(84vw, 20rem);
  }

  .device {
    width: min(96vw, 38rem);
  }

  .dialogue-box {
    min-height: 17rem;
  }
}
