/* Colors, radii and type follow the app's tokens (src/theme). The fonts are
   served from this site, so a visit sends nothing to a third party. */
@font-face {
  font-family: 'Instrument Sans';
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/instrument-sans-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Instrument Sans';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/instrument-sans-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-800.woff2') format('woff2');
}

:root {
  --background: #fcfbf9;
  --page: #e9e6e1;
  --ink: #1b1a19;
  --muted: #736e68;
  --inkSecondary: #5e5953;
  --inkBody: #3a3734;
  --placeholder: #e3ded8;
  --surface: #ffffff;
  --accent: #2f6bff;
  --disabledFill: #efece7;
  --disabledInk: #a8a39c;
  /* "Coming soon": a muted blue that still reads as the brand accent. */
  --soonFill: #e3e9f8;
  --soonInk: #7d8fbf;
  --spinnerTrack: rgba(255, 255, 255, 0.35);
  --radius-media: 20px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --text: 'Instrument Sans', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  background: var(--background);
  color: var(--ink);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.page {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 28px 24px max(24px, env(safe-area-inset-bottom));
}

.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  line-height: 32px;
  letter-spacing: -1.2px;
  color: var(--ink);
  text-decoration: none;
  align-self: center;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 40px 0 0;
}

/* Phones: tile and text in the middle, the buttons at the bottom. */
.side {
  display: contents;
}

.main .tile,
.main .actions {
  margin-top: auto;
}

.tile {
  width: min(220px, 60vw);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-media);
  background: var(--placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lock {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.8px;
}

.body {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
  max-width: 260px;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  padding: 0 28px;
  border: 0;
  white-space: nowrap;
  border-radius: 999px;
  font: 600 17px/1 var(--text);
  background: var(--accent);
  color: var(--surface);
}

.button[aria-disabled='true'] {
  background: var(--soonFill);
  color: var(--soonInk);
  cursor: default;
}

.open {
  font-size: 13px;
  font-weight: 600;
  color: var(--inkSecondary);
}

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

.open a:hover {
  text-decoration: underline;
}

/* Larger screens: logo top left, tile and text side by side. */
@media (min-width: 760px) {
  .page {
    padding: 40px 56px;
  }

  .logo {
    align-self: flex-start;
  }

  .main {
    flex-direction: row;
    justify-content: center;
    padding: 40px 0;
    gap: clamp(48px, 9vw, 128px);
  }

  .tile {
    width: clamp(260px, 28vw, 360px);
  }

  .lock {
    width: 80px;
    height: 80px;
  }

  .lock svg {
    width: 26px;
    height: 26px;
  }

  .main .tile,
  .main .actions {
    margin-top: 0;
  }

  .side {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 440px;
  }

  .copy {
    align-items: flex-start;
    text-align: left;
    gap: 16px;
  }

  h1 {
    font-size: clamp(40px, 4.4vw, 56px);
    line-height: 1.05;
    letter-spacing: -2px;
  }

  .body {
    font-size: 18px;
    max-width: none;
  }

  .actions {
    align-items: flex-start;
  }

  .button {
    width: auto;
    height: 60px;
  }
}

/* Home: the big blue logo with the tagline and the download button. */
.home {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero {
  font-size: clamp(72px, 18vw, 168px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  color: var(--accent);
}

.tagline {
  margin-top: 20px;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 500;
  color: var(--inkBody);
}

.home .button {
  margin-top: 48px;
  width: min(100%, 300px);
}

@media (min-width: 760px) {
  .home .button {
    width: auto;
  }
}

/* The waitlist on the homepage: email and button in one row on larger
   screens, stacked on phones. */
.waitlist,
.waitlist-done {
  margin-top: 48px;
  width: min(100%, 460px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.waitlist-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.waitlist .waitlist-input {
  height: 56px;
  min-height: 0;
  padding: 0 22px;
  border-radius: 999px;
  text-align: center;
}

.home .waitlist-button {
  position: relative;
  margin-top: 0;
  width: 100%;
  cursor: pointer;
}

.waitlist-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.spinner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--spinnerTrack);
  border-top-color: var(--surface);
  border-radius: 50%;
  display: none;
  animation: spin 0.8s linear infinite;
}

.waitlist[data-busy='true'] .spinner {
  display: block;
}

.waitlist[data-busy='true'] .waitlist-label {
  visibility: hidden;
}

.waitlist-note {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.waitlist-done-title {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  color: var(--ink);
}

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

@media (min-width: 760px) {
  .waitlist-row {
    flex-direction: row;
  }

  .waitlist-input {
    flex: 1;
    text-align: left;
  }

  .home .waitlist-button {
    width: auto;
    flex: none;
  }
}

/* A quiet line at the bottom of every page: the legal pages. */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
  padding-top: 24px;
  font-size: 12px;
  font-weight: 500;
  color: var(--disabledInk);
}

.footer a {
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  color: var(--muted);
  text-decoration: underline;
}

.home {
  position: relative;
}

.home .footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(20px, env(safe-area-inset-bottom));
}

/* Legal pages and the contact form: one readable column. */
.doc {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 0 16px;
}

.doc-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.lang {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.lang:hover {
  text-decoration: underline;
}

.doc h1 {
  font-size: clamp(32px, 6vw, 44px);
  letter-spacing: -1.4px;
}

.updated {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.doc h2 {
  margin-top: 36px;
  font-family: var(--text);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
}

.doc h3 {
  margin-top: 20px;
  font-weight: 600;
  font-size: 16px;
}

.doc p,
.doc li {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--inkBody);
}

.doc p {
  margin-top: 12px;
}

.doc ul {
  margin-top: 12px;
  padding-left: 22px;
}

.doc li + li {
  margin-top: 6px;
}

.doc a {
  color: var(--accent);
}

.doc strong {
  font-weight: 600;
  color: var(--ink);
}

.lead {
  margin-top: 20px;
}

.doc .doc-actions {
  margin-top: 32px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--disabledFill);
  color: var(--ink) !important;
  font: 600 15px/1 var(--text);
  text-decoration: none;
}

.pill:hover {
  background: var(--placeholder);
}

/* Contact form */
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 28px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label,
.field legend {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.optional {
  font-weight: 500;
  color: var(--muted);
}

.input {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: 1.5px solid var(--placeholder);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  font: 500 16px/1.4 var(--text);
  appearance: none;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
}

textarea.input {
  min-height: 160px;
  resize: vertical;
}

select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23736E68' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 48px;
}

/* The field people never see; bots that fill in every field give themselves away. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.human {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 0 18px;
  border: 1.5px solid var(--placeholder);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
}

.human input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check {
  flex: none;
  width: 26px;
  height: 26px;
  border: 2px solid var(--disabledInk);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--surface);
}

.check svg {
  display: none;
}

.human input:focus-visible + .check {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.human[data-state='working'] .check {
  border-color: var(--placeholder);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.human[data-state='done'] .check {
  border-color: var(--accent);
  background: var(--accent);
}

.human[data-state='done'] .check svg {
  display: block;
}

.human-label {
  font-size: 15px;
  font-weight: 600;
}

.human-note {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .human[data-state='working'] .check {
    animation-duration: 2.4s;
  }
}

.form .button {
  margin-top: 6px;
}

.form .button:disabled {
  background: var(--disabledFill);
  color: var(--disabledInk);
  cursor: default;
}

.status:empty {
  display: none;
}

.status {
  font-size: 14px;
  font-weight: 600;
  color: #ef4136;
}

.sent {
  margin-top: 28px;
  padding: 24px;
  border-radius: var(--radius-media);
  background: var(--disabledFill);
}

.sent h2 {
  margin-top: 0;
}

/* Classes like .form set display, which would win over the hidden attribute. */
[hidden] {
  display: none !important;
}

/* The reported text on the moderation page, line breaks kept. */
.quote {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
}

@media (min-width: 760px) {
  .form .button {
    align-self: flex-start;
  }
}
