/* ======================================================================
   Foodlock 2026 — design tokens & base styles
   Warm commercial Nordic SaaS. Bricolage Grotesque + Manrope + JetBrains Mono.
   ====================================================================== */

:root {
  /* Brand */
  --orange: #ff7a1a;
  --orange-600: #ee6a0a;
  --orange-50: #fff3e8;
  --orange-100: #ffe3cc;

  /* Neutrals */
  --ink: #111827;
  --ink-2: #1f2937;
  --ink-3: #374151;
  --muted: #6b7280;
  --line: #e7e5e4;
  --line-2: #f1ede9;
  --bg: #ffffff;
  --bg-soft: #faf7f3;
  --bg-cream: #f6f1ea;

  /* Accents */
  --green: #22c55e;
  --green-50: #e7f9ed;
  --blue: #38aeea;
  --blue-50: #e6f5fd;

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(17, 24, 39, .04), 0 0 0 1px rgba(17, 24, 39, .04);
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05), 0 4px 12px -4px rgba(17, 24, 39, .06);
  --shadow-md: 0 2px 4px rgba(17, 24, 39, .04), 0 12px 32px -8px rgba(17, 24, 39, .10);
  --shadow-lg: 0 4px 8px rgba(17, 24, 39, .04), 0 24px 60px -12px rgba(17, 24, 39, .18);
  --shadow-orange: 0 8px 24px -8px rgba(255, 122, 26, .45);

  /* Type */
  --font-display: "Roboto", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: 0; color: inherit; }

::selection { background: var(--orange); color: #fff; }

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6.4vw, 76px); letter-spacing: -0.035em; font-weight: 700; }
h2 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.028em; font-weight: 700; }
h3 { font-size: clamp(20px, 2vw, 24px); }
p  { margin: 0; text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-600);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--orange);
  border-radius: 999px;
  display: inline-block;
}

.lede { font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-3); line-height: 1.55; max-width: 60ch; }

/* Container */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-orange {
  background: var(--orange);
  color: #fff;
  box-shadow: var(--shadow-orange);
}
.btn-orange:hover { background: var(--orange-600); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 13px 20px;
}
.btn-ghost:hover { border-color: var(--ink); background: var(--bg-soft); }
.btn-link {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: gap .2s ease, border-color .2s ease, color .2s ease;
}
.btn-link:hover { gap: 10px; color: var(--orange-600); }
.btn-link .arr { transition: transform .2s ease; }
.btn-link:hover .arr { transform: translateX(2px); }

/* Badges & chips */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}
.badge .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--green); }

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line); }

/* Section */
section { padding: clamp(72px, 9vw, 120px) 0; }
section.tight { padding: clamp(56px, 7vw, 96px) 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
}
.section-head.left { margin-left: 0; margin-right: 0; text-align: left; max-width: 720px; }
.section-head .eyebrow { justify-content: center; }
.section-head.left .eyebrow { justify-content: flex-start; }

/* Header / nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 28px; width: auto; }
.brand-mark {
  height: 32px; width: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--ink); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

.nav-burger { display: none; width: 40px; height: 40px; border-radius: 10px; background: var(--bg-soft); align-items: center; justify-content: center; }
.nav-burger span { display: block; width: 18px; height: 1.5px; background: var(--ink); position: relative; }
.nav-burger span::before, .nav-burger span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: var(--ink);
}
.nav-burger span::before { top: -6px; }
.nav-burger span::after { top: 6px; }

@media (max-width: 880px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-burger { display: inline-flex; }
}

/* Mobile menu drawer */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(17, 24, 39, .4);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu-panel {
  position: absolute; top: 12px; right: 12px; left: 12px;
  background: #fff;
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  transform: translateY(-12px);
  transition: transform .25s ease;
}
.mobile-menu.open .mobile-menu-panel { transform: translateY(0); }
.mobile-menu-panel a {
  display: block;
  padding: 14px 8px;
  font-size: 18px;
  font-weight: 500;
  border-bottom: 1px solid var(--line-2);
}
.mobile-menu-panel a:last-of-type { border-bottom: 0; }
.mobile-menu-panel .btn { width: 100%; justify-content: center; margin-top: 12px; }

/* Trust pills */
.trust-row {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.trust-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  box-shadow: var(--shadow-xs);
}
.trust-pill svg { width: 14px; height: 14px; }

/* Icon swatch */
.icon-swatch {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--orange-50);
  color: var(--orange-600);
  flex-shrink: 0;
}
.icon-swatch.green { background: var(--green-50); color: #16a34a; }
.icon-swatch.blue  { background: var(--blue-50); color: #0e7ec0; }
.icon-swatch.dark  { background: #1f2937; color: #fff; }
.icon-swatch svg { width: 22px; height: 22px; }

/* Mono tag */
.tag-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Footer */
.footer {
  background: var(--ink);
  color: #d1d5db;
  padding: 80px 0 32px;
  margin-top: 0;
}
.footer h4 { color: #fff; font-size: 14px; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; margin-bottom: 16px; }
.footer a { color: #d1d5db; font-size: 14px; padding: 6px 0; display: inline-block; transition: color .15s ease; }
.footer a:hover { color: var(--orange); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid #1f2937;
}
.footer .brand-text { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 28px;
  font-size: 13px;
  color: #9ca3af;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ----- Tweaks panel ----- */
.tweaks {
  position: fixed; bottom: 20px; right: 20px; z-index: 80;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 16px;
  width: 260px;
  display: none;
  font-family: var(--font-body);
}
.tweaks.open { display: block; animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: translateY(0) } }
.tweaks-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.tweaks-head h5 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.tweaks-head button { color: var(--muted); font-size: 14px; }
.tweaks-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; font-family: var(--font-mono); }
.tweaks-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tweaks-swatch {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform .15s ease;
}
.tweaks-swatch:hover { transform: scale(1.06); }
.tweaks-swatch.active { border-color: var(--ink); }
.tweaks-swatch.active::after {
  content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 16px; font-weight: 700;
}
