/* ============================================================
   MUSTER — marketing site stylesheet
   Forest / Parchment / Warm-white
   DM Serif Display (headings) + Karla (body) + JetBrains Mono (numbers)
   ============================================================ */

:root {
  /* Brand */
  --forest:     #1B3829;
  --canopy:     #2B5441;
  --moss:       #3D7A5A;
  --leaf:       #6DBF7E;
  --parchment:  #F5ECD7;
  --parchment-2:#EAD9BC;
  --warm-white: #FAF7F2;
  --paper:      #FFFFFF;
  --ink:        #1B3829;
  --ink-60:     #4A6B58;
  --ink-40:     #8A9B91;
  --ember:      #C44F2A; /* for warnings / discrepancy numbers only */

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-xl: 28px;

  --shadow-card: 0 1px 0 rgba(27,56,41,0.06), 0 10px 30px -18px rgba(27,56,41,0.15);
  --shadow-big:  0 40px 80px -40px rgba(27,56,41,0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--warm-white);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ───────── type ───────── */
.serif { font-family: 'DM Serif Display', 'Times New Roman', Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
.mono  { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

h1, h2, h3 { font-family: 'DM Serif Display', serif; font-weight: 400; letter-spacing: -0.015em; margin: 0; color: var(--forest); }
h1 { font-size: clamp(44px, 6vw, 84px); line-height: 1.02; }
h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.08; }
h3 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.2; }
h4 { font-family: 'Karla', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: 0.02em; text-transform: uppercase; margin: 0; color: var(--forest); }

p { margin: 0; text-wrap: pretty; }
a { color: inherit; }

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-60);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--leaf); box-shadow: 0 0 0 3px rgba(109,191,126,0.2);
}
.eyebrow.on-dark { color: var(--parchment-2); }
.eyebrow.on-dark::before { background: var(--leaf); box-shadow: 0 0 0 3px rgba(109,191,126,0.22); }

/* ───────── layout ───────── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section   { padding: clamp(72px, 10vw, 140px) 0; }
.section.tight { padding: clamp(48px, 6vw, 88px) 0; }
.divider { height: 1px; background: var(--parchment-2); border: 0; margin: 0; }

/* ───────── nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250,247,242,0.85);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid rgba(234,217,188,0.5);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
}
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { text-decoration: none; font-size: 14px; color: var(--ink-60); transition: color .18s; }
.nav-links a:hover, .nav-links a.active { color: var(--forest); }
.nav-ctas { display: flex; gap: 10px; align-items: center; }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ───────── brand mark ───────── */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--forest); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: transparent; color: var(--parchment);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg, .brand-mark img { width: 28px; height: 28px; display: block; }
.brand-name {
  font-family: 'DM Serif Display', serif;
  font-size: 24px; letter-spacing: -0.02em; color: var(--forest); line-height: 1;
}
.brand.on-dark .brand-mark { background: transparent; color: var(--forest); }
.brand.on-dark .brand-name { color: var(--parchment); }

/* ───────── buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-family: 'Karla', sans-serif; font-weight: 500; font-size: 14.5px; line-height: 1;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--forest); color: var(--parchment); }
.btn-primary:hover { background: var(--canopy); }
.btn-leaf { background: var(--leaf); color: var(--forest); }
.btn-leaf:hover { background: #7ecc8f; }
.btn-ghost { background: transparent; color: var(--forest); border-color: rgba(27,56,41,0.2); }
.btn-ghost:hover { background: rgba(27,56,41,0.04); }
.btn-ghost.on-dark { color: var(--parchment); border-color: rgba(245,236,215,0.25); }
.btn-ghost.on-dark:hover { background: rgba(245,236,215,0.06); }
.btn-link { padding: 0; background: transparent; color: var(--forest); border: 0; gap: 6px; }
.btn-link:hover { gap: 10px; transform: none; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ───────── cards ───────── */
.card {
  background: var(--paper); border: 1px solid var(--parchment-2);
  border-radius: var(--r-lg); padding: 28px;
}
.card.soft { background: var(--parchment); border-color: transparent; }
.card.forest { background: var(--forest); color: var(--parchment); border-color: transparent; }
.card.forest h3, .card.forest h4 { color: var(--parchment); }

/* ───────── footer ───────── */
.footer { background: var(--forest); color: var(--parchment-2); padding: 72px 0 32px; margin-top: 80px; }
.footer h4 { color: var(--parchment); margin-bottom: 16px; }
.footer a { color: var(--parchment-2); text-decoration: none; font-size: 14px; opacity: .75; }
.footer a:hover { opacity: 1; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid rgba(245,236,215,0.1);
  display: flex; justify-content: space-between; font-size: 12px; color: rgba(245,236,215,0.5);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* ───────── utility ───────── */
.stack { display: flex; flex-direction: column; }
.row { display: flex; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ───────── product mock chrome ───────── */
.mock {
  background: var(--paper); border-radius: 14px;
  box-shadow: var(--shadow-big);
  overflow: hidden; border: 1px solid rgba(27,56,41,0.08);
}
.mock-bar {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px;
  border-bottom: 1px solid var(--parchment-2);
  background: var(--warm-white);
}
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--parchment-2); }
.mock-addr {
  margin-left: 10px; font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--ink-40);
}

/* ───────── subtle motifs ───────── */
.leaf-motif {
  position: absolute; opacity: 0.06; pointer-events: none;
}

/* stat */
.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1; letter-spacing: -0.03em; color: var(--forest);
}
.stat-num.leaf { color: var(--leaf); }
.stat-label { font-size: 13px; color: var(--ink-60); max-width: 22ch; }

/* badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}
.badge-leaf   { background: rgba(109,191,126,0.18); color: var(--moss); }
.badge-muted  { background: var(--parchment); color: var(--ink-60); }
.badge-ember  { background: rgba(196,79,42,0.12); color: var(--ember); }

/* ───────── mobile nav ───────── */
.nav-toggle {
  display: none;
  background: transparent; border: 1px solid rgba(27,56,41,0.15);
  width: 40px; height: 40px; border-radius: 10px;
  align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.nav-toggle-bars { display: flex; flex-direction: column; gap: 4px; }
.nav-toggle-bars span { display:block; width: 18px; height: 1.5px; background: var(--forest); border-radius: 2px; }
.nav-mobile-panel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 41;
  background: var(--warm-white);
  padding: 24px var(--gutter) 40px;
  display: none; flex-direction: column;
  border-top: 1px solid var(--parchment-2);
  box-shadow: 0 24px 50px -36px rgba(27,56,41,0.45);
  max-height: calc(100vh - 68px);
  overflow-y: auto;
}
.nav-mobile-panel[data-open="true"] { display: flex; }
.nav-mobile-panel a.nav-mobile-link {
  display: block; padding: 18px 0;
  font-family: 'DM Serif Display', serif;
  font-size: 24px; color: var(--forest);
  text-decoration: none;
  border-bottom: 1px solid var(--parchment-2);
}
.nav-mobile-panel .nav-mobile-ctas {
  display: flex; flex-direction: column; gap: 10px; margin-top: 24px;
}
.nav-mobile-panel .nav-mobile-ctas .btn { width: 100%; padding: 14px 18px; font-size: 15px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-ctas { display: none; }
  body[data-nav-open="true"] { overflow: hidden; }
}

/* ───────── mobile reflow for feature sections ───────── */
@media (max-width: 820px) {
  .feat-row { grid-template-columns: 1fr !important; gap: 36px !important; }
  .feat-row .feat-media { order: 2; }
  .feat-row .feat-copy  { order: 1; }
  .feat-grid-3 { grid-template-columns: 1fr !important; gap: 16px !important; }
  .section { padding: clamp(56px, 12vw, 88px) 0; }
  h1 { font-size: clamp(36px, 9vw, 52px) !important; }
  h2 { font-size: clamp(28px, 7vw, 38px) !important; }
}

@media (max-width: 540px) {
  .mock { border-radius: 12px; }
  .mock-bar { height: 34px; padding: 0 12px; }
  .whereabouts-card { padding: 20px 18px !important; }
  .whereabouts-summary { grid-template-columns: repeat(5, 1fr) !important; gap: 6px !important; }
  .whereabouts-summary .stat-num-sm { font-size: 18px !important; }
  .whereabouts-x-axis span:nth-child(even) { visibility: hidden; }
  .demo-cta { padding: 60px 0 !important; }
}

/* subtle topo texture */
.topo {
  background-image:
    radial-gradient(circle at 20% 10%, rgba(109,191,126,0.08) 0, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(27,56,41,0.05) 0, transparent 40%);
}

/* ───────── mobile layout safety pass ───────── */
@media (max-width: 760px) {
  :root {
    --gutter: 20px;
  }

  html,
  body {
    overflow-x: hidden;
  }

  body {
    font-size: 16px;
    line-height: 1.5;
  }

  h1 {
    font-size: 42px;
    line-height: 1.04;
  }

  h2 {
    font-size: 34px;
    line-height: 1.08;
  }

  h3 {
    font-size: 24px;
  }

  .section,
  .section.tight {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }

  .container {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .nav-inner {
    min-height: 64px;
    height: auto;
    gap: 12px;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand-name {
    font-size: 22px;
  }

  .btn {
    max-width: 100%;
    min-height: 44px;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  .card {
    padding: 22px !important;
    border-radius: 14px;
  }

  .footer {
    margin-top: 40px;
    padding-top: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 26px;
  }

  .footer-bottom {
    margin-top: 36px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }

  [style*="grid-template-columns"]:not([data-whereabouts-bars]):not(.whereabouts-x-axis):not(.whereabouts-summary) {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  [data-whereabouts-bars],
  .whereabouts-x-axis {
    grid-template-columns: repeat(14, minmax(10px, 1fr)) !important;
    gap: 4px !important;
  }

  .whereabouts-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  [style*="gap: 80px"],
  [style*="gap: 64px"],
  [style*="gap: 60px"],
  [style*="gap: 40px"],
  [style*="gap: 32px"] {
    gap: 24px !important;
  }

  [style*="position:sticky"] {
    position: static !important;
    top: auto !important;
  }

  [style*="min-height: 80vh"] {
    min-height: auto !important;
  }

  [style*="padding: clamp(60px"] {
    padding: 56px var(--gutter) !important;
  }

  [style*="padding-top: 100px"],
  [style*="padding-bottom: 100px"],
  [style*="padding-top: 80px"],
  [style*="padding-bottom: 100px"] {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }

  [style*="margin-top: 80px"] {
    margin-top: 42px !important;
  }

  [style*="margin-bottom: 56px"],
  [style*="margin-bottom: 48px"] {
    margin-bottom: 30px !important;
  }

  [style*="font-size: 64px"] {
    font-size: 48px !important;
  }

  [style*="font-size: 56px"] {
    font-size: 42px !important;
  }

  [style*="font-size: 32px"] {
    font-size: 28px !important;
  }

  .mock {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 18px 50px -34px rgba(27,56,41,0.45);
  }

  .mock-bar {
    min-width: 0;
  }

  .mock-addr {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mock [style*="padding: 28px 32px"],
  .mock [style*="padding: 24px"],
  .mock [style*="padding: 22px"] {
    padding: 18px !important;
  }

  .mock [style*="justify-content:space-between"] {
    gap: 12px !important;
  }

  .badge {
    white-space: normal;
    line-height: 1.2;
  }

  .leaf-motif {
    display: none;
  }
}

@media (max-width: 380px) {
  :root {
    --gutter: 16px;
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 31px;
  }

  .brand-name {
    font-size: 20px;
  }
}
