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

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #151a22;
  --muted: #5a6372;
  --border: #e1e6ee;
  --accent: #1a7fd0;
  --accent-strong: #0f63a8;
  --accent-soft: #e6f1fb;
  --highlight: #f26b2a;
  --shadow: 0 1px 2px rgba(21, 26, 34, 0.06), 0 8px 24px rgba(21, 26, 34, 0.06);
  --radius: 16px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #181c23;
    --text: #eef1f6;
    --muted: #a4abb8;
    --border: #2a303b;
    --accent: #5cb8ff;
    --accent-strong: #8ccdff;
    --accent-soft: #182637;
    --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: #0e1116; } }
.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)); }

/* 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; }

/* 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; }

/* 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); }
}

@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) {
  .nav { gap: 14px; font-size: 14px; }
  .nav .hide-small { display: none; }
  .hero { padding: 40px 0 32px; }
  section { padding: 40px 0; }
}
