:root {
  color-scheme: dark;
  --ink: #11140f;
  --ink-2: #171b14;
  --paper: #f5f0df;
  --muted: #b8b39f;
  --line: rgba(245, 240, 223, 0.16);
  --lime: #c9ff4a;
  --blue: #4cc9f0;
  --red: #ff5b4a;
  --yellow: #f8c537;
  --slate: #a8b3a0;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 18%, rgba(201, 255, 74, 0.13), transparent 24rem),
    radial-gradient(circle at 82% 12%, rgba(76, 201, 240, 0.11), transparent 26rem),
    linear-gradient(135deg, #11140f 0%, #171b14 48%, #0e120e 100%);
  color: var(--paper);
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(245, 240, 223, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 240, 223, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 76%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}

.system-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 10;
  display: grid;
  width: min(calc(100% - 32px), var(--max));
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 20, 15, 0.74);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.brand,
.nav-cta,
.main-nav a,
.button {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(201, 255, 74, 0.65);
  border-radius: 7px;
  background: rgba(201, 255, 74, 0.12);
  color: var(--lime);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a,
.nav-cta {
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.main-nav a:hover,
.nav-cta:hover {
  background: rgba(245, 240, 223, 0.08);
  color: var(--paper);
}

.nav-cta {
  justify-self: end;
  border: 1px solid rgba(201, 255, 74, 0.45);
  color: var(--lime);
}

.hero {
  min-height: 100svh;
  padding: 146px 0 70px;
}

.hero-grid,
.section,
.contact-section,
.site-footer {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

.hero-grid {
  display: grid;
  min-height: calc(100svh - 220px);
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.62fr);
  align-items: center;
  gap: 48px;
}

.hero-copy {
  max-width: 790px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--lime);
  font-size: 0.79rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 24px;
  font-family: "Aptos Display", "Segoe UI", sans-serif;
  font-size: clamp(2.5rem, 4.25vw, 4.05rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 2.25vw, 2.35rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.08rem;
  line-height: 1.1;
}

.hero-lead {
  max-width: 590px;
  margin-bottom: 32px;
  color: #ddd7c2;
  font-size: clamp(0.98rem, 1.35vw, 1.12rem);
}

.hero-lead span {
  display: inline;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 13px 18px;
  font-weight: 900;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  border: 1px solid var(--lime);
  background: var(--lime);
  color: var(--ink);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(245, 240, 223, 0.06);
  color: var(--paper);
}

.signal-panel {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(245, 240, 223, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 240, 223, 0.12), rgba(245, 240, 223, 0.035)),
    rgba(17, 20, 15, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.signal-panel::before {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  content: "";
  background: linear-gradient(135deg, rgba(201, 255, 74, 0.38), transparent 38%, rgba(76, 201, 240, 0.22));
}

.panel-topline,
.metric-strip {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.panel-topline span:last-child {
  color: var(--lime);
}

.signal-stack {
  display: grid;
  gap: 10px;
  margin: 72px 0;
}

.signal-row {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(17, 20, 15, 0.56);
}

.signal-row span,
.metric-strip span,
.card-index,
.case-meta,
dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-row strong {
  color: var(--paper);
  font-size: 1.04rem;
}

.metric-strip {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.metric-strip div {
  display: grid;
  gap: 3px;
}

.metric-strip strong {
  color: var(--paper);
  font-size: 1.8rem;
  line-height: 1;
}

.section {
  padding: 88px 0;
  scroll-margin-top: 132px;
}

.intro-band {
  padding: 34px 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(245, 240, 223, 0.06);
}

.intro-band p {
  max-width: 1100px;
  margin: 0;
  font-size: clamp(1rem, 1.35vw, 1.28rem);
  font-weight: 800;
  line-height: 1.32;
}

.section-heading {
  display: grid;
  max-width: 760px;
  gap: 10px;
  margin-bottom: 34px;
}

.section-heading.compact {
  max-width: 660px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-card,
.case-card,
.audience-list article,
.process-list li,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(245, 240, 223, 0.055);
}

.service-card {
  min-height: 276px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.service-card::after {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 78px;
  height: 78px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.2;
}

.service-card h3 {
  margin-top: 78px;
  font-size: 1.2rem;
}

.service-card p,
.case-card p,
.audience-list p,
.process-list p,
.capability-copy p,
.faq-list p,
.contact-panel p {
  margin-bottom: 0;
  color: #cfc8b2;
}

.accent-lime { color: var(--lime); }
.accent-blue { color: var(--blue); }
.accent-red { color: var(--red); }
.accent-yellow { color: var(--yellow); }
.accent-slate { color: var(--slate); }
.accent-ink { color: var(--paper); }

.audience-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 42px;
  align-items: start;
}

.audience-list {
  display: grid;
  gap: 12px;
}

.audience-list article {
  padding: 22px;
}

.audience-list h3 {
  margin-bottom: 8px;
}

.cases-section {
  border-top: 1px solid var(--line);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.case-card {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(245, 240, 223, 0.08), rgba(245, 240, 223, 0.035));
}

.case-card h3 {
  margin-top: 36px;
  font-size: 1.28rem;
}

.case-card dl {
  display: grid;
  gap: 12px;
  margin: auto 0 0;
  padding-top: 28px;
}

.case-card dl div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.case-card dd {
  margin: 4px 0 0;
  color: var(--paper);
  font-weight: 800;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  min-height: 240px;
  padding: 22px;
}

.process-list span {
  display: inline-flex;
  margin-bottom: 54px;
  color: var(--lime);
  font-weight: 900;
}

.capabilities-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.capability-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.capability-matrix span {
  display: grid;
  min-height: 74px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(17, 20, 15, 0.5);
  color: var(--paper);
  font-weight: 900;
}

.faq-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 42px;
  align-items: start;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  padding: 20px 22px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 900;
}

.faq-list p {
  padding-top: 14px;
}

.contact-section {
  padding: 80px 0 40px;
}

.contact-panel {
  min-height: 420px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(201, 255, 74, 0.32);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 20%, rgba(201, 255, 74, 0.2), transparent 20rem),
    linear-gradient(135deg, rgba(245, 240, 223, 0.12), rgba(245, 240, 223, 0.04));
  box-shadow: var(--shadow);
}

.contact-panel h2 {
  max-width: 760px;
}

.contact-panel p {
  max-width: 700px;
  margin-top: 22px;
  margin-bottom: 30px;
  font-size: 1.18rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: inline-grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(201, 255, 74, 0.62);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(201, 255, 74, 0.2), rgba(76, 201, 240, 0.12)),
    rgba(17, 20, 15, 0.9);
  color: var(--lime);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  letter-spacing: 0;
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.chat-launcher:hover {
  transform: translateY(-3px);
  border-color: var(--lime);
}

.chat-launcher-status {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 16px rgba(76, 201, 240, 0.9);
}

.chat-panel {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 29;
  width: min(430px, calc(100vw - 24px));
  max-height: min(720px, calc(100svh - 118px));
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.chat-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-shell {
  display: grid;
  height: min(720px, calc(100svh - 118px));
  min-height: 560px;
  grid-template-rows: auto 1fr auto auto auto;
  overflow: hidden;
  border: 1px solid rgba(245, 240, 223, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 0%, rgba(201, 255, 74, 0.18), transparent 15rem),
    radial-gradient(circle at 100% 80%, rgba(76, 201, 240, 0.18), transparent 16rem),
    rgba(17, 20, 15, 0.94);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(22px);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.chat-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--lime);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-header h2 {
  font-size: 1.02rem;
  line-height: 1.15;
}

.chat-icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(245, 240, 223, 0.06);
  color: var(--paper);
  cursor: pointer;
  font: inherit;
  font-size: 1.3rem;
  line-height: 1;
}

.chat-messages {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 18px;
  scrollbar-color: rgba(201, 255, 74, 0.45) transparent;
}

.chat-message {
  width: fit-content;
  max-width: 92%;
  padding: 12px 13px;
  border: 1px solid rgba(245, 240, 223, 0.12);
  border-radius: 8px;
  color: #eee8d4;
  font-size: 0.94rem;
  line-height: 1.42;
  white-space: pre-wrap;
}

.chat-message.assistant {
  align-self: flex-start;
  background: rgba(245, 240, 223, 0.07);
}

.chat-message.user {
  align-self: flex-end;
  border-color: rgba(201, 255, 74, 0.34);
  background: rgba(201, 255, 74, 0.14);
  color: var(--paper);
}

.chat-message.is-streaming::after {
  display: inline-block;
  width: 0.48em;
  height: 1em;
  margin-left: 2px;
  border-right: 2px solid var(--lime);
  content: "";
  vertical-align: -0.12em;
  animation: chat-caret 900ms steps(1) infinite;
}

.chat-verification {
  display: grid;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
}

.chat-verification[hidden],
.chat-suggestions[hidden] {
  display: none;
}

.chat-verification label {
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 850;
}

.chat-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.chat-inline input,
.chat-composer textarea {
  width: 100%;
  border: 1px solid rgba(245, 240, 223, 0.17);
  border-radius: 7px;
  background: rgba(17, 20, 15, 0.72);
  color: var(--paper);
  font: inherit;
}

.chat-inline input {
  min-height: 42px;
  padding: 0 11px;
}

.chat-inline button,
.chat-composer button,
.chat-suggestions button {
  border: 1px solid rgba(201, 255, 74, 0.48);
  border-radius: 7px;
  background: rgba(201, 255, 74, 0.12);
  color: var(--lime);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
}

.chat-inline button {
  min-height: 42px;
  padding: 0 12px;
}

.chat-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.chat-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.chat-suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 18px 12px;
}

.chat-suggestions button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0 10px;
  border-color: rgba(245, 240, 223, 0.16);
  background: rgba(245, 240, 223, 0.05);
  color: #ddd7c2;
  white-space: nowrap;
}

.chat-composer {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
  padding: 0 18px 18px;
}

.chat-composer textarea {
  min-height: 44px;
  max-height: 116px;
  resize: none;
  padding: 11px 12px;
  line-height: 1.35;
}

.chat-composer textarea:disabled,
.chat-composer button:disabled,
.chat-inline button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.chat-composer button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: var(--lime);
  color: var(--ink);
  font-size: 1.1rem;
}

@keyframes chat-caret {
  50% {
    opacity: 0;
  }
}

@media (max-width: 940px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .hero-grid,
  .audience-section,
  .capabilities-section,
  .faq-section {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 28px;
  }

  .signal-panel {
    max-width: 620px;
  }

  .service-grid,
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    top: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    transform: none;
    grid-template-columns: 1fr;
  }

  .brand span:last-child {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    padding: 108px 0 44px;
  }

  .hero-grid,
  .section,
  .contact-section,
  .site-footer {
    width: min(calc(100% - 20px), var(--max));
  }

  h1 {
    max-width: calc(100vw - 20px);
    font-size: clamp(1.78rem, 8vw, 1.98rem);
    line-height: 1.05;
    overflow-wrap: normal;
  }

  .hero-copy,
  .hero-lead {
    width: 100%;
    max-width: calc(100vw - 20px);
  }

  .hero-lead {
    overflow-wrap: break-word;
  }

  .hero-lead span {
    display: block;
  }

  .hero-actions,
  .contact-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .signal-stack {
    margin: 44px 0;
  }

  .signal-panel,
  .signal-row,
  .intro-band,
  .service-card,
  .case-card,
  .audience-list article,
  .process-list li,
  .faq-list details,
  .contact-panel {
    max-width: 100%;
  }

  .metric-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-strip span {
    font-size: 0.66rem;
    letter-spacing: 0.055em;
  }

  .intro-band {
    padding: 24px;
  }

  .section {
    padding: 58px 0;
  }

  .service-grid,
  .case-grid,
  .process-list,
  .capability-matrix {
    grid-template-columns: 1fr;
  }

  .service-card,
  .case-card,
  .process-list li {
    min-height: auto;
  }

  .service-card h3 {
    margin-top: 46px;
  }

  .case-card h3 {
    margin-top: 24px;
  }

  .site-footer {
    flex-direction: column;
  }

  .chat-launcher {
    position: fixed;
    top: calc(100dvh - 70px);
    left: calc(100dvw - 70px);
    right: auto;
    bottom: auto;
    z-index: 30;
    width: 56px;
    height: 56px;
  }

  .chat-panel {
    right: 10px;
    bottom: 78px;
    width: calc(100vw - 20px);
    max-height: calc(100svh - 88px);
  }

  .chat-shell {
    height: calc(100svh - 88px);
    min-height: 0;
  }

  .chat-inline {
    grid-template-columns: 1fr;
  }

  .chat-inline button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
