/* =====================================================================
   Miles2Go — Base reset, typography, and shared shell chrome.
   Token-driven (Branding VT-1). Header/nav + CRM sidebar/topbar match the
   approved prototypes (miles2go-website-v2.html / miles2go-crm-v2.html).
   Page-level component styles arrive in Prompt 03 (design system).
   ===================================================================== */

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--text);
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  transition:background .5s,color .5s;
}

/* Typography — Branding §4 */
h1,h2,h3{font-family:var(--font-display);line-height:1.08;font-weight:700}
.display{font-size:clamp(2.6rem,6.5vw,5rem);letter-spacing:-.02em;font-weight:800}
.display em,.sec-title em{font-style:normal;color:var(--accent)}
.lead{color:var(--text-soft);font-size:1.05rem;line-height:1.7;max-width:560px}
.eyebrow{display:inline-flex;align-items:center;gap:.7em;color:var(--accent);
  font-size:.76rem;letter-spacing:.2em;text-transform:uppercase;font-weight:600;margin-bottom:20px}
.eyebrow::before{content:'';width:30px;height:2px;background:var(--accent)}

/* Custom scrollbar — Branding §6.8 / SC-1 */
::-webkit-scrollbar{width:11px}
::-webkit-scrollbar-track{background:var(--bg)}
::-webkit-scrollbar-thumb{background:linear-gradient(var(--color-secondary),var(--color-support));
  border-radius:8px;border:2px solid var(--bg)}
::-webkit-scrollbar-thumb:hover{background:var(--color-tertiary)}
*{scrollbar-color:var(--color-secondary) var(--bg);scrollbar-width:thin}
::selection{background:var(--accent);color:var(--on-accent)}

/* Visible focus everywhere — Branding AX-2 / BT-3 */
:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 45%,transparent);outline-offset:2px;border-radius:4px}

/* Theme toggle — Branding §3.1 (small icon button, NOT a pill). 36×36, glyph swaps by theme. */
.theme-toggle{width:44px;height:44px;border:none;background:none;color:var(--text-soft);
  cursor:pointer;font-size:1.05rem;border-radius:50%;display:flex;align-items:center;
  justify-content:center;transition:color .3s var(--ease)}
.theme-toggle:hover{color:var(--accent)}
.theme-toggle::after{content:'\263E'}                       /* ☾ in dark mode → go light */
[data-theme="light"] .theme-toggle::after{content:'\2600'}  /* ☀ in light mode → go dark */

/* ---------- Public website header / nav — Branding §6.5, prototype ---------- */
.site-header{position:fixed;top:0;left:0;right:0;z-index:1000;transition:.45s var(--ease)}
.nav{display:flex;align-items:center;justify-content:space-between;padding:18px 6vw;transition:.45s}
.site-header.scrolled .nav{padding:11px 6vw;
  background:color-mix(in srgb,var(--bg) 86%,transparent);backdrop-filter:blur(18px);
  border-bottom:1px solid var(--line)}
.logo{cursor:pointer;display:flex;align-items:center}
.logo img{height:46px;width:auto;transition:.4s}
.site-header.scrolled .logo img{height:40px}
[data-theme="dark"] .logo img{filter:brightness(0) invert(1) drop-shadow(0 0 1px rgba(0,0,0,.3))}
.nav-right{display:flex;align-items:center;gap:24px}
.navlinks{display:flex;gap:32px;align-items:center;list-style:none}
.navlinks a{color:var(--text-soft);text-decoration:none;font-size:.8rem;letter-spacing:.12em;
  text-transform:uppercase;font-weight:500;position:relative;padding:6px 0;cursor:pointer;transition:.3s}
.navlinks a::after{content:'';position:absolute;left:0;bottom:0;width:0;height:2px;background:var(--accent);transition:.4s}
.navlinks a:hover,.navlinks a.on{color:var(--text)}
.navlinks a:hover::after,.navlinks a.on::after{width:100%}
.nav-cta{padding:11px 24px;background:var(--accent);color:var(--on-accent);border:none;
  border-radius:var(--pill);font-family:var(--font-body);font-size:.8rem;letter-spacing:.08em;
  text-transform:uppercase;font-weight:600;cursor:pointer;transition:.4s;text-decoration:none;display:inline-block}
.nav-cta:hover{transform:translateY(-2px);box-shadow:0 12px 26px -10px rgba(7,77,154,.6)}
.burger{display:none;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;background:none;border:none;min-width:44px;min-height:44px;padding:6px;z-index:1100}
.burger span{width:26px;height:2px;background:var(--text);transition:.4s;border-radius:2px}

/* Public footer (minimal shell; full footer in Prompt 04) */
.site-footer{border-top:1px solid var(--line);background:var(--surface);padding:48px 6vw;margin-top:80px}
.site-footer .foot-brand img{height:40px}
[data-theme="dark"] .site-footer .foot-brand img{filter:brightness(0) invert(1)}
.site-footer small{color:var(--text-soft)}

/* Placeholder shell content (Prompt 01 only — replaced by real pages later) */
.placeholder{min-height:60vh;display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:160px 6vw 80px;gap:18px}
.placeholder .sec-title{font-size:clamp(2rem,4.5vw,3.2rem)}

/* ---------- CRM shell — Branding §6.7, prototype ---------- */
.app{display:flex;min-height:100vh}
.sidebar{width:262px;background:var(--sidebar);border-right:1px solid var(--line);padding:24px 16px;
  position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;z-index:100;transition:.4s}
.sb-logo{padding:0 8px 22px;margin-bottom:6px;border-bottom:1px solid rgba(60,109,164,.2)}
.sb-logo img{height:42px;filter:brightness(0) invert(1)}
.main{flex:1;margin-left:262px;min-width:0;transition:.4s}
.topbar{height:70px;border-bottom:1px solid var(--line);display:flex;align-items:center;
  justify-content:space-between;padding:0 30px;position:sticky;top:0;
  background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(16px);z-index:50}
.pg-title{font-family:var(--font-display);font-size:1.35rem;font-weight:700}
.tb-right{display:flex;align-items:center;gap:12px}
.icon-btn{width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--surface);
  color:var(--text-soft);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:1rem;transition:.3s}
.icon-btn:hover{border-color:var(--accent);color:var(--accent)}

/* CRM login shell (placeholder until Prompt 07) */
.crm-login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:40px;background:var(--bg)}
.crm-login-card{width:100%;max-width:420px;background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius);padding:40px;box-shadow:var(--shadow);text-align:center}
.crm-login-card img{height:54px;margin-bottom:22px}
[data-theme="dark"] .crm-login-card img{filter:brightness(0) invert(1)}
.crm-login-card h1{font-size:1.5rem;margin-bottom:10px}
.crm-login-card p{color:var(--text-soft);font-size:.95rem;line-height:1.6}

/* Reduced motion — Branding AX-5 / MO-3 */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;
    transition-duration:.001ms!important;scroll-behavior:auto!important}
}

/* Responsive nav — Branding §6.6. Aligned to the 900px layout breakpoint (was 860) so the nav
   and the page grids collapse together. */
@media(max-width:900px){
  .navlinks,.nav-cta{display:none}
  .burger{display:flex}
  .nav-right{gap:14px}
}
