/* =============================================================
   BriarStack — single-file stylesheet, no build step.
   Reskin the whole site by editing the variables in :root.
   ============================================================= */

:root {
  --bg: #f7f4ee;
  --panel: rgba(23, 20, 12, 0.035);
  --panel-2: rgba(23, 20, 12, 0.06);
  --line: rgba(23, 20, 12, 0.11);
  --line-strong: rgba(23, 20, 12, 0.20);
  --text: #1a1811;
  --muted: #6b6555;
  --accent: #2f5d46;
  --accent-2: #7d8f45;
  --ink: #fbfaf6;

  --radius: 10px;
  --maxw: 1140px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display: Georgia, "Iowan Old Style", "Times New Roman", "Songti SC", serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.022em;
}

/* ---------- layout ---------- */

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

.section { position: relative; padding: 92px 0; }

.sec-head { max-width: 660px; margin-bottom: 54px; }
.sec-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.55rem); text-wrap: balance; }
.sec-head p { margin-top: 18px; color: var(--muted); font-size: 16.5px; }

.eyebrow {
  display: block;
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 238, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 70px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.brand img { width: 28px; height: 28px; border-radius: 8px; }
.brand b { font-weight: 600; }
.brand-accent { color: var(--accent); font-weight: 600; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14.5px;
  color: var(--muted);
}

.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg { width: 18px; height: 18px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 21px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease,
    color 0.22s ease, background 0.22s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--ink);
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -14px var(--accent);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: var(--panel);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- hero ---------- */

.hero { position: relative; overflow: hidden; padding: 96px 0 84px; }

.hero .glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.16;
  pointer-events: none;
}

.hero .glow-a {
  top: -180px;
  left: -120px;
  width: 520px;
  height: 520px;
  background: var(--accent);
}

.hero .glow-b {
  top: 40px;
  right: -160px;
  width: 460px;
  height: 460px;
  background: var(--accent-2);
  opacity: 0.12;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.35rem, 5.1vw, 3.9rem);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin-top: 26px;
  max-width: 53ch;
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--muted);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-note {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  opacity: 0.75;
}

/* ---------- dashboard mock ---------- */

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: 0 30px 70px -45px rgba(26, 24, 17, 0.35);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-live { display: inline-flex; align-items: center; gap: 8px; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 93, 70, 0.18);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 0 6px;
}

.kpi {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(23, 20, 12, 0.03);
}

.kpi b {
  display: block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.kpi span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rows { display: flex; flex-direction: column; gap: 10px; padding: 14px 2px 4px; }

.row {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 11px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.bar {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: rgba(23, 20, 12, 0.09);
  overflow: hidden;
}

.bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  padding: 38px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat b {
  display: block;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.stat span {
  display: block;
  margin-top: 8px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  padding: 26px 22px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: var(--panel-2);
}

.card-num {
  display: block;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.card h3 { margin-bottom: 10px; font-size: 16.5px; }
.card p { font-size: 14px; line-height: 1.65; color: var(--muted); }

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.step { padding: 34px 30px 0; border-right: 1px solid var(--line); }
.step:first-child { padding-left: 0; }
.step:last-child { padding-right: 0; border-right: 0; }

.step .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.step h3 { margin: 15px 0 10px; font-size: 17px; }
.step p { font-size: 14px; color: var(--muted); }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: start;
}

.about-grid p + p { margin-top: 16px; }
.about-grid p { color: var(--muted); font-size: 16px; }

.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

.fact { display: flex; justify-content: space-between; gap: 20px; padding: 16px 20px; background: var(--bg); }
.fact dt { font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 0; font-size: 14.5px; text-align: right; }

/* ---------- cta ---------- */

.cta {
  position: relative;
  overflow: hidden;
  padding: 60px 48px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(115% 150% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 58%),
    var(--panel);
  text-align: center;
}

.cta h2 { position: relative; font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.cta p { position: relative; margin: 16px auto 0; max-width: 52ch; color: var(--muted); }
.cta .hero-actions { position: relative; justify-content: center; }

/* ---------- footer ---------- */

.site-footer { margin-top: 30px; padding: 36px 0 56px; border-top: 1px solid var(--line); }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
}

.footer-links { display: flex; gap: 22px; }
.footer-links a:hover { color: var(--text); }

/* ---------- motion ---------- */

/* Reveal-on-scroll is an enhancement only: with JS absent or slow, content is visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 72px 0 64px; }
  .section { padding: 72px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .steps { grid-template-columns: 1fr; }
  .step {
    padding: 28px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .step:last-child { border-bottom: 0; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 49;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 18px 24px 26px;
    background: rgba(247, 244, 238, 0.98);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
  }

  .nav-links.open { transform: none; }
  .nav-links a { padding: 12px 0; font-size: 16px; }
  .nav-links .btn { margin-top: 10px; width: 100%; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .cta { padding: 44px 24px; }
  .panel { padding: 14px; }
  .panel-head { font-size: 9.5px; letter-spacing: 0.06em; gap: 8px; }
  .panel-head > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .panel-live { flex: 0 0 auto; white-space: nowrap; }
  .kpis { gap: 7px; }
  .kpi { padding: 10px 8px; }
  .kpi b { font-size: 16px; }
  .kpi span { font-size: 9px; letter-spacing: 0.05em; }
  .section { padding: 58px 0; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- editorial overrides (BriarStack) ---------- */

.hero h1,
.sec-head h2,
.cta h2,
.about-grid h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.012em;
}

.hero h1 { line-height: 1.08; }
.sec-head h2 { line-height: 1.16; }

.eyebrow,
.card-num,
.step .num,
.kpi span,
.stat span,
.panel-head {
  color: var(--accent);
}

.panel-head { letter-spacing: 0.12em; }

/* light surfaces need a hair more contrast on hover */
.card:hover { background: rgba(23, 20, 12, 0.05); }

.btn-ghost { background: transparent; }
