/* Fitter AI website. Tokens mirror the app (src/theme/tokens.ts). */

@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('assets/fonts/DMSans_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('assets/fonts/DMSans_500Medium.ttf') format('truetype'); }
@font-face { font-family: 'DM Sans'; font-weight: 600; font-display: swap; src: url('assets/fonts/DMSans_600SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('assets/fonts/DMSans_700Bold.ttf') format('truetype'); }
@font-face { font-family: 'DM Sans'; font-weight: 800; font-display: swap; src: url('assets/fonts/DMSans_800ExtraBold.ttf') format('truetype'); }

:root {
  --ink: #1c1b22;
  --ink-soft: #2d2b36;
  --text: #1c1b22;
  --text-2: #5f5e69;
  --text-3: #8a8a93;
  --surface: #f7f7fb;
  --line: #e9e9ee;
  --accent: #2563eb;
  --accent-soft: #e8effd;
  --dot: #e3e5ea;
  --warn-bg: #fff7ec;
  --warn-ink: #8a5a18;
  --shadow-card: 0 1px 20px 1px rgba(228, 229, 233, 0.5);
  --shadow-phone: 0 30px 60px -20px rgba(28, 27, 34, 0.28), 0 12px 24px -12px rgba(28, 27, 34, 0.18);
  --max: 1200px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  line-height: 1.5;
  background-color: #fff;
  background-image: linear-gradient(to bottom, #ffffff 0%, #fbfcff 18%, #f1f6ff 46%, #fafbff 72%, #ffffff 100%);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

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

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; }
.skip-link:focus { top: 12px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }

.header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: var(--max); margin: 0 auto; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.brand img { width: 26px; height: auto; }

.nav-desktop { position: absolute; left: 50%; display: none; gap: 30px; transform: translateX(-50%); font-weight: 500; }
.nav-desktop a { padding: 6px 2px; color: var(--text); transition: opacity 0.2s; }
.nav-desktop a:hover { opacity: 0.6; }

.header-cta { display: none; gap: 10px; }

.menu-button { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; cursor: pointer; }
.menu-button svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }

.mobile-menu { display: flex; flex-direction: column; max-width: var(--max); margin: 8px auto 0; padding-bottom: 6px; font-size: 18px; font-weight: 500; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: 11px 0; border-top: 1px solid var(--line); }

@media (min-width: 1024px) {
  .nav-desktop, .header-cta { display: flex; }
  .menu-button, .mobile-menu { display: none !important; }
}

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

.store-row { display: flex; flex-wrap: wrap; gap: 14px; }
.store-row-center { justify-content: center; }

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 164px;
  height: 54px;
  padding: 0 20px 0 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.store-btn:hover { transform: translateY(-2px); background: #000; }
.store-btn svg { flex: none; width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.store-btn span { display: flex; flex-direction: column; white-space: nowrap; }
.store-btn small { font-size: 11px; font-weight: 500; letter-spacing: 0; opacity: 0.75; }

.store-btn-sm { min-width: 0; height: 42px; padding: 0 14px 0 11px; gap: 8px; border-radius: 10px; font-size: 14px; }
.store-btn-sm svg { width: 19px; height: 19px; }
.store-btn-sm small { font-size: 9px; }

/* ---------- Phone frame ---------- */

.phone {
  --w: 280px;
  flex: none;
  width: var(--w);
  padding: calc(var(--w) * 0.034);
  border-radius: calc(var(--w) * 0.17);
  background: var(--ink);
  box-shadow: var(--shadow-phone);
}
.phone-screen { position: relative; overflow: hidden; padding-top: calc(var(--w) * 0.13); border-radius: calc(var(--w) * 0.138); background: #fff; }
.phone-screen::before {
  content: '';
  position: absolute;
  top: calc(var(--w) * 0.03);
  left: 50%;
  width: calc(var(--w) * 0.29);
  height: calc(var(--w) * 0.082);
  border-radius: 999px;
  background: var(--ink);
  transform: translateX(-50%);
}
.phone-screen img { width: 100%; height: auto; }

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

.hero { display: grid; align-items: center; gap: 24px; max-width: var(--max); margin: 0 auto; padding: 28px 20px 0; }

.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }

.pill { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px 0 12px; border: 1px solid rgba(198, 198, 198, 0.56); border-radius: 999px; background: rgba(255, 255, 255, 0.6); font-size: 14px; font-weight: 500; }
.pill-dots { display: inline-flex; gap: 4px; }
.pill-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.pill-dots i:last-child { background: var(--dot); }

h1 { font-size: clamp(36px, 9.4vw, 52px); font-weight: 800; line-height: 1.12; letter-spacing: -0.035em; }
h1 span { display: block; margin-top: 4px; font-weight: 500; letter-spacing: -0.03em; text-wrap: balance; }
h1 br { display: none; }

.lede { max-width: 520px; font-size: 17px; color: var(--text-2); }

.hero-visual { position: relative; width: 100%; max-width: 560px; height: 470px; margin: 12px auto 0; }
.hero-glow { position: absolute; inset: 8% 4% 4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0)); }
.hero-visual .phone { position: absolute; }
.phone-front { --w: 196px; left: 50%; top: 10px; margin-left: -168px; transform: rotate(-5deg); z-index: 2; }
.phone-back { --w: 184px; left: 50%; top: 44px; margin-left: -10px; transform: rotate(6deg); z-index: 1; }

@media (min-width: 640px) {
  .hero-visual { height: 640px; }
  .phone-front { --w: 276px; margin-left: -250px; }
  .phone-back { --w: 258px; top: 60px; margin-left: -6px; }
}

@media (min-width: 1024px) {
  .hero { grid-template-columns: 1.08fr 0.92fr; padding-top: 44px; }
  .hero-copy { gap: 20px; padding-left: 12px; }
  h1 br { display: inline; }
  .hero-visual { margin-top: 0; }
}

/* ---------- Sections ---------- */

.section { max-width: var(--max); margin: 0 auto; padding: 96px 20px 0; }
.section-title { text-align: center; font-size: clamp(30px, 6.4vw, 48px); font-weight: 500; line-height: 1.15; letter-spacing: -0.03em; }
.section-sub { max-width: 560px; margin: 12px auto 0; text-align: center; font-size: 18px; color: var(--text-2); }

@media (min-width: 1024px) { .section { padding-top: 150px; } }

/* ---------- How it works ---------- */

.steps { display: grid; gap: 21px; margin-top: 48px; }

/* Screenshot on top, text underneath: the two never overlap. */
.step { position: relative; display: flex; flex-direction: column; overflow: hidden; max-width: 420px; width: 100%; margin: 0 auto; border: 1px solid var(--line); border-radius: 28px; background: #fff; box-shadow: 0 18px 40px -24px rgba(28, 27, 34, 0.25); transition: transform 0.3s ease; }
.step:hover { transform: translateY(-4px); }
.step > img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
/* Starts this screenshot at its first control instead of a cut-off title. */
.step > img.shot-offset { object-position: 0 36%; }

.step-caption { position: relative; flex: 1; padding: 6px 26px 28px; background: #fff; }
/* The screenshot fades out into the text area, so the crop has no hard edge. */
.step-caption::before { content: ''; position: absolute; right: 0; bottom: 100%; left: 0; height: 84px; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 88%); pointer-events: none; }
.step-num { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 12px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; }
.step-caption h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.step-caption p { margin-top: 6px; font-size: 15px; color: var(--text-2); }

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); margin-top: 110px; }
  .step-raised { top: -64px; }
}

/* ---------- Feature switcher ---------- */

.features { display: grid; align-items: center; gap: 72px; max-width: 1080px; margin: 56px auto 0; }

.features-phone { position: relative; justify-self: center; }
.features-phone .phone { --w: 270px; }
#feature-img { transition: opacity 0.3s ease; }

.feature-dots { position: absolute; bottom: -34px; left: 50%; display: flex; gap: 8px; transform: translateX(-50%); }
.feature-dots button { width: 12px; height: 12px; padding: 0; border: 0; border-radius: 50%; background: #d1d5db; cursor: pointer; transition: background-color 0.3s, transform 0.3s; }
.feature-dots button.is-active { background: var(--ink); transform: scale(1.1); }

.feature-list { display: flex; flex-direction: column; gap: 16px; }
.feature-card { display: block; width: 100%; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; text-align: left; cursor: pointer; transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease; }
.feature-card h3 { margin-bottom: 6px; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.feature-card p { font-size: 15.5px; color: var(--text-2); }
.feature-card:hover { border-color: #cfcfd6; }
.feature-card.is-active { border-color: var(--ink); background: var(--surface); }

@media (min-width: 1024px) {
  .features { grid-template-columns: 1fr 1fr; gap: 64px; margin-top: 72px; }
  .features-phone .phone { --w: 310px; }
  .feature-list { gap: 22px; }
  .feature-card.is-active { transform: scale(1.04); }
}

/* ---------- Why ---------- */

.why { display: grid; gap: 24px; max-width: 1080px; margin: 56px auto 0; }
.why-card { padding: 32px; border-radius: 30px; background: #fff; box-shadow: var(--shadow-card); }
.why-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 18px; border-radius: 16px; background: var(--surface); }
.why-icon svg { width: 44px; height: 44px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.why-icon .track { stroke: #dcdde4; }
.why-icon .fill { fill: var(--accent); stroke: none; }
.why-card h3 { margin-bottom: 10px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.why-card p { font-size: 15px; color: var(--text-2); }

@media (min-width: 768px) { .why { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Spotlight ---------- */

.spotlight { display: grid; align-items: center; gap: 56px; max-width: 1080px; margin: 0 auto; padding: 110px 20px 120px; overflow: hidden; }
.spotlight-copy { text-align: center; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.spotlight h2 { margin-top: 12px; font-size: clamp(34px, 7vw, 50px); font-weight: 700; line-height: 1.1; letter-spacing: -0.035em; }
.spotlight p { max-width: 440px; margin: 18px auto 0; font-size: 18px; color: var(--text-2); }
.spotlight-visual { justify-self: center; padding: 10px 30px; }
.phone-tilt { --w: 270px; transform: rotate(-3deg); }

@media (min-width: 1024px) {
  .spotlight { grid-template-columns: 1fr 1fr; padding: 150px 20px 160px; overflow: visible; }
  .spotlight-copy { text-align: left; }
  .spotlight p { margin-left: 0; }
  .spotlight-visual { justify-self: end; padding-right: 60px; }
  .phone-tilt { --w: 310px; }
}

/* ---------- Dark section ---------- */

.dark { padding: 80px 20px; background: var(--ink); color: #fff; }
.dark-inner { max-width: 1080px; margin: 0 auto; }
.dark h2 { text-align: center; font-size: clamp(30px, 6.4vw, 48px); font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; }
.dark-sub { max-width: 560px; margin: 14px auto 0; text-align: center; font-size: 18px; color: rgba(255, 255, 255, 0.72); }

.calc { display: grid; gap: 20px; margin-top: 52px; }
.calc-card { padding: 28px; border: 1px solid #45424f; border-radius: 20px; background: var(--ink-soft); transition: transform 0.3s ease; }
.calc-card:hover { transform: translateY(-4px); }
.calc-num { font-size: 14px; font-weight: 700; letter-spacing: 0.04em; color: #8fb2ff; }
.calc-card h3 { margin: 10px 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.calc-card p { font-size: 14.5px; color: rgba(255, 255, 255, 0.78); }
.dark-note { margin-top: 36px; text-align: center; font-size: 14px; color: rgba(255, 255, 255, 0.6); }

@media (min-width: 640px) { .calc { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .dark { padding: 150px 20px; }
  .calc { grid-template-columns: repeat(4, 1fr); margin-top: 64px; }
}

/* ---------- Pricing ---------- */

.pricing { display: grid; align-items: center; gap: 20px; max-width: 980px; margin: 56px auto 0; }
.price-card { position: relative; padding: 34px 28px 30px; border-radius: 28px; background: #fff; text-align: center; box-shadow: var(--shadow-card); }
.price-card h3 { font-size: 18px; font-weight: 600; color: var(--text-2); }
.price { margin-top: 8px; font-size: 17px; color: var(--text-2); }
.price strong { font-size: 44px; font-weight: 700; letter-spacing: -0.035em; color: var(--text); }
.price-note { margin-top: 4px; font-size: 15px; color: var(--text-3); }

.price-badge { position: absolute; top: -13px; left: 50%; padding: 4px 12px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; transform: translateX(-50%); }
.price-badge-soft { background: var(--accent-soft); color: var(--accent); }

.price-card-best { background: var(--ink); color: #fff; box-shadow: 0 30px 50px -28px rgba(28, 27, 34, 0.6); }
.price-card-best h3, .price-card-best .price { color: rgba(255, 255, 255, 0.75); }
.price-card-best .price strong { color: #fff; }
.price-card-best .price-note { color: rgba(255, 255, 255, 0.62); }

.included { display: grid; gap: 12px 28px; width: fit-content; max-width: 100%; margin: 48px auto 0; font-size: 16px; }
.included li { position: relative; padding-left: 32px; }
.included li::before { content: ''; position: absolute; top: 1px; left: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E") center / 14px no-repeat; }

.fine-print { max-width: 640px; margin: 28px auto 0; text-align: center; font-size: 13.5px; color: var(--text-3); }

@media (min-width: 640px) { .included { grid-template-columns: repeat(2, auto); } }
@media (min-width: 860px) {
  .pricing { grid-template-columns: repeat(3, 1fr); }
  .price-card-best { padding: 46px 28px 42px; }
}

/* ---------- FAQ ---------- */

.faq { display: flex; flex-direction: column; gap: 12px; max-width: 768px; margin: 48px auto 0; }
.faq-item { overflow: hidden; border-radius: 24px; background: #fff; box-shadow: var(--shadow-card); }
.faq-item summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px; list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline-offset: -4px; border-radius: 24px; }
.faq-item h3 { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.chev { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); transition: transform 0.2s ease; }
.chev svg { width: 14px; height: 14px; fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.faq-item[open] .chev { transform: rotate(180deg); }

.faq-answer { display: flex; flex-direction: column; gap: 14px; padding: 0 24px 24px; color: #4a4552; line-height: 1.65; }
.faq-answer ul { display: flex; flex-direction: column; gap: 8px; }
.faq-answer li { position: relative; padding-left: 18px; }
.faq-answer li::before { content: ''; position: absolute; top: 0.68em; left: 0; width: 6px; height: 6px; border-radius: 50%; background: #b7aec3; }
.faq-answer strong { color: var(--ink); font-weight: 600; }
.callout { padding: 14px 16px; border-radius: 16px; background: var(--surface); font-size: 14.5px; }
.callout-warn { background: var(--warn-bg); }
.callout-warn strong { color: var(--warn-ink); }

/* ---------- Download ---------- */

.download { padding: 110px 20px 90px; }
.download-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 24px;
  border-radius: 40px;
  text-align: center;
  background:
    radial-gradient(60% 90% at 12% 10%, rgba(37, 99, 235, 0.2), transparent 70%),
    radial-gradient(55% 80% at 90% 95%, rgba(37, 99, 235, 0.16), transparent 70%),
    linear-gradient(135deg, #eef3ff, #f7f7fb 55%, #eaf1ff);
}
.download-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 16px 30px -14px rgba(28, 27, 34, 0.35); }
.download h2 { margin-top: 26px; font-size: clamp(32px, 7vw, 50px); font-weight: 700; line-height: 1.1; letter-spacing: -0.035em; }
.download p { margin: 14px 0 30px; font-size: 18px; color: var(--text-2); }

@media (min-width: 1024px) { .download { padding: 170px 20px 120px; } .download-panel { padding: 110px 24px; } }

/* ---------- Legal pages ---------- */

.legal { max-width: 760px; margin: 0 auto; padding: 48px 20px 72px; }
.legal h1 { font-size: clamp(34px, 8vw, 48px); }
.legal-updated { margin-top: 10px; font-size: 15px; color: var(--text-3); }
.legal-summary { margin-top: 28px; padding: 22px 24px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-card); font-size: 17px; }
.legal-summary strong { font-weight: 700; }
.legal h2 { margin-top: 44px; font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
.legal h3 { margin-top: 22px; font-size: 17px; font-weight: 600; }
.legal p, .legal ul { margin-top: 12px; color: #4a4552; line-height: 1.65; }
.legal ul { display: flex; flex-direction: column; gap: 8px; }
.legal li { position: relative; padding-left: 18px; }
.legal li::before { content: ''; position: absolute; top: 0.68em; left: 0; width: 6px; height: 6px; border-radius: 50%; background: #b7aec3; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal .callout { margin-top: 16px; font-size: 15.5px; }

@media (min-width: 1024px) { .legal { padding-top: 72px; } }

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

.site-footer { padding: 28px 20px 0; }
.footer-inner { display: grid; gap: 36px; max-width: 1280px; margin: 0 auto; padding-bottom: 36px; }
.footer-brand p { margin-top: 12px; font-size: 14px; color: var(--text-2); }
.footer-col h3 { margin-bottom: 14px; font-size: 16px; font-weight: 600; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 14px; color: var(--text-2); transition: color 0.2s; }
.footer-col a:hover { color: #000; }
.footer-bottom { display: flex; flex-direction: column; gap: 4px; max-width: 1280px; margin: 0 auto; padding: 16px 0 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-3); }

@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ---------- Toast ---------- */

.toast { position: fixed; bottom: 24px; left: 50%; z-index: 60; max-width: calc(100vw - 32px); padding: 13px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; text-align: center; box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.5); opacity: 0; transform: translate(-50%, 12px); transition: opacity 0.25s ease, transform 0.25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Scroll reveal (only when script.js is running) ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .step-raised.reveal { transition-delay: 0.08s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
