:root {
  --ink: #0e0e0c;
  --paper: #f3f1ea;
  --rule: rgba(243, 241, 234, 0.14);
  --mute: #8c897f;
  --signal: #e23d2b;
  --signal-mid: rgb(226 61 43 / 55%);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --frame: 1.25rem;
  --fit: 1;
  color-scheme: dark;
}

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

html,
body {
  margin: 0;
  background: var(--ink);
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  min-height: 100dvh;
  overflow: hidden;
  color: var(--paper);
  font-family: Switzer, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--signal);
  color: var(--ink);
}

.frame {
  position: fixed;
  z-index: 1;
  inset: var(--frame);
  border: 1px solid var(--rule);
  pointer-events: none;
  animation: fade 500ms var(--ease-out) both;
}

.status {
  position: fixed;
  z-index: 4;
  top: calc(var(--frame) + 0.9rem);
  right: calc(var(--frame) + 1.1rem);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--mute);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  animation: fade 500ms var(--ease-out) 40ms both;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--signal);
  animation: pulse 2.4s var(--ease-in-out) infinite;
}

.hero {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100dvh;
  padding: 0 1.5rem 8vh;
  text-align: center;
}

.hero-mark {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.hero-title,
.hero-line {
  margin: 0;
}

.hero-title {
  min-width: 0;
  max-width: 100%;
  font-size: clamp(2.5rem, 11vw, 7.75rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.92;
  white-space: nowrap;
  animation: rise 700ms var(--ease-out) both;
}

.spot {
  position: relative;
  width: 100%;
  height: 1px;
  margin-top: 0.85rem;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(243 241 234 / 75%) 2%,
    rgb(243 241 234 / 92%) 50%,
    rgb(243 241 234 / 75%) 98%,
    transparent
  );
  pointer-events: none;
  animation: fade 700ms var(--ease-out) 120ms both;
}

.spot::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 0;
  width: 100%;
  height: 6.5rem;
  background: radial-gradient(
    ellipse 100% 100% at 50% 0%,
    rgb(243 241 234 / 16%) 0%,
    rgb(243 241 234 / 6%) 42%,
    transparent 76%
  );
}

.hero-line {
  margin-top: 0.9rem;
  color: var(--mute);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
  animation: rise 700ms var(--ease-out) 80ms both;
}

.skyline {
  position: fixed;
  z-index: 2;
  right: var(--frame);
  bottom: var(--frame);
  left: var(--frame);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}

.cluster-left,
.cluster-right {
  transform: scale(var(--fit));
}

.cluster-left {
  transform-origin: bottom left;
}

.cluster-right {
  transform-origin: bottom right;
}

.cluster {
  display: flex;
  align-items: flex-end;
}

.cluster-left {
  gap: 0;
}

.cluster-right {
  gap: 0;
}

.piece-gem {
  margin-right: 0.85rem;
}

.bar {
  display: block;
}

.cluster-left .piece:nth-child(1) .bar {
  width: 76px;
  height: 168px;
  background: var(--signal);
}

.cluster-left .piece:nth-child(2) .bar {
  width: 52px;
  height: 96px;
  background: var(--signal-mid);
}

.cluster-left .piece:nth-child(3) .bar {
  width: 34px;
  height: 52px;
  background: var(--paper);
}

.cluster-right .piece:nth-child(2) .bar {
  width: 58px;
  height: 148px;
  background: var(--paper);
}

.cluster-right .piece:nth-child(3) .bar {
  width: 40px;
  height: 74px;
  background: var(--signal);
}

.gem {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
}

.diamond {
  width: 48px;
  height: 48px;
  background: var(--signal);
  transform: rotate(45deg);
}

.follower {
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  background: var(--signal);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease-out);
}

.follower.is-on {
  opacity: 1;
}

@keyframes fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

@media (max-width: 700px) {
  :root {
    --frame: 0.75rem;
    --fit: 0.62;
  }

  .status {
    top: calc(var(--frame) + 0.7rem);
    right: calc(var(--frame) + 0.8rem);
  }

  .hero {
    padding-inline: 1rem;
    padding-bottom: 10vh;
  }
}

@media (max-height: 700px) {
  :root {
    --fit: 0.7;
  }

  .hero {
    padding-bottom: 8vh;
  }
}

@media (max-width: 700px) and (max-height: 700px) {
  :root {
    --fit: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .frame,
  .status,
  .hero-title,
  .hero-line,
  .spot,
  .piece {
    animation: fade 200ms var(--ease-out) both;
  }

  .status-dot {
    animation: none;
  }

  .diamond {
    transform: rotate(45deg);
  }

  .follower {
    display: none;
  }
}
