@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=Archivo+Narrow:wght@600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

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

:root {
  /* Gunmetal system */
  --bg: #0f1214;
  --panel: #14181b;
  --panel-2: #121618;
  --sunk: #0b0e10;
  --ink: #e7ebee;
  --ink-dim: #a7b2b9;
  --muted: #7d8a93;
  --silver: #aab4bf;
  --silver-edge: #8ea1ad;
  --cta: #0b0b0b;
  /* Sanctioned live-signal accent — used ONLY for the "on the mat now" markers/banner,
     nowhere else (same exception basis as the caution-gold competition pill). rgb 79,180,119. */
  --live: #4fb477;
  --hair: rgba(255,255,255,0.09);
  --hair-2: rgba(255,255,255,0.14);
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Legacy semantic vars remapped to dark so not-yet-rebuilt pages degrade gracefully */
  --white: #14181b;
  --off-white: #121618;
  --black: #e7ebee;
  --charcoal: #0b0b0b;
  --charcoal-dark: #000000;
  --gray: #8a96a0;
  --light-gray: #2a3238;
  --border: rgba(255,255,255,0.10);
  --surface: #121618;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--ink); text-decoration: none; }
::selection { background: #6f8794; color: #0f1214; }

/* NAV */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 16px 40px;
  background: rgba(15,18,20,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 56px; width: auto; display: block; }
.logo-word {
  font-weight: 800; font-size: 18px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}
nav ul { display: flex; gap: 30px; list-style: none; }
nav a.navlink {
  color: #aab5bc; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  transition: color 0.2s;
}
nav a.navlink:hover, nav a.navlink.active { color: #ffffff; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-phone { font-family: var(--mono); font-size: 13px; color: #9aa6ad; letter-spacing: 0.02em; transition: color 0.2s; }
.nav-phone:hover { color: #ffffff; }
.nav-cta {
  padding: 11px 20px; background: var(--cta); border: 1px solid var(--silver-edge); color: #ffffff;
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s;
}
.nav-cta:hover { background: #14181b; border-color: #ffffff; color: #ffffff; }
/* Hamburger toggle: hidden by default (desktop + no-JS); shown only for html.js below the nav
   breakpoint. .nav-menu is a transparent wrapper so its children join the nav layout (the grid on
   desktop, the flex bar on no-JS mobile), and become a full-screen overlay when the drawer opens. */
.nav-toggle { display: none; background: none; border: none; margin: 0; padding: 0 0.3rem; cursor: pointer;
  color: var(--ink); font-size: 1.6rem; line-height: 1; }
.nav-menu { display: contents; }

/* DESKTOP NAV (>=1000px): scaled-up sizes (wordmark 22, links 17, phone/CTA 16) in the integrated
   grid band (110px logo left, phone/CTA + links stacked right). Breakpoint is 1000px, not 861:
   the grid needs >=982px to hold one clean band, so below 1000px the hamburger (C2) takes over. */
@media (min-width: 1000px) {
  .logo-word { font-size: 22px; }
  nav a.navlink { font-size: 17px; }
  .nav-phone { font-size: 16px; }
  .nav-cta { font-size: 16px; }
  .logo img { height: 110px; }
  /* One integrated band: the 110px logo is pinned left and spans the full band height; the nav fills
     the space to its right as two stacked right-aligned lines (phone + CTA on top, the 5 links below).
     No divider. CSS grid: column 1 = logo (spans both rows), column 2 = the two nav lines. */
  nav { display: grid; grid-template-columns: auto 1fr; align-items: center;
        column-gap: 32px; row-gap: 10px; padding: 16px 28px; }
  .logo { grid-column: 1; grid-row: 1 / 3; }
  .nav-right { grid-column: 2; grid-row: 1; justify-self: end; gap: 16px; }
  nav ul { grid-column: 2; grid-row: 2; justify-self: end; gap: 22px; }
}

/* GRAND-OPENING ANNOUNCEMENT BAR (TEMPORARY — remove after 2026-09-14; injected in shared.js).
   Non-sticky strip above the sticky nav: it scrolls away while the nav still pins to top:0. Its
   height is measured at runtime into --announce-h so the hero's 100vh fill calc stays exact. */
.announce-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 6px 22px; padding: 8px 40px;
  background: var(--panel); border-bottom: 1px solid var(--hair);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  line-height: 1.45;
}
.announce-msg { color: var(--silver); }
.announce-cta {
  color: var(--silver); white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,0.28);
  padding-bottom: 2px; transition: color 0.2s, border-color 0.2s;
}
.announce-cta:hover { color: #ffffff; border-color: #ffffff; }

/* BUTTONS (tune-a: primary = black block + silver border + white; secondary = hairline ghost) */
.btn {
  display: inline-block; padding: 16px 30px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--cta); border: 1px solid var(--silver-edge); color: #ffffff; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { background: #14181b; border-color: #ffffff; }
.btn-ghost {
  display: inline-block; padding: 16px 30px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  background: transparent; border: 1px solid rgba(255,255,255,0.2); color: var(--ink);
  transition: background 0.2s, border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(255,255,255,0.05); }

/* LABELS */
.section-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1rem;
}

/* GETTING-HERE / driving directions — shared by the homepage map section (.map-head) and
   contact.html so both render from one source of style. Diamond marker matches the .prog-ul idiom. */
.directions { margin: 0; }
.directions-h { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.directions-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.directions-list li { position: relative; padding-left: 18px; font-size: 13px; line-height: 1.45; color: var(--ink-dim); }
.directions-list li::before { content: ''; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; background: #6f8794; transform: rotate(45deg); }
/* The map header is a wrapping flex row; give the directions block its own full-width line there. */
.map-head .directions { flex: 0 0 100%; margin-top: 10px; }

/* PAGE HERO (other pages) */
.page-hero { padding: 5rem 3rem 4rem; border-bottom: 1px solid var(--hair); background: var(--panel-2); }
.page-hero h1 { font-size: clamp(2.5rem, 4vw, 3.8rem); font-weight: 800; line-height: 1.1; margin-bottom: 1rem; color: var(--ink); letter-spacing: -0.02em; }
.page-hero h1 em { font-family: 'Archivo Narrow', 'Archivo', sans-serif; font-style: italic; color: #eef2f4; }
.page-hero p { font-size: 0.95rem; color: var(--ink-dim); max-width: 500px; line-height: 1.7; }

/* FOOTER */
footer { border-top: 1px solid var(--hair); background: var(--sunk); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; padding: 64px 40px 48px; }
.footer-brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand-row img { height: 110px; width: auto; display: block; }
.footer-wordmark { font-weight: 800; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; }
.footer-brand p { max-width: 34ch; font-size: 14px; line-height: 1.6; color: var(--muted); }
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-h { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: #5e6a72; text-transform: uppercase; }
.footer-col a { font-size: 14px; color: var(--ink-dim); transition: color 0.2s; }
.footer-col a:hover { color: #ffffff; }
.footer-addr { font-size: 14px; color: var(--ink-dim); line-height: 1.6; }
.footer-sub { font-size: 13px; color: var(--muted); }
.footer-phone { font-family: var(--mono); font-size: 14px; color: var(--ink-dim); }
.footer-follow { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.footer-follow-h { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: #5e6a72; text-transform: uppercase; }
.footer-social { display: flex; gap: 16px; }
.footer-social a { display: inline-flex; color: var(--silver); transition: color 0.2s; }
.footer-social a:hover { color: #ffffff; }
.footer-social svg { width: 20px; height: 20px; display: block; }
.footer-bar {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 20px 40px; border-top: 1px solid rgba(255,255,255,0.07);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: #5e6a72;
}

/* CHAT WIDGET (gunmetal) */
#chat-bubble {
  position: fixed; bottom: 2rem; right: 2rem; width: 52px; height: 52px;
  background: var(--cta); border: 1px solid var(--silver-edge); border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 9999;
  transition: transform 0.2s, background 0.2s; box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
#chat-bubble:hover { background: #14181b; transform: scale(1.05); }
#chat-bubble svg { width: 24px; height: 24px; fill: var(--ink); }

#chat-window {
  position: fixed; bottom: 5.5rem; right: 2rem; width: 360px; height: 500px;
  background: var(--panel); border: 1px solid var(--hair-2); border-radius: 6px;
  display: flex; flex-direction: column; z-index: 9998; overflow: hidden;
  transition: opacity 0.2s, transform 0.2s; transform-origin: bottom right;
  box-shadow: 0 12px 48px rgba(0,0,0,0.6);
}
#chat-window.hidden { opacity: 0; transform: scale(0.92); pointer-events: none; }
.chat-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--hair); display: flex; align-items: center; gap: 10px; background: var(--panel-2); }
.chat-avatar {
  width: 34px; height: 34px; background: var(--cta); border: 1px solid var(--silver-edge); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500; color: var(--ink); flex-shrink: 0; letter-spacing: 0.02em;
}
.chat-header-name { font-size: 0.85rem; font-weight: 700; color: var(--ink); letter-spacing: 0.02em; }
.chat-header-status { font-family: var(--mono); font-size: 0.68rem; color: #6f8794; display: flex; align-items: center; gap: 4px; }
.status-dot { width: 6px; height: 6px; background: #6f8794; border-radius: 50%; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; background: var(--panel); }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--light-gray); border-radius: 2px; }
.msg { max-width: 85%; padding: 0.65rem 0.9rem; border-radius: 8px; font-size: 0.84rem; line-height: 1.5; }
.msg-bot { background: var(--panel-2); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 3px; border: 1px solid var(--hair); }
.msg-user { background: var(--cta); border: 1px solid var(--silver-edge); color: #ffffff; align-self: flex-end; border-bottom-right-radius: 3px; }
.msg-typing { background: var(--panel-2); align-self: flex-start; border-bottom-left-radius: 3px; padding: 0.75rem 1rem; border: 1px solid var(--hair); }
.typing-dots { display: flex; gap: 4px; align-items: center; }
.typing-dots span { width: 6px; height: 6px; background: var(--muted); border-radius: 50%; animation: bounce 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0);}30%{transform:translateY(-5px);} }
.chat-input-area { padding: 0.85rem; border-top: 1px solid var(--hair); display: flex; gap: 8px; background: var(--panel-2); }
#chat-input {
  flex: 1; background: var(--panel); border: 1px solid var(--hair-2); border-radius: 6px;
  padding: 0.55rem 0.85rem; color: var(--ink); font-family: 'Archivo', sans-serif; font-size: 0.84rem;
  outline: none; resize: none; transition: border-color 0.2s;
}
#chat-input:focus { border-color: var(--silver-edge); }
#chat-input::placeholder { color: var(--muted); }
#chat-send {
  width: 36px; height: 36px; background: var(--cta); border: 1px solid var(--silver-edge); border-radius: 6px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.2s; align-self: flex-end;
}
#chat-send:hover { background: #14181b; }
#chat-send svg { width: 16px; height: 16px; fill: var(--ink); }
.chat-disclaimer { text-align: center; font-family: var(--mono); font-size: 0.6rem; color: var(--muted); padding: 0.4rem 1rem 0.6rem; background: var(--panel-2); }

/* NAV HAMBURGER (<1000px): the grid band needs >=982px, so below 1000px the nav collapses to a
   hamburger. html.js => bar is logo + toggle, the menu opens as a full-screen overlay. The ungated
   rules below are a defensive inline fallback; note the nav is JS-injected, so no-JS renders no nav
   at all (site-wide, pre-existing), not this fallback. */
@media (max-width: 999px) {
  /* Make the sticky header actually pin on mobile. The nav is already position:sticky, but it can
     only stick within its parent's box, and its parent is the #site-nav wrapper (exactly nav-height
     tall), so it scrolls away with the wrapper. display:contents dissolves that wrapper so the nav
     sticks within <body> (full page height). overflow-x:clip keeps the h-scroll clipped without
     making <body> a scroll container (which would also break sticky). Desktop keeps both as-is. */
  #site-nav { display: contents; }
  body { overflow-x: clip; }
  /* Effectively-opaque bar so page content can't bleed through while it's pinned over the scroll. */
  nav { flex-wrap: wrap; gap: 0.75rem; padding: 14px 1.25rem; background: rgba(15,18,20,0.98); }
  /* Keep the announcement bar's side padding aligned with the mobile nav. */
  .announce-bar { padding-left: 1.25rem; padding-right: 1.25rem; }
  /* Defensive inline layout (only if the nav ever rendered without html.js): links on their own row. */
  nav ul { order: 3; width: 100%; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.1rem; padding: 0.6rem 0 0; border-top: 1px solid var(--hair); }
  .nav-right { order: 2; }
  /* html.js: collapse to the hamburger. */
  html.js .nav-toggle { display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 44px; margin-left: auto; position: relative; z-index: 600; }
  html.js .nav-menu { display: none; }
  html.js nav.nav-open .nav-menu {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.25rem;
    position: fixed; inset: 0; height: 100vh; height: 100dvh; z-index: 500;
    padding: 6rem 2rem 2rem; overflow-y: auto;
    background: rgba(15,18,20,0.97); backdrop-filter: blur(10px);
  }
  html.js nav.nav-open .nav-menu ul { order: 0; width: auto; flex-direction: column; align-items: center;
    gap: 1.75rem; padding: 0; border-top: none; }
  html.js nav.nav-open .nav-menu .nav-right { order: 0; flex-direction: column; align-items: center; gap: 1.5rem; }
  html.js nav.nav-open .nav-menu .navlink { font-size: 1.25rem; }
  html.js nav.nav-open .nav-menu .nav-phone { font-size: 1rem; }
  html.js nav.nav-open .nav-menu .nav-cta { font-size: 0.95rem; padding: 0.9rem 1.6rem; }
}

/* MOBILE */
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2.5rem 1.25rem; }
  .footer-bar { padding: 1rem 1.25rem; }
  #chat-window { width: calc(100vw - 2rem); right: 1rem; bottom: 5rem; height: 70vh; }
  #chat-bubble { bottom: 1.25rem; right: 1.25rem; }
  .page-hero { padding: 3rem 1.25rem 2.5rem; }
}
/* Announcement bar: once the message + link no longer fit one line, center them so the text
   wraps to two clean lines with no horizontal overflow (TEMPORARY — remove after 2026-09-14). */
@media (max-width: 560px) {
  .announce-bar { justify-content: center; text-align: center; gap: 4px 14px; }
}
@media (max-width: 520px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* SCROLL-REVEAL (shared module; inert unless a page opts in).
   A page activates it by (1) adding `js` to <html> in <head> and (2) tagging
   elements with [data-reveal]. With no [data-reveal] on the page, and no `js`
   class, none of these rules match, so every other page renders unchanged.
   No-JS: `js` is never set, so tagged content stays fully visible and static.
   Reduced-motion: revealed immediately with no transform/transition. */
html.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js [data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* COUNT-UP (shared module; inert unless a page hooks [data-countup]).
   tabular-nums keeps every digit the same width so the tween doesn't wobble; the
   module also locks a min-width in JS before counting. No JS => the literal number
   is shown, static (this rule only affects digit metrics, never the value). */
[data-countup] { font-variant-numeric: tabular-nums; }
