@font-face {
  font-family: "Inter var";
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/inter:vf@latest/latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  --ink: #1A2744;
  --ink-soft: #2C3A5A;
  --copper: #C45C26;
  --copper-dark: #9A461C;
  --copper-soft: #F3E4D8;
  --sand: #F4F1EA;
  --sand-deep: #E8E2D6;
  --white: #FFFEFB;
  --slate: #5A6478;
  --line: #D9D3C7;
  --ok: #1F7A4D;
  --warn: #B8860B;
  --danger: #B42318;
  --banner-h: 32px;
  --nav-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(26, 39, 68, 0.06), 0 8px 24px rgba(26, 39, 68, 0.08);
  --font: "Inter var", Inter, system-ui, -apple-system, sans-serif;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--slate); }
.section-inner { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.75rem 1.25rem; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: 0.15s ease;
}
.btn-primary { background: var(--copper); color: var(--white); }
.btn-primary:hover { background: var(--copper-dark); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink); background: var(--white); }
.btn-ghost { background: rgba(255,255,255,0.12); color: var(--white); border-color: rgba(255,255,255,0.25); }
.btn-ghost:hover { background: rgba(255,255,255,0.2); }

/* Demo banner */
.demo-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--banner-h); background: var(--ink); color: var(--sand);
  overflow: hidden; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.02em;
}
.marquee { height: 100%; display: flex; align-items: center; }
.marquee-track {
  display: flex; width: max-content; animation: marquee 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-chunk { white-space: nowrap; padding-right: 2.5rem; opacity: 0.9; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* Header */
.site-header {
  position: fixed; top: var(--banner-h); left: 0; right: 0; z-index: 90;
  height: var(--nav-h); background: rgba(244, 241, 234, 0.92);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(100% - 2.5rem, var(--max)); margin-inline: auto; height: 100%;
  display: flex; align-items: center; gap: 1.5rem;
}
.logo { display: flex; align-items: center; gap: 0.65rem; font-weight: 700; color: var(--ink); }
.logo-mark { width: 34px; height: 34px; flex-shrink: 0; }
.logo-word { font-size: 1.05rem; letter-spacing: -0.01em; }
.main-nav { display: flex; gap: 1.25rem; margin-left: auto; font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); }
.main-nav a:hover { color: var(--copper); }
#employeeLogin {
  margin-left: 0.5rem; padding: 0.55rem 1rem; border-radius: 999px;
  background: var(--ink); color: var(--white); font-size: 0.88rem; font-weight: 600;
}
#employeeLogin[disabled], #employeeLogin[aria-disabled="true"] {
  opacity: 0.45; cursor: not-allowed; pointer-events: none;
}
#employeeLogin[data-active="true"] { opacity: 1; cursor: pointer; pointer-events: auto; }
#employeeLogin[data-active="true"]:hover { background: var(--ink-soft); }

body { padding-top: calc(var(--banner-h) + var(--nav-h)); }

/* Hero */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 85% 20%, rgba(196, 92, 38, 0.12), transparent 55%),
    linear-gradient(165deg, var(--sand) 0%, var(--sand-deep) 100%);
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  width: min(100% - 2.5rem, var(--max)); margin-inline: auto;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center;
}
.hero-kicker {
  display: inline-block; font-size: 0.78rem; font-weight: 650; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--copper); margin-bottom: 0.85rem;
}
.hero-lead { font-size: 1.1rem; max-width: 38ch; margin-bottom: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.75rem; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
  padding-top: 1.25rem; border-top: 1px solid var(--line); max-width: 420px;
}
.hero-stats strong { display: block; font-size: 1.25rem; color: var(--ink); font-weight: 700; }
.hero-stats span { font-size: 0.78rem; color: var(--slate); }
.hero-visual {
  position: relative; border-radius: calc(var(--radius) + 4px);
  overflow: hidden; box-shadow: var(--shadow); background: var(--ink);
  aspect-ratio: 5 / 4; min-height: 280px;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-card {
  position: absolute; left: 1rem; right: 1rem; bottom: 1rem;
  background: rgba(255, 254, 251, 0.94); backdrop-filter: blur(8px);
  border-radius: var(--radius-sm); padding: 0.85rem 1rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem;
  font-size: 0.78rem; color: var(--slate); box-shadow: var(--shadow);
}
.hero-card strong { display: block; color: var(--ink); font-size: 0.95rem; }

/* Signature: Workforce Pulse */
.pulse { padding: 3.5rem 0; background: var(--white); }
.pulse .section-sub { max-width: 52ch; margin-bottom: 1.75rem; }
.pulse-board {
  display: grid; grid-template-columns: 280px 1fr; gap: 1.25rem;
  background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow);
}
.pulse-controls { display: flex; flex-direction: column; gap: 0.85rem; }
.pulse-controls label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.35rem; }
.pulse-controls select, .pulse-controls input {
  width: 100%; padding: 0.65rem 0.75rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
}
.pulse-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
.metric {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem 1.1rem; min-height: 108px;
}
.metric .label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate); }
.metric .value { font-size: 1.65rem; font-weight: 700; color: var(--ink); margin: 0.25rem 0; letter-spacing: -0.02em; }
.metric .delta { font-size: 0.82rem; font-weight: 600; }
.metric .delta.up { color: var(--ok); }
.metric .delta.down { color: var(--danger); }
.metric .note { font-size: 0.78rem; color: var(--slate); margin: 0; }
.pulse-foot {
  grid-column: 1 / -1; font-size: 0.75rem; color: var(--slate);
  padding-top: 0.35rem; border-top: 1px dashed var(--line); margin-top: 0.25rem;
}

/* Demo thesis */
.thesis { padding: 3.25rem 0; background: var(--ink); color: var(--sand); }
.thesis h2 { color: var(--white); }
.thesis .section-sub { color: rgba(244, 241, 234, 0.72); max-width: 48ch; }
.thesis-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.25rem; margin-top: 1.5rem;
}
.trace {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); padding: 1.15rem 1.25rem;
}
.trace-row {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 0.75rem; align-items: start;
  padding: 0.7rem 0; border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.9rem;
}
.trace-row:last-child { border-bottom: 0; padding-bottom: 0; }
.trace-dot {
  width: 10px; height: 10px; border-radius: 50%; margin-top: 0.35rem;
  background: var(--copper); box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.25);
}
.trace-dot.ok { background: #3DCC8A; box-shadow: 0 0 0 3px rgba(61, 204, 138, 0.2); }
.trace-dot.block { background: #F07167; box-shadow: 0 0 0 3px rgba(240, 113, 103, 0.2); }
.trace-title { color: var(--white); font-weight: 600; }
.trace-meta { color: rgba(244, 241, 234, 0.6); font-size: 0.8rem; margin-top: 0.15rem; }
.trace-badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.25rem 0.5rem; border-radius: 999px; align-self: center;
  background: rgba(255,255,255,0.1); color: var(--sand);
}
.trace-badge.allow { background: rgba(61, 204, 138, 0.18); color: #8EF0C0; }
.trace-badge.deny { background: rgba(240, 113, 103, 0.18); color: #FFB4AE; }
.access-card {
  background: var(--white); color: var(--ink); border-radius: var(--radius);
  padding: 1.25rem; display: flex; flex-direction: column; gap: 0.85rem;
}
.access-card h3 { margin: 0; }
.access-card p { margin: 0; font-size: 0.92rem; }
.access-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem;
  font-size: 0.8rem;
}
.access-meta div {
  background: var(--sand); border-radius: var(--radius-sm); padding: 0.65rem 0.75rem;
}
.access-meta strong { display: block; color: var(--ink); font-size: 0.88rem; margin-top: 0.15rem; }
.demo-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--copper); margin-bottom: 0.5rem;
}

/* Modules */
.modules { padding: 3.5rem 0; }
.module-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem;
}
.module-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem 1.25rem; min-height: 170px;
  transition: border-color 0.15s, transform 0.15s;
}
.module-card:hover { border-color: var(--copper); transform: translateY(-2px); }
.module-icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--copper-soft); color: var(--copper); margin-bottom: 0.85rem;
}
.module-card h3 { margin-bottom: 0.35rem; }
.module-card p { font-size: 0.92rem; margin: 0; }

/* Global + outcomes */
.global { padding: 3.25rem 0; background: var(--white); border-block: 1px solid var(--line); }
.global-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; margin-top: 1.25rem;
}
.hub-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; }
.hub-list li {
  display: grid; grid-template-columns: 1fr auto; gap: 0.5rem;
  padding: 0.85rem 1rem; background: var(--sand); border-radius: var(--radius-sm);
  border: 1px solid var(--line); font-size: 0.92rem;
}
.hub-list strong { color: var(--ink); }
.hub-list span { color: var(--slate); font-size: 0.82rem; }
.outcome-grid { display: grid; gap: 0.75rem; }
.outcome {
  padding: 1rem 1.1rem; border-left: 3px solid var(--copper);
  background: var(--sand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.outcome strong { display: block; color: var(--ink); margin-bottom: 0.2rem; }
.outcome p { margin: 0; font-size: 0.9rem; }

/* CTA */
.cta {
  padding: 3.5rem 0; text-align: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(196, 92, 38, 0.18), transparent 45%),
    var(--ink);
  color: var(--sand);
}
.cta h2 { color: var(--white); }
.cta p { color: rgba(244, 241, 234, 0.72); max-width: 42ch; margin-inline: auto 1.25rem; margin: 0 auto 1.5rem; }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; }

/* Footer */
.site-footer {
  background: #121A2E; color: rgba(244, 241, 234, 0.7); padding: 2.5rem 0 1.5rem;
  font-size: 0.88rem;
}
.footer-inner {
  width: min(100% - 2.5rem, var(--max)); margin-inline: auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
}
.site-footer .logo-word { color: var(--white); }
.site-footer a:hover { color: var(--white); }
.footer-col h4 {
  margin: 0 0 0.75rem; color: var(--white); font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.footer-col a, .footer-col p { display: block; margin-bottom: 0.45rem; color: inherit; }
.footer-bottom {
  width: min(100% - 2.5rem, var(--max)); margin: 1.75rem auto 0;
  padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.78rem;
}

/* Chat widget — chassis toggles .open (not the hidden attribute) */
#chatLaunch {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 80;
  border: 0; border-radius: 999px; padding: 0.85rem 1.15rem;
  background: var(--copper); color: var(--white); font-weight: 650;
  box-shadow: 0 8px 24px rgba(196, 92, 38, 0.35); cursor: pointer;
}
#chatLaunch:hover { background: var(--copper-dark); }
#chatPanel {
  position: fixed; right: 1.25rem; bottom: 4.75rem; z-index: 85;
  width: min(380px, calc(100vw - 2rem)); height: min(520px, calc(100vh - 8rem));
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  visibility: hidden; transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
#chatPanel.open,
#chatPanel.open[hidden] {
  opacity: 1; transform: translateY(0); pointer-events: auto; visibility: visible;
  display: flex !important;
}
#chatPanel header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1rem; background: var(--ink); color: var(--white); font-weight: 650;
}
#chatClose {
  border: 0; background: transparent; color: var(--white); font-size: 1.35rem;
  line-height: 1; cursor: pointer; opacity: 0.8;
}
#chatLog { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.65rem; background: var(--sand); }
.msg {
  max-width: 88%; padding: 0.7rem 0.85rem; border-radius: 12px;
  font-size: 0.9rem; line-height: 1.45; white-space: pre-wrap;
}
.msg.user { align-self: flex-end; background: var(--ink); color: var(--white); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.msg.system { align-self: center; background: var(--copper-soft); color: var(--copper-dark); font-size: 0.82rem; max-width: 95%; text-align: center; }
.msg.typing { opacity: 0.7; font-style: italic; }
#chatForm {
  display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--line); background: var(--white);
}
#chatInput {
  flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 0.65rem 0.9rem;
  background: var(--sand); color: var(--ink);
}
#chatSend {
  border: 0; border-radius: 999px; padding: 0.65rem 1rem;
  background: var(--copper); color: var(--white); font-weight: 600; cursor: pointer;
}
#chatSend:disabled { opacity: 0.5; cursor: not-allowed; }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner, .pulse-board, .thesis-grid, .global-grid, .footer-inner { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .pulse-results { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .module-grid, .pulse-results, .hero-stats, .access-meta { grid-template-columns: 1fr; }
  .hero { padding: 2.75rem 0 2.25rem; }
  .hero-visual { min-height: 220px; }
}
