/* ==========================================================================
   MSChanges — marketing landing page
   msnugget brand: pure black bg, green #39A751 accent, ultra-bold white
   headings, grey body text, Manrope, rounded green pill CTAs, dark cards.
   Self-contained. No external resources. Tokens mirror MSFinder / cmtrace.
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/manrope.woff2") format("woff2");
}

/* ---- Design tokens: DARK is the default brand theme ---- */
:root,
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-elev: #0c120b;
  --fg: #d2d7dc;
  --fg-dim: #9aa1a8;
  --fg-faint: rgba(255, 255, 255, 0.42);

  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  --accent: #39a751;
  --accent-fg: #ffffff;
  --accent-soft: rgba(57, 167, 81, 0.16);
  --accent-border: rgba(57, 167, 81, 0.55);
  --accent-btn: #267038;

  --hover-bg: rgba(255, 255, 255, 0.06);
  --active-bg: rgba(255, 255, 255, 0.10);
  --shadow: rgba(0, 0, 0, 0.6);

  --heading: #ffffff;

  --st-added: #39a751;
  --st-modified: #2f80ed;
  --st-renamed: #f59e0b;
  --st-removed: #e5484d;

  --font-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Code",
    "Cascadia Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-elev: #f5f7f5;
  --fg: #1d2421;
  --fg-dim: #5b665f;
  --fg-faint: #8a948c;

  --border: #e2e8e3;
  --border-strong: #cdd6cf;

  --accent: #1f8f3d;
  --accent-fg: #ffffff;
  --accent-soft: rgba(31, 143, 61, 0.12);
  --accent-border: rgba(31, 143, 61, 0.45);
  --accent-btn: #1c6e30;

  --hover-bg: rgba(0, 0, 0, 0.05);
  --active-bg: rgba(0, 0, 0, 0.08);
  --shadow: rgba(0, 0, 0, 0.18);

  --heading: #0c130f;

  --st-modified: #1d6fd6;
  --st-renamed: #c77700;
  --st-removed: #d33;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.65;
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 50% -8%, var(--accent-soft), transparent 70%),
    repeating-linear-gradient(135deg, rgba(57,167,81,0.035) 0px, rgba(57,167,81,0.035) 1px, transparent 1px, transparent 11px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:root[data-theme="light"] body {
  background-image:
    radial-gradient(900px 520px at 50% -8%, var(--accent-soft), transparent 70%),
    repeating-linear-gradient(135deg, rgba(31,143,61,0.04) 0px, rgba(31,143,61,0.04) 1px, transparent 1px, transparent 11px);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--heading); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }

kbd {
  font-family: var(--font-ui);
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1;
  padding: 0.18em 0.45em;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--hover-bg);
  color: var(--fg-dim);
}

a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--accent-fg);
  padding: 0.6rem 1rem; border-radius: 0 0 10px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
section { padding-block: clamp(3.5rem, 7vw, 6rem); }

.section-head { max-width: 720px; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.6rem;
}
.section-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.lead { color: var(--fg-dim); font-size: 1.05rem; margin: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 700; font-size: 0.98rem;
  padding: 0.78rem 1.4rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.08s ease, filter 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--hover-bg); }
.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.88rem; }

/* ============================ HEADER ============================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--heading); }
.brand:hover { text-decoration: none; }
.brand-glyph { width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto; }
.brand-name { color: var(--heading); }
.brand-dev { color: var(--accent); }

.site-nav { display: flex; align-items: center; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0; }
.nav-links a:not(.btn) { color: var(--fg-dim); font-weight: 600; font-size: 0.92rem; padding: 0.5rem 0.7rem; border-radius: 8px; }
.nav-links a:not(.btn):hover { color: var(--fg); background: var(--hover-bg); text-decoration: none; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px;
  background: transparent; border: 1px solid transparent; color: var(--fg-dim); cursor: pointer;
}
.theme-toggle:hover { background: var(--hover-bg); color: var(--fg); }
.theme-toggle svg { width: 18px; height: 18px; }
.icon-sun { display: none; }
:root[data-theme="light"] .icon-sun { display: inline-block; }
:root[data-theme="light"] .icon-moon { display: none; }

.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 8px; color: var(--fg); background: transparent; cursor: pointer;
  }
  .nav-toggle svg { width: 24px; height: 24px; }
  .nav-links {
    position: absolute; top: 64px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0.2rem;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 0.8rem clamp(1.1rem, 4vw, 2rem); display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a:not(.btn) { padding: 0.7rem; }
  .nav-links .btn { margin-top: 0.4rem; }
}

/* ============================ HERO ============================ */
.hero { text-align: center; padding-top: clamp(3rem, 7vw, 5.5rem); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 600; color: var(--fg-dim);
  padding: 0.35rem 0.85rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elev);
  margin-bottom: 1.4rem;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4rem); margin-bottom: 0.4em; }
.hero h1 .accent { color: var(--accent); }
.hero-sub { max-width: 640px; margin: 0 auto 2rem; color: var(--fg-dim); font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }

/* ---- Hero preview feed mock ---- */
.preview {
  max-width: 760px; margin: 3rem auto 0;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: 16px; box-shadow: 0 24px 60px var(--shadow); overflow: hidden; text-align: left;
}
.preview-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 40%, var(--bg-elev)); }
.preview-bar .tl { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.preview-bar .tl.r { background: #e5484d99; }
.preview-bar .tl.y { background: #f59e0b99; }
.preview-bar .tl.g { background: #39a75199; }
.preview-bar .pv-title { margin-left: 0.6rem; font-size: 0.8rem; color: var(--fg-faint); font-family: var(--font-mono); }
.preview-body { padding: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.pv-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.7rem; border-radius: 10px; border: 1px solid var(--border); border-left: 3px solid var(--st-modified); background: var(--bg); }
.pv-row.added { border-left-color: var(--st-added); }
.pv-row.renamed { border-left-color: var(--st-renamed); }
.pv-tile { width: 34px; height: 34px; border-radius: 7px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.pv-tile svg { width: 19px; height: 19px; }
.pv-tile img.svc-logo { width: 22px; height: 22px; object-fit: contain; }
.pv-tile.has-logo { box-shadow: inset 0 0 0 1px var(--border); }
.pv-main { flex: 1 1 auto; min-width: 0; }
.pv-name { font-weight: 700; color: var(--heading); font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-crumb { font-size: 0.76rem; color: var(--fg-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-badge { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 7px; border-radius: 999px; flex: 0 0 auto; }
.pv-badge.m { color: var(--st-modified); background: color-mix(in srgb, var(--st-modified) 16%, transparent); }
.pv-badge.a { color: var(--st-added); background: color-mix(in srgb, var(--st-added) 16%, transparent); }
.pv-badge.r { color: var(--st-renamed); background: color-mix(in srgb, var(--st-renamed) 16%, transparent); }

.trust-line { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.6rem; color: var(--fg-dim); font-size: 0.9rem; }
.trust-line svg { width: 18px; height: 18px; color: var(--accent); }

/* ============================ STATS ============================ */
.stats { padding-block: clamp(2rem, 4vw, 3rem); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3, 1rem); }
.stat { text-align: center; padding: 1.2rem 0.6rem; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); }
.stat .num { display: block; font-size: clamp(1.5rem, 1rem + 1.6vw, 2.2rem); font-weight: 800; color: var(--heading); letter-spacing: -0.02em; }
.stat .num .accent { color: var(--accent); }
.stat .label { display: block; margin-top: 0.3rem; font-size: 0.82rem; color: var(--fg-dim); }
@media (max-width: 680px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================ FEATURE / CARD GRID ============================ */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.1rem; }
.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; }
.feature h3 { font-size: 1.15rem; margin: 0.8rem 0 0.4rem; }
.feature p { margin: 0; color: var(--fg-dim); font-size: 0.95rem; }
.icon-tile { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }
.icon-tile svg { width: 24px; height: 24px; }

/* ============================ HOW IT WORKS ============================ */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; }
.step { position: relative; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-weight: 800; margin-bottom: 0.8rem; }
.step h3 { font-size: 1.1rem; margin: 0 0 0.4rem; }
.step p { margin: 0; color: var(--fg-dim); font-size: 0.95rem; }

/* ============================ PRODUCT COVERAGE ============================ */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; }
.prod {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-elev);
  transition: border-color 0.14s ease, transform 0.08s ease;
}
.prod:hover { border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
.prod-tile { width: 40px; height: 40px; border-radius: 9px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.prod-tile svg { width: 22px; height: 22px; }
.prod-tile img.svc-logo { width: 26px; height: 26px; object-fit: contain; }
.prod-tile.has-logo { box-shadow: inset 0 0 0 1px var(--border); }
.prod-name { font-weight: 700; color: var(--heading); font-size: 0.98rem; }
.prod-desc { font-size: 0.8rem; color: var(--fg-dim); }

/* ============================ FAQ ============================ */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.7rem; }
.faq-item { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.3rem; font-weight: 700; color: var(--heading); cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .chevron { width: 20px; height: 20px; color: var(--fg-dim); flex: 0 0 auto; transition: transform 0.2s ease; }
.faq-item[open] .chevron { transform: rotate(180deg); }
.faq-answer { padding: 0 1.3rem 1.2rem; margin: 0; color: var(--fg-dim); }

/* ============================ FINAL CTA ============================ */
.cta-final { padding-block: clamp(3rem, 6vw, 5rem); }
.cta-card { text-align: center; max-width: 760px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.4rem); border-radius: 20px; border: 1px solid var(--accent-border); background: var(--accent-soft); }
.cta-card h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }

/* ============================ FOOTER ============================ */
.site-footer { border-top: 1px solid var(--border); padding-block: 2.5rem; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 0; padding: 0; }
.footer-links a { color: var(--fg-dim); font-weight: 600; font-size: 0.92rem; }
.footer-links a:hover { color: var(--fg); }
.footer-bottom { padding-top: 1.5rem; display: flex; flex-direction: column; gap: 0.3rem; }
.disclaimer { margin: 0; font-size: 0.84rem; color: var(--fg-faint); }
