/* Optimistic Text = police Muse / Meta (CDN Meta) */
@font-face {
  font-family: "Optimistic Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://static.xx.fbcdn.net/rsrc.php/y2/r/6YirsaXqsap.woff2") format("woff2");
}

@font-face {
  font-family: "Optimistic Text";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("https://static.xx.fbcdn.net/rsrc.php/ye/r/ndhgOwkNmDs.woff2") format("woff2");
}

@font-face {
  font-family: "Optimistic Text";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("https://static.xx.fbcdn.net/rsrc.php/y8/r/WF8VhTuShVE.woff2") format("woff2");
}

:root {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-hover: #2c2c2e;
  --text: #ffffff;
  --muted: #8e8e93;
  --blue: #4a90e2;
  --blue-press: #3a7bc8;
  --danger: #ff3b30;
  --font: "Optimistic Text", Helvetica, Arial, sans-serif;
}

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

html {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100svh;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.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;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding: 18px 20px;
  z-index: 2;
}

.topbar-brand {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 20px;
}

.stage {
  min-height: 100svh;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 72px 20px 40px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  text-align: center;
  overflow-x: hidden;
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mark {
  display: block;
  width: min(140px, 36vw);
  height: auto;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 0 28px;
  object-fit: contain;
  /* SVG vector — net sur écrans retina / PC */
  image-rendering: auto;
  shape-rendering: geometricPrecision;
  -webkit-user-drag: none;
  user-select: none;
}

h1 {
  margin: 0;
  width: 100%;
  max-width: 36rem;
  font-size: clamp(1.25rem, 4.6vw + 0.7rem, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.headline-fixed,
.rotator-item,
.phrase {
  white-space: normal;
}

.headline-fixed {
  display: block;
  text-wrap: balance;
}

.rotator {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 0.12em;
}

.rotator-item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  white-space: normal;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.rotator-item.is-active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.rotator-item.is-exit {
  opacity: 0;
  transform: translateY(-10px);
}

.topic {
  flex: 0 0 auto;
  font-size: 0.72em;
  line-height: 1;
}

.phrase {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  text-wrap: balance;
}

.signup {
  width: min(420px, 100%);
  margin-top: auto;
  padding-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sub {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  color: var(--muted);
}

.waitlist {
  width: 100%;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.email-wrap {
  position: relative;
  width: 100%;
}

.waitlist input {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0 20px;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
  outline: none;
  transition: background 160ms ease;
}

.waitlist input::placeholder {
  color: var(--muted);
}

.waitlist input:focus {
  background: var(--surface-hover);
}

.waitlist input.is-invalid {
  background: var(--surface) !important;
  color: transparent !important;
  caret-color: transparent;
}

.email-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 16px;
  border-radius: 999px;
  pointer-events: auto;
  cursor: pointer;
  color: #ffffff;
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  line-height: 1.1;
}

.email-error[hidden] {
  display: none !important;
}

.waitlist button {
  height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  background: var(--blue);
  color: #ffffff;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 20px;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.waitlist button:hover {
  background: var(--blue-press);
}

.waitlist button:active {
  transform: scale(0.98);
}

.waitlist button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.waitlist-status {
  min-height: 20px;
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  color: var(--muted);
}

.waitlist-status.is-ok {
  color: #ffffff;
}

.waitlist-status.is-error {
  color: #ff8a80;
}

.success-check {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.success-check[hidden] {
  display: none !important;
}

.success-check-svg {
  width: 72px;
  height: 72px;
  overflow: visible;
}

.success-check-circle {
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 190;
  stroke-dashoffset: 190;
}

.success-check-mark {
  stroke: #ffffff;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

.success-check.is-play .success-check-circle {
  animation: draw-circle 520ms ease forwards;
}

.success-check.is-play .success-check-mark {
  animation: draw-check 380ms ease 280ms forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes draw-circle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes draw-check {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 720px) {
  .stage {
    padding: 64px 16px 32px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  .signup {
    padding-top: 32px;
  }

  .mark {
    width: min(96px, 28vw);
    margin-bottom: 20px;
  }

  h1,
  .headline-fixed,
  .rotator,
  .rotator-item,
  .phrase,
  .signup,
  .sub,
  .waitlist {
    width: 100%;
    max-width: 100%;
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .stage {
    padding: 56px 16px 28px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  .email-error {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage,
  .rotator-item,
  .success-check-circle,
  .success-check-mark {
    animation: none !important;
    transition: none !important;
  }

  .success-check.is-play .success-check-circle,
  .success-check.is-play .success-check-mark {
    stroke-dashoffset: 0;
  }
}
