/* ===== Design tokens ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-elev: #ffffff;
  --text: #1d1d1f;
  --text-dim: #6e6e73;
  --border: rgba(0, 0, 0, 0.10);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --red: #ff5f57;
  --yellow: #febc2e;
  --green: #28c840;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
  --radius: 20px;
  --maxw: 1040px;
  --nav-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #0a0a0a;
    --bg-elev: #161617;
    --text: #f5f5f7;
    --text-dim: #a1a1a6;
    --border: rgba(255, 255, 255, 0.12);
    --accent: #2997ff;
    --accent-hover: #4aa8ff;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  }
}

/* ===== Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  padding: 13px 24px;
  border-radius: 980px;
  transition: background-color .25s ease, transform .12s ease, color .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost { color: var(--accent); padding-left: 8px; padding-right: 8px; }
.btn--ghost:hover { text-decoration: underline; }

.btn--small { font-size: 14px; padding: 8px 16px; background: var(--accent); color: #fff; }
.btn--small:hover { background: var(--accent-hover); }

.btn--lg { font-size: 19px; padding: 16px 36px; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 600; }
.nav__brand img { border-radius: 7px; }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links a { font-size: 14px; color: var(--text-dim); transition: color .2s ease; }
.nav__links a:hover { color: var(--text); }
.nav__links .btn--small,
.nav__links .btn--small:hover { color: #fff; }

@media (max-width: 720px) {
  .nav__links a:not(.btn) { display: none; }
}

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 80px 0 40px; text-align: center; }
.hero__glow {
  position: absolute;
  top: -180px; left: 50%;
  width: 760px; height: 760px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0,113,227,0.18), transparent 62%);
  pointer-events: none;
  z-index: 0;
}
.hero__inner { position: relative; z-index: 1; }
.hero__icon {
  width: 128px; height: 128px;
  border-radius: 28px;
  filter: drop-shadow(0 14px 34px rgba(0,0,0,0.22));
  margin-bottom: 28px;
}
.hero__title {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.hero__subtitle {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--text-dim);
}
.hero__actions {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: center; align-items: center;
  margin-top: 34px;
}
.hero__meta { margin-top: 18px; font-size: 13px; color: var(--text-dim); }

/* macOS window mock */
.window {
  max-width: 720px;
  margin: 64px auto 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
}
.window__bar {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-alt) 80%, transparent);
  position: relative;
}
.dot { width: 13px; height: 13px; border-radius: 50%; display: inline-block; }
.dot--red { background: var(--red); }
.dot--yellow { background: var(--yellow); }
.dot--green { background: var(--green); }
.window__title {
  position: absolute; left: 0; right: 0; text-align: center;
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  pointer-events: none;
}
.window__body { padding: 28px 24px; display: grid; gap: 14px; }
.annotation {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--bg-alt);
  border-radius: 12px;
}
.annotation__key {
  flex: 0 0 70px;
  font-size: 13px; font-weight: 600;
  padding: 5px 0; text-align: center;
  border-radius: 8px; color: #1d1d1f;
}
.annotation--red .annotation__key { background: var(--red); }
.annotation--yellow .annotation__key { background: var(--yellow); }
.annotation--green .annotation__key { background: var(--green); }
.annotation__text { font-size: 15px; }
.annotation__text small { color: var(--text-dim); }

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section__title {
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}
.section__lead {
  max-width: 600px;
  margin: 16px auto 0;
  text-align: center;
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--text-dim);
}

/* ===== Feature grid ===== */
.grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 14px;
  margin-bottom: 18px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.card__icon--red { background: color-mix(in srgb, var(--red) 18%, transparent); color: #e0443e; }
.card__icon--yellow { background: color-mix(in srgb, var(--yellow) 22%, transparent); color: #b07d00; }
.card__icon--green { background: color-mix(in srgb, var(--green) 18%, transparent); color: #1a9e30; }
@media (prefers-color-scheme: dark) {
  .card__icon--yellow { color: var(--yellow); }
  .card__icon--red { color: var(--red); }
  .card__icon--green { color: var(--green); }
}
.card h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.card p { margin-top: 8px; font-size: 15px; color: var(--text-dim); }

/* ===== Steps ===== */
.steps {
  margin-top: 56px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.step__num {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 18px; font-weight: 600;
  margin-bottom: 18px;
}
.step h3 { font-size: 20px; font-weight: 600; }
.step p { margin-top: 8px; font-size: 15px; color: var(--text-dim); }

/* ===== CTA ===== */
.cta { text-align: center; }
.cta__inner { display: flex; flex-direction: column; align-items: center; }
.cta__icon { border-radius: 22px; margin-bottom: 24px; filter: drop-shadow(0 10px 26px rgba(0,0,0,0.2)); }
.cta .btn { margin-top: 30px; }
.cta .hero__meta { margin-top: 16px; }

/* ===== Footer ===== */
.footer { padding: 44px 0; border-top: 1px solid var(--border); background: var(--bg); }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer__brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.footer__brand img { border-radius: 6px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer__links a { font-size: 14px; color: var(--text-dim); transition: color .2s ease; }
.footer__links a:hover { color: var(--text); }
.footer__pm7 { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--text-dim); }
.footer__sep { opacity: .55; }
.footer__pm7-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); transition: color .2s ease; }
.footer__pm7-link:hover { color: var(--text); }
.footer__pm7-link svg { display: block; }
.footer__copy { font-size: 12px; color: var(--text-dim); }

/* ===== Build badge ===== */
.w-build-version {
  position: fixed;
  right: 14px; bottom: 14px;
  z-index: 200;
  font-size: 11px;
  color: var(--text-dim);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 980px;
  opacity: .65;
  transition: opacity .2s ease;
}
.w-build-version:hover { opacity: 1; }
