/*
 * Iris. One screen, black, Space Grotesk, nothing that scrolls.
 *
 * The tokens are the dark-theme tokens of the Iris desktop app, so the page
 * and the product are literally the same colours. Type sizes and letterspacing
 * follow the app's own small-caps labels: 10 to 12 px, weight 300, wide
 * tracking, dim until you touch them.
 */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --iris-bg: #000000;
  --iris-text: #fafafb;
  --iris-text-soft: rgba(250, 250, 251, 0.8);
  --iris-text-muted: rgba(250, 250, 251, 0.55);
  --iris-dim: rgba(250, 250, 251, 0.35);
  --iris-line: rgba(250, 250, 251, 0.12);

  --panel-w: 560px;
  --panel-max-h: 400px;
  --words-top-closed: 68%;
  --words-top-open: 82%;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--iris-bg);
  color: var(--iris-text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 300;
  cursor: crosshair;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overscroll-behavior: none;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.surface {
  position: relative;
  z-index: 1;
}

/* The chrome waits for her to settle before it appears. */
.chrome {
  opacity: 0;
  transition: opacity 1200ms ease;
  pointer-events: none;
}

html[data-scene='settling'] .chrome,
html[data-scene='done'] .chrome {
  opacity: 1;
  pointer-events: auto;
}

/* ---- the words under the eye ------------------------------------------- */

.words {
  position: fixed;
  left: 50%;
  top: var(--words-top-closed);
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: clamp(20px, 5vw, 46px);
  z-index: 3;
  white-space: nowrap;
  transition: opacity 1200ms ease, top 620ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

html[data-orbit-open] .words {
  top: var(--words-top-open);
}

.word {
  position: relative;
  appearance: none;
  background: none;
  border: 0;
  padding: 6px 2px;
  font: inherit;
  font-size: clamp(11px, 1.15vw, 13px);
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--iris-dim);
  cursor: pointer;
  transition: color 220ms ease;
}

.word:hover,
.word:focus-visible {
  color: var(--iris-text);
}

.word::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: var(--iris-text);
  opacity: 0;
  transition: opacity 260ms ease;
}

.word[aria-expanded='true'] {
  color: var(--iris-text);
}

.word[aria-expanded='true']::after {
  opacity: 1;
}

/* ---- an orbit ----------------------------------------------------------- */

.orbit {
  position: fixed;
  top: 50%;
  left: 50%;
  width: var(--panel-w);
  height: auto;
  max-height: var(--panel-max-h);
  transform: translate(-50%, -50%) scale(0.985);
  padding: clamp(26px, 3.4vw, 40px) clamp(24px, 3.2vw, 38px);
  background: rgba(0, 0, 0, 0.58);
  border-radius: 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 460ms ease, transform 460ms cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 460ms;
  scrollbar-width: thin;
  scrollbar-color: var(--iris-line) transparent;
}

.orbit[data-active] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 460ms ease 120ms, transform 460ms cubic-bezier(0.2, 0.7, 0.2, 1) 120ms,
    visibility 0s linear 0s;
}

.orbit:focus {
  outline: none;
}

.orbit-title {
  margin: 0 0 22px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--iris-dim);
}

.orbit p {
  max-width: 46ch;
  margin: 0 0 15px;
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 300;
  line-height: 1.62;
  color: var(--iris-text-soft);
}

.orbit .lead {
  margin-bottom: 20px;
  font-size: clamp(19px, 2.3vw, 25px);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--iris-text);
}

.orbit p:last-child {
  margin-bottom: 0;
}

.byline {
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.55;
}
.byline a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.byline a:hover,
.byline a:focus-visible {
  opacity: 1;
}

.cta {
  display: inline-block;
  margin-top: 8px;
  padding-bottom: 5px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--iris-text);
  border-bottom: 1px solid var(--iris-line);
  transition: border-color 220ms ease;
  cursor: pointer;
}

.cta:hover,
.cta:focus-visible {
  border-bottom-color: var(--iris-text);
}

.orbit-close {
  position: absolute;
  top: clamp(18px, 2.4vw, 26px);
  right: clamp(18px, 2.4vw, 26px);
  appearance: none;
  background: none;
  border: 0;
  padding: 4px;
  font: inherit;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--iris-dim);
  cursor: pointer;
  transition: color 220ms ease;
}

.orbit-close:hover,
.orbit-close:focus-visible {
  color: var(--iris-text);
}

/* ---- corners ------------------------------------------------------------ */

.corner {
  position: fixed;
  margin: 0;
  z-index: 3;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--iris-dim);
  transition: opacity 1200ms ease, color 220ms ease;
}

.corner-top {
  top: 28px;
  right: 32px;
  cursor: pointer;
}

.corner-top:hover,
.corner-top:focus-visible {
  color: var(--iris-text);
}

.corner-bottom {
  bottom: 26px;
  left: 32px;
  pointer-events: none;
}

html[data-scene='settling'] .corner-bottom,
html[data-scene='done'] .corner-bottom {
  pointer-events: none;
}

:focus-visible {
  outline: 1px solid rgba(250, 250, 251, 0.5);
  outline-offset: 6px;
}

@media (max-width: 560px) {
  .corner-top {
    top: 22px;
    right: 22px;
    left: 22px;
    text-align: center;
    letter-spacing: 0.28em;
  }

  .corner-bottom {
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
  }

  .words {
    gap: clamp(16px, 5vw, 30px);
  }

  .word {
    letter-spacing: 0.22em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chrome,
  .words,
  .orbit,
  .corner {
    transition-duration: 1ms;
  }
}
