/* Look and motion from docs/source/landing_alcove_screen_source.html (renderVals). */
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/IBMPlexSans-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/IBMPlexSans-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/IBMPlexMono-Medium.woff2") format("woff2");
}

:root,
[data-theme="light"] {
  color-scheme: light;
  --g: #e8e6e0;
  --t1: #f2f0ea;
  --t2: #e1dfd8;
  --n: #dad7cf;
  --sd: #bebbb3;
  --sd2: #c9c6be;
  --sl: #fffefa;
  --ink: #33312b;
  --mut: #5e5b53;
  --p1: #f0eee8;
  --p2: #dfdcd4;
  --line: #d3d0c8;
  --dialog-shadow: rgb(0 0 0 / 0.28);
  --dialog-scrim: rgb(0 0 0 / 0.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --g: #2f2d27;
    --t1: #403d36;
    --t2: #292722;
    --n: #302e28;
    --sd: #1b1916;
    --sd2: #1c1a17;
    --sl: #4a473f;
    --ink: #e8e6e0;
    --mut: #b3b0a7;
    --p1: #e4e2db;
    --p2: #c9c6be;
    --line: #45423b;
  }
}
[data-theme="dark"] {
  color-scheme: dark;
  --g: #2f2d27;
  --t1: #403d36;
  --t2: #292722;
  --n: #302e28;
  --sd: #1b1916;
  --sd2: #1c1a17;
  --sl: #4a473f;
  --ink: #e8e6e0;
  --mut: #b3b0a7;
  --p1: #e4e2db;
  --p2: #c9c6be;
  --line: #45423b;
}

body {
  margin: 0;
}
.ak-root {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  /* The caption under the niche and the footer are placed against the page's edges, so the
     vertical padding reserves their room: on a short window the page grows (and scrolls)
     instead of the niche running into them. Where the window is tall enough the niche is
     centred exactly as before. */
  padding: 150px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  background: var(--g);
  color: var(--ink);
  font-family: "IBM Plex Sans", Helvetica, sans-serif;
  font-size-adjust: from-font;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease;
}
.ak-stage {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* the niche */
.ak-niche {
  position: relative;
  width: 300px;
  max-width: 78vw;
  height: 360px;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 62px;
  border-radius: 150px 150px 20px 20px;
  background: var(--n);
  box-shadow:
    inset 16px 20px 32px var(--sd),
    inset -9px -9px 22px var(--sl);
  transition: background 0.9s ease;
}
.ak-anchor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* the pearl: same shadow-list shape in rest and press so they interpolate */
.ak-pearl {
  position: relative;
  width: 100px;
  height: 100px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: var(--n);
  box-shadow:
    5px 7px 14px var(--sd),
    -4px -4px 9px var(--sl),
    inset 0 0 0 0 var(--sd);
  transition: box-shadow 0.75s cubic-bezier(0.55, 0, 0.1, 1);
}
.ak-pearl-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--p1), var(--p2));
  opacity: 1;
  transition: opacity 0.75s cubic-bezier(0.55, 0, 0.1, 1);
}
.ak-pearl.is-pressed {
  box-shadow:
    0 0 0 var(--sd),
    0 0 0 var(--sl),
    inset 0 0 0 0 var(--sd);
}
.ak-pearl.is-pressed .ak-pearl-face {
  opacity: 0;
}

/* wordmark and the words under the niche */
.ak-caption {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 36px;
  text-align: center;
}
.ak-wordmark {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 400;
  letter-spacing: 0.14em;
}
.ak-soon {
  margin: 10px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--mut);
}

/* the light/dark button */
.ak-mode {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  background: linear-gradient(150deg, var(--t1), var(--t2));
  box-shadow:
    4px 5px 10px var(--sd),
    -3px -3px 8px var(--sl);
  transition:
    box-shadow 0.25s ease,
    background 0.4s ease,
    color 0.4s ease;
}
.ak-mode:active {
  box-shadow:
    inset 3px 4px 8px var(--sd),
    inset -3px -3px 6px var(--sl);
}
.ak-icon-sun {
  display: none;
}
[data-theme="dark"] .ak-icon-moon {
  display: none;
}
[data-theme="dark"] .ak-icon-sun {
  display: block;
}

/* the EN/FR switch, left of the theme button; each target is 44px or more */
.ak-lang {
  position: absolute;
  top: 24px;
  right: 84px;
  z-index: 2;
  height: 48px;
  display: flex;
  align-items: center;
}
.ak-lang button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: none;
  cursor: pointer;
  font:
    500 0.75rem "IBM Plex Mono",
    monospace;
  letter-spacing: 0.12em;
  color: var(--mut);
}
.ak-lang button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* the footer under the stage: one link to the privacy notice, a 44px target */
.ak-foot {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}
.ak-foot a {
  min-height: 44px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--mut);
  text-underline-offset: 6px;
}

/* the privacy notice: long-form text, about 70 characters a line */
.ak-doc {
  align-items: flex-start;
  padding-top: 96px;
  padding-bottom: 48px;
}
.ak-notice {
  max-width: 33em;
  font-size: 1.0625rem;
  line-height: 1.6;
}
.ak-notice h1 {
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  text-wrap: balance;
}
.ak-notice p {
  margin: 0 0 18px;
  text-wrap: pretty;
}
.ak-notice .ak-lost-home {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 0;
}

.ak-pearl:focus-visible,
.ak-lang button:focus-visible,
.ak-foot a:focus-visible,
.ak-mode:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

@keyframes ak-rest {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}
/* v0.10: the pearl is a link. Its own box must stay still for a steady pointer (and for the
   browser tests' stability check), so the rest bob moves the face inside it instead. The bob
   stops after 3 loops of the 6 s cycle (18 s): a looping motion on a page that waits for the
   visitor is a distraction, and the pearl is still. */
.ak-rest .ak-pearl-face {
  animation: ak-rest 6s ease-in-out 3;
}

@media (prefers-reduced-motion: reduce) {
  .ak-rest .ak-pearl-face {
    animation: none;
  }
  .ak-root,
  .ak-niche,
  .ak-mode,
  .ak-pearl,
  .ak-pearl-face {
    transition: none;
  }
}

/* the 404: the same ground and ink, one line and a way home */
.ak-lost {
  flex-direction: column;
  text-align: center;
}
.ak-lost-title {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 400;
  letter-spacing: 0.14em;
}
.ak-lost-home {
  margin-top: 18px;
  padding: 12px 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-underline-offset: 6px;
}
.ak-lost-home:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

/* v0.10 waitlist dialog: a flat form that inherits the page's theme tokens. No display is set
   on the closed dialog, so the UA's dialog:not([open]) { display: none } still hides it. */
.ak-dialog {
  width: min(92vw, 420px);
  max-height: min(90vh, 720px);
  box-sizing: border-box;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  /* --t1 is a dark surface in the dark theme and a light one in the light theme, so the
     dialog's own surface tracks the scheme; --ink stays legible against it in both. */
  background: var(--t1);
  color: var(--ink);
  font-family: "IBM Plex Sans", Helvetica, sans-serif;
  font-size-adjust: from-font;
  box-shadow: 0 24px 60px var(--dialog-shadow);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ak-dialog::backdrop {
  background: var(--dialog-scrim);
}
.ak-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ak-form .ak-privacy-link {
  align-self: flex-start;
  margin-top: 6px;
}
.ak-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.ak-dialog #waitlist-heading {
  margin: 0 40px 4px 0;
  font-size: 1.375rem;
  font-weight: 500;
  text-wrap: balance;
}
.ak-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--ink);
}
.ak-dialog input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  /* --mut against the dialog surface is 5.95:1 light and 5.0:1 dark (3:1 needed for a control's edge). */
  border: 1px solid var(--mut);
  border-radius: 10px;
  background: var(--g);
  color: var(--ink);
  font:
    1rem "IBM Plex Sans",
    Helvetica,
    sans-serif;
}
.ak-dialog input[type="email"][aria-invalid="true"] {
  /* Ink and a second inner line, so the error stays apart from the resting --mut border. */
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.ak-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.ak-consent-row input[type="checkbox"] {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--ink);
}
.ak-consent-row label {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--mut);
}
.ak-privacy-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--mut);
  text-underline-offset: 4px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}
.ak-turnstile {
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--mut);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
}
.ak-msg {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink);
}
.ak-submit {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  /* Inverted button: --ink is the backdrop, the dialog surface its text, so the pair
     stays high-contrast in both themes (light button on a dark dialog and vice versa). */
  color: var(--t1);
  font:
    500 0.9375rem "IBM Plex Sans",
    Helvetica,
    sans-serif;
  cursor: pointer;
}
.ak-submit:disabled {
  opacity: 0.6;
  cursor: default;
}
.ak-dialog .ak-close:focus-visible,
.ak-dialog input:focus-visible,
.ak-dialog a:focus-visible,
.ak-dialog .ak-submit:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.ak-noscript {
  padding: 12px;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--mut);
}
/* Entry and exit are one transition pair: closed is the faded state, [open] the shown one.
   allow-discrete keeps the dialog displayed (and in the top layer) while it fades out; with
   reduced motion none of this applies and the dialog closes at once. */
@media (prefers-reduced-motion: no-preference) {
  .ak-dialog {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition:
      opacity 0.22s ease-out,
      transform 0.22s ease-out,
      overlay 0.22s ease-out allow-discrete,
      display 0.22s ease-out allow-discrete;
  }
  .ak-dialog[open] {
    opacity: 1;
    transform: none;
  }
  .ak-dialog::backdrop {
    opacity: 0;
    transition:
      opacity 0.22s ease-out,
      overlay 0.22s ease-out allow-discrete,
      display 0.22s ease-out allow-discrete;
  }
  .ak-dialog[open]::backdrop {
    opacity: 1;
  }
  @starting-style {
    .ak-dialog[open] {
      opacity: 0;
      transform: translateY(10px) scale(0.98);
    }
    .ak-dialog[open]::backdrop {
      opacity: 0;
    }
  }
}
