/* =========================================================
   miniMDM marketing site — extends the app's design language
   Tokens below MIRROR app/styles.css so the site feels native.
   ========================================================= */

:root {
  --sidebar-width: 240px;
  --header-height: 56px;

  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;

  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;

  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #3b82f6;

  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;

  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .25), 0 2px 6px rgba(15, 23, 42, .08);

  /* marketing-only */
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --max: 1160px;
}

[data-theme="dark"] {
  --bg: #0b1322;
  --bg-alt: #111c30;
  --surface: #111c30;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #1f2a40;
  --primary-light: #17233f;
  --shadow: 0 1px 3px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .4);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .2s, color .2s;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

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

/* ========================================================= */
/*  Header — echoes the app header (dark slab, white brand)   */
/* ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--sidebar-bg);
  color: #fff;
  box-shadow: var(--shadow);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: var(--header-height);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  display: inline-grid;
  place-items: center;
  color: #0b1322;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand__mark::before { content: "m"; }
.brand b { font-weight: 700; }
.brand i { font-style: normal; font-weight: 500; color: #cbd5e1; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}
.site-nav a {
  color: var(--sidebar-text);
  font-size: .875rem;
}
.site-nav a:hover { color: #fff; text-decoration: none; }

.theme-toggle {
  background: transparent;
  color: var(--sidebar-text);
  border: 1px solid #334155;
  border-radius: var(--radius);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.theme-toggle:hover { color: #fff; border-color: #64748b; }
.theme-toggle svg { width: 15px; height: 15px; flex-shrink: 0; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .75rem;
  border-radius: var(--radius);
  background: #fff;
  color: #1e293b;
  font-size: .825rem;
  font-weight: 600;
  border: 1px solid #fff;
}
.header-cta:hover { text-decoration: none; background: #e2e8f0; border-color: #e2e8f0; }
.header-cta svg { width: 14px; height: 14px; }

/* ========================================================= */
/*  Hero                                                      */
/* ========================================================= */
.hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(37, 99, 235, .10), transparent 60%),
    radial-gradient(40% 40% at 10% 10%, rgba(59, 130, 246, .06), transparent 60%);
  pointer-events: none;
}
[data-theme="dark"] .hero::before {
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(59, 130, 246, .18), transparent 60%),
    radial-gradient(40% 40% at 10% 10%, rgba(59, 130, 246, .08), transparent 60%);
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid color-mix(in oklab, var(--primary) 20%, transparent);
  border-radius: 999px;
  padding: .3rem .7rem;
  margin-bottom: 1.1rem;
}
.hero__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 25%, transparent);
}
.hero__title {
  font-size: clamp(2rem, 3.6vw, 3.15rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.022em;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: var(--primary);
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__lede {
  font-size: 1.075rem;
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}

.cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.75rem; }

/* Site buttons — mirror .btn in the app */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-alt); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* trust chips */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .65rem;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.chip svg { width: 13px; height: 13px; color: var(--success); }

/* ========================================================= */
/*  Browser-chrome screenshot frame                           */
/* ========================================================= */
.frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.frame__chrome {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .75rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.frame__dots { display: inline-flex; gap: 6px; }
.frame__dots span {
  width: 11px; height: 11px; border-radius: 50%;
  background: #cbd5e1;
}
.frame__dots span:nth-child(1) { background: #ef4444aa; }
.frame__dots span:nth-child(2) { background: #f59e0baa; }
.frame__dots span:nth-child(3) { background: #10b981aa; }
.frame__url {
  flex: 1;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .2rem .55rem;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.frame__modeswitch {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.frame__modeswitch button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: .2rem .55rem;
  line-height: 1;
}
.frame__modeswitch button.is-active {
  background: var(--primary);
  color: #fff;
}
.frame__body { position: relative; background: #fff; }
.frame__body img {
  display: block;
  width: 100%;
  height: auto;
}

/* annotation tags below the hero screenshot */
.hero__frame-wrap { display: flex; flex-direction: column; gap: 12px; }
.hero__badges { display: flex; gap: 10px; flex-wrap: wrap; }
.hero__badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: .55rem .75rem;
  font-size: .78rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--text);
}
.hero__badge .kbd {
  font-family: var(--mono);
  font-size: .7rem;
  padding: .1rem .4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--text-muted);
}
.hero__badge .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--success) 25%, transparent);
}

/* ========================================================= */
/*  Section scaffolding                                       */
/* ========================================================= */
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--muted { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .6rem;
}
.section-title {
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.018em;
  line-height: 1.15;
  margin-bottom: .6rem;
  text-wrap: balance;
}
.section-lede {
  color: var(--text-muted);
  font-size: 1.025rem;
  text-wrap: pretty;
}

/* ========================================================= */
/*  Feature grid                                              */
/* ========================================================= */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.feature {
  grid-column: span 4;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.feature:hover {
  border-color: color-mix(in oklab, var(--primary) 40%, var(--border));
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.feature__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.feature__icon svg { width: 18px; height: 18px; }
.feature__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -.005em;
}
.feature__body {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.55;
}
/* Feature layout: 2 wide emphasised + 1 full-width highlight + regular grid */
.feature--wide { grid-column: span 6; }
.feature--full { grid-column: span 12; }

@media (max-width: 900px) {
  .feature, .feature--wide { grid-column: span 6; }
  .feature--full { grid-column: span 12; }
}
@media (max-width: 640px) {
  .feature, .feature--wide, .feature--full { grid-column: span 12; }
}

/* ========================================================= */
/*  Screenshot tour                                           */
/* ========================================================= */
.tour {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}
.tour__tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: calc(var(--header-height) + 20px);
}
.tour__tab {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem .85rem;
  background: transparent;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  text-align: left;
  color: var(--text);
  transition: background .15s, border-color .15s;
}
.tour__tab:hover { background: var(--bg-alt); }
.tour__tab.is-active {
  background: var(--surface);
  border-color: var(--border);
  border-left-color: var(--primary);
}
.tour__tab-num {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--text-muted);
  flex-shrink: 0;
  padding-top: 2px;
}
.tour__tab-title { font-weight: 600; font-size: .9rem; line-height: 1.3; }
.tour__tab-body { font-size: .78rem; color: var(--text-muted); margin-top: 2px; line-height: 1.45; }
.tour__tab.is-active .tour__tab-title { color: var(--primary); }

.tour__stage { min-width: 0; }
.tour__panel { display: none; }
.tour__panel.is-active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.tour__caption {
  margin-top: 14px;
  font-size: .85rem;
  color: var(--text-muted);
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
}
.tour__caption .badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
}

@media (max-width: 860px) {
  .tour { grid-template-columns: 1fr; }
  .tour__tabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .tour__tab { min-width: 220px; }
}

/* ========================================================= */
/*  Comparison table                                          */
/* ========================================================= */
.compare {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.compare__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare table { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare th, .compare td {
  padding: 14px 18px;
  text-align: left;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare thead th {
  background: var(--bg-alt);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.compare thead th.is-highlight {
  background: color-mix(in oklab, var(--primary) 10%, var(--surface));
  color: var(--primary);
}
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td:first-child { color: var(--text); font-weight: 500; }
.compare .col-mark { text-align: center; width: 18%; }
.compare .mark-yes { color: var(--success); font-weight: 700; }
.compare .mark-no { color: #94a3b8; }
.compare .mark-partial { color: var(--warning); font-weight: 600; }
.compare tr.is-highlight td { background: color-mix(in oklab, var(--primary) 5%, transparent); }

/* ========================================================= */
/*  Open source card                                          */
/* ========================================================= */
.oss {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  box-shadow: var(--shadow);
}
.oss__left { padding: 44px 40px; overflow-wrap: break-word; }
.oss__right {
  background: var(--sidebar-bg);
  color: #e2e8f0;
  padding: 36px 40px;
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.7;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}
.oss__right .c-prompt { color: #64748b; margin-right: .5rem; user-select: none; }
.oss__right .c-comment { color: #64748b; }
.oss__right .c-cmd { color: #93c5fd; }
.oss__right .c-path { color: #fcd34d; }
.oss__right .c-ok { color: #86efac; }

.stat-row {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.stat { }
.stat b { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.stat span { font-size: .78rem; color: var(--text-muted); letter-spacing: .02em; }

@media (max-width: 800px) {
  .oss { grid-template-columns: 1fr; }
}

/* ========================================================= */
/*  Footer                                                    */
/* ========================================================= */
.footer {
  background: var(--sidebar-bg);
  color: #cbd5e1;
  padding: 56px 0 32px;
}
.footer a { color: #cbd5e1; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer .brand b { color: #fff; }
.footer .brand i { color: #64748b; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
}
.footer__about p { color: #94a3b8; font-size: .88rem; max-width: 32ch; margin-top: 10px; }
.footer__col h4 {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 14px;
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.footer__bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #334155;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  font-size: .78rem;
  color: #94a3b8;
}
.footer__bottom .sep { color: #475569; }
@media (max-width: 780px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ========================================================= */
/*  Responsive tweaks                                         */
/* ========================================================= */
@media (max-width: 920px) {
  .section { padding: 56px 0; }
  .site-nav a { display: none; }
  .site-nav .theme-toggle, .site-nav .header-cta { display: inline-flex; }
}

/* ========================================================= */
/*  Tweaks panel                                              */
/* ========================================================= */
.tweaks {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px 16px;
  z-index: 90;
  display: none;
  font-size: .85rem;
}
.tweaks.is-open { display: block; }
.tweaks__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tweaks__title { font-weight: 700; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.tweaks__close {
  background: transparent; border: 0; color: var(--text-muted); font-size: 1rem;
  width: 22px; height: 22px; display: grid; place-items: center; border-radius: 4px;
}
.tweaks__close:hover { background: var(--bg-alt); color: var(--text); }
.tweaks__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tweaks__row:last-child { margin-bottom: 0; }
.tweaks__row label { font-size: .8rem; color: var(--text-muted); font-weight: 500; }
.tweaks__swatches { display: inline-flex; gap: 6px; }
.tweaks__swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid transparent; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}
.tweaks__swatch.is-active { border-color: var(--text); }
.tweaks__input {
  width: 100%;
  padding: .4rem .55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .85rem;
  background: var(--bg);
  color: var(--text);
}
