:root {
  --yellow: #fcee21;
  --page: #ffffff;
  --ink: #0a0a0a;
  --paper: #fffdf3;
  --line: rgba(10, 10, 10, 0.16);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --logo-max: min(70vw, 608px);
  font-family: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--ink);
}

body {
  min-height: 100dvh;
}

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

.stage {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
}

.backdrop,
.backdrop__video {
  position: absolute;
  inset: 0;
}

.backdrop {
  background: var(--page);
  z-index: 0;
}

.backdrop__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero {
  position: relative;
  z-index: 1;
  height: 100dvh;
}

.logo {
  position: absolute;
  top: calc(10vh + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: var(--logo-max);
  height: auto;
}

.chat-toggle {
  position: absolute;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  transform: translateX(-50%);
  appearance: none;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--yellow);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
}

.chat-toggle:hover,
.chat-toggle:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.sheet[hidden] {
  display: none;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.35);
}

.sheet__panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(520px, 100%);
  max-height: min(88dvh, 760px);
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  padding:
    28px
    calc(22px + var(--safe-right))
    calc(28px + var(--safe-bottom))
    calc(22px + var(--safe-left));
}

.sheet__close {
  position: absolute;
  top: 16px;
  right: calc(16px + var(--safe-right));
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sheet__panel h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2rem);
}

.sheet__lede {
  margin: 0 0 22px;
  opacity: 0.72;
}

.form {
  display: grid;
  gap: 14px;
}

.form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.form input,
.form textarea {
  width: 100%;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
}

.form textarea {
  resize: vertical;
  min-height: 120px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}

.submit {
  appearance: none;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--yellow);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.95rem 1.2rem;
  border-radius: 14px;
  cursor: pointer;
}

.submit:hover,
.submit:focus-visible {
  background: var(--yellow);
  color: var(--ink);
}

.submit[disabled] {
  opacity: 0.55;
  cursor: wait;
}

.form__status {
  min-height: 1.4em;
  margin: 0;
  font-weight: 700;
}

.form__status.is-error {
  color: #8a1208;
}

@media (min-width: 720px) {
  :root {
    --logo-max: min(54vw, 688px);
  }

  .sheet__panel {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    border-bottom: 3px solid var(--ink);
    border-radius: 28px;
    max-height: min(82dvh, 720px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo,
  .chat-toggle,
  .sheet__panel {
    transition: none;
  }
}
