/* Home page (index.html). The legal pages keep their own legal/legal.css. */
:root {
  color-scheme: light;
  --accent: #6c4cf1;
  --ink: #16131f;
  --text: #4a4658;
  --line: rgba(108, 76, 241, 0.16);
  --card: rgba(255, 255, 255, 0.66);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f3ecff 0%, #e6dffc 55%, #ddd5fb 100%) fixed;
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Top bar */
.top { display: flex; align-items: center; gap: 12px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -0.3px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 4px 14px rgba(108, 76, 241, 0.25); }
.top nav { display: flex; gap: 24px; }
.top nav a { color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; opacity: 0.75; }
.top nav a:hover { opacity: 1; }

/* Shared */
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -0.5px; }
h1 { font-size: 64px; line-height: 1.02; font-weight: 800; letter-spacing: -2px; }
h2 { font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -1px; }
h3 { font-size: 20px; line-height: 1.25; font-weight: 700; }
em { font: italic 400 1.04em/1 "New York", "Iowan Old Style", Georgia, serif; color: var(--accent); letter-spacing: -0.5px; }
.kicker { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase; color: var(--accent); }
.sub { margin: 16px 0 0; font-size: 20px; line-height: 1.5; max-width: 30em; }
section { padding: 72px 0; }
.center { text-align: center; }
.center .sub { margin-left: auto; margin-right: auto; }

.cta { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; margin-top: 32px; padding: 0 28px; border-radius: 26px; background: var(--accent); color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; box-shadow: 0 10px 28px rgba(108, 76, 241, 0.35); }
a.cta:hover { background: #5b3ce0; }
.cta.soon { background: var(--ink); box-shadow: none; }
/* Apple's own App Store badge: used as supplied, never recoloured or reshaped.
   50px tall clears Apple's 40px minimum; the margin keeps their quarter-height clear space. */
.badge { display: inline-block; margin-top: 32px; line-height: 0; }
.badge img { height: 50px; width: auto; }
.note { margin: 12px 0 0; font-size: 14px; opacity: 0.8; }

.phone { width: 100%; border: 7px solid #15121f; border-radius: 40px; overflow: hidden; background: #15121f; box-shadow: 0 30px 60px rgba(60, 40, 140, 0.28); }
.phone img { width: 100%; height: auto; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 48px; padding: 40px 0 72px; }
.hero-phones { position: relative; height: 560px; }
.hero-phones .phone { position: absolute; width: 250px; }
.hero-phones .back { left: 4%; top: 40px; transform: rotate(-7deg); }
.hero-phones .front { right: 4%; top: 0; transform: rotate(4deg); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; }
.step { text-align: center; }
.step .phone { max-width: 230px; margin: 0 auto 24px; }
.step .num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-bottom: 8px; border-radius: 16px; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; }
.step p { margin: 8px auto 0; max-width: 17em; font-size: 16px; }

/* Features */
.feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; margin-top: 64px; }
.feature .phone { max-width: 250px; margin: 0 auto; }
.feature.flip .shot { order: 2; }
.feature ul { margin: 16px 0 0; padding: 0; list-style: none; }
.feature li { position: relative; margin: 8px 0; padding-left: 28px; }
.feature li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 8px; height: 8px; border-radius: 4px; background: var(--accent); }
.feature p { margin: 12px 0 0; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.card p { margin: 8px 0 0; font-size: 16px; }

/* What is PoseLab */
#about { padding-top: 24px; }
.sub.about { max-width: 38em; }

/* Help */
.contact { margin-top: 48px; font-size: 24px; }
.faq { max-width: 760px; margin: 32px auto 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 16px 0; color: var(--ink); font-weight: 600; cursor: pointer; }
.faq details p { margin: 0 0 16px; }

/* Pose guides (the blog). Cards on the home page; the articles live in /blog/. */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.post { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--card); text-decoration: none; }
.post:hover { border-color: rgba(108, 76, 241, 0.4); }
.post-shot { aspect-ratio: 16 / 10; overflow: hidden; background: #15121f; }
.post-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.post-body { padding: 20px 22px 24px; }
.post h3 { margin: 0; }
.post p { margin: 8px 0 0; font-size: 16px; color: var(--text); }
.post .more { display: inline-block; margin-top: 14px; color: var(--accent); font-size: 15px; font-weight: 700; }
.all-guides { margin-top: 32px; }

footer { padding: 32px 0 48px; border-top: 1px solid var(--line); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; }
footer span { margin-right: auto; }
/* Social links: the icons are inline SVG so there is nothing extra to download. */
.social { display: flex; gap: 14px; }
/* The footer has no credit line any more, so the links centre and the icons sit beside them. */
.social a { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 17px; border: 1px solid var(--line); background: var(--card); color: var(--accent); }
.social a:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
.social svg { width: 17px; height: 17px; fill: currentColor; display: block; }

/* Motion: sections fade and slide in on scroll (index.html adds .in), the hero phones float,
   a thin bar at the top shows how far the page is scrolled. Without scripts everything is simply visible. */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s); }
.js .reveal.side { transform: translateX(-56px) scale(0.94); }
.js .flip .reveal.side { transform: translateX(56px) scale(0.94); }
.js .reveal.in { opacity: 1; transform: none; }
.step .num { transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) calc(var(--d, 0s) + 0.35s); }
.js .step.reveal:not(.in) .num { transform: scale(0); }

.hero-phones .phone { animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both, float 6s ease-in-out 1s infinite; }
.hero-phones .back { animation-delay: 0.15s, 1.15s; animation-duration: 1s, 7s; }
.hero-phones .front { animation-delay: 0.3s, 1.3s; }
@keyframes rise { from { opacity: 0; translate: 0 60px; } to { opacity: 1; translate: 0 0; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

.phone { transition: box-shadow 0.4s, translate 0.4s; }
.step .phone:hover, .feature .phone:hover { translate: 0 -8px; box-shadow: 0 40px 70px rgba(60, 40, 140, 0.36); }
.card { transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s), opacity 0.8s var(--d, 0s), box-shadow 0.3s; }
.card:hover { box-shadow: 0 16px 36px rgba(108, 76, 241, 0.16); }
.cta { transition: background 0.2s, transform 0.2s; }
a.cta:hover { transform: translateY(-2px); }
.badge img { transition: transform 0.2s; }
.badge:hover img { transform: translateY(-2px); }

.progress { display: none; }
@supports (animation-timeline: scroll()) {
  .progress { display: block; position: fixed; z-index: 5; left: 0; top: 0; width: 100%; height: 3px; background: var(--accent); transform-origin: 0 50%; animation: grow linear both; animation-timeline: scroll(); }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal.side, .js .flip .reveal.side { opacity: 1; transform: none; transition: none; }
  .js .step.reveal:not(.in) .num { transform: none; }
  .hero-phones .phone { animation: none; }
  .progress { display: none; }
}

@media (max-width: 820px) {
  .js .reveal.side, .js .flip .reveal.side { transform: translateY(36px) scale(0.94); }
  .js .reveal.side.in { transform: none; }
  h1 { font-size: 44px; letter-spacing: -1.2px; }
  h2 { font-size: 30px; }
  .sub { font-size: 18px; }
  section { padding: 48px 0; }
  .top nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 16px; text-align: center; }
  .hero .sub { margin-left: auto; margin-right: auto; }
  .hero-phones { height: 440px; max-width: 360px; width: 100%; margin: 0 auto; }
  .hero-phones .phone { width: 190px; border-width: 6px; border-radius: 32px; }
  .hero-phones .back { left: 0; }
  .hero-phones .front { right: 0; }
  .steps, .cards { grid-template-columns: 1fr; }
  .steps { gap: 48px; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 32px; margin-top: 48px; text-align: center; }
  .feature.flip .shot { order: 0; }
  .feature ul { display: inline-block; text-align: left; }
}

/* Pose guide cards stack on small screens, like the other rows. */
@media (max-width: 860px) {
  .posts { grid-template-columns: 1fr; }
}
