:root {
  color-scheme: dark;
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --paper: #f3f1ec;
  --paper-muted: rgba(243, 241, 236, 0.68);
  --velvet: #160406;
  --wine: #5b101c;
  --rose: #e37a84;
  --gold: #dfbc7e;
  --plate-ratio: 0.707579;
  --nose-x: 50%;
  --nose-y: 38.1%;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 0;
  min-height: 100%;
  margin: 0;
  background: #090203;
}

body {
  min-height: 100svh;
  overflow: hidden;
  color: var(--paper);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.stage {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 38%, rgba(91, 16, 28, 0.22), transparent 42%),
    #090203;
}

.portrait {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  width: min(calc((100svh - 16px) * var(--plate-ratio)), calc(100vw - 16px), 760px);
  aspect-ratio: 1055 / 1491;
  overflow: hidden;
  background: var(--velvet);
  box-shadow: 0 24px 84px rgba(0, 0, 0, 0.64);
}

.portrait__image,
.master-plate,
.motion-sequence,
.living-plate {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portrait__image {
  z-index: 0;
  overflow: hidden;
  background: var(--velvet);
}

.master-plate,
.motion-sequence,
.living-plate {
  display: block;
  object-fit: contain;
  object-position: 50% 50%;
  transform: none;
  user-select: none;
  pointer-events: none;
}

.master-plate {
  z-index: 0;
}

.motion-sequence {
  z-index: 1;
  opacity: 0;
}

.living-plate {
  z-index: 2;
  opacity: 0;
  background: var(--velvet);
  pointer-events: none;
}

.portrait[data-living-ready="true"] .living-plate {
  opacity: 1;
}

.portrait[data-motion-sequence-ready="true"] .motion-sequence {
  opacity: 1;
}

.portrait[data-motion-sequence-ready="true"] .living-plate {
  opacity: 0;
}

.campaign-chrome {
  position: absolute;
  z-index: 5;
  inset: 0;
  color: var(--paper);
  pointer-events: none;
  user-select: none;
}

.brand-lockup,
.taxonomy,
.identity-lockup,
.campaign-tagline,
.world-lockup {
  position: absolute;
}

.brand-lockup {
  top: 3.4%;
  left: 4.35%;
  display: grid;
  gap: 1.8cqw;
}

.after-dark-brandline {
  display: flex;
  width: 9.2cqw;
  height: 2.2cqw;
  align-items: center;
  gap: 0.65cqw;
  white-space: nowrap;
}

.after-dark-icon {
  display: block;
  width: 2.2cqw;
  height: 2.2cqw;
}

.brand-wordmark {
  font-size: 0.98cqw;
  font-weight: 360;
  letter-spacing: 0.14em;
  line-height: 1;
}

.brand-wordmark > span {
  opacity: 0.72;
}

.brand-wordmark strong {
  font: inherit;
  font-weight: 480;
}

.brand-meaning,
.taxonomy,
.world-lockup {
  color: rgba(243, 241, 236, 0.72);
  font-size: 0.76cqw;
  font-weight: 430;
  letter-spacing: 0.28em;
  line-height: 1.72;
}

.taxonomy {
  top: 3.25%;
  right: 4.55%;
  display: grid;
  gap: 0.76cqw;
  min-width: 9.2%;
}

.taxonomy i,
.world-lockup i {
  display: block;
  width: 2.45cqw;
  height: 1px;
  margin-top: 0.52cqw;
  background: rgba(243, 241, 236, 0.72);
}

.identity-lockup {
  top: 65.99%;
  right: 8%;
  left: 8%;
  display: grid;
  justify-items: center;
  gap: 3.22cqw;
  text-align: center;
}

.identity-lockup > span {
  font-size: 1.72cqw;
  font-weight: 390;
  letter-spacing: 0.56em;
  line-height: 1;
  transform: none;
}

.identity-lockup strong {
  font-size: 5.64cqw;
  font-weight: 280;
  letter-spacing: 0.17em;
  line-height: 0.92;
  transform: none;
}

.campaign-tagline {
  top: 83.6%;
  right: 10%;
  left: 10%;
  margin: 0;
  color: rgba(243, 241, 236, 0.95);
  font-size: 2.75cqw;
  font-weight: 320;
  letter-spacing: -0.025em;
  line-height: 1;
  text-align: center;
}

.world-lockup {
  top: 89.67%;
  right: auto;
  bottom: auto;
  left: 4.55%;
  display: grid;
  justify-items: start;
  gap: 2.45cqw;
  text-align: left;
}

.qr-lockup {
  position: absolute;
  z-index: 10;
  top: 89.54%;
  right: 4.65%;
  left: auto;
  display: grid;
  justify-items: center;
  gap: 1.3cqw;
  color: rgba(243, 241, 236, 0.76);
  font-size: 0.76cqw;
  font-weight: 430;
  letter-spacing: 0.4em;
  line-height: 1.72;
  text-decoration: none;
}

.qr-lockup img {
  display: block;
  width: 5.69cqw;
  height: 5.69cqw;
  border: 0;
  background: transparent;
  image-rendering: pixelated;
  transform: translateX(0.45cqw);
}

.qr-lockup:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 0.8cqw;
}

.answer {
  position: absolute;
  z-index: 7;
  top: calc(var(--nose-y) + 4.7%);
  left: var(--nose-x);
  width: min(84%, 40rem);
  min-height: 2rem;
  color: var(--paper);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.27rem, 0.98cqw, 0.68rem);
  font-variant-ligatures: none;
  font-weight: 400;
  letter-spacing: 0.025em;
  line-height: 1.2;
  text-align: center;
  text-wrap: nowrap;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 420ms ease;
  pointer-events: none;
}

.portrait:is([data-state="streaming"], [data-state="holding"]) .answer {
  opacity: 1;
}

.portrait[data-state="holding"] .answer {
  pointer-events: auto;
}

.answer.answer--wrap {
  line-height: 1.4;
  text-wrap: balance;
  white-space: normal;
}

.answer__cursor {
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin-left: 0.07em;
  background: currentColor;
  opacity: 0.72;
  vertical-align: -0.07em;
  animation: cursor 820ms step-end infinite;
}

.interaction {
  position: absolute;
  z-index: 8;
  top: 76.1%;
  left: 19.2%;
  width: 61.6%;
  height: 4.95%;
}

.prompt {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.prompt::before,
.prompt::after {
  position: absolute;
  content: "";
  pointer-events: none;
  transition: opacity 360ms ease;
}

.prompt::before {
  z-index: 1;
  inset: 0;
  border: 1px solid rgba(243, 241, 236, 0.7);
  border-radius: 999px;
  background: rgba(12, 3, 5, 0.76);
  box-shadow: inset 0 0 2.2cqw rgba(91, 16, 28, 0.14);
  opacity: 1;
}

.prompt:focus-within::before {
  opacity: 1;
}

.prompt__persona-graph {
  position: absolute;
  z-index: 6;
  top: 46.5%;
  left: 3.4%;
  display: block;
  width: 5%;
  aspect-ratio: 1;
  transform: translateY(-50%);
  contain: strict;
  isolation: isolate;
  pointer-events: none;
}

.prompt__persona-graph::before,
.prompt__persona-graph::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.prompt__persona-graph::before {
  inset: -13%;
  background: radial-gradient(
    circle,
    rgb(20, 4, 7) 0%,
    rgb(20, 4, 7) 72%,
    rgba(20, 4, 7, 0) 100%
  );
}

.prompt__persona-graph::after {
  inset: 12%;
  background: rgba(227, 122, 132, 0.08);
  filter: blur(3px);
}

.prompt__persona-graph canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.prompt::after {
  z-index: 4;
  inset: -4%;
  border-radius: 999px;
  background: rgba(4, 5, 5, 0.82);
  opacity: 0;
}

.prompt__input {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 11.5%;
  bottom: 0;
  left: 11.5%;
  width: 77%;
  height: 100%;
  min-width: 0;
  margin: 0;
  border: 0;
  outline: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  color: var(--paper);
  font-size: max(0.5rem, 1.05cqw);
  font-weight: 350;
  letter-spacing: -0.01em;
  line-height: 1;
}

.prompt__input::placeholder {
  color: rgba(243, 241, 236, 0.62);
  font-size: 100%;
  letter-spacing: 0.01em;
}

.prompt__input:focus::placeholder {
  color: rgba(243, 241, 236, 0.62);
  font-size: 100%;
}

.prompt__voice,
.prompt__send {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  width: 12%;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.prompt__voice {
  left: 0;
}

.prompt__send {
  right: 0;
}

.prompt__send > span[aria-hidden="true"] {
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgba(243, 241, 236, 0.72);
  font-size: 3.25cqw;
  font-weight: 190;
  line-height: 1;
  transform: translate(-53%, -55%);
}

.prompt__voice:focus-visible,
.prompt__send:focus-visible {
  outline: 1px solid rgba(243, 241, 236, 0.95);
  outline-offset: 2px;
}

.prompt__input:focus,
.prompt__input:focus-visible {
  outline: 0;
  box-shadow: none;
}

.prompt__voice[data-listening="true"] {
  box-shadow: inset 0 0 0 1px rgba(243, 241, 236, 0.72);
  animation: listen 1.55s ease-in-out infinite;
}

.portrait:is([data-state="preparing"], [data-state="streaming"], [data-state="holding"], [data-state="dissolving"]) .prompt::after {
  opacity: 1;
}

.portrait:is([data-state="preparing"], [data-state="streaming"], [data-state="holding"], [data-state="dissolving"]) .prompt__input,
.portrait:is([data-state="preparing"], [data-state="streaming"], [data-state="holding"], [data-state="dissolving"]) .prompt__voice,
.portrait:is([data-state="preparing"], [data-state="streaming"], [data-state="holding"], [data-state="dissolving"]) .prompt__send {
  opacity: 0;
  pointer-events: none;
}

.begin {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(243, 241, 236, 0.8);
  border-radius: 999px;
  background: rgba(23, 4, 8, 0.9);
  color: var(--paper);
  font-size: clamp(0.58rem, 1.42cqw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.24em;
  cursor: pointer;
}

.portrait[data-stage="after-dark-ready"] .prompt {
  display: none;
}

.portrait[data-stage="after-dark-ready"] .begin {
  display: block;
  animation: reveal 850ms ease both;
}

.hotspot {
  position: absolute;
  z-index: 9;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hotspot--privacy {
  top: 2.3%;
  left: 3.2%;
  width: 15%;
  height: 8%;
}

.hotspot:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 2px;
}

.disclosure {
  width: min(calc(100% - 2rem), 31rem);
  margin: auto;
  padding: clamp(1.35rem, 5vw, 2.4rem);
  border: 1px solid rgba(243, 241, 236, 0.23);
  background: rgba(20, 4, 7, 0.97);
  color: var(--paper);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(18px);
}

.disclosure::backdrop {
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(3px);
}

.disclosure__close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: none;
  color: var(--paper-muted);
  font-size: 1.55rem;
  font-weight: 250;
  cursor: pointer;
}

.disclosure__label {
  margin: 0 0 0.65rem;
  color: var(--paper-muted);
  font-size: 0.68rem;
  letter-spacing: 0.17em;
}

.disclosure h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 5vw, 2.05rem);
  font-weight: 410;
  letter-spacing: -0.025em;
}

.disclosure p:last-child {
  margin: 0;
  color: rgba(243, 241, 236, 0.78);
  font-size: 1rem;
  line-height: 1.55;
}

.handoff {
  max-width: 34rem;
}

.handoff__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
  margin-top: 1.4rem;
}

.handoff__actions button,
.handoff__actions a,
.handoff__done {
  display: inline-grid;
  min-height: 2.75rem;
  place-items: center;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(243, 241, 236, 0.3);
  border-radius: 999px;
  background: rgba(91, 16, 28, 0.42);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
}

.handoff__actions button:focus-visible,
.handoff__actions a:focus-visible,
.handoff__done:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.handoff__done {
  display: block;
  margin: 1.4rem 0 0 auto;
}

.noscript {
  position: absolute;
  z-index: 30;
  top: 48%;
  right: 15%;
  left: 15%;
  padding: 1rem;
  background: #160406;
  color: var(--paper);
  text-align: center;
}

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

@keyframes cursor {
  0%,
  45% {
    opacity: 0.75;
  }
  46%,
  100% {
    opacity: 0;
  }
}

@keyframes listen {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 rgba(243, 241, 236, 0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(243, 241, 236, 0.78);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .portrait[data-motion-sequence-ready="true"] .motion-sequence {
    opacity: 0;
  }

  .portrait[data-motion-sequence-ready="true"] .living-plate {
    opacity: 1;
  }
}
