/* FitRealm — site styles
   Palette mirrors lib/app/theme/app_tokens.dart. Dark-only by design. */

:root {
  /* Surfaces */
  --bg-deep: #0b1220;
  --surface-1: #111827;
  --surface-2: #1f2937;
  --surface-card: #131d2e;

  /* Brand */
  --primary: #2563eb;
  --primary-bright: #3b82f6;
  --xp-purple: #a855f7;
  --xp-fuchsia: #d946ef;
  --success: #22c55e;

  /* Text */
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;

  /* Derived */
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --xp-gradient: linear-gradient(90deg, var(--xp-purple), var(--xp-fuchsia));

  /* Rhythm */
  --wrap: 1120px;
  --gutter: 20px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

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

/* ---------- reset ---------- */

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

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

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary-bright);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--xp-fuchsia);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.5rem, 9vw, 4.25rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(1.9rem, 6vw, 3rem);
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

p {
  margin: 0 0 1em;
}

.lede {
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 34ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--xp-gradient);
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(64px, 12vw, 120px);
  position: relative;
}

.section--hairline {
  border-top: 1px solid var(--hairline);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 12px 18px;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
}

.wordmark__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--xp-gradient);
  flex: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--primary-bright);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--text-primary);
  padding: 10px 18px;
  font-size: 0.94rem;
}

.btn--ghost:hover {
  background: var(--surface-2);
  border-color: var(--text-tertiary);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(48px, 10vw, 88px);
  padding-bottom: clamp(56px, 10vw, 104px);
  overflow: hidden;
}

/* Soft XP glow behind the mascot. Purely decorative. */
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -140px;
  width: 620px;
  height: 620px;
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.22) 0%,
    rgba(217, 70, 239, 0.09) 42%,
    transparent 68%
  );
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(28px, 6vw, 48px);
  align-items: center;
}

.hero__copy > * + * {
  margin-top: 20px;
}

.hero__art {
  justify-self: center;
  max-width: 300px;
}

.hero__art picture {
  display: block;
}

.hero__art img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55));
}

.hero h1 {
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  background: var(--xp-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin-top: 18px;
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex: none;
}

/* ---------- signup form ---------- */

.signup {
  max-width: 480px;
}

.signup__row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.signup__input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 14px 18px;
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  transition: border-color 0.15s ease;
}

.signup__input::placeholder {
  color: var(--text-tertiary);
}

.signup__input:focus {
  border-color: var(--primary-bright);
  outline: none;
}

.signup__input:focus-visible {
  outline: 2px solid var(--xp-fuchsia);
  outline-offset: 2px;
}

.signup__note {
  margin: 12px 0 0;
  font-size: 0.83rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.signup__status {
  margin: 14px 0 0;
  font-size: 0.94rem;
  font-weight: 600;
  min-height: 1.4em;
}

.signup__status[data-state="ok"] {
  color: var(--success);
}

.signup__status[data-state="error"] {
  color: #f87171;
}

.signup__status[data-state="busy"] {
  color: var(--text-secondary);
}

/* Honeypot — hidden from humans, catches naive bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- the wedge ---------- */

.wedge {
  background: var(--surface-1);
  border-block: 1px solid var(--hairline);
}

.wedge__claim {
  font-size: clamp(2.1rem, 7.5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0 0 24px;
  max-width: 18ch;
  text-wrap: balance;
}

.wedge__claim span {
  display: block;
  background: var(--xp-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wedge__body {
  max-width: 56ch;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.wedge__body strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ---------- screenshots ---------- */

.screens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(16px, 3vw, 26px);
  margin-top: 44px;
}

.phone {
  border-radius: 26px;
  border: 1px solid var(--hairline-strong);
  background: var(--surface-card);
  padding: 8px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.phone img {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  border-radius: 19px;
  background: var(--surface-2);
}

.phone__caption {
  margin: 12px 4px 4px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ---------- feature rows ---------- */

.features {
  display: grid;
  gap: 14px;
  margin-top: 44px;
  padding: 0;
  list-style: none;
}

.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

/* XP-bar motif: a gradient sliver on the leading edge. */
.feature::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: var(--xp-gradient);
  opacity: 0.85;
}

.feature__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  flex: none;
}

.feature h3 {
  margin-bottom: 4px;
}

.feature p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

/* ---------- closing CTA ---------- */

.closer {
  background: var(--surface-1);
  border-block: 1px solid var(--hairline);
  text-align: center;
}

.closer .signup {
  margin-inline: auto;
}

.closer .signup__note {
  text-align: center;
}

.closer h2 {
  margin-bottom: 16px;
  text-wrap: balance;
}

.closer .lede {
  margin-inline: auto;
  margin-bottom: 32px;
  max-width: 46ch;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 48px;
  font-size: 0.92rem;
  color: var(--text-tertiary);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: start;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.site-footer nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

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

.site-footer__legal {
  margin: 12px 0 0;
  max-width: 42ch;
  line-height: 1.55;
}

/* ---------- legal / prose pages ---------- */

.prose {
  max-width: 74ch;
  padding-block: clamp(40px, 8vw, 72px);
}

.prose h1 {
  font-size: clamp(2rem, 6.5vw, 2.9rem);
  margin-bottom: 8px;
}

.prose h2 {
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  padding-top: 0.9em;
  border-top: 1px solid var(--hairline);
}

.prose h3 {
  margin-top: 1.8em;
  margin-bottom: 0.4em;
  color: var(--text-primary);
}

.prose p,
.prose li {
  color: var(--text-secondary);
}

.prose strong {
  color: var(--text-primary);
  font-weight: 700;
}

.prose ul {
  padding-left: 1.15em;
  margin: 0 0 1.2em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose__meta {
  color: var(--text-tertiary);
  font-size: 0.92rem;
  margin-bottom: 2em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.6em;
  font-size: 0.94rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
  color: var(--text-secondary);
}

.prose th {
  color: var(--text-primary);
  font-weight: 700;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.callout {
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-left: 3px solid var(--xp-purple);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 0 0 2em;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout--warn {
  border-left-color: #f59e0b;
}

/* Unresolved legal facts. Deliberately loud so they cannot ship unnoticed. */
.needs-input {
  display: inline;
  background: rgba(245, 158, 11, 0.16);
  border: 1px dashed #f59e0b;
  border-radius: 4px;
  padding: 1px 6px;
  color: #fbbf24;
  font-size: 0.9em;
  font-weight: 600;
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.94rem;
  margin-bottom: 28px;
}

.backlink:hover {
  color: var(--text-primary);
}

/* ---------- placeholder page ----------
   The skeleton that ships until the real landing page is built. Everything
   above this block is the foundation for that build — don't delete it. */

.skeleton {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.skeleton .site-header {
  position: static;
  background: transparent;
  border-bottom: 0;
}

.skeleton .site-footer__inner {
  justify-content: center;
}

.stage {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: clamp(32px, 8vw, 72px);
  position: relative;
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(760px, 130vw);
  aspect-ratio: 1;
  transform: translate(-50%, -60%);
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.17) 0%,
    rgba(217, 70, 239, 0.07) 45%,
    transparent 70%
  );
  pointer-events: none;
}

.stage__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage__mark {
  width: clamp(84px, 20vw, 112px);
  height: auto;
  border-radius: 24%;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.stage__name {
  font-size: clamp(2.75rem, 12vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  margin-top: 28px;
}

.stage__tagline {
  font-size: clamp(1.15rem, 4.6vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 10px 0 0;
}

.stage__tagline span {
  color: var(--xp-purple);
}

.stage__blurb {
  max-width: 46ch;
  color: var(--text-secondary);
  font-size: clamp(0.98rem, 3.4vw, 1.06rem);
  margin: 26px 0 0;
}

.stage__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 34px 0 0;
  padding: 9px 20px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.stage__status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex: none;
}

.stage__contact {
  margin: 26px 0 0;
  font-size: 0.95rem;
}

.stage__contact a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 2px;
}

.stage__contact a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--xp-purple);
}

/* ---------- holding page ----------
   The current live page. The hero/wedge/screens/features/closer rules above are
   kept deliberately — they are the scaffolding for the full site and get reused
   once copy and screenshots are ready. */

.holding {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 0 0;
  position: relative;
  overflow-x: hidden;
}

.holding::before {
  content: "";
  position: absolute;
  top: -260px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 140vw);
  height: 700px;
  background: radial-gradient(
    ellipse at center,
    rgba(168, 85, 247, 0.20) 0%,
    rgba(217, 70, 239, 0.08) 45%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.holding__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  justify-content: center;
  padding-block: 48px;
}

.holding__mark {
  width: clamp(88px, 22vw, 116px);
  height: auto;
  border-radius: 24%;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

.holding__name {
  margin-top: 28px;
  font-size: clamp(2.6rem, 11vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.holding__tagline {
  margin: 14px 0 0;
  font-size: clamp(1.15rem, 4.6vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.holding__tagline span {
  background: var(--xp-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.holding__blurb {
  margin: 26px 0 0;
  max-width: 44ch;
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.holding__status {
  margin-top: 34px;
}

.holding__contact {
  margin: 18px 0 0;
  font-size: 0.98rem;
}

.holding__contact a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 2px;
}

.holding__contact a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--xp-purple);
}

.holding__footer {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 28px var(--gutter);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.86rem;
}

.holding__footer p {
  margin: 0;
}

/* ---------- responsive ---------- */

@media (min-width: 760px) {
  .hero__inner {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .hero__copy {
    order: 1;
  }

  .hero__art {
    order: 2;
    max-width: 380px;
  }

  .features {
    grid-template-columns: 1fr 1fr;
  }

  .wedge__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
  }
}

@media (max-width: 759px) {
  .hero__art {
    max-width: 220px;
  }

  .screens {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  body {
    font-size: 16px;
  }

  .signup__row {
    flex-direction: column;
  }

  .signup__row .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
