/* Meg Software / mPaceline website — one stylesheet for every page. Light and dark follow the visitor's system. */

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #19181a;
  --muted: #5d5b60;
  --border: #e6e2da;
  --accent: #c8322b;
  --accent-strong: #a3231d;
  --accent-soft: #fbeae8;
  --highlight: #b88a1b;
  --shadow: 0 1px 2px rgba(25, 24, 26, 0.06), 0 8px 24px rgba(25, 24, 26, 0.06);
  --radius: 16px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0e;
    --surface: #18181b;
    --text: #f3f1ec;
    --muted: #aeaaa2;
    --border: #2c2b2f;
    --accent: #ff6a5f;
    --accent-strong: #ff9389;
    --accent-soft: #2b1716;
    --highlight: #f1d98a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 20px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* Buttons */
.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
@media (prefers-color-scheme: dark) { .button { color: #0d0d0e; } }
.button:hover { background: var(--accent-strong); text-decoration: none; }
.button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}
.button.secondary:hover { background: var(--accent-soft); }

.app-store-badge img { height: 54px; width: auto; display: block; }

/* Hero */
.hero { padding: 64px 0 48px; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 12px;
}
.hero .eyebrow img { width: 40px; height: 40px; border-radius: 10px; }
.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.hero h1 .accent { color: var(--accent); }
.hero p.lead { font-size: 20px; margin: 0 0 16px; }
.hero p { color: var(--muted); margin: 0 0 16px; }
.hero .actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.hero .note { margin-top: 12px; font-size: 14px; color: var(--muted); }
.hero .photo {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.hero .photo img { display: block; width: 100%; }

/* Sections */
section { padding: 56px 0; }
section h2 {
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 12px;
  text-align: center;
}
section p.section-lead {
  max-width: 680px;
  margin: 0 auto 36px;
  text-align: center;
  color: var(--muted);
}

.band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pull-quote {
  text-align: center;
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.pull-quote span { display: block; color: var(--highlight); }

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0 0 12px; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.card .emoji { font-size: 28px; line-height: 1; display: block; margin-bottom: 12px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feature-list li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.feature-list li::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

/* Screens gallery */
.screens {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.screens img { display: block; width: 100%; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.18)); }

/* Apple Watch screens */
.watch-screens {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.watch-screens img { display: block; width: 100%; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.18)); }
.subhead { text-align: center; font-size: 22px; margin: 48px 0 8px; }

/* Testimonials */
.quotes { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.quote h3 { margin: 0 0 2px; font-size: 18px; }
.quote .who { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.quote .stars { color: var(--highlight); letter-spacing: 2px; font-size: 15px; margin-left: 6px; }

/* Help */
.doc img { border-radius: 12px; }
.doc img.float-right { float: right; width: 220px; margin: 0 0 16px 24px; }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; clear: both; }
.doc .back { display: inline-block; margin-bottom: 18px; font-size: 15px; }
.doc .help-group { margin-bottom: 8px; }
.doc .help-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.doc .help-list li { margin: 0; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.doc .help-list li.soon { color: var(--muted); }
.doc .help-list li.soon::after { content: " — coming soon"; font-size: 14px; }
.doc .callout { background: var(--accent-soft); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; clear: both; }
@media (max-width: 640px) { .doc img.float-right { float: none; display: block; margin: 0 auto 16px; width: 60%; } }

/* Who it's for */
.fit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fit-list strong { display: block; color: var(--text); }
.fit-list li { color: var(--muted); }

/* Download */
.download { text-align: center; }
.download .app-store-badge { display: inline-block; margin: 8px auto 12px; }
.download p { color: var(--muted); margin: 0; }

/* Home page */
.hero .note { margin: 0; }
.hero-image img { display: block; margin: 0 auto; max-height: 620px; width: auto; }
.works-with { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.works-with li { font-size: 14px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; background: var(--surface); }

.persona .tag { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.persona h3 { font-size: 21px; margin-bottom: 16px; }
.persona .feature-list li { color: var(--muted); }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature.reverse .feature-text { order: 2; }
.feature h2 { text-align: left; }
.feature-text > p { color: var(--muted); margin: 0 0 20px; }
.feature-text .feature-list li { color: var(--muted); }
.feature-text .feature-list strong { color: var(--text); }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent) !important; margin: 0 0 8px !important; }
.feature:has(.phones.three) { grid-template-columns: 0.9fr 1.1fr; gap: 40px; }
.feature.reverse:has(.phones.three) { grid-template-columns: 1.1fr 0.9fr; }
.feature.stacked { grid-template-columns: 1fr; gap: 32px; }
.feature.stacked .feature-text { max-width: 720px; margin: 0 auto; text-align: center; }
.feature.stacked h2 { text-align: center; }
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.phones.three { grid-template-columns: repeat(3, 1fr); gap: 12px; }
.phones.four { grid-template-columns: repeat(4, 1fr); gap: 24px; max-width: 960px; margin: 0 auto; }
.phones img { display: block; width: 100%; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.18)); }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 32px 0 0; display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.steps li { counter-increment: step; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 12px; }
@media (prefers-color-scheme: dark) { .steps li::before { color: #0d0d0e; } }
.steps h3 { margin: 0 0 6px; font-size: 19px; }
.steps p { margin: 0; color: var(--muted); }
.setup-note { text-align: center; color: var(--muted); margin: 28px 0 0; }

section .stars { color: var(--highlight); letter-spacing: 2px; }
#testimonials .quotes { grid-template-columns: repeat(2, 1fr); max-width: 860px; margin: 0 auto; }
figure.quote { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
figure.quote blockquote { margin: 0; color: var(--text); }
figure.quote figcaption { font-size: 14px; font-weight: 600; color: var(--muted); }
figure.quote figcaption::before { content: "— "; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq details:first-of-type { border-top: 1px solid var(--border); margin-top: 28px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 32px 14px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 22px; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

.download h2 { margin-bottom: 4px; }
.download p { margin-bottom: 12px; }

@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.reverse .feature-text { order: 0; }
  .feature:has(.phones.three), .feature.reverse:has(.phones.three) { grid-template-columns: 1fr; }
  .phones { max-width: 560px; margin: 0 auto; }
  .phones.four { grid-template-columns: repeat(2, 1fr); max-width: 480px; }
  .steps { grid-template-columns: 1fr; }
  #testimonials .quotes { grid-template-columns: 1fr; }
  .hero-image img { max-height: 460px; }
}

/* Legal and contact pages */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 20px 72px; }
.doc h1 { font-size: clamp(32px, 5vw, 42px); line-height: 1.15; margin: 0 0 6px; letter-spacing: -0.01em; }
.doc .updated { color: var(--muted); margin: 0 0 32px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; text-align: left; }
.doc h3 { font-size: 18px; margin: 24px 0 8px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .summary {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 28px;
}
.doc .summary p { margin: 0 0 8px; }
.doc .summary p:last-child { margin: 0; }
.doc .email { font-size: 22px; font-weight: 700; }

/* Contact page */
button.button { font: inherit; font-weight: 600; cursor: pointer; border: 0; }
button.button.secondary { border: 1px solid var(--border); }
.doc .contact-card { background: var(--accent-soft); border-radius: var(--radius); padding: 24px; margin: 28px 0 8px; }
.doc .contact-card h2 { margin: 0 0 6px; }
.doc .contact-card .email { margin: 0 0 16px; word-break: break-all; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.contact-actions[hidden] { display: none; }
.doc .contact-hint { margin: 0; font-size: 15px; color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (max-width: 1000px) {
  .screens { grid-template-columns: repeat(3, 1fr); }
  .watch-screens { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .photo { max-width: 360px; margin: 0 auto; }
  .two-col { grid-template-columns: 1fr; }
  .screens { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .phones.three, .phones.four { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; max-width: none; margin: 0 -20px; padding: 0 20px 16px; }
  .phones.three img, .phones.four img { flex: 0 0 auto; width: 62%; scroll-snap-align: center; }
  .nav { gap: 14px; font-size: 14px; }
  .nav .hide-small { display: none; }
  .hero { padding: 40px 0 32px; }
  section { padding: 40px 0; }
}
