/* Tempi site. Colors follow the app's tokens (figma_prompt.md 3.1): neutrals only, the label color is the accent.
   Activity colors are the only saturated colors, and only inside the phone mockups and small activity dots. */
:root {
  --bg: #FFFFFF;
  --bg-2: #F2F2F7;
  --bg-3: #E5E5EA;
  --label: #000000;
  --label-2: #6C6C70;
  --label-3: #C7C7CC;
  --separator: #E5E5EA;
  --band: #111111;
  --frame: #111111;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --phone-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.35);
  --run: #FF9500;
  --swim: #007AFF;
  --bike: #34C759;
  --lift: #AF52DE;
  --red: #FF3B30;
  --tint: 14%;
  --max: 640px;
  --wide: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --bg-2: #1C1C1E;
    --bg-3: #2C2C2E;
    --label: #FFFFFF;
    --label-2: #8E8E93;
    --label-3: #48484A;
    --separator: #38383A;
    --band: #000000;
    --frame: #3A3A3C;
    --shadow: none;
    --phone-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
    --run: #FF9F0A;
    --swim: #0A84FF;
    --bike: #30D158;
    --lift: #BF5AF2;
    --red: #FF453A;
    --tint: 24%;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  overflow-x: clip;
}

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 16px 48px;
}

.page.wide { max-width: var(--wide); }

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

header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--separator) 70%, transparent);
}

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

.top-inner.wide { max-width: var(--wide); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--label);
  text-decoration: none;
}

.brand img { border-radius: 22%; box-shadow: 0 0 0 1px var(--separator); }

nav { display: flex; align-items: center; gap: 22px; }

nav a { color: var(--label-2); text-decoration: none; font-size: 15px; }

nav a:hover, nav a[aria-current="page"] { color: var(--label); }

nav a.pill { color: var(--bg); }

/* ---------- Type and basics ---------- */

h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 40px 0 8px;
}

h3 { font-size: 17px; margin: 24px 0 4px; }

h1, h2, h3 { text-wrap: balance; }

p, ul, ol { margin: 0 0 14px; }

ul, ol { padding-left: 22px; }

li { margin-bottom: 6px; }

.lede { color: var(--label-2); font-size: 19px; }

.meta { color: var(--label-2); font-size: 15px; }

a { color: var(--label); }

.card {
  background: var(--bg-2);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 24px 0;
}

.card p:last-child, .card ul:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: 15px;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--separator);
}

th { font-weight: 600; }

.pill {
  display: inline-block;
  background: var(--label);
  color: var(--bg);
  border-radius: 999px;
  padding: 14px 26px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.pill:hover { opacity: 0.85; }

.pill:active { transform: scale(0.97); }

.pill.small { padding: 8px 16px; font-size: 14px; }

details {
  border-bottom: 1px solid var(--separator);
  padding: 18px 0;
}

summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

summary::after { content: "+"; color: var(--label-2); font-weight: 400; font-size: 22px; line-height: 1; }

details[open] summary::after { content: "–"; }

details p { margin: 10px 0 0; color: var(--label-2); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.site-footer {
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--separator);
  color: var(--label-2);
  font-size: 14px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
}

.foot-brand p { margin: 10px 0 0; max-width: 22em; }

.foot-brand .brand { font-size: 17px; }

.foot-col { display: flex; flex-direction: column; gap: 8px; }

.foot-col b { color: var(--label); font-weight: 600; }

.foot-col a { color: var(--label-2); text-decoration: none; }

.foot-col a:hover { color: var(--label); }

.foot-copy { grid-column: 1 / -1; margin: 8px 0 0; }

/* ---------- Homepage sections ---------- */

.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label-2);
  margin-bottom: 12px;
}

.section { margin-top: 128px; }

.section.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }

.section-head h2, .spotlight h2, .card.big h2, .final h2 {
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

.section-head .lede { margin: 0 auto; max-width: 34em; }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 160px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
}

.badge em { width: 7px; height: 7px; border-radius: 50%; background: var(--label); }

.hero h1 {
  font-size: 60px;
  max-width: 9.5em;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.hero h1 span { display: block; color: var(--label-2); }

.hero .lede { max-width: 30em; margin-bottom: 32px; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

.cta .meta { margin: 0; }

/* Waitlist form (build.mjs cta()) */

.join { max-width: 460px; }

.join-row {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--separator);
}

.join-row:focus-within { border-color: var(--label); }

.join.done .join-row { display: none; }

.join input[type="email"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--label);
  font: inherit;
  font-size: 17px;
  padding: 0 14px;
  outline: none;
}

.join input[type="email"]::placeholder { color: var(--label-2); }

.join .pill { border: 0; font: inherit; font-weight: 600; cursor: pointer; padding: 12px 22px; white-space: nowrap; }

.join .pill:disabled { opacity: 0.5; cursor: default; }

.join .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.join-note { margin: 12px 0 0 18px; font-size: 14px; }

.join-note a { color: inherit; }

.join.error .join-note { color: var(--red); }

.join.done .join-note { margin-left: 0; font-size: 17px; color: var(--label); font-weight: 600; }

.join.done .join-note::before { content: "✓  "; }

.final .join, .post-cta .join { margin: 0 auto; }

.final .join-row { background: color-mix(in srgb, var(--bg) 12%, var(--label)); border-color: transparent; }

.final .join input[type="email"] { color: var(--bg); }

.final .join input[type="email"]::placeholder { color: color-mix(in srgb, var(--bg) 55%, var(--label)); }

.final .join-note { color: color-mix(in srgb, var(--bg) 65%, var(--label)); margin-left: 0; }

.final .join.done .join-note { color: var(--bg); }

.chips {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--label-2);
  font-size: 14px;
}

.chips li { margin: 0; display: inline-flex; align-items: center; gap: 8px; }

.chips li:not(:first-child)::before { content: "✓"; color: var(--label); font-weight: 600; }

.dots { display: inline-flex; gap: 3px; }

.dots em { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.run { --c: var(--run); }
.swim { --c: var(--swim); }
.bike { --c: var(--bike); }
.lift { --c: var(--lift); }

.hero-phones { position: relative; aspect-ratio: 1 / 1.2; width: 100%; max-width: 520px; justify-self: center; }

.hero-phones .back,
.hero-phones .front { position: absolute; }

.hero-phones .back { width: 52%; left: 2%; top: 9%; transform: rotate(-7deg); }

.hero-phones .front { width: 57%; right: 3%; top: 0; transform: rotate(4deg); }

/* Stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--separator);
  border-bottom: 1px solid var(--separator);
  margin-top: 72px;
}

.stats div { padding: 28px 16px; text-align: center; }

.stats div + div { border-left: 1px solid var(--separator); }

.stats b { display: block; font-size: 30px; letter-spacing: -0.02em; line-height: 1.2; }

.stats span { color: var(--label-2); font-size: 14px; }

/* Spotlight */

.spotlight {
  margin-top: 128px;
  background: var(--bg-2);
  border-radius: 32px;
  padding: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: center;
}

.spotlight-phone { width: 100%; max-width: 290px; justify-self: center; }

.checks { list-style: none; padding: 0; margin: 24px 0 0; }

.checks li { position: relative; padding-left: 34px; margin-bottom: 14px; color: var(--label-2); }

.checks li b { color: var(--label); font-weight: 600; }

.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--label);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.checks.small li { font-size: 15px; color: var(--label); padding-left: 30px; margin-bottom: 10px; }

.checks.small li::before { width: 19px; height: 19px; font-size: 11px; top: 2px; }

/* Steps */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.steps li { margin: 0; }

.steps .n { display: block; font-size: 48px; font-weight: 700; letter-spacing: -0.03em; color: var(--label-3); line-height: 1; }

.steps h3 { font-size: 20px; margin: 18px 0 6px; letter-spacing: -0.01em; }

.steps p { color: var(--label-2); margin: 0; }

/* Feature grid */

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.tile {
  border: 1px solid var(--separator);
  border-radius: 24px;
  padding: 28px;
}

.tile .icon {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 12px;
  background: var(--bg-2);
  fill: none;
  stroke: var(--label);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tile h3 { font-size: 19px; letter-spacing: -0.01em; margin: 20px 0 6px; }

.tile p { color: var(--label-2); margin: 0; font-size: 16px; }

.pro {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--label);
  border-radius: 6px;
  padding: 0 5px;
  vertical-align: 3px;
  margin-left: 4px;
}

/* Dark band with the screen gallery */

.band {
  margin: 128px calc(50% - 50vw) 0;
  background: var(--band);
  color: #FFFFFF;
}

.band-inner { max-width: var(--wide); margin: 0 auto; padding: 104px 16px; }

.band .eyebrow, .band .lede { color: rgba(255, 255, 255, 0.6); }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }

.gallery figure { margin: 0; }

.gallery figcaption { margin-top: 20px; font-size: 15px; color: rgba(255, 255, 255, 0.6); text-align: center; }

.gallery figcaption b { display: block; color: #FFFFFF; font-size: 17px; }

/* PDF block */

.card.big { padding: 48px; border-radius: 32px; margin: 0; }

.card.big > p { color: var(--label-2); font-size: 18px; }

/* Pricing */

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 860px; margin: 0 auto; }

.plan { border: 1px solid var(--separator); border-radius: 28px; padding: 32px; }

.plan h3 { margin: 0; font-size: 17px; color: var(--label-2); }

.plan .price { margin: 6px 0 22px; color: var(--label-2); }

.plan .price b { font-size: 40px; letter-spacing: -0.03em; color: var(--label); margin-right: 4px; }

.plan .price span { display: block; font-size: 15px; }

.plan .meta { margin: 18px 0 0; }

.pro-plan { background: var(--label); color: var(--bg); border-color: var(--label); }

.pro-plan h3, .pro-plan .price, .pro-plan .meta { color: color-mix(in srgb, var(--bg) 65%, var(--label)); }

.pro-plan .price b, .pro-plan .checks li { color: var(--bg); }

.pro-plan .checks li::before { background: var(--bg); color: var(--label); }

/* Final call to action */

.final {
  margin-top: 128px;
  background: var(--label);
  color: var(--bg);
  border-radius: 36px;
  padding: 88px 32px;
  text-align: center;
}

.final p { color: color-mix(in srgb, var(--bg) 65%, var(--label)); font-size: 19px; margin-bottom: 32px; }

.final .cta { justify-content: center; flex-direction: column; }

.final .pill { background: var(--bg); color: var(--label); }

.final .cta .meta { color: color-mix(in srgb, var(--bg) 65%, var(--label)); }

/* ---------- Phones: real app screenshots (templates/screens/*.html, images in public/img/screens/) ---------- */

.phone {
  width: 100%;
  /* Screen is 322 × 700 inside a 3.2% bezel: height = width × (0.936 × 700 / 322 + 0.064). */
  aspect-ratio: 1 / 2.099;
  border-radius: 15% / 7%;
  padding: 3.2%;
  background: var(--frame);
  box-shadow: var(--phone-shadow);
}

.phone picture, .phone img { display: block; width: 100%; height: 100%; }

.phone img { border-radius: 12.5% / 5.75%; background: var(--bg); }

/* ---------- Blog ---------- */

.posts { list-style: none; padding: 0; margin: 0; }

.posts li { margin: 0; border-bottom: 1px solid var(--separator); }

.posts li:first-child { border-top: 1px solid var(--separator); }

.posts a {
  display: block;
  padding: 18px 0;
  text-decoration: none;
}

.posts .t { display: block; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }

.posts .d { display: block; color: var(--label-2); font-size: 15px; margin-top: 2px; }

.posts a:hover .t { text-decoration: underline; }

.draft-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--label-2);
  color: var(--label-2);
  border-radius: 6px;
  padding: 1px 6px;
  margin-right: 6px;
  vertical-align: 2px;
}

.draft-banner {
  background: var(--bg-2);
  border: 1px dashed var(--label-2);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 32px;
  font-size: 15px;
  color: var(--label-2);
}

article h1 { font-size: 36px; margin-bottom: 8px; }

article .meta { margin-bottom: 32px; }

article h2 { font-size: 24px; margin-top: 44px; }

article blockquote {
  margin: 20px 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--label);
  color: var(--label-2);
}

article code {
  font: 0.9em ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--bg-2);
  border-radius: 5px;
  padding: 1px 5px;
}

article pre {
  background: var(--bg-2);
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
}

article pre code { background: none; padding: 0; }

article img { max-width: 100%; height: auto; border-radius: 16px; }

article hr { border: 0; border-top: 1px solid var(--separator); margin: 36px 0; }

.post-cta { margin-top: 48px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 56px; }
  .hero-phones { max-width: 460px; }
  .spotlight { grid-template-columns: 1fr; padding: 48px 32px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n + 3) { border-top: 1px solid var(--separator); }
  .gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -16px;
    padding: 0 16px 8px;
    scrollbar-width: none;
  }
  .gallery figure { flex: 0 0 min(62%, 260px); scroll-snap-align: center; }
}

@media (max-width: 720px) {
  .home nav a:not(.pill) { display: none; }
  .hero h1 { font-size: 46px; }
  .section, .spotlight, .final, .band { margin-top: 96px; }
  .section-head h2, .spotlight h2, .card.big h2, .final h2 { font-size: 34px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .band-inner { padding: 80px 16px; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  h1 { font-size: 28px; }
  .hero h1 { font-size: 40px; }
  .hero .lede { font-size: 18px; }
  .join .pill { padding: 12px 16px; }
  .join input[type="email"] { padding: 0 10px; font-size: 16px; }
  .section-head { text-align: left; }
  .spotlight { padding: 36px 20px; border-radius: 28px; }
  .spotlight-phone { max-width: 240px; }
  .card.big { padding: 32px 22px; }
  .final { padding: 64px 22px; border-radius: 28px; }
  .stats div { padding: 22px 8px; }
  .stats b { font-size: 24px; }
  article h1 { font-size: 30px; }
  nav { gap: 14px; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  td { border: 0; padding: 2px 0; }
  td:first-child { font-weight: 600; padding-top: 12px; }
  tr { border-bottom: 1px solid var(--separator); padding-bottom: 10px; }
}
