/* Project typography. Original animation selectors and timing stay intact. */
:root {
  --font-display: 'Climate Crisis', sans-serif;
  --font-body: 'Medeo Pixel', 'Medeo Mono', monospace;
  --color-background: #fff;
  --color-text: #000;
  --color-muted: #4d4d4d;
  --color-field: rgb(0 0 0 / 5%);
  --color-field-focus: rgb(0 0 0 / 9%);
  --color-error: #b42318;
  --color-success: #18764b;
  --success-glow: 0 0 6px rgb(26 155 94 / 45%), 0 0 18px rgb(26 155 94 / 32%);
}

body {
  font-family: var(--font-body);
  font-variation-settings: "ELSH" 20;
}

.brand-wordmark {
  display: block;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: clamp(16px, 1.4vw, 27px);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.comming-soon-header {
  font-family: var(--font-display);
  font-weight: 400;
}

/* One static label: no clipping wrapper or text animation target. */
.form-button .button-label {
  color: var(--color-background);
  font-size: clamp(12px, 1.15vw, 18px);
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
}

@media screen and (max-width: 767px) {
  .form-button .button-label {
    font-size: clamp(12px, 3.8vw, 18px);
  }
}

/* Light palette. Keep transforms and animation targets untouched. */
body,
.whole-page-wrapper.page-6 {
  color: var(--color-text);
  background-color: var(--color-background);
}

.section-wrapper.hero.page-6,
.comming-soon-header {
  color: var(--color-text);
}

.text-field-email.page-6 {
  color: var(--color-text);
  font-family: var(--font-body);
  font-variation-settings: inherit;
  caret-color: var(--color-text);
  background-color: var(--color-field);
  border-color: rgb(0 0 0 / 12%);
}

.text-field-email.page-6:focus {
  background-color: var(--color-field-focus);
  border-color: rgb(0 0 0 / 50%);
}

.text-field-email.page-6::placeholder,
.last-line-text {
  color: var(--color-muted);
}

.form-button.white {
  color: var(--color-background);
  background-color: var(--color-text);
}

.prespective-bg {
  filter: invert(1);
}

.star-image,
.social-icon {
  filter: brightness(0);
}

/* Swap vertical corners; keep the selectors used by the parallax engine. */
.left-top-image {
  top: auto;
  bottom: -5em;
}

.right-bottom-image {
  top: -10.5em;
  bottom: auto;
}

@media screen and (max-width: 767px) {
  .left-top-image {
    bottom: -13em;
  }

  .right-bottom-image {
    top: -19em;
  }
}

/* Temporarily hide corner artwork; remove this block to restore it. */
.left-top-image,
.right-bottom-image {
  display: none;
}

/* Inverted text selection, including text inside the email input. */
::selection {
  color: #fff;
  background: #000;
}

::-moz-selection {
  color: #fff;
  background: #000;
}

button.form-button {
  appearance: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-variation-settings: inherit;
  font-weight: inherit;
}

.form-button:disabled {
  opacity: .55;
  cursor: default;
}

.form-button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 4px;
}

.text-field-email.page-6[aria-invalid="true"] {
  border-color: var(--color-error);
  box-shadow:
    0 0 6px rgb(224 43 50 / 45%),
    0 0 18px rgb(224 43 50 / 32%);
}

.email-form[data-state="success"] .text-field-email.page-6 {
  border-color: var(--color-success);
  background-color: var(--color-field);
  color: transparent;
  padding-inline-end: 0;
  box-shadow: var(--success-glow);
}

@media (prefers-reduced-motion: no-preference) {
  .text-field-email.page-6 {
    transition: border-color 180ms ease-out, box-shadow 180ms ease-out, color 140ms ease-out;
  }
}

.email-form[data-state="success"] {
  margin-inline: auto;
}

.email-form[data-state="success"]:not([data-phase="settled"]) .form-button {
  pointer-events: none;
}

.email-form[data-phase="settled"] .text-field-email {
  visibility: hidden;
}

.email-form[data-phase="settled"] .form-button {
  inset-inline: 0;
  margin-inline: auto;
  cursor: default;
}

.email-form[data-phase="settled"] .form-button::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--success-ring-y)) calc(-1 * var(--success-ring-x));
  border: 1px solid var(--color-success);
  border-radius: 999px;
  box-shadow: var(--success-glow);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .email-form[data-state="success"] .form-button {
    transform: none !important;
  }
}

.waitlist-form-shell {
  position: relative;
}

.waitlist-consent {
  margin-top: .75rem;
  color: var(--color-muted);
  font-size: .75rem;
  line-height: 1.4;
  text-align: center;
}

.waitlist-consent input {
  accent-color: var(--color-text);
}

.waitlist-consent a {
  color: inherit;
}

.email-form[data-state="success"] ~ .waitlist-consent {
  visibility: hidden;
}

.form-feedback {
  position: absolute;
  inset-block-start: 100%;
  inset-inline: 0;
  margin: .8em 0 0;
  padding-inline: .5em;
  color: var(--color-text);
  font-size: .5em;
  line-height: 1.4;
  text-align: center;
}

.form-feedback[data-tone="error"],
.form-feedback[data-tone="notice"] {
  color: var(--color-error);
}

.form-feedback[data-tone="success"] {
  color: var(--color-success);
}

.form-feedback:focus {
  outline: none;
}

@media screen and (max-width: 767px) {
  .form-feedback {
    font-size: 1.54em;
  }
}
