@font-face {
  font-family: "Silka";
  src:
    local("Silka Bold"),
    local("Silka-Bold"),
    url("./assets/fonts/silka-bold-webfont.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #ffffff;
  --dim: rgba(255, 255, 255, 0.03);
  --paper: #000000;
  --page-margin: clamp(1.3rem, 4.2vw, 5.25rem);
  --display-size: clamp(3rem, 4.35vw, 5.7rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: "Silka", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.brand-name,
.statement {
  font-family: "Silka", Arial, sans-serif;
  font-weight: 700;
}

a {
  color: inherit;
}

.entry-screen {
  position: relative;
  display: grid;
  width: 100vw;
  min-width: 320px;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  padding: var(--page-margin);
  background: var(--paper);
}

.brand-name {
  position: absolute;
  top: var(--page-margin);
  left: var(--page-margin);
  z-index: 2;
  display: inline-block;
  font-size: clamp(1.6rem, 2.4vw, 2.65rem);
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.phrase-field {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: min(42vw, 42rem);
  height: 100%;
  overflow: hidden;
  color: var(--dim);
  font-size: clamp(1rem, 1.55vw, 1.65rem);
  pointer-events: none;
}

.phrase-field p {
  position: absolute;
  left: clamp(0.6rem, 1.5vw, 2rem);
  width: max-content;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(90deg);
  transform-origin: left top;
}

.phrase-field p:nth-child(1) {
  top: -18vh;
  left: clamp(0.6rem, 1.5vw, 2rem);
}

.phrase-field p:nth-child(2) {
  top: -41vh;
  left: clamp(2rem, 3.3vw, 4.3rem);
}

.phrase-field p:nth-child(3) {
  top: -9vh;
  left: clamp(3.4rem, 5.1vw, 6.7rem);
}

.phrase-field p:nth-child(4) {
  top: -58vh;
  left: clamp(4.8rem, 6.9vw, 9.1rem);
}

.phrase-field p:nth-child(5) {
  top: -26vh;
  left: clamp(6.2rem, 8.7vw, 11.5rem);
}

.phrase-field p:nth-child(6) {
  top: -73vh;
  left: clamp(7.6rem, 10.5vw, 13.9rem);
}

.phrase-field p:nth-child(7) {
  top: -35vh;
  left: clamp(9rem, 12.3vw, 16.3rem);
}

.phrase-field p:nth-child(8) {
  top: -3vh;
  left: clamp(10.4rem, 14.1vw, 18.7rem);
}

.phrase-field p:nth-child(9) {
  top: -52vh;
  left: clamp(11.8rem, 15.9vw, 21.1rem);
}

.phrase-field p:nth-child(10) {
  top: -21vh;
  left: clamp(13.2rem, 17.7vw, 23.5rem);
}

.phrase-field p:nth-child(11) {
  top: -67vh;
  left: clamp(14.6rem, 19.5vw, 25.9rem);
}

.phrase-field p:nth-child(12) {
  top: -31vh;
  left: clamp(16rem, 21.3vw, 28.3rem);
}

.statement {
  position: absolute;
  right: var(--page-margin);
  bottom: clamp(2.5rem, 8vh, 6.2rem);
  z-index: 2;
  display: grid;
  justify-items: end;
  gap: clamp(1.7rem, 4vh, 3rem);
  width: min(84rem, calc(100% - (var(--page-margin) * 2)));
}

.statement h1 {
  width: 100%;
  margin: 0;
  font-size: var(--display-size);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
  text-align: right;
  text-wrap: balance;
}

.statement .char {
  position: relative;
  visibility: hidden;
}

.statement .char.is-visible {
  visibility: visible;
}

.statement .char.is-cursor::after {
  position: absolute;
  left: 100%;
  top: 0.08em;
  display: block;
  width: 0.08em;
  height: 0.76em;
  margin-left: 0.04em;
  background: var(--ink);
  content: "";
  animation: blink 0.9s steps(1) infinite;
}

.talk-link {
  display: block;
  color: var(--ink);
  font-size: var(--display-size);
  line-height: 0.9;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.18em;
}

.talk-link.is-prepared {
  visibility: hidden;
}

.talk-link.is-typing,
.talk-link.is-complete {
  visibility: visible;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (min-width: 1280px) {
  .statement h1 {
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  :root {
    --page-margin: 0.9rem;
    --display-size: clamp(2.5rem, 10.5vw, 4rem);
  }

  .entry-screen {
    min-height: 500px;
  }

  .phrase-field {
    width: 13rem;
    font-size: clamp(0.9rem, 4vw, 1.08rem);
  }

  .statement {
    bottom: clamp(2rem, 8vh, 4rem);
    gap: 1.5rem;
  }
}
