@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/instrument-sans-df7998fe.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0020, U+002E, U+0045, U+0061-0065, U+0069, U+006B-0070, U+0072-0074, U+0076-0077, U+0079;
}

:root {
  color-scheme: dark;
  --phi-fourth: 6.854; /* phi to the fourth power */
  --ink: #11171d;
  --stone: #f1eee8;
  --muted: #8b979f;
  --edge-x: clamp(1.5rem, 7.5vw, 8.5rem);
  --edge-y: clamp(1.5rem, 5.5vw, 4.5rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

html {
  background: var(--ink);
}

body {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  background-color: var(--ink);
  background-image: radial-gradient(
    circle at 22% 18%,
    rgba(79, 96, 108, 0.1),
    transparent 42%
  );
  color: var(--stone);
  font-family: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overscroll-behavior: none;
}

.structure {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.composition {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  width: 100%;
  height: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  padding:
    max(var(--edge-y), env(safe-area-inset-top))
    max(var(--edge-x), env(safe-area-inset-right))
    max(var(--edge-y), env(safe-area-inset-bottom))
    max(var(--edge-x), env(safe-area-inset-left));
}

h1 {
  max-width: min(12.5ch, 82vw);
  margin: clamp(1.25rem, 7.5vh, 5.5rem) 0 0;
  font-size: clamp(3.35rem, 7.25vw, 8rem);
  font-weight: 670;
  font-variation-settings: "wdth" 94, "wght" 670;
  letter-spacing: -0.018em;
  line-height: 1.06;
  text-wrap: balance;
}

.revealed-word {
  position: relative;
  display: inline-block;
  color: rgba(241, 238, 232, 0.14);
}

.reveal-layer {
  position: absolute;
  inset: 0;
  color: var(--stone);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  -webkit-mask-image: radial-gradient(
    circle 0.85em at 50% 50%,
    #000 0%,
    rgba(0, 0, 0, 0.94) 28%,
    rgba(0, 0, 0, 0.55) 56%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle 0.85em at 50% 50%,
    #000 0%,
    rgba(0, 0, 0, 0.94) 28%,
    rgba(0, 0, 0, 0.55) 56%,
    transparent 100%
  );
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.revealed-word:hover .reveal-layer {
  opacity: 1;
}

.signature {
  position: fixed;
  z-index: 2;
  right: max(var(--edge-x), env(safe-area-inset-right));
  bottom: max(var(--edge-y), env(safe-area-inset-bottom));
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.72rem, 0.8vw, 0.82rem);
  font-weight: 520;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: lowercase;
}

@media (max-width: 700px) {
  :root {
    --edge-x: clamp(1.4rem, 7vw, 2.25rem);
    --edge-y: clamp(1.4rem, 6vw, 2.25rem);
  }

  h1 {
    max-width: 9.7ch;
    margin-top: clamp(1.5rem, 6.5vh, 3.5rem);
    font-size: clamp(3.15rem, 14.4vw, 5.6rem);
    line-height: 1.02;
  }
}

@media (max-height: 620px) {
  h1 {
    max-width: 14ch;
    margin-top: 0;
    font-size: clamp(2.5rem, 9.6vh, 4.5rem);
    line-height: 1.02;
  }
}

@media (max-height: 430px) and (orientation: landscape) {
  h1 {
    max-width: 17ch;
    font-size: clamp(2.3rem, 11.5vh, 3.4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
