@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/instrument-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-italic-latin.woff2") format("woff2");
}

:root {
  --bg: #fbfbf9;
  --raised: #ffffff;
  --ink: #15161a;
  --soft: #6b6c74;
  --line: rgba(21, 22, 26, 0.14);
  --bubble: #efefec;
  --pupil: #15161a;
  --error: #b3261e;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --raised: #181818;
    --ink: #f2f2f0;
    --soft: #9b9b98;
    --line: rgba(242, 242, 240, 0.16);
    --bubble: #1f1f1f;
    --pupil: #f2f2f0;
    --error: #ff8f86;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Landing */

.stage {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(40px, 11vh, 120px) 16px 2.5rem;
  text-align: center;
}

h1 {
  margin: 0 auto 0.6em;
  max-width: 13em;
  font-size: clamp(2.1rem, 1.2rem + 4vw, 3.75rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

/* The eye: a quick pen stroke, lids crossing at the outer corner. */

.eye {
  width: clamp(64px, 18vw, 80px);
  margin: 0 auto clamp(1.4rem, 4vh, 2.2rem);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.eye-inner {
  position: relative;
  aspect-ratio: 44 / 26;
  transform-origin: 50% 52%;
}

.eye.blink .eye-inner {
  animation: blink 0.26s ease-in-out;
}

@keyframes blink {
  0%, 100% { transform: scaleY(1); }
  45%, 55% { transform: scaleY(0.06); }
}

.eye svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.eye path,
.eye circle {
  fill: none;
  stroke: var(--ink);
  /* In drawing units, so the line keeps a bold, graphic weight at any size. */
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eye .pupil {
  fill: var(--ink);
  stroke: none;
}

.ball {
  transform: translate(var(--lx, 0px), var(--ly, 0px));
  transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.2, 1);
}

/* Pills: the CTA and the message composer. */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--raised);
}

.cta {
  padding: 0.55em 0.55em 0.55em 1.35em;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.cta:hover {
  transform: translateY(-1px);
}

.cta:active {
  transform: scale(0.98);
}

.send {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.2em;
  height: 2.2em;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
}

.send svg {
  width: 55%;
  height: 55%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.send:disabled {
  opacity: 0.4;
  cursor: progress;
}

/* Load: a soft rise, eye first. */

.rise {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.rise { animation-delay: 0.05s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* The conversation. */

.chat {
  max-width: 30rem;
  margin: 0 auto;
  text-align: left;
}

/* Iris introduces herself: the opening messages arrive one by one. */
.msg.first {
  font-size: 1.3em;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.msg em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
}

.thread .intro:nth-child(1) { animation-delay: 0.45s; }
.thread .intro:nth-child(2) { animation-delay: 1.15s; }
.thread .intro:nth-child(3) { animation-delay: 1.85s; }

.cta-line {
  display: flex;
  justify-content: flex-end;
  margin: 0.6rem 0 0;
  animation: pop 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) 2.45s both;
}

.cta-line[hidden] {
  display: none;
}

.thread {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.msg {
  margin: 0;
  max-width: 85%;
  padding: 0.55em 0.95em;
  border-radius: 1.2em;
  animation: pop 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  overflow-wrap: anywhere;
}

.msg.iris-says {
  align-self: flex-start;
  background: var(--bubble);
  border-bottom-left-radius: 0.35em;
}

.msg.you-say {
  align-self: flex-end;
  background: var(--ink);
  color: var(--bg);
  border-bottom-right-radius: 0.35em;
}

.msg.you-say.skipped {
  background: transparent;
  color: var(--soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.msg.error {
  color: var(--error);
}

.msg a {
  color: inherit;
}

.typing {
  display: inline-flex;
  gap: 0.28em;
  align-self: flex-start;
  padding: 0.85em 1em;
  border-radius: 1.2em;
  border-bottom-left-radius: 0.35em;
  background: var(--bubble);
}

.typing i {
  width: 0.4em;
  height: 0.4em;
  border-radius: 50%;
  background: var(--soft);
  animation: dot 1s ease-in-out infinite;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes dot {
  0%, 60%, 100% { opacity: 0.3; transform: none; }
  30% { opacity: 1; transform: translateY(-2px); }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.chips {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.chips:empty {
  display: none;
}

.chip {
  padding: 0.35em 0.95em;
  font: inherit;
  font-size: 0.9em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--ink);
}

.composer {
  display: flex;
  width: 100%;
  padding: 0.35em 0.35em 0.35em 1.1em;
}

.composer[hidden] {
  display: none;
}

.composer input {
  flex: 1;
  min-width: 0;
  padding: 0.3em 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  outline: none;
}

.composer input::placeholder {
  color: var(--soft);
  opacity: 0.8;
}

.composer:focus-within {
  box-shadow: 0 0 0 3px var(--line);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile:empty {
  display: none;
}

.turnstile {
  margin: 0 0 0.8rem;
}

.fine {
  margin: 0.8rem 0 0;
  font-size: 0.8em;
  color: var(--soft);
  text-align: center;
}

/* The arc a message travels along to reach the eye. */

.sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.sky path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2px;
  stroke-linecap: round;
}

/* Footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4em 1.4em;
  margin-top: auto;
  padding: 1.5rem 16px max(1.5rem, env(safe-area-inset-bottom));
  font-size: 0.8125rem;
  color: var(--soft);
}

.foot a {
  color: inherit;
  text-decoration: none;
}

.foot a:hover {
  color: var(--ink);
}

/* Terms and privacy */

.prose {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(32px, 8vh, 88px) 16px 2.5rem;
}

.prose h1 {
  margin: 0.6em 0 0.6em;
  max-width: none;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
}

.prose h2 {
  margin: 1.8em 0 0.4em;
  font-size: 1.05em;
  font-weight: 600;
}

.prose p,
.prose ul {
  margin: 0 0 0.9em;
}

.prose ul {
  padding-left: 1.1em;
}

.prose li {
  margin: 0 0 0.35em;
}

.prose .soft {
  color: var(--soft);
}

@media (prefers-reduced-motion: reduce) {
  .cta-line {
    animation: none;
  }

  .rise {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .msg,
  .typing i {
    animation: none;
  }

  .ball,
  .cta {
    transition: none;
  }

  .eye.blink .eye-inner {
    animation: none;
  }
}

