@font-face {
  font-family: "Nippo";
  src: url("./assets/fonts/Nippo-Variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
}

@font-face {
  font-family: "Azeret Mono";
  src: url("./assets/fonts/AzeretMono-Variable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font-primary: "Nippo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Azeret Mono", "Courier New", monospace;
  --page-gutter: clamp(20px, 3vw, 56px);
  --page-gutter-y: clamp(22px, 3.2vw, 56px);
  --text: #f6f5f0;
  --focus: #ffffff;
  --ease-editorial: cubic-bezier(0.76, 0, 0.24, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #11110f;
}

html {
  overflow-x: hidden;
}

body,
button,
a {
  font-family: var(--font-primary);
}

body {
  color: var(--text);
  overflow: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.site-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #11110f;
}

.carousel,
.carousel__image,
.contrast-layer,
.interface {
  position: absolute;
  inset: 0;
}

.carousel {
  z-index: 0;
  overflow: hidden;
  background: #11110f;
}

.carousel__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  backface-visibility: hidden;
  transform-origin: center center;
}

.carousel__image--current {
  z-index: 1;
  opacity: 1;
}

.carousel__image--next {
  z-index: 2;
  opacity: 0;
}

.contrast-layer {
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 78% 64% at 0 0, rgba(6, 7, 6, 0.68) 0%, rgba(6, 7, 6, 0.24) 48%, transparent 82%),
    radial-gradient(ellipse 66% 56% at 100% 0, rgba(6, 7, 6, 0.64) 0%, rgba(6, 7, 6, 0.22) 52%, transparent 84%),
    radial-gradient(ellipse 48% 42% at 0 100%, rgba(6, 7, 6, 0.48) 0%, rgba(6, 7, 6, 0.12) 52%, transparent 80%),
    radial-gradient(ellipse 50% 48% at 100% 100%, rgba(6, 7, 6, 0.62) 0%, rgba(6, 7, 6, 0.2) 50%, transparent 78%);
}

.interface {
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "title copy"
    "brand contact";
  gap: clamp(2rem, 5vw, 7rem);
  padding:
    calc(var(--page-gutter-y) + env(safe-area-inset-top))
    calc(var(--page-gutter) + env(safe-area-inset-right))
    calc(var(--page-gutter-y) + env(safe-area-inset-bottom))
    calc(var(--page-gutter) + env(safe-area-inset-left));
  pointer-events: none;
}

.interface__block {
  position: relative;
  margin: 0;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.18);
}

.js [data-intro] {
  opacity: 0;
}

.hero-title {
  grid-area: title;
  align-self: start;
  justify-self: start;
  max-width: 12ch;
}

.hero-title h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.55rem, 5.35vw, 6.55rem);
  font-weight: 500;
  line-height: 0.91;
  letter-spacing: -0.048em;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero-copy {
  grid-area: copy;
  align-self: start;
  justify-self: end;
  width: min(100%, 31ch);
  text-align: right;
}

.hero-copy p {
  margin: 0;
  width: 100%;
  font-size: clamp(1rem, 1.12vw, 1.2rem);
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: -0.01em;
  text-align: right;
}

.brand {
  grid-area: brand;
  align-self: end;
  justify-self: start;
  width: auto;
  height: clamp(5.5rem, 8vw, 7rem);
  aspect-ratio: 790 / 290;
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.contact {
  grid-area: contact;
  align-self: end;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: min(100%, 24rem);
  color: inherit;
  font-size: clamp(0.875rem, 0.9vw, 1rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.38;
  letter-spacing: 0.01em;
  text-align: right;
  pointer-events: auto;
}

.contact a,
.carousel-toggle {
  color: inherit;
  text-decoration-color: transparent;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 180ms ease, opacity 180ms ease;
}

.contact a:hover,
.carousel-toggle:hover {
  text-decoration-color: currentColor;
}

.contact a:focus-visible,
.carousel-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 1px;
}

.carousel-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  margin: 0.45rem -0.7rem -0.65rem 0;
  padding: 0.65rem 0.7rem;
  border: 0;
  background: transparent;
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
}

.js .carousel-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 720px) {
  :root {
    --page-gutter: clamp(18px, 5.5vw, 28px);
    --page-gutter-y: clamp(20px, 5.8vw, 30px);
  }

  .interface {
    grid-template-columns: minmax(0, 1fr) minmax(8.6rem, 0.68fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "title title"
      ". copy"
      "brand contact";
    column-gap: 1rem;
    row-gap: clamp(1.5rem, 5vh, 3.5rem);
  }

  .hero-title {
    max-width: 12ch;
  }

  .hero-title h1 {
    font-size: clamp(2.45rem, 12vw, 4.5rem);
    line-height: 0.92;
  }

  .hero-copy {
    align-self: start;
    width: min(100%, 24ch);
    margin-top: 0.25rem;
  }

  .hero-copy p {
    font-size: clamp(0.95rem, 4vw, 1.05rem);
    line-height: 1.38;
  }

  .brand {
    height: clamp(4rem, 18vw, 4.75rem);
  }

  .contact {
    min-width: 8.6rem;
    font-size: clamp(0.82rem, 3.45vw, 0.94rem);
  }

  .carousel-toggle {
    max-width: 11.5rem;
    white-space: normal;
  }

  .contrast-layer {
    background:
      radial-gradient(ellipse 118% 54% at 0 0, rgba(6, 7, 6, 0.72) 0%, rgba(6, 7, 6, 0.25) 60%, transparent 89%),
      radial-gradient(ellipse 92% 58% at 100% 34%, rgba(6, 7, 6, 0.62) 0%, rgba(6, 7, 6, 0.2) 62%, transparent 89%),
      radial-gradient(ellipse 72% 35% at 0 100%, rgba(6, 7, 6, 0.58) 0%, transparent 82%),
      radial-gradient(ellipse 75% 42% at 100% 100%, rgba(6, 7, 6, 0.7) 0%, transparent 82%);
  }
}

@media (max-height: 680px) {
  body {
    overflow-y: auto;
  }

  .site-shell {
    min-height: 680px;
  }

  .interface {
    position: absolute;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .interface {
    grid-template-columns: minmax(0, 1.2fr) minmax(15rem, 0.8fr);
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
      "title copy"
      "brand contact";
    row-gap: 1rem;
  }

  .hero-title h1 {
    font-size: clamp(2rem, 7vh, 3.3rem);
  }

  .hero-copy {
    width: min(100%, 30ch);
  }

  .brand {
    height: clamp(3.6rem, 12vh, 4.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .carousel__image {
    transform: none !important;
  }

  .contact a,
  .carousel-toggle {
    transition-duration: 0.01ms;
  }
}
