/* ===================================================================
   Tome Fitness — design tokens
   =================================================================== */
:root {
  --bg: #F5F6F2;
  --card: #FFFFFF;
  --text: #121212;
  --text-2: #6E746A;
  --accent: #B7D93A;
  --accent-ink: #14210A;
  --border: #E5E7E0;

  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.04);
  --glow: rgba(183, 217, 58, 0.28);
  --band: #ECEEE8;
  --frost: rgba(245, 246, 242, 0.72);

  --r-card: 24px;
  --r-btn: 16px;
  --r-frame: 30px;

  --maxw: 1200px;
  --pad-y: clamp(72px, 11vw, 150px);

  --t-ease: cubic-bezier(0.22, 1, 0.36, 1);

  --f-12: 0.75rem; --f-14: 0.875rem; --f-16: 1rem; --f-18: 1.125rem;
  --f-24: 1.5rem; --f-32: 2rem; --f-44: 2.75rem;
}

[data-theme="dark"] {
  --bg: #0A0A0A;
  --card: #141414;
  --text: #F5F7F3;
  --text-2: #9BA59A;
  --accent: #B7D93A;
  --accent-ink: #0D0D0D;
  --border: #242424;

  --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.40);
  --glow: rgba(183, 217, 58, 0.22);
  --band: #101010;
  --frost: rgba(20, 20, 20, 0.72);
}

/* ===================================================================
   Base
   =================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--f-16);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s var(--t-ease), color 0.5s var(--t-ease);
  overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--pad-y) 0; }

.eyebrow {
  display: inline-block;
  font-size: var(--f-14); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px;
}
.section__head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 72px); }
.section__title { font-size: clamp(var(--f-32), 4.4vw, var(--f-44)); }

/* ===================================================================
   Buttons
   =================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: var(--f-16);
  padding: 14px 26px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s var(--t-ease), background 0.3s, border-color 0.3s, box-shadow 0.3s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 24px rgba(183, 217, 58, 0.28);
}
.btn--primary:hover { transform: translateY(-2px) scale(1.015); box-shadow: 0 14px 34px rgba(183, 217, 58, 0.4); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.btn--lg { padding: 18px 36px; font-size: var(--f-18); }
.btn--sm { padding: 10px 18px; font-size: var(--f-14); }

/* ===================================================================
   Navigation
   =================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s var(--t-ease), box-shadow 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: var(--frost);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--border);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.nav__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.nav__logo {
  width: 34px; height: 34px; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; background: var(--card);
  border: 1px solid var(--border); flex: none;
}
.nav__logo img { width: 100%; height: 100%; object-fit: cover; }
.nav__word { font-size: var(--f-18); letter-spacing: -0.02em; }
.nav__word-thin { color: var(--text-2); font-weight: 500; margin-left: 4px; }
.nav__links { display: flex; gap: 32px; margin-left: auto; }
.nav__links a { color: var(--text-2); font-weight: 500; font-size: var(--f-16); transition: color 0.25s; }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 14px; margin-left: 24px; }
@media (max-width: 900px) { .nav__links { display: none; } .nav__actions { margin-left: auto; } }

.theme-toggle {
  width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card);
  display: grid; place-items: center; cursor: pointer; color: var(--text);
  transition: border-color 0.25s, transform 0.25s, color 0.25s;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: block; fill: currentColor; stroke: none; }

/* ===================================================================
   Hero
   =================================================================== */
.hero { position: relative; padding: clamp(140px, 18vh, 200px) 0 var(--pad-y); overflow: hidden; }
.hero__glow {
  position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
  width: min(1100px, 120vw); height: 700px; pointer-events: none; z-index: 0;
  background: radial-gradient(50% 50% at 60% 40%, var(--glow), transparent 70%);
  filter: blur(20px); animation: glowDrift 14s ease-in-out infinite alternate;
}
@keyframes glowDrift { from { transform: translateX(-54%) translateY(0); } to { transform: translateX(-46%) translateY(30px); } }
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
}
.hero__title { font-size: clamp(2.8rem, 7vw, 6rem); letter-spacing: -0.035em; }
.hero__sub { color: var(--text-2); font-size: clamp(var(--f-18), 2.2vw, 1.35rem); margin-top: 22px; max-width: 30ch; }
.hero__ctas { display: flex; gap: 16px; margin-top: 36px; flex-wrap: wrap; }
.hero__trust { margin-top: 28px; color: var(--text-2); font-size: var(--f-14); }
.hero__trust strong { color: var(--text); }

.hero__visual { position: relative; height: 560px; }
.hero__visual--placeholder { display: flex; align-items: center; justify-content: center; }
.screenshot-placeholder {
  width: 100%; height: 100%;
  border: 2px dashed var(--border);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); font-size: var(--f-14);
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__sub { margin-inline: auto; }
  .hero__ctas { justify-content: center; }
  .hero__visual { height: 480px; margin-top: 24px; }
}

/* ===================================================================
   Phone mockups
   =================================================================== */
.phone { width: 248px; }
.phone__frame {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-frame); padding: 12px;
  box-shadow: var(--shadow-soft);
}
[data-theme="dark"] .phone__frame { box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 60px rgba(183,217,58,0.12); }
.screen {
  background: linear-gradient(180deg, var(--bg), var(--card));
  border: 1px solid var(--border); border-radius: 22px;
  padding: 18px; min-height: 360px; display: flex; flex-direction: column; gap: 16px;
}
.screen__head { display: flex; align-items: center; justify-content: space-between; }
.screen__title { font-weight: 700; font-size: var(--f-18); }
.pill-tag {
  font-size: var(--f-12); font-weight: 700; color: var(--accent-ink);
  background: var(--accent); padding: 4px 10px; border-radius: 999px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--lime { background: var(--accent); box-shadow: 0 0 0 4px var(--glow); }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 8px; }
.bars span {
  flex: 1; height: var(--h); border-radius: 6px 6px 4px 4px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, transparent));
}
.bars span:nth-child(odd) { background: var(--border); }
.mini-stats { display: flex; gap: 12px; margin-top: auto; }
.mini-stats div {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px 12px;
}
.mini-stats b { display: block; font-size: var(--f-18); }
.mini-stats i { font-style: normal; font-size: var(--f-12); color: var(--text-2); }

.ring { position: relative; width: 150px; height: 150px; margin: 4px auto; }
.ring--lg { width: 180px; height: 180px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: var(--border); stroke-width: 9; }
.ring__fill {
  fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 82;
}
.ring__fill--anim { stroke-dashoffset: 326.7; transition: stroke-dashoffset 1.6s var(--t-ease); }
.ring__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring__label b { font-size: var(--f-32); line-height: 1; }
.ring__label i { font-style: normal; font-size: var(--f-12); color: var(--text-2); }

.set-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.set-list li {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px; font-size: var(--f-14);
}
.set-list li span { color: var(--text-2); }
.set-list li b { font-weight: 700; }
.set-list li.done { border-color: var(--accent); }
.set-list li.done b { color: var(--accent); }

/* hero phone positioning */
.hero__visual .phone { position: absolute; }
.phone--back { right: 4%; top: 0; transform: rotate(6deg); }
.phone--front { left: 0; top: 80px; transform: rotate(-5deg); z-index: 2; }
@media (max-width: 900px) {
  .phone--back { right: 50%; transform: translateX(70%) rotate(6deg) scale(0.9); }
  .phone--front { left: 50%; transform: translateX(-80%) rotate(-5deg) scale(0.9); }
}
@media (max-width: 480px) { .phone { width: 210px; } }

.float .phone__frame { animation: float 6s ease-in-out infinite; }
.float--delay .phone__frame { animation-delay: -3s; }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -16px; } }

/* ===================================================================
   Grid / cards
   =================================================================== */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--3 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 32px;
  box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--t-ease), border-color 0.4s, box-shadow 0.4s;
}
.card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: var(--shadow-soft); }

.feature { display: flex; flex-direction: column; gap: 14px; }
.feature__icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.feature__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: var(--f-24); }
.feature p { color: var(--text-2); }
.feature--cta { justify-content: center; background: var(--band); }
.feature--cta .btn { align-self: flex-start; margin-top: 6px; }

/* ===================================================================
   Steps
   =================================================================== */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  counter-reset: step;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 28px; border-radius: var(--r-card); border: 1px solid var(--border); background: var(--card); }
.step__num { font-size: var(--f-32); font-weight: 700; color: var(--accent); display: block; margin-bottom: 12px; }
.step h3 { font-size: var(--f-18); margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: var(--f-14); }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 44px; right: -16px; width: 16px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
@media (max-width: 760px) { .step:not(:last-child)::after { display: none; } }

/* ===================================================================
   Stats band
   =================================================================== */
.stats-band { background: var(--band); border-block: 1px solid var(--border); }
[data-theme="dark"] .stats-band { background: var(--band); }
.stats-grid { grid-template-columns: repeat(4, 1fr); align-items: center; gap: 32px; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; }
.stat__num { display: block; font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; }
.stat__label { color: var(--text-2); font-size: var(--f-14); }
.stat--ring { display: grid; place-items: center; }
.ring--lg .ring__pct { font-size: var(--f-32); color: var(--text); }

/* ===================================================================
   App preview
   =================================================================== */
.preview { position: relative; display: flex; justify-content: center; align-items: center; gap: -40px; min-height: 520px; }
.preview .phone { position: relative; }
.phone--p1 { transform: rotate(-8deg) translateY(20px); z-index: 1; margin-right: -50px; }
.phone--p2 { transform: translateY(-24px); z-index: 3; }
.phone--p3 { transform: rotate(8deg) translateY(20px); z-index: 1; margin-left: -50px; }
@media (max-width: 900px) {
  .preview { flex-direction: column; min-height: auto; gap: 32px; }
  .phone--p1, .phone--p2, .phone--p3 { transform: none; margin: 0; }
}

/* ===================================================================
   Testimonials
   =================================================================== */
.quote { display: flex; flex-direction: column; gap: 22px; margin: 0; }
.quote blockquote { margin: 0; font-size: var(--f-18); line-height: 1.5; }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: var(--f-14);
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.quote figcaption b { display: block; }
.quote figcaption i { font-style: normal; color: var(--text-2); font-size: var(--f-14); }

/* ===================================================================
   Final CTA
   =================================================================== */
.cta-band { position: relative; overflow: hidden; }
.cta-band__inner {
  position: relative; z-index: 1; text-align: center;
  background: var(--band); border: 1px solid var(--border);
  border-radius: 32px; padding: clamp(48px, 8vw, 88px) 32px;
}
.cta-band__glow {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 700px; height: 500px; z-index: 0; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, var(--glow), transparent 70%); filter: blur(10px);
}
.cta-band__title { font-size: clamp(var(--f-32), 5vw, 3.4rem); }
.cta-band__sub { color: var(--text-2); max-width: 44ch; margin: 18px auto 0; font-size: var(--f-18); }
.cta-band__actions { display: flex; flex-direction: column; align-items: center; gap: 24px; margin-top: 36px; }
.badges { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); background: var(--card);
  border-radius: 14px; padding: 10px 18px; transition: border-color 0.25s, transform 0.25s;
}
.badge:hover { border-color: var(--accent); transform: translateY(-2px); }
.badge svg { width: 24px; height: 24px; fill: var(--text); }
.badge span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.badge i { font-style: normal; font-size: var(--f-12); color: var(--text-2); }
.badge b { font-size: var(--f-16); }

/* ===================================================================
   Footer
   =================================================================== */
.footer { border-top: 1px solid var(--border); padding-top: 64px; color: var(--text-2); }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 48px; }
@media (max-width: 760px) { .footer__inner { grid-template-columns: 1fr 1fr; } }
.footer__brand p { margin-top: 14px; max-width: 28ch; }
.footer__col h4 { margin-bottom: 14px; }
.footer__col a { display: block; color: var(--text-2); padding: 5px 0; transition: color 0.2s; }
.footer__col a:hover { color: var(--accent); }
.footer__social { display: flex; gap: 10px; margin-bottom: 18px; }
.footer__social a {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  display: grid; place-items: center; transition: border-color 0.25s, transform 0.25s;
}
.footer__social a:hover { border-color: var(--accent); transform: translateY(-2px); }
.footer__social svg { width: 18px; height: 18px; fill: none; stroke: var(--text-2); stroke-width: 1.6; }
.theme-toggle--footer { width: 38px; height: 38px; }
.footer__base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-top: 24px; padding-bottom: 32px; font-size: var(--f-14);
}

/* ===================================================================
   Legal pages (Terms / Privacy)
   =================================================================== */
.legal { padding: clamp(120px, 16vh, 180px) 0 var(--pad-y); }
.legal__wrap { max-width: 800px; }
.legal__head { margin-bottom: 48px; }
.legal__head h1 { font-size: clamp(var(--f-32), 5vw, var(--f-44)); }
.legal__updated { color: var(--text-2); font-size: var(--f-14); margin-top: 12px; }
.legal__toc {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 24px 28px; margin-bottom: 48px;
}
.legal__toc h2 { font-size: var(--f-14); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin-bottom: 14px; }
.legal__toc ol { margin: 0; padding-left: 20px; columns: 2; gap: 24px; }
@media (max-width: 600px) { .legal__toc ol { columns: 1; } }
.legal__toc a { color: var(--text); padding: 4px 0; display: inline-block; transition: color 0.2s; }
.legal__toc a:hover { color: var(--accent); }
.legal h2.legal__h { font-size: var(--f-24); margin: 48px 0 14px; scroll-margin-top: 100px; }
.legal h3 { font-size: var(--f-18); margin: 24px 0 8px; }
.legal p, .legal li { color: var(--text-2); line-height: 1.7; }
.legal p { margin-bottom: 16px; }
.legal ul { padding-left: 20px; margin-bottom: 16px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal strong { color: var(--text); }
.legal__contact {
  background: var(--band); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 28px; margin-top: 40px;
}
.legal__contact p { margin-bottom: 6px; }

/* ===================================================================
   Screenshot placeholders
   =================================================================== */
.screenshots {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  padding: 20px 0 40px;
}
.screenshot-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: translateY(24px);
  transition: transform 0.4s var(--t-ease);
}
.screenshot-frame--mid {
  transform: translateY(0);
}
.screenshot-frame__phone {
  width: 220px;
  aspect-ratio: 9/19.5;
  border-radius: 36px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  position: relative;
}
.screenshot-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.screenshot-frame__img--dark { display: none; }
[data-theme="dark"] .screenshot-frame__img--light { display: none; }
[data-theme="dark"] .screenshot-frame__img--dark  { display: block; }
.screenshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: 34px;
}
.screenshot-placeholder svg {
  width: 32px; height: 32px;
  stroke: var(--accent); fill: none; stroke-width: 1.5;
  opacity: 0.6;
}
.screenshot-placeholder span {
  font-size: var(--f-14); font-weight: 700; color: var(--text);
}
.screenshot-placeholder small {
  font-size: 11px; color: var(--text-2); line-height: 1.5;
}
.screenshot-frame__label {
  font-size: var(--f-14); font-weight: 600; color: var(--text-2);
  margin: 0;
}
@media (max-width: 700px) {
  .screenshots { flex-direction: column; align-items: center; }
  .screenshot-frame { transform: none !important; }
  .screenshot-frame__phone { width: 240px; }
}

/* ===================================================================
   Reveal animations
   =================================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s var(--t-ease), transform 0.6s var(--t-ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float, .hero__glow { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .ring__fill--anim { transition: none; }
  * { scroll-behavior: auto !important; }
}
