/* ============================================================
   BY FIVE IT — DESIGN SYSTEM v1.0
   The shared visual language. Every page loads this file.
   Benchmark: Stripe (trust) + Linear (modern precision).
   ============================================================ */

/* ---- Typography: Inter (UI) + Orbitron (brand mark) ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Orbitron:wght@500;700;800&display=swap');

:root {
  /* Color tokens */
  --primary: #2563EB;   /* house blue (design/house-style.md) */
  --primary-dark: #1D4ED8;
  --accent: #2563EB;
  --warm: #EA580C;
  --good: #1D6B2F;
  --bad: #C0392B;
  --bg: #F8F9FB;
  --surface: #FFFFFF;
  --text: #161B26;
  --muted: #64748B;
  --soft: #9CBFDF;
  --line: #E5E7EB;

  /* Type scale (1.25 ratio) */
  --fs-display: 2.5rem;   /* 40px heroes */
  --fs-h1: 1.875rem;      /* 30px */
  --fs-h2: 1.375rem;      /* 22px */
  --fs-h3: 1.0625rem;     /* 17px */
  --fs-body: 1rem;        /* 16px */
  --fs-small: 0.875rem;   /* 14px */
  --fs-fine: 0.8125rem;   /* 13px captions/labels */

  /* Spacing rhythm (4px base) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-6: 24px; --sp-8: 32px; --sp-12: 48px; --sp-16: 64px;

  /* Elevation + shape */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(24,33,43,.08);
  --shadow-md: 0 6px 18px rgba(24,33,43,.10);
  --shadow-lg: 0 12px 32px rgba(24,33,43,.14);
}

/* ---- Base: one font family everywhere, refined rendering ---- */
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body, input, textarea, select, button {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-feature-settings: "cv05" 1;  /* nicer lowercase l */
  letter-spacing: -0.011em;
}
h1, h2, h3 { letter-spacing: -0.02em; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

/* ---- Focus states: visible, on-brand (accessibility = professionalism) ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Selection: on-brand ---- */
::selection { background: var(--soft); color: var(--text); }

/* ---- Scrollbars: quiet, modern ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #C7D0D9; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #AEB9C2; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- v1.2: shared sticky nav (every page) ---- */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px) saturate(1.8);
  -webkit-backdrop-filter: blur(12px) saturate(1.8);
  border-bottom: 1px solid var(--line, #E5E7EB);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; max-width: 1080px; margin: 0 auto; }
.brand { font-family: "Orbitron", "Inter", sans-serif; font-weight: 700; font-size: 15px; color: var(--text, #161B26); text-decoration: none; letter-spacing: 0.02em; display: flex; align-items: center; gap: 10px; }
.brand img { border-radius: 7px; }
.brand span { color: var(--primary, #2563EB); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--muted, #64748B); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: all .2s cubic-bezier(.4,0,.2,1); }
.nav-links a:hover { color: var(--text, #161B26); }
.nav-links a.btn, .nav-links a.btn:hover { color: #fff; font-size: 15px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 11px 22px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 15px;
  transition: all .2s cubic-bezier(.4,0,.2,1); cursor: pointer; border: none;
}
.btn-primary { background: var(--primary, #2563EB); color: #fff; }
.btn-primary:hover { background: var(--primary-dark, #1D4ED8); }
@media (max-width: 860px) { .nav-links a:not(.btn) { display: none; } }

/* ---- v1.1 (2026-11-02): house-style tokens — design/house-style.md ---- */
:root {
  /* Two-tone rhythm: dark sections (Stripe/Linear/Podium pattern) */
  --dark: #0E1524;
  --dark-text: #F2F5FA;
  --dark-muted: #97A3B8;
  --dark-line: rgba(255,255,255,.09);
  --dark-card: rgba(255,255,255,.045);
  /* Depth = glow, not border */
  --glow: 0 20px 60px rgba(22,27,38,.08);
  --glow-primary: 0 30px 90px rgba(37,99,235,.12);
}

/* ---- Forms: consistent inputs even before page CSS touches them ---- */
input, textarea, select {
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(8,104,224,.12);
  outline: none;
}

/* ---- Buttons: consistent hover/active language ---- */
button { transition: transform .12s ease, box-shadow .12s ease, background .15s ease; }
button:active:not(:disabled) { transform: translateY(1px); }

/* ---- Images: never overflow ---- */
img { max-width: 100%; height: auto; }

/* ============================================================
   v1.2 (2026-11-14, Creative Studio): ONE header on every page.
   Replaces the five per-page nav variants. Markup: README.md in the fix package.
   Selectors are namespaced (bf-*), and "nav.bf-nav" outranks the old
   page-level "nav { }" rules, so no page <style> can restyle it.
   ============================================================ */
nav.bf-nav {
  position: sticky; top: 0; z-index: 50; display: block; margin: 0; padding: 0;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line, #E5E7EB);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
nav.bf-nav .bf-inner {
  position: relative; box-sizing: border-box; max-width: 1120px; height: 72px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px;
}
nav.bf-nav .bf-brand { display: inline-flex; align-items: center; flex: 0 0 auto; margin-right: auto; line-height: 0; text-decoration: none; }
nav.bf-nav .bf-brand img { display: block; height: 32px; width: auto; border-radius: 0; }
nav.bf-nav .bf-links { display: flex; align-items: center; gap: 28px; }
nav.bf-nav .bf-links a {
  color: var(--muted, #64748B); font-size: 15px; font-weight: 500; line-height: 1.2; text-decoration: none;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: color .18s ease, border-color .18s ease;
}
nav.bf-nav .bf-links a:hover { color: var(--text, #161B26); }
nav.bf-nav .bf-links a[aria-current="page"] { color: var(--text, #161B26); border-bottom-color: var(--primary, #2563EB); }

/* Get Help: the only filled button in the header, same on every page. White on #2563EB = 5.2:1. */
nav.bf-nav a.bf-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto;
  height: 44px; padding: 0 20px; border-radius: 999px; background: #2563EB; color: #FFFFFF;
  font-size: 15px; font-weight: 600; line-height: 1; letter-spacing: 0; text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(14,21,36,.16), 0 6px 16px rgba(37,99,235,.22);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
nav.bf-nav a.bf-cta:hover { background: #1D4ED8; color: #FFFFFF; transform: translateY(-1px); }
nav.bf-nav a.bf-cta:active { transform: translateY(0); }
nav.bf-nav a:focus-visible, nav.bf-nav button:focus-visible { outline: 3px solid rgba(37,99,235,.55); outline-offset: 3px; border-radius: 10px; }
nav.bf-nav .bf-toggle { display: none; }

/* Phones and small tablets: logo, Get Help and a menu button; the links drop down. */
@media (max-width: 860px) {
  nav.bf-nav .bf-inner { height: 64px; padding: 0 16px; gap: 10px; }
  nav.bf-nav .bf-brand img { height: 28px; }
  nav.bf-nav a.bf-cta { order: 2; height: 42px; padding: 0 16px; }
  nav.bf-nav .bf-toggle {
    order: 3; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid var(--line, #E5E7EB); border-radius: 12px;
    background: #FFFFFF; color: var(--text, #161B26); cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  nav.bf-nav .bf-toggle span,
  nav.bf-nav .bf-toggle span::before,
  nav.bf-nav .bf-toggle span::after {
    display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform .18s ease, background-color .18s ease;
  }
  nav.bf-nav .bf-toggle span { position: relative; }
  nav.bf-nav .bf-toggle span::before, nav.bf-nav .bf-toggle span::after { content: ""; position: absolute; left: 0; }
  nav.bf-nav .bf-toggle span::before { top: -6px; }
  nav.bf-nav .bf-toggle span::after { top: 6px; }
  nav.bf-nav.bf-open .bf-toggle span { background: transparent; }
  nav.bf-nav.bf-open .bf-toggle span::before { transform: translateY(6px) rotate(45deg); }
  nav.bf-nav.bf-open .bf-toggle span::after { transform: translateY(-6px) rotate(-45deg); }
  nav.bf-nav .bf-links {
    order: 4; display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 6px 16px 14px;
    background: #FFFFFF; border-bottom: 1px solid var(--line, #E5E7EB); box-shadow: 0 24px 40px rgba(14,21,36,.12);
  }
  nav.bf-nav.bf-open .bf-links { display: flex; }
  nav.bf-nav .bf-links a { padding: 15px 4px; font-size: 17px; color: var(--text, #161B26); border-bottom: 1px solid #EEF1F5; }
  nav.bf-nav .bf-links a:last-child { border-bottom: none; }
  nav.bf-nav .bf-links a[aria-current="page"] { color: var(--primary, #2563EB); border-bottom-color: #EEF1F5; }
}
@media (max-width: 370px) {
  nav.bf-nav .bf-brand img { height: 24px; }
  nav.bf-nav a.bf-cta { padding: 0 13px; font-size: 14.5px; }
}

/* Hero eyebrow ("By Five IT — Client Portal"): the old nav ".brand" rule made it a
   left-aligned flex row in Orbitron on portal, business, booking, thank-you and work. */
.hero > .brand { display: block; font-family: inherit; }
