/*!
 * lettuce-energy.css — shared design system for lettuce.energy
 *
 * Aesthetic: quiet precision. Bright neutral canvas, hairline borders,
 * one saturated accent (electric orange #ff6b1a), tight typography.
 * Think Stripe / Linear / Vercel — not neobrutalist, not dark.
 *
 * All three energy pages import this so the palette, spacing, buttons,
 * and nav are identical. Page-specific styles live in the page.
 */

:root {
  /* Canvas */
  --bg:        #fafaf7;          /* warm off-white, feels like paper */
  --bg-2:      #f4f2ec;          /* subtle contrast blocks */
  --paper:     #ffffff;
  --line:      #e7e4dc;          /* hairline borders */
  --line-2:    #d5d1c6;

  /* Ink */
  --ink:       #0f1114;          /* near-black w/ slight cool tint */
  --ink-2:     #3a3d42;
  --muted:     #6a6d73;
  --dim:       #9a9da3;

  /* Accent — electric current orange */
  --accent:    #ff6b1a;
  --accent-2:  #ffa066;
  --accent-3:  #fff1e6;          /* wash */
  --accent-ink:#7a2a05;

  /* Signal colors — used sparingly */
  --green:     #16a34a;
  --green-bg:  #ecfdf3;
  --red:       #dc2626;
  --blue:      #0284c7;

  /* Radii */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Shadows — subtle only */
  --sh-1: 0 1px 2px rgba(15,17,20,.04), 0 1px 1px rgba(15,17,20,.03);
  --sh-2: 0 4px 12px rgba(15,17,20,.06), 0 2px 4px rgba(15,17,20,.04);
  --sh-3: 0 12px 32px rgba(15,17,20,.08), 0 4px 8px rgba(15,17,20,.05);

  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: 'Space Grotesk', Inter, system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 92% -10%, rgba(255,107,26,.055), transparent 55%),
    radial-gradient(900px 500px at -5% 8%,   rgba(255,107,26,.03),  transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
::selection { background: rgba(255,107,26,.20); color: var(--ink); }

/* --------------------------------------------------------------- typography */
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.022em; line-height: 1.08; margin: 0; font-weight: 600; }
p { margin: 0; }
code, kbd { font-family: var(--mono); font-size: 0.86em; }
.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* --------------------------------------------------------------- navigation */
.le-nav-wrap {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250,250,247,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.le-nav {
  max-width: 1360px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.le-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  color: var(--ink);
}
.le-brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, #ff8a3c 0%, #ff6b1a 55%, #d94c00 100%);
  display: grid; place-items: center;
  box-shadow: inset 0 -6px 12px rgba(0,0,0,.15), 0 2px 6px rgba(255,107,26,.35);
  flex-shrink: 0;
}
.le-brand-mark svg { width: 14px; height: 14px; color: #fff; }
.le-brand-sep { color: var(--dim); font-weight: 400; margin: 0 6px; }
.le-brand-sub { color: var(--muted); font-weight: 400; font-family: var(--mono); font-size: 11px; }
.le-nav-links { display: flex; gap: 2px; align-items: center; flex: 1; justify-content: center; }
.le-nav-links a {
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  padding: 7px 12px; border-radius: var(--r-sm); transition: 0.15s;
}
.le-nav-links a:hover { color: var(--ink); background: rgba(15,17,20,.04); }
.le-nav-links a.current { color: var(--accent); }
@media (max-width: 900px) { .le-nav-links { display: none; } }
.le-nav-cta { display: flex; gap: 8px; align-items: center; }

/* Buttons — soft-rounded, one accent style */
.le-btn {
  appearance: none; border: 1px solid var(--line-2);
  background: var(--paper); color: var(--ink);
  padding: 8px 14px; border-radius: 999px;
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
  white-space: nowrap;
}
.le-btn:hover { border-color: var(--ink); background: var(--paper); box-shadow: var(--sh-1); }
.le-btn.primary {
  background: var(--ink); color: #fff; border-color: var(--ink);
  padding: 8px 16px; font-weight: 500;
}
.le-btn.primary:hover { background: #26292f; }
.le-btn.accent {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.le-btn.accent:hover { background: #e85a0f; border-color: #e85a0f; box-shadow: 0 4px 12px rgba(255,107,26,.30); }
.le-btn.ghost { border-color: transparent; background: transparent; }
.le-btn.ghost:hover { background: rgba(15,17,20,.04); border-color: transparent; box-shadow: none; }
.le-btn.big { padding: 12px 22px; font-size: 15px; }
.le-btn svg { width: 14px; height: 14px; }

/* 3x3 apps dropdown launcher (shared) */
.le-apps-btn {
  background: transparent; border: 1px solid var(--line-2); color: var(--ink);
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-grid; place-items: center; padding: 0;
  cursor: pointer; transition: 0.15s;
}
.le-apps-btn:hover { background: var(--paper); border-color: var(--ink); box-shadow: var(--sh-1); }
.le-apps-btn[aria-expanded="true"] { background: var(--accent-3); border-color: var(--accent); color: var(--accent-ink); }
.le-apps-btn svg { width: 16px; height: 16px; }

@media (max-width: 540px) {
  .le-nav { padding: 10px 16px; gap: 8px; }
  .le-brand-sub, .le-brand-sep { display: none; }
  .le-nav-cta .le-btn:not(.primary):not(.accent) { display: none; }
}

/* ------------------------------------------------------------------- footer */
.le-foot {
  max-width: 1360px; margin: 96px auto 0; padding: 32px 24px 40px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px;
}
.le-foot .fmark {
  display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500;
}
.le-foot .fmark .le-brand-mark { width: 20px; height: 20px; border-radius: 6px; }
.le-foot .fmark .le-brand-mark svg { width: 10px; height: 10px; }
.le-foot .flinks { display: flex; gap: 20px; flex-wrap: wrap; }
.le-foot .flinks a:hover { color: var(--accent); }

/* -------------------------------------------------------- glossary tooltip */
/* Applied by lettuce-energy-glossary.js to any known acronym.               */
.le-term {
  border-bottom: 1px dotted var(--line-2);
  cursor: help; position: relative;
  transition: border-color 0.15s;
}
.le-term:hover, .le-term:focus { border-bottom-color: var(--accent); outline: none; }
.le-tip {
  position: fixed;
  background: var(--ink); color: #f5f5f2;
  padding: 10px 14px; border-radius: var(--r);
  font-size: 12.5px; line-height: 1.5; font-family: var(--body); font-weight: 400;
  max-width: 320px; z-index: 200;
  box-shadow: var(--sh-3);
  pointer-events: none;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.14s, transform 0.14s;
}
.le-tip.visible { opacity: 1; transform: translateY(0); }
.le-tip b {
  display: block; color: var(--accent-2);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 4px; font-weight: 500;
}
.le-tip::after {
  content: ''; position: absolute; top: -5px; left: 20px;
  width: 10px; height: 10px; background: var(--ink);
  transform: rotate(45deg); border-radius: 2px;
}
.le-tip.below::after { top: auto; bottom: -5px; }

/* --------------------------------------------------------------- utilities */
.le-hairline { height: 1px; background: var(--line); border: 0; margin: 0; }
.le-container { max-width: 1360px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
@media (max-width: 640px) { .le-container { padding: 0 16px; } }
