:root {
  color-scheme: dark;
  --blue: #1711ec;
  --ink: #050505;
  --paper: #f7f7f2;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  min-width: 320px;
  min-height: 100svh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--ink);
  color: var(--paper);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  transition: background-color .65s var(--ease), color .65s var(--ease);
}

body.is-blue { background: var(--blue); }

a, button { color: inherit; }

.stage {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  padding: max(56px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(70px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  transform: translate3d(calc(var(--mx, 0) * 8px), calc(var(--my, 0) * 8px), 0);
  transition: transform .5s var(--ease);
}

.mark-wrap {
  width: clamp(280px, 52vmin, 650px);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0;
  transform: scale(.88);
  animation: arrive 1.15s .08s var(--ease) forwards;
}

.mark {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
  filter: saturate(1.1) contrast(1.08);
  transform: scale(1.03) rotate(calc(var(--mx, 0) * 1.2deg));
  transition: transform .5s var(--ease), filter .65s var(--ease), opacity .3s ease;
  user-select: none;
  -webkit-user-drag: none;
}

body.is-blue .mark {
  filter: grayscale(1) contrast(1.2) brightness(1.5);
}

.copy {
  width: min(510px, 78vw);
  margin-top: clamp(-34px, -3.5vmin, -18px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  opacity: 0;
  transform: translateY(16px);
  animation: rise .8s .6s var(--ease) forwards;
}

h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.copy p, .copy a {
  display: block;
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(1rem, 1.15vw + .4rem, 1.2rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-decoration: none;
}

.copy a {
  position: relative;
  padding: 2px 4px 4px;
}

.site-footer {
  position: fixed;
  z-index: 5;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  font-size: .78rem;
  line-height: 1;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  opacity: .58;
  transition: opacity .25s ease;
}

.site-footer a:hover,
.site-footer a:focus-visible { opacity: 1; }
.site-footer a:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }

.copy a::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 1px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}

.copy a:hover::after, .copy a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.copy a:focus-visible, .mark-wrap:focus-visible { outline: 2px solid currentColor; outline-offset: 7px; }

.wash {
  position: fixed;
  z-index: 0;
  inset: -30%;
  pointer-events: none;
  background: radial-gradient(circle at var(--px, 50%) var(--py, 50%), rgba(23,17,236,.9), transparent 22%);
  opacity: .32;
  filter: blur(28px);
  transition: opacity .6s var(--ease);
}

body.is-blue .wash { opacity: 0; }

.grain {
  position: fixed;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

@keyframes arrive { to { opacity: 1; transform: scale(1); } }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 620px) {
  .identity { width: 100%; }
  .mark-wrap { width: min(112vw, 520px); }
  .copy {
    width: min(82vw, 360px);
    margin-top: clamp(-46px, -9vw, -30px);
    grid-template-columns: 1fr;
    gap: 9px;
    text-align: center;
  }

  .copy p, .copy a { line-height: 1.18; }
  .site-footer { font-size: .75rem; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .stage { padding-block: 24px 52px; }
  .identity { flex-direction: row; gap: clamp(8px, 3vw, 36px); }
  .mark-wrap { width: min(62vh, 350px); flex: 0 0 auto; }
  .copy {
    width: min(42vw, 330px);
    margin-top: 0;
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (min-width: 1500px) {
  .mark-wrap { width: min(48vmin, 720px); }
  .copy { width: 560px; }
}

@media (hover: none), (pointer: coarse) {
  .identity, .mark { transform: none; }
  .wash { opacity: .2; }
}

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

.legal-page {
  min-height: 100svh;
  min-height: 100dvh;
  overflow-y: auto;
  background: var(--ink);
}

.legal {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(72px, 12vh, 140px) 0 80px;
}

.legal h1 {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 42px;
  overflow: visible;
  clip: auto;
  white-space: normal;
  font-size: clamp(2.25rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: -.065em;
}

.legal h2 {
  margin: 42px 0 10px;
  font-size: 1rem;
  font-weight: 600;
}

.legal p {
  margin: 0 0 14px;
  font-size: clamp(1rem, 1.1vw, 1.08rem);
  line-height: 1.55;
}

.legal a { color: inherit; text-underline-offset: 3px; }
.legal-back { display: inline-block; margin-bottom: 50px; text-decoration: none; }
