/* ============= Shared stylesheet for every mockup page =============
   Ported from home-E-smoke.html so every subpage inherits the same
   brand tokens, nav, footer, section shells, animated smoke bg, and
   typography without duplicating 500 lines per file. Page-specific
   overrides live in each page's own <style> block. */

:root {
  --teal: #2ecbb6;
  --teal-soft: rgba(46,203,182,0.14);
  --ink: #0a0a0a;
  --paper: #efeae0;
  --paper-2: #e5dfd1;
  --line-dark: rgba(255,255,255,0.08);
  --line-light: rgba(0,0,0,0.08);
  --dim-on-dark: #ffffff;
  --dim-on-light: #4a4a4a;
  --muted-on-light: #6b6b6b;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #fff; background: var(--ink);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
section { position: relative; }

/* ============= Sticky nav ============= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 44px;
  background: rgba(10,10,10,0.55);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14.5px; letter-spacing: 0.2px;
  transition: background 220ms, color 220ms, border-color 220ms;
}
.nav.on-light {
  background: rgba(239,234,224,0.72);
  color: var(--ink);
  border-bottom-color: rgba(0,0,0,0.06);
}
.nav.on-light .brand,
.nav.on-light .nav-links a { color: var(--ink); }
.nav.on-light .cta { color: var(--ink); border-color: var(--teal); }
.brand {
  display: inline-flex; align-items: center; height: 52px;
  font-weight: 900; letter-spacing: -0.3px; font-size: 16px; color: #fff;
}
.brand-img { height: 100%; width: auto; display: block; }
.brand-light { display: none; }
.nav.on-light .brand-dark { display: none; }
.nav.on-light .brand-light { display: block; }
.nav-links {
  list-style: none; display: flex; gap: 26px; padding: 0; margin: 0;
  font-weight: 500;
  align-items: flex-start;  /* all nav items top-aligned */
}
.nav-links a { opacity: 1; }
.nav-links a:hover { color: var(--teal); }
/* Active nav link (the page you are currently on). A soft light teal
   so you can see where you are without competing with the brand teal. */
.nav-links a.active,
.nav-links a.active .l2 { color: #8adfd0; }
.nav.on-light .nav-links a.active,
.nav.on-light .nav-links a.active .l2 { color: #4a988a; }
/* Systems nav items - stacked two lines, same size, same colour,
   horizontally centred within their own container. */
.nav-links a.two-line {
  display: inline-flex; flex-direction: column;
  line-height: 1.15;
  text-align: center;
  align-items: center;
}
.nav-links a.two-line .l2 { color: inherit; opacity: 1; font-size: inherit; letter-spacing: inherit; margin-top: 1px; }
.cta {
  padding: 10px 18px; border: 1px solid var(--teal); border-radius: 999px;
  color: #fff; font-weight: 600; font-size: 14.5px;
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.cta:hover { background: var(--teal); color: #001915; border-color: var(--teal); }

/* Mobile menu button (hamburger) - hidden on desktop */
.nav-toggle { display: none; background: none; border: none; color: #fff; padding: 8px; cursor: pointer; }
.nav-toggle svg { display: block; }
@media (max-width: 900px) {
  .nav-links, .cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.mobile-open .nav-links {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: center; gap: 0;
    background: rgba(10,10,10,0.96); padding: 24px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav.mobile-open .nav-links a { padding: 14px 20px; font-size: 16px; }
  .nav.mobile-open .cta {
    display: inline-flex; margin: 12px auto;
  }
}

/* ============= Section shell ============= */
.sec { position: relative; z-index: 0; padding: 128px 44px; }
.sec.dark { background: var(--ink); color: #fff; }
.sec.light { background: var(--paper); color: var(--ink); --teal: #0e747a; }
.container { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; }
canvas.smoke-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
}

/* ============= Typography ============= */
h1, h2, h3, h4 { font-family: 'Inter', sans-serif; }

/* Small section eyebrow / label (uppercase teal, 17px). This is the
   smallest font used anywhere on the site - per Curtis's spec. */
.eyebrow {
  display: inline-block;
  font-size: 17px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 24px;
  line-height: 1.35;
}

/* Page hero - matches the home page hero. Fills the viewport (100vh)
   on desktop so no lower section is visible on page load. H1 uses the
   typing effect (see typing keyframes below); the lead paragraph fades
   in AFTER the H1 finishes typing (JS handles the sequencing). */
.page-hero {
  padding: 0 44px;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  gap: 44px;
  overflow: visible;
}
.page-hero h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(46px, 6.6vw, 88px);
  font-weight: 800; letter-spacing: -2.5px; line-height: 1.05;
  margin: 0;
  color: #fff;
  max-width: 1200px;
  padding: 0 16px;
  /* Hidden until the typing script rebuilds the innerHTML - prevents a
     flash of the fallback text on first paint. */
  opacity: 0;
}
.page-hero h1.built { opacity: 1; }
.page-hero h1 .accent { color: var(--teal); }

.page-hero .lead {
  margin: 0 auto;
  max-width: 720px;
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1.55;
  color: #fff;
  text-wrap: balance;
  padding: 0 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 2000ms ease-out, transform 2000ms ease-out;
}
.page-hero .lead.visible { opacity: 1; transform: translateY(0); }

/* Typing effect for hero H1 - matches home page (chat.output.systems
   TypingHeading.tsx). Each char span fades in via its own animation-
   delay computed at build time by the typing script. */
@keyframes typing-char-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.typing-char { opacity: 0; }
.typing-active .typing-char {
  animation-name: typing-char-fade-in;
  animation-duration: 160ms;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

/* Reduced-motion users skip the typing + fade sequence entirely. */
@media (prefers-reduced-motion: reduce) {
  .page-hero h1 { opacity: 1 !important; }
  .typing-char { opacity: 1 !important; animation: none !important; }
  .page-hero .lead { opacity: 1 !important; transform: none !important; }
}

/* Mobile: only the H1 is above the fold; the lead pushes below so the
   visitor has to scroll to see it (same trick as the home page). */
@media (max-width: 767px) {
  .page-hero {
    justify-content: flex-start;
    padding-top: 22vh;
    gap: 50vh;
  }
  .page-hero h1 { font-size: clamp(38px, 10vw, 60px); letter-spacing: -1.5px; }
  .page-hero .lead { font-size: 15px; padding: 0 16px; }
}

/* Section headings (h2) - big weight, teal accent word */
h2.section-h {
  font-family: 'Inter', sans-serif;
  font-size: clamp(36px, 4.6vw, 64px);
  font-weight: 800; letter-spacing: -1.8px; line-height: 1.08;
  margin: 0 0 24px;
  max-width: 900px;
  text-wrap: balance;
}
h2.section-h .accent { color: var(--teal); }

/* Body paragraph — same size and line-height as the hero subhead. */
.body-p {
  font-family: 'Inter', sans-serif;
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1.55;
  margin: 0 auto 20px;
  max-width: 720px;
  text-wrap: balance;
}
.sec.dark .body-p { color: #fff; }
.sec.light .body-p { color: var(--dim-on-light); }

/* ============= Site footer (ported from ai.output.systems) ============= */
.site-footer {
  position: relative; z-index: 10;
  background: var(--ink); color: #fff;
  border-top: 1px solid rgba(46,203,182,0.08);
  padding: 64px 44px 160px;
}
.site-footer-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; flex-direction: column;
  gap: 48px;
}
.site-footer-brand { display: flex; flex-direction: column; gap: 16px; }
.site-footer-logo img { height: 64px; width: auto; display: block; }
.site-footer-copy {
  font-size: 15px; line-height: 1.6; margin: 0; color: #fff;
}
.site-footer-nav {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.site-footer-nav a {
  color: #fff; white-space: nowrap; font-size: 16px;
  transition: color .2s;
}
.site-footer-nav a:hover { color: var(--teal); }
@media (min-width: 768px) {
  .site-footer-inner {
    flex-direction: row; align-items: flex-start; justify-content: space-between;
  }
  .site-footer-nav {
    flex-direction: row; align-items: center; gap: 28px;
  }
}

/* ============= Chat widget (bottom-right pill + expandable panel) ============= */
.chat-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 500;
  width: 102px; height: 102px; border-radius: 50%;
  background: var(--teal); color: #001915;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 26px rgba(46,203,182,0.35), 0 4px 12px rgba(0,0,0,0.45);
  transition: transform .2s;
  animation: chat-fab-pulse 2.6s ease-in-out infinite;
}
/* Label sitting above the FAB. Absolutely positioned so the flex layout
   inside the button stays untouched. Doesn't inherit the button's
   pulsing background because ::before renders its own box. */
.chat-fab::before {
  content: "Ask our AI receptionist a question";
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: #fff;
  background: rgba(13, 13, 13, 0.9);
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid rgba(46, 203, 182, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.chat-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 32px rgba(46,203,182,0.5), 0 6px 18px rgba(0,0,0,0.55); }
.chat-fab svg { width: 45px; height: 45px; }
.chat-fab.hidden { display: none; }
@keyframes chat-fab-pulse {
  0%, 100% {
    background: #2ecbb6;
    box-shadow: 0 8px 26px rgba(46,203,182,0.35), 0 4px 12px rgba(0,0,0,0.45);
  }
  50% {
    background: #7fe8dd;
    box-shadow: 0 10px 34px rgba(127,232,221,0.65), 0 4px 12px rgba(0,0,0,0.45);
  }
}
@media (prefers-reduced-motion: reduce) {
  .chat-fab { animation: none; }
}

.chat-panel {
  position: fixed; bottom: 22px; right: 22px; z-index: 501;
  width: min(400px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 44px));
  background: #0d0d0d;
  border: 1px solid rgba(46,203,182,0.32);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 8px 24px rgba(0,0,0,0.4);
  display: none;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  font-family: 'Inter', sans-serif;
}
.chat-panel.open { display: flex; }
.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(46,203,182,0.06), transparent);
}
.chat-header-title {
  font-weight: 700; font-size: 15px; letter-spacing: 0.2px;
  display: flex; align-items: center; gap: 10px;
}
.chat-status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 8px rgba(46,203,182,0.8);
}
.chat-close {
  background: none; border: none; color: rgba(255,255,255,0.7);
  cursor: pointer; padding: 4px; border-radius: 4px;
  transition: color .2s, background .2s;
}
.chat-close:hover { color: #fff; background: rgba(255,255,255,0.06); }
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 8px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.chat-msg {
  padding: 12px 16px; border-radius: 14px;
  font-size: 14.5px; line-height: 1.45;
  max-width: 82%;
  word-wrap: break-word;
}
.chat-msg.bot {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.94);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: var(--teal); color: #001915;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}
.chat-msg.typing {
  display: inline-flex; gap: 4px; padding: 14px 18px;
  background: rgba(255,255,255,0.06); border-radius: 14px;
  align-self: flex-start;
}
.chat-msg.typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.6);
  animation: chat-typing-bounce 1.2s infinite ease-in-out;
}
.chat-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-msg.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chat-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}
.chat-input-row {
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; gap: 10px; align-items: flex-end;
  background: rgba(0,0,0,0.3);
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-family: inherit; font-size: 14.5px;
  outline: none;
  resize: none;
  min-height: 40px; max-height: 120px;
}
.chat-input:focus { border-color: rgba(46,203,182,0.5); }
.chat-send {
  background: var(--teal); color: #001915;
  border: none; border-radius: 10px;
  padding: 10px 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s, background .2s;
}
.chat-send:hover:not(:disabled) { transform: translateY(-1px); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* Smaller mobile chat */
@media (max-width: 640px) {
  .chat-panel {
    width: calc(100vw - 16px);
    height: calc(100vh - 32px);
    bottom: 8px; right: 8px;
    border-radius: 14px;
  }
  .chat-fab { width: 90px; height: 90px; bottom: 16px; right: 16px; }
  .chat-fab svg { width: 40px; height: 40px; }
  .chat-fab::before { font-size: 12px; padding: 6px 12px; }
}

/* Utilities */
.text-center { text-align: center; }
.grid { display: grid; }
.stack-vert { display: flex; flex-direction: column; }
.hero-glow::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 800px 500px at 20% 30%, rgba(46,203,182,0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 100%, rgba(46,203,182,0.06), transparent 60%);
  z-index: -2;
}

/* Reduced motion — kill animations, keep content visible */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
