/* Fit-Start — fit-start.ai
   Colours and type follow the iOS app's AppTheme.swift: a cool lavender-grey
   ground, periwinkle / amber / mint accents, near-black "ink" for the one
   main button, and Outfit set light with size doing the work. */

:root {
  --periwinkle: #CCCCFF;
  --on-periwinkle: #1B1A21;

  --primary: #8A7FF5;
  --primary-dark: #6C60E0;
  --primary-muted: #EDEBFC;
  --secondary: #F2BF63;
  --tertiary: #6FD3BE;

  --ink: #15151A;
  --on-ink: #FFFFFF;

  --background: #F3F2F8;
  --surface: #ECEAF5;
  --surface-elevated: #FFFFFF;
  --card-edge: #FFFFFF;
  --border: #E2E0EC;

  --text-primary: #1B1A21;
  --text-secondary: #7C7B88;
  --text-muted: #A9A8B6;

  --success: #3DBD8A;
  --error: #E5484D;

  --radius-card: 22px;
  --radius-md: 12px;
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #A198FF;
    --primary-dark: #8A80F0;
    --primary-muted: #2A2749;
    --secondary: #F5C978;
    --tertiary: #7FDCC8;
    --ink: #F4F3F8;
    --on-ink: #15151A;
    --background: #0F0F14;
    --surface: #1A1922;
    --surface-elevated: #26252F;
    --card-edge: #2C2B37;
    --border: #2C2B37;
    --text-primary: #F2F1F7;
    --text-secondary: #A5A4B3;
    --text-muted: #6E6D7B;
    --success: #5BCF9F;
    --error: #F0666A;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); }
@media (prefers-color-scheme: dark) { a { color: var(--primary); } }

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

/* ------------------------------------------------------------------ */
/* Landing: the app's first screen — the mark alone on periwinkle.     */
/* Periwinkle in both appearances, as in the app's SplashStep.         */
/* ------------------------------------------------------------------ */

.landing {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--on-periwinkle);
  background: var(--periwinkle);
}

/* Soft washes of the three accents, like light through frosted glass. */
.landing::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 34% at 18% 22%, rgba(138, 127, 245, .38), transparent 70%),
    radial-gradient(32% 30% at 84% 18%, rgba(242, 191, 99, .30), transparent 70%),
    radial-gradient(40% 36% at 78% 86%, rgba(111, 211, 190, .32), transparent 70%),
    radial-gradient(46% 40% at 50% 50%, rgba(255, 255, 255, .45), transparent 72%);
  filter: blur(8px);
  animation: drift 24s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .landing::before { animation: none; }
  .logo { animation: none !important; }
}

.landing main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 48px 16px 24px;
  text-align: center;
}

.logo {
  display: block;
  width: clamp(140px, 34vw, 196px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 22.5%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12), 0 24px 60px rgba(27, 26, 33, .10);
  animation: rise .9s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.landing h1 {
  margin: 4px 0 0;
  font-size: clamp(30px, 6vw, 44px);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.1;
}

.tagline {
  max-width: 30rem;
  margin: -14px 0 0;
  font-size: 17px;
  color: rgba(27, 26, 33, .72);
}

/* The sign-up card: a frosted tile with a hairline of white along its edge. */
.signup {
  width: 100%;
  max-width: 460px;
  padding: 22px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 10px 30px rgba(27, 26, 33, .08);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.signup p.lead {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 400;
}

.signup form { margin: 0; }

.field-row {
  display: flex;
  gap: 8px;
}

.signup input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  font: inherit;
  font-size: 16px; /* keeps iOS from zooming in */
  font-weight: 400;
  color: #1B1A21;
  background: #FFFFFF;
  border: 1px solid #E2E0EC;
  border-radius: 999px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.signup input[type="email"]::placeholder { color: #A9A8B6; }

.signup input[type="email"]:focus {
  border-color: #8A7FF5;
  box-shadow: 0 0 0 4px rgba(138, 127, 245, .22);
}

.signup input[aria-invalid="true"] { border-color: #E5484D; }

/* Ink: the one hard colour, kept for the main button. */
.btn-ink {
  flex: none;
  height: 52px;
  padding: 0 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #FFFFFF;
  background: #15151A;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
  transition: transform .12s, opacity .15s;
}

.btn-ink:hover { transform: translateY(-1px); }
.btn-ink:active { transform: translateY(0) scale(.98); }
.btn-ink:disabled { opacity: .55; cursor: progress; transform: none; }
.btn-ink:focus-visible { outline: 3px solid #8A7FF5; outline-offset: 3px; }

.form-note {
  margin: 12px 4px 0;
  font-size: 12.5px;
  color: rgba(27, 26, 33, .62);
}

.form-note a { color: inherit; }

.status {
  min-height: 1.4em;
  margin: 12px 4px 0;
  font-size: 14px;
  font-weight: 400;
}

.status:empty { display: none; }

.status[data-kind="error"] { color: #C9353A; }

.done {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 15px;
  font-weight: 400;
}

.done .tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: #FFFFFF;
  background: #3DBD8A;
}

.ref-chip {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
}

.ref-chip strong { font-weight: 600; letter-spacing: .04em; }

/* Honeypot: invisible to people, filled in by bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 359px) {
  .field-row { flex-direction: column; }
  .signup input[type="email"] { flex: none; width: 100%; }
  .btn-ink { width: 100%; }
}

/* Footer links, near the bottom of every page. */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin-bottom: 8px;
}

.site-footer a {
  color: inherit;
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover { border-bottom-color: currentColor; }

.site-footer small {
  display: block;
  font-size: 12.5px;
  opacity: .65;
}

.landing .site-footer { color: var(--on-periwinkle); }

/* ------------------------------------------------------------------ */
/* Document pages: the app's own ground, cards a tone deeper.          */
/* ------------------------------------------------------------------ */

.doc-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--background) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.doc-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
}

.brand img { width: 32px; height: 32px; border-radius: 8px; }

.doc-header .back {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
}

.doc-header .back:hover { color: var(--text-primary); }

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 16px 24px;
}

.doc h1 {
  margin: 0 0 6px;
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.15;
}

.doc .eyebrow {
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--text-secondary);
}

.doc h2 {
  margin: 40px 0 10px;
  font-size: 20px;
  font-weight: 500;
  scroll-margin-top: 80px;
}

.doc h3 {
  margin: 26px 0 6px;
  font-size: 16px;
  font-weight: 500;
}

.doc p, .doc li { font-size: 16px; color: var(--text-primary); }
.doc strong { font-weight: 500; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--primary); }

.card {
  margin: 24px 0;
  padding: 20px 22px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--card-edge);
}

.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.card.accent { background: var(--primary-muted); border-color: transparent; }

.mail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--on-ink);
  background: var(--ink);
  border-radius: 999px;
  text-decoration: none;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 28px 16px 0;
  font-size: 16px;
  font-weight: 500;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-size: 22px;
  font-weight: 300;
  color: var(--text-secondary);
}

.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--text-secondary); }

.doc-page .site-footer {
  max-width: 760px;
  margin: 24px auto 0;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}

.doc-page .site-footer a[aria-current="page"] { color: var(--text-primary); font-weight: 500; }
