/* freeerapps.com — shared site styles
   Palette anchored on the freeerapps signature color (#344271), paired
   with a warm brass accent and warm-paper neutrals so the signature
   color reads as a deliberate anchor rather than the only color on the
   page. */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --brand: #344271;
  --brand-dark: #232d54;
  --brand-tint: #5c6ba3;
  --brand-50: rgba(52, 66, 113, 0.07);
  --brand-100: rgba(52, 66, 113, 0.13);
  --accent: #a9781f;
  --accent-strong: #8a6316;
  --accent-soft: rgba(169, 120, 31, 0.14);
  --bg: #f7f4ee;
  --surface: #ffffff;
  --text: #1c2033;
  --text-light: #5c6178;
  --border: #e6e1d5;
  --shadow-sm: 0 1px 2px rgba(28, 32, 51, 0.06), 0 1px 1px rgba(28, 32, 51, 0.04);
  --shadow-md: 0 18px 36px -14px rgba(28, 32, 51, 0.24);
  --radius: 12px;
  --container: 1080px;
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
  color-scheme: light dark;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv01', 'ss01';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── Top tab bar — uses the signature brand color directly ─────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--brand); border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 24px -12px rgba(28, 32, 51, 0.45);
}
.site-header .bar { max-width: var(--container); margin: 0 auto; display: flex; align-items: center; gap: 24px; padding: 0 24px; min-height: 60px; }
.site-header .brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.site-header .brand img { width: 22px; height: 22px; border-radius: 6px; }
.site-header nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.site-header nav > a, .nav-drop .drop-toggle { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.72); white-space: nowrap; transition: color 0.15s ease, background-color 0.15s ease; }
.site-header nav > a:hover, .nav-drop .drop-toggle:hover { color: #ffffff; background: rgba(255, 255, 255, 0.1); }
.site-header nav > a.active, .nav-drop .drop-toggle.active { color: #ffffff; font-weight: 600; background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 -2px 0 var(--accent); }

/* ── Products page (reuses policy card grid) ─────────────────────────── */
.products-head { max-width: 860px; margin: 0 auto; }

.page { max-width: var(--container); margin: 0 auto; padding: 52px 24px 80px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer; text-decoration: none; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -6px rgba(52, 66, 113, 0.55); }
.btn.primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { border-color: var(--brand); color: var(--brand); }

/* ── Nav dropdowns ─────────────────────────────────────────────────────
   Visibility is driven ENTIRELY by the .is-open class, which nav.js
   toggles via pointer events (checking pointerType, not CSS :hover) plus
   click/outside-click/Escape. There is deliberately no CSS `:hover`
   trigger here — many touchscreen and hybrid (trackpad + touch) devices
   report `(hover: hover)` as true and then latch a tap into a permanent
   :hover state with no matching "leave" event, which is what caused the
   menus to stay open constantly. Keeping this single, JS-owned code path
   is what actually prevents that. ───────────────────────────────────── */
.nav-drop { position: relative; }
.nav-drop .drop-toggle { display: inline-flex; align-items: center; gap: 5px; }
.nav-drop .caret { transition: transform 0.16s ease; }
.nav-drop .drop-menu {
  display: none;
  position: absolute; top: 100%; left: 0; z-index: 100; min-width: 172px;
  margin: 8px 0 0; padding: 4px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-md);
}
.nav-drop.is-open .drop-menu { display: block; animation: drop-in 0.14s ease; }
.nav-drop.is-open .caret { transform: rotate(180deg); }
@keyframes drop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
/* invisible bridge so moving the cursor down doesn't close the menu */
.nav-drop .drop-menu::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
/* keep the right-most menu inside the viewport */
.nav-drop:last-child .drop-menu { left: auto; right: 0; }
.nav-drop .drop-menu a { display: block; padding: 8px 12px; border-radius: 6px; font-size: 13.5px; font-weight: 500; color: var(--text-light); white-space: nowrap; }
.nav-drop .drop-menu a:hover { background: var(--brand-50); color: var(--text); }

/* ── Home: hero — asymmetric two-column, left-aligned (not the generic
   centered-hero default) ─────────────────────────────────────────────── */
.hero {
  max-width: var(--container); margin: 0 auto; padding: 68px 0 8px;
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center;
}
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--accent-strong); background: var(--accent-soft); padding: 5px 13px; border-radius: 999px; letter-spacing: 0.01em; }
.hero h1 { margin: 18px 0 14px; font-family: var(--font-display); font-size: 42px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.hero p { margin: 0 0 26px; font-size: 16.5px; line-height: 1.65; color: var(--text-light); max-width: 46ch; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-panel {
  background: var(--brand); color: #fff; border-radius: 16px; padding: 30px 30px 26px;
  box-shadow: 0 20px 44px -18px rgba(52, 66, 113, 0.55);
}
.hero-panel-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.03em; color: rgba(255, 255, 255, 0.6); margin-bottom: 16px; }
.hero-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hero-panel li { position: relative; padding-left: 24px; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.hero-panel li::before { content: ''; position: absolute; left: 0; top: 6px; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }

/* ── Home: mission sections ────────────────────────────────────────────── */
.section-head { max-width: 620px; margin: 0 0 30px; }
.section-head h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.section-head p { margin: 0; color: var(--text-light); font-size: 15.5px; line-height: 1.65; }
.goals { margin: 88px auto 0; max-width: 980px; }

/* Editorial hairline-divided columns instead of matching card boxes — the
   three commitments read as a considered set, not identical tiles. */
.goal-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.goal-card { padding: 30px 30px 6px 0; margin-left: 30px; border-left: 1px solid var(--border); }
.goal-card:first-child { margin-left: 0; border-left: none; padding-left: 0; }
.goal-card h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--brand); }
.goal-card p { margin: 0; color: var(--text-light); font-size: 14.5px; line-height: 1.7; }

.approach { margin: 72px auto 0; max-width: 700px; }
.steps { margin: 0; padding: 0 0 0 20px; list-style: none; position: relative; counter-reset: step; }
.steps::before { content: ''; position: absolute; top: 6px; bottom: 6px; left: 20px; width: 1px; background: var(--border); }
.steps li { position: relative; padding: 4px 0 28px 40px; font-size: 14.5px; line-height: 1.65; color: var(--text-light); counter-increment: step; }
.steps li:last-child { padding-bottom: 4px; }
.steps li strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 15px; font-weight: 800; margin-bottom: 3px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--brand); color: var(--brand); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; z-index: 1; }

.contact-strip { text-align: left; margin: 72px auto 0; max-width: 980px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 40px 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.contact-strip h2 { margin: 0 0 6px; font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.contact-strip p { margin: 0; color: var(--text-light); font-size: 15px; }
.contact-strip .actions { display: flex; }

/* (featured-product styles removed — home is mission-focused; products live on /products/) */

/* ── Not-found / misc ──────────────────────────────────────────────────── */
.not-found { text-align: center; padding-top: 88px; }
.not-found h1 { font-family: var(--font-display); font-size: 56px; font-weight: 800; color: var(--brand); margin: 0 0 10px; }
.not-found p { font-size: 16px; color: var(--text-light); margin: 0 0 26px; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.site-footer .grid { max-width: var(--container); margin: 0 auto; padding: 40px 24px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 28px; }
.site-footer .col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.site-footer .col h4 { margin: 0; font-family: var(--font-display); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); }
.site-footer .col .blurb { color: var(--text-light); font-size: 13.5px; line-height: 1.65; max-width: 230px; }
.site-footer .col a { color: var(--text-light); font-size: 14px; transition: color 0.15s ease; }
.site-footer .col a:hover { color: var(--brand); }
.site-footer .bottom { max-width: var(--container); margin: 0 auto; text-align: center; padding: 20px 24px 18px; font-size: 12.5px; color: var(--text-light); border-top: 1px solid var(--border); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; }
  .hero-panel { order: -1; }
  .goal-grid { grid-template-columns: 1fr; border-top: none; }
  .goal-card { margin-left: 0; border-left: none; padding: 22px 0; border-top: 1px solid var(--border); }
  .goal-card:first-child { border-top: none; }
  .contact-strip { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .site-header .bar { gap: 12px; }
  .site-header nav { gap: 0; }
  .hero h1 { font-size: 30px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141e; --surface: #191d2b; --text: #edeff5; --text-light: #9aa0b4;
    --border: #2a2e40; --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 18px 36px -14px rgba(0, 0, 0, 0.6);
    --brand: #55679e; --brand-dark: #3e4c7f; --brand-tint: #7987b8;
    --brand-50: rgba(85, 103, 158, 0.14); --brand-100: rgba(85, 103, 158, 0.22);
    --accent: #d9a521; --accent-strong: #e8b845; --accent-soft: rgba(217, 165, 33, 0.14);
  }
  .site-header { background: #232c4c; }
  .site-footer { background: #161a26; }
}
