@font-face {
  font-family: "Manrope";
  src: url("./assets/fonts/Manrope-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: block;
}

:root {
  color-scheme: dark;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #010102;
  color: #f7f8f8;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: #010102; }

.portrait-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  text-align: center;
}

/* Logo sits at the top; the auto margins center the rest in the space below it. */
.logo { display: block; width: auto; height: 26px; margin-bottom: auto; }
.portrait-copy { margin-bottom: auto; }

.portrait {
  position: relative;
  width: min(80vw, 50svh, 500px);
  aspect-ratio: 1;
  margin: 0;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.portrait[data-dragging] { cursor: grabbing; }
.portrait:focus-visible { outline: 2px solid #8a94f3; outline-offset: 6px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.portrait-canvas,
.portrait-still {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portrait-still {
  position: absolute;
  inset: 0;
}

.portrait-canvas { opacity: 0; }
.portrait-canvas[data-state="ready"] { opacity: 1; }
.portrait-canvas[data-state="ready"] + .portrait-still { display: none; }

.portrait-copy {
  container-type: inline-size;
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 640px;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 8.7vw, 36px);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.subheading {
  margin: 0 auto;
  max-width: 39ch;
  color: #b9bac3;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

::selection { background: #5e6ad2; color: #f7f8f8; }

@media (max-width: 639px) {
  h1 {
    white-space: nowrap;
    text-wrap: nowrap;
    /* This exact Manrope heading measures 10.10449em, including letter spacing. */
    font-size: calc((100vw - max(20px, env(safe-area-inset-left)) - max(20px, env(safe-area-inset-right)) - 2px) / 10.105);
  }
  @supports (font-size: 1cqi) {
    h1 { font-size: calc((100cqi - 2px) / 10.105); }
  }
}

@media (min-width: 640px) {
  .portrait-screen { gap: 32px; padding: 32px; }
  .portrait { width: min(48vw, 56svh, 540px); }
  .portrait-copy { gap: 20px; }
  .logo { height: 30px; }
  h1 { font-size: 48px; }
  .subheading { max-width: 60ch; font-size: 18px; }
}

@media (max-height: 650px) {
  .portrait-screen { gap: 20px; padding-block: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-bottom)); }
  .portrait { width: min(76vw, 43svh, 400px); }
  .portrait-copy { gap: 14px; }
}

