/* The website's half of the Pulse design system.
 *
 * Everything here is lifted from the app rather than invented: the accent is the
 * AccentColor asset (#4F46E5 light, #818CF8 dark), the greys are UIKit's grouped-background
 * and label colours, the type is SF Pro with SF Rounded for the wordmark, and the corner
 * radii are the 16 / 18 the app uses for cards and buttons. Someone landing here from the
 * App Store should recognise the screenshots.
 */

:root {
  /* systemGroupedBackground / secondary / tertiary */
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #f2f2f7;

  /* label / secondaryLabel / tertiaryLabel */
  --ink: #1c1c1e;
  --ink-soft: #3c3c43;
  --muted: #6c6c70;
  --faint: #8e8e93;

  --line: #d8d8dd;
  --line-strong: #c7c7cc;

  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --accent-soft: rgba(79, 70, 229, 0.12);
  --accent-soft-line: rgba(79, 70, 229, 0.28);
  --focus: #4f46e5;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.05);

  --radius-card: 16px;
  --radius-btn: 18px;

  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;

    --ink: #ffffff;
    --ink-soft: #d6d6db;
    --muted: #9d9da3;
    --faint: #8e8e93;

    --line: #38383a;
    --line-strong: #48484a;

    --accent: #818cf8;
    --accent-ink: #14142b;
    --accent-soft: rgba(129, 140, 248, 0.16);
    --accent-soft-line: rgba(129, 140, 248, 0.34);
    --focus: #818cf8;

    --shadow-card: none;
  }
}

* { box-sizing: border-box; }

/* An explicit `display` beats the `hidden` attribute, and both the CTA and the two invite
   states below rely on `hidden` to pick which of them the reader sees. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; text-decoration-color: var(--accent-soft-line); }
a:hover { text-decoration-color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.6em 1em; font-size: 0.9rem; border-radius: 0 0 12px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.1rem, 5vw, 2rem) 3rem;
}

/* ---------- Wordmark ---------- */

.mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
}

.mark-badge {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  margin-bottom: 0.6rem;
}
.mark-badge svg { width: 34px; height: 34px; fill: var(--accent); display: block; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.35rem, 11vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin: 0;
}

.tagline {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

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

.hero { text-align: center; position: relative; }

.hero-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 2.6rem 0 0.6rem;
  text-wrap: balance;
}

.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 auto;
  max-width: 34em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.7rem;
  justify-content: center;
  align-items: center;
}

/* Capsule primary, matching EmptyActivitiesView's "Add Activity". */
.btn {
  display: inline-block;
  padding: 0.82em 1.5em;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.2;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink-soft); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-quiet {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
  border-color: var(--line);
}

/* ---------- Cards ---------- */

.section-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 2.8rem 0 0.7rem;
  padding-left: 0.2rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.3rem;
}
.card + .card { margin-top: 0.85rem; }
/* Breathing room where a card follows the hero directly, as on the invite page. */
main > .card:first-child { margin-top: 1.9rem; }

.card h2 {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.45rem;
}
.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.card p { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.95rem; }
.card p:last-child { margin-bottom: 0; }

/* Numbered rows, the shape of a grouped list. */
.step-row {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.05rem 1.3rem;
}
.step-row + .step-row { border-top: 1px solid var(--line); }
.step-badge {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.1rem;
}
.step-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card.grouped { padding: 0; }

.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.note-list li {
  padding: 0.95rem 1.3rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.note-list li + li { border-top: 1px solid var(--line); }
.note-list strong { color: var(--ink); font-weight: 600; display: block; }

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

.site-foot {
  margin-top: 3rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--faint);
}
.site-foot nav { display: flex; gap: 1.2rem; }
.site-foot a { color: var(--muted); }


/* ============================================================
   Screenshots
   ------------------------------------------------------------
   Real captures from the simulator, framed. The frame's aspect
   matches the iPhone 17 Pro's 402x874 points, so the image sits
   in it without cropping — the status bar and Dynamic Island in
   the shot are the device's own.
   ============================================================ */

.device {
  --device-w: 402px;
  --device-h: 874px;
  --scale: 0.58;
  position: relative;
  width: calc(var(--device-w) * var(--scale));
  height: calc(var(--device-h) * var(--scale));
  margin: 0 auto;
  flex: none;
}

.device-frame {
  position: absolute;
  top: 0; left: 0;
  width: var(--device-w);
  height: var(--device-h);
  transform: scale(var(--scale));
  transform-origin: top left;
  border-radius: 58px;
  padding: 11px;
  background: #0b0b0d;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.07) inset,
    0 30px 60px -20px rgba(28, 27, 60, 0.42),
    0 8px 20px -8px rgba(0, 0, 0, 0.28);
}

.device-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 47px;
}

/* Text on one side, a phone on the other; stacked until there is room. */
.showcase {
  display: grid;
  gap: 1.6rem;
  align-items: center;
  margin-top: 2.6rem;
}
.showcase h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}
.showcase p { color: var(--muted); margin: 0 0 0.8rem; }
.showcase p:last-child { margin-bottom: 0; }

.pair { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }
.pair .device { --scale: 0.46; }

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

.hero-split { display: grid; gap: 2.4rem; }

.glow {
  position: absolute;
  inset: -14% -30% auto;
  height: 480px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  filter: blur(10px);
  z-index: -1;
  pointer-events: none;
}

/* ---------- App Store badge ---------- */

.store-badge { display: inline-block; line-height: 0; }
.store-badge img { width: 148px; height: auto; }
.store-badge:hover { opacity: 0.85; }

@media (min-width: 900px) {
  .page.wide { max-width: 1000px; }
  .hero-split {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3.5rem;
    text-align: left;
  }
  .hero-split .mark { align-items: flex-start; text-align: left; }
  .hero-split .cta-row { justify-content: flex-start; }
  .hero-split .hero-sub { margin-left: 0; }
  .hero-split .device { --scale: 0.66; margin: 0; }

  .showcase {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3rem;
  }
  .showcase.flip { grid-template-columns: minmax(0, 1fr) auto; }
  .showcase.flip > :first-child { order: 2; }
  .pair .device { --scale: 0.5; }
}
