/* Racked landing — brand-aligned with mobile/theme.ts.
   Single stylesheet, no framework. Mobile-first; one max-width breakpoint
   for desktop. System font stack so nothing has to download.

   Visual approach: floating UI cards (cropped from real app screenshots)
   instead of full-device screenshots. Each card has subtle rotation, a
   soft drop shadow with a brand-purple tint, and rounded corners so it
   reads as "designed for the web" rather than "cropped from a store
   listing". */

:root {
  --bg: #141416;
  --surface: #1f1f23;
  --surface-raised: #27272a;
  --border: #2a2a2e;
  --text: #fafafa;
  --muted: #a1a1aa;
  --primary: #8b5cf6;
  --primary-dim: #5b21b6;
  --primary-fg: #ffffff;
  --accent-soft: rgba(139, 92, 246, 0.18);

  --r-card: 16px;
  --r-ctrl: 10px;
  --r-float: 20px;

  --maxw: 1100px;

  /* The card shadow used everywhere — soft, larger than you'd expect,
     and tinted with the brand purple so cards feel like they belong on
     a Racked-branded dark surface rather than just dropped on it. */
  --float-shadow:
    0 24px 50px -20px rgba(0, 0, 0, 0.55),
    0 8px 20px -10px rgba(139, 92, 246, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* tilted cards can poke past 100vw on small screens */
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
strong { color: var(--text); }

/* -------------------------------- nav --------------------------------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.2px;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 7px; }

/* ------------------------------- CTAs --------------------------------- */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 800;
  letter-spacing: 0.1px;
  border-radius: var(--r-ctrl);
  padding: 11px 16px;
  font-size: 14px;
  transition: transform 0.08s ease, background 0.15s ease;
}
.cta:hover { text-decoration: none; background: #7c4dff; transform: translateY(-1px); }
.cta-sm { padding: 9px 14px; font-size: 13px; }
.cta-lg {
  padding: 16px 22px;
  font-size: 16px;
  border-radius: 12px;
}
.cta-secondary {
  display: inline-block;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  padding: 14px 4px;
  margin-left: 8px;
}

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

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 60px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(91, 33, 182, 0.18), transparent 60%);
}
.hero-copy h1 {
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -1.2px;
  font-weight: 800;
  margin: 0 0 18px;
}
.lede {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  max-width: 520px;
  margin: 0 0 24px;
}
.hero-ctas { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.hero-note { color: var(--muted); font-size: 12.5px; margin: 0; }

/* hero video — autoplay muted loop, sits in a soft purple glow */
.hero-video-wrap {
  position: relative;
  max-width: 380px;
  margin: 0 auto;
}
.hero-video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 28px;
  /* Same as cards but a touch heavier; the video is the page's focal point. */
  box-shadow:
    0 36px 80px -24px rgba(0, 0, 0, 0.7),
    0 10px 28px -10px rgba(139, 92, 246, 0.4);
  position: relative;
  z-index: 1;
}
.hero-video-glow {
  /* Soft purple halo behind the video — picks up the gradient theme. */
  position: absolute;
  inset: -40px;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.35), transparent 70%);
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 80px 20px 100px;
    gap: 56px;
  }
  .hero-copy h1 { font-size: 64px; letter-spacing: -1.8px; }
  .lede { font-size: 19px; }
}

/* ----------------------------- bridge --------------------------------- */

.bridge {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  text-align: center;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}
.bridge strong { color: var(--text); }
@media (min-width: 880px) { .bridge { font-size: 20px; padding: 40px 24px 80px; } }

/* ----------------------------- floating cards ------------------------- */

/* The shared "this is a piece of the real app, floating on the page"
   treatment. Cards keep their app dark-bg around the actual UI element,
   so the trimmed dark padding becomes the visible card edge. */
.float-card {
  display: block;
  width: 100%;
  max-width: 520px;
  border-radius: var(--r-float);
  box-shadow: var(--float-shadow);
  /* Soft brand border — barely visible but ties everything to the palette. */
  outline: 1px solid rgba(139, 92, 246, 0.15);
  outline-offset: -1px;
}
.tilt-l { transform: rotate(-2.5deg); }
.tilt-r { transform: rotate(2.5deg); }

/* ----------------------------- how (steps) ---------------------------- */

.how {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.how h2,
.organize h2,
.pricing h2,
.faq h2,
.cta-band h2 {
  font-size: 30px;
  letter-spacing: -0.8px;
  font-weight: 800;
  margin: 0 0 32px;
  text-align: center;
}
@media (min-width: 880px) {
  .how h2, .organize h2, .pricing h2, .faq h2, .cta-band h2 {
    font-size: 40px; letter-spacing: -1.2px; margin-bottom: 56px;
  }
}

.step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}
.step:first-of-type { border-top: 0; }
.step-num {
  width: 36px; height: 36px;
  background: var(--accent-soft);
  color: var(--primary);
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  margin-bottom: 12px;
}
.step-copy h3 {
  font-size: 24px; letter-spacing: -0.4px; font-weight: 800;
  margin: 0 0 10px;
}
.step-copy p { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0; }

.step-cards {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
}
/* Step 3 stacks two cards — the gym-sets card behind, the rest timer in
   front, slightly overlapping. Different tilts to feel hand-arranged. */
.step-cards-stack {
  position: relative;
  min-height: 320px;
}
.step-cards-stack .float-card {
  max-width: 420px;
}
.step-cards-stack .float-back {
  position: relative;
  z-index: 1;
}
.step-cards-stack .float-front {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -10px;
  width: 80%;
  transform: translateX(-50%) rotate(3deg);
}

@media (min-width: 880px) {
  .step {
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 56px 0;
  }
  .step-reverse .step-cards { order: 2; }
  .step-reverse .step-copy { order: 1; }
  .step-copy h3 { font-size: 30px; }
  .step-copy p { font-size: 17px; }
  .step-cards-stack { min-height: 420px; }
  .step-cards-stack .float-front {
    bottom: 30px;
    width: 85%;
  }
}

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

.organize {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  border-top: 1px solid var(--border);
}
.org-cards {
  display: flex;
  justify-content: center;
  padding: 8px;
}
.org-copy p {
  color: var(--muted); font-size: 17px; line-height: 1.6; margin: 0;
}
@media (min-width: 880px) {
  .organize { grid-template-columns: 0.9fr 1.1fr; gap: 60px; padding: 100px 20px; }
  .org-copy h2 { text-align: left; margin-bottom: 20px; }
}

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

/* No screenshot here — the message IS the visual. Pair the big app icon
   (with a soft purple glow) against a typographic list of honesty
   bullets. Reads as a brand moment, not another phone in a section. */
.pricing {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  border-top: 1px solid var(--border);
}
.pricing-mark {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.pricing-icon {
  width: 160px;
  height: 160px;
  border-radius: 36px;
  position: relative;
  z-index: 1;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 8px 24px -8px rgba(139, 92, 246, 0.5);
}
.pricing-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.45), transparent 70%);
  filter: blur(28px);
  z-index: 0;
  pointer-events: none;
}
.pricing-copy p {
  color: var(--muted); font-size: 17px; line-height: 1.6; margin: 0;
}
.pricing-list {
  margin: 0; padding: 0; list-style: none;
}
.pricing-list li {
  color: var(--muted);
  font-size: 16px; line-height: 1.55;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.pricing-list li:first-child { border-top: 0; }

@media (min-width: 880px) {
  .pricing { grid-template-columns: 0.7fr 1.3fr; gap: 60px; padding: 100px 20px; }
  .pricing-icon { width: 200px; height: 200px; border-radius: 44px; }
  .pricing-copy h2 { text-align: left; margin-bottom: 20px; }
  .pricing-list li { font-size: 17px; padding: 16px 0; }
}

/* -------------------------------- faq --------------------------------- */

.faq {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 20px 80px;
  border-top: 1px solid var(--border);
}
details {
  border-top: 1px solid var(--border);
  padding: 18px 4px;
}
details:last-of-type { border-bottom: 1px solid var(--border); }
summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700; font-size: 17px;
  color: var(--text);
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  color: var(--primary);
  font-weight: 800; font-size: 22px; line-height: 1;
}
details[open] summary::after { content: "−"; }
details p {
  color: var(--muted); font-size: 15px; line-height: 1.6;
  margin: 12px 0 4px;
}

/* ----------------------------- cta band ------------------------------- */

.cta-band {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 60px 20px 80px;
  text-align: center;
  background:
    radial-gradient(800px 320px at 50% 100%, rgba(139, 92, 246, 0.2), transparent 60%);
}
.cta-band h2 { margin-bottom: 24px; }

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

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 36px 20px 60px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 800;
}
.footer-mark { width: 24px; height: 24px; border-radius: 6px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 14px; font-weight: 600; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-note { color: var(--muted); font-size: 12.5px; margin: 0; }

@media (min-width: 880px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .footer-note { grid-column: 1 / -1; }
}

/* ------------------------- reduced motion ----------------------------- */
/* Flat cards (no rotation) for users who asked the OS to reduce motion.
   Video autoplay can't be cancelled from CSS — to actually pause it for
   those users, a tiny JS check at page load is needed. Not added here
   yet; the video is short and silent so the impact is small. */
@media (prefers-reduced-motion: reduce) {
  .tilt-l, .tilt-r { transform: none; }
  .step-cards-stack .float-front { transform: translateX(-50%); }
}
