/* ==========================================================================
   LessFit — Coming Soon
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --surface: #121212;
  --text: #f5f5f4;
  --text-muted: #8f8f8c;   /* 6.3:1 on --bg */
  --text-faint: #6b6b69;   /* 3.9:1 on --bg, decorative / large text only */
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.22);
  --focus: #ffffff;
  --success: #f5f5f4;
  --error: #ff8a80;

  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 5vw, 4rem);
  --max: 76rem;
  --radius: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; }

h1, h2, p { margin: 0; }

a { color: inherit; }

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

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

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

/* --------------------------------------------------------------------------
   Backdrop — oversized, near-invisible brand mark
   -------------------------------------------------------------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.backdrop__mark {
  position: absolute;
  right: -8vw;
  bottom: -6vw;
  width: min(62vw, 54rem);
  height: auto;
  filter: invert(1);
  opacity: 0.035;
}

.backdrop::after {
  /* soft vignette so the mark fades into the page edges */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 20% 30%, transparent 40%, var(--bg) 100%);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding:
    max(clamp(1.5rem, 4vw, 2.75rem), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(clamp(1.5rem, 3vw, 2.25rem), env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.brand {
  display: inline-flex;
  border-radius: 6px;
  transition: opacity 0.25s var(--ease);
}
.brand:hover { opacity: 0.75; }

.brand__logo {
  width: auto;
  height: clamp(1.75rem, 2.4vw, 2.125rem);
  /* The source SVG is black; invert it for the dark theme without editing the file. */
  filter: invert(1);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(4rem, 12vh, 8rem);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  align-self: flex-start;
  padding: 0.45rem 0.9rem 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tag__dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
}
.tag__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--text);
  animation: pulse 2.6s var(--ease) infinite;
}

.hero__title {
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  font-size: clamp(2.75rem, 9vw, 7.5rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.hero__title span { display: block; }
.hero__title--muted { color: var(--text-faint); }

.hero__lede {
  max-width: 36ch;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  text-wrap: balance;
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Waitlist
   -------------------------------------------------------------------------- */

.waitlist {
  width: 100%;
  max-width: 30rem;
  margin-top: clamp(2.75rem, 6vw, 4rem);
}

.waitlist__title {
  margin-bottom: 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.field {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.field:hover { border-color: rgba(255, 255, 255, 0.32); }
.field:focus-within {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.field[data-invalid] { border-color: var(--error); }

.field__input {
  flex: 1;
  min-width: 0;
  height: 2.75rem;
  padding: 0 0.5rem 0 1.125rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* ≥16px avoids iOS zoom on focus */
  letter-spacing: -0.005em;
  outline: none;
}
.field__input::placeholder { color: var(--text-faint); }
/* Focus is shown on the surrounding .field via :focus-within */
.field__input:focus-visible { outline: none; }

.field__input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 100px var(--bg) inset;
  caret-color: var(--text);
}

.field__button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), opacity 0.25s var(--ease);
}
.field__button:hover { background: #ffffff; }
.field__button:focus-visible { outline-offset: 2px; }
.field__button:disabled { cursor: progress; opacity: 0.6; }

.field__arrow {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s var(--ease);
}
.field__button:hover .field__arrow { transform: translateX(3px); }

.waitlist__message {
  min-height: 1.25rem;
  margin-top: 0.875rem;
  padding-left: 1.125rem;
  color: var(--text-faint);
  font-size: 0.8125rem;
}
.waitlist__message[data-state="error"] { color: var(--error); }

/* Success state */

.waitlist__success {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 1.25rem;
  outline: none;
  animation: rise 0.6s var(--ease) both;
}
.waitlist__success[hidden] { display: none; }

.waitlist__check {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
}
.waitlist__check svg { width: 1rem; height: 1rem; }

.waitlist__success-title {
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.waitlist__success-text {
  margin-top: 0.125rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.contact a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.25s var(--ease);
}
.contact a:hover { text-decoration-color: var(--text); }

.social {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social__link {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-muted);
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.social__link svg { width: 1.0625rem; height: 1.0625rem; }
.social__link:hover {
  color: var(--bg);
  border-color: var(--text);
  background: var(--text);
  transform: translateY(-2px);
}

.copyright {
  justify-self: end;
  color: var(--text-faint);
}
.copyright small { font-size: inherit; }

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

.reveal {
  animation: rise 0.9s var(--ease) both;
  animation-delay: calc(var(--d, 0) * 90ms + 80ms);
}

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

@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  70%  { transform: scale(3.2); opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .tag__dot::after { display: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 52rem) {
  .site-footer {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "contact contact"
      "social  copyright";
    row-gap: 1.25rem;
  }
  .contact   { grid-area: contact; }
  .social    { grid-area: social; }
  .copyright { grid-area: copyright; }
}

@media (max-width: 30rem) {
  .hero { padding-block: 3.5rem 3rem; }

  .field {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0;
    border: 0;
    background: none;
  }
  .field:hover,
  .field:focus-within { background: none; }

  .field__input {
    flex: none;
    height: 3.25rem;
    padding: 0 1.25rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    transition: border-color 0.25s var(--ease);
  }
  .field__input:focus { border-color: var(--text); }
  .field[data-invalid] .field__input { border-color: var(--error); }

  .field__button {
    justify-content: center;
    height: 3.25rem;
  }

  .waitlist__message { padding-left: 1.25rem; }
}

@media (forced-colors: active) {
  .brand__logo,
  .backdrop__mark { filter: none; }
  .field__button { border: 1px solid ButtonText; }
}
