:root {
  --void: #03070b;
  --navy: #07131d;
  --navy-2: #0b1d29;
  --navy-3: #132934;
  --paper: #f1eee7;
  --paper-2: #e6e0d6;
  --ink: #17222c;
  --white: #f8f7f3;
  --muted: #9aa7ae;
  --muted-dark: #5c6971;
  --cyan: #3ab8ca;
  --cyan-bright: #56d4df;
  --orange: #f27622;
  --orange-deep: #d85a10;
  --line: rgba(255, 255, 255, 0.13);
  --line-dark: rgba(3, 7, 11, 0.14);
  --font-display: "Archivo", Arial, sans-serif;
  --font-hero: "Space Grotesk", "IBM Plex Sans", Arial, sans-serif;
  --font-body: "IBM Plex Sans", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
  --shell: 1536px;
  --pad: clamp(22px, 4vw, 60px);
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  background: var(--void);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.chatfi-open { overflow: hidden; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.shell { width: min(100%, var(--shell)); margin-inline: auto; padding-inline: var(--pad); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

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

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  height: 130px;
  background: rgba(3, 7, 11, 0.98);
  border-bottom: 1px solid rgba(86, 212, 223, 0.74);
  transition: background-color 220ms ease, border-color 220ms ease, height 220ms ease;
}
.site-header[data-scrolled] {
  height: 68px;
  background: rgba(3, 7, 11, 0.94);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: transform 180ms ease;
}
.brand-mini img { width: 100px; height: auto; flex: none; }
.brand-mini-copy { display: flex; flex-direction: column; align-items: flex-start; }
.brand-mini-copy strong {
  font-size: clamp(46px, 4.35vw, 64px);
  line-height: 0.86;
  font-weight: 800;
  letter-spacing: -0.055em;
}
.brand-mini-copy small {
  margin-top: 9px;
  color: #b9bec0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.01em;
}
.site-header[data-scrolled] .brand-mini { transform: scale(0.72); transform-origin: left center; }
.site-header[data-scrolled] .brand-mini-copy small { display: none; }
.desktop-nav { display: flex; align-items: center; gap: clamp(54px, 6.4vw, 96px); margin-left: auto; }
.desktop-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c1c9cd;
  transition: color 180ms ease;
}
.desktop-nav a:hover, .desktop-nav a.is-active { color: var(--cyan-bright); }
.nav-chat {
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--orange);
  border-radius: 999px;
  background: transparent;
  color: var(--orange);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.nav-chat:hover { background: var(--orange); color: var(--void); }
.nav-toggle { display: none; }
.mobile-nav { display: none; }

/* Hero */
.hero {
  min-height: 100svh;
  position: relative;
  padding-top: 130px;
  background: var(--void);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-grid {
  min-height: calc(100svh - 130px);
  display: flex;
  align-items: flex-end;
  position: relative;
}
.hero-copy { position: relative; z-index: 2; width: min(600px, 48vw); padding-bottom: clamp(64px, 7.6vh, 88px); }
.eyebrow {
  margin: 0 0 18px;
  color: var(--cyan-bright);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
}
.hero-message > .eyebrow { margin-bottom: 32px; }
.eyebrow-orange { color: var(--orange-deep); }
.hero-message h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--font-hero);
  font-size: clamp(68px, 5.8vw, 88px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: normal;
}
.hero-message h1 span { color: var(--orange); }
.proof-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 560px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.proof-chips li {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid rgba(86, 212, 223, 0.34);
  border-radius: 999px;
  color: #b9c5ca;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  justify-content: center;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 30px; }
.button {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button i { font-size: 20px; }
.button-primary { background: var(--orange); color: var(--void); }
.button-primary:hover { background: #ff8734; }
.button-secondary { border-color: var(--cyan); background: transparent; color: var(--cyan-bright); }
.button-secondary:hover { border-color: var(--cyan-bright); color: var(--white); }
.hero-actions .button {
  min-width: 244px;
  min-height: 64px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-actions .button i { display: none; }
.hero-actions .button-secondary { min-width: 258px; }

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100vw;
  height: 100%;
  margin-left: calc(50% - 50vw);
  pointer-events: none;
}
.hero-scene {
  position: absolute;
  top: -20px;
  right: 0;
  width: min(114vw, 1800px);
  right: -190px;
  max-width: none;
  transform: translateX(0);
  filter: saturate(0.95) contrast(1.04);
  isolation: isolate;
}
.hero-scene > .hero-animation {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-width: none;
  object-fit: cover;
  background: #020408;
  pointer-events: none;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 28px;
  padding-bottom: 34px;
}
.signal-step {
  min-height: 132px;
  display: grid;
  grid-template-columns: 36px 52px 1fr;
  gap: 18px;
  align-items: start;
  padding: 18px clamp(16px, 2vw, 34px);
  border-right: 1px solid var(--line);
}
.signal-step:first-child { padding-left: 0; }
.signal-step:last-child { border-right: 0; padding-right: 0; }
.signal-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--cyan-bright);
  border-radius: 50%;
  color: var(--cyan-bright);
  font-family: var(--font-mono);
  font-size: 11px;
}
.signal-step > i { color: var(--cyan-bright); font-size: 46px; line-height: 1; }
.signal-step h2 { margin: 1px 0 6px; font-family: var(--font-display); font-size: 18px; }
.signal-step p { margin: 0; max-width: 260px; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* WellFi */
.wellfi-section { padding: clamp(92px, 10vw, 154px) 0; background: var(--navy); }
.section-intro { display: grid; grid-template-columns: 0.9fr 1.1fr; column-gap: clamp(42px, 8vw, 120px); align-items: end; }
.section-intro .eyebrow { grid-column: 1 / -1; }
.section-intro h2 {
  margin: 0;
  max-width: 690px;
  font-family: var(--font-display);
  font-size: clamp(42px, 5.2vw, 76px);
  line-height: 1;
  letter-spacing: -0.05em;
}
.section-intro h2 span { color: var(--cyan-bright); }
.section-summary { align-self: end; }
.section-summary p { margin: 0; color: #b6c0c5; font-size: 18px; line-height: 1.75; }
.section-summary .measurement-line {
  margin-bottom: 18px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.journey-list {
  list-style: none;
  margin: clamp(70px, 8vw, 110px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}
.journey-list li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 22px;
  padding: 34px 34px 34px 0;
  border-bottom: 1px solid var(--line);
}
.journey-list li:nth-child(odd) { border-right: 1px solid var(--line); }
.journey-list li:nth-child(even) { padding-left: 34px; }
.journey-list li > span { color: var(--cyan-bright); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.12em; }
.journey-list h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 22px; }
.journey-list p { margin: 0; color: var(--muted); }
.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(72px, 8vw, 112px) 0 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.spec-grid > div { min-height: 170px; padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec-grid dt { color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; }
.spec-grid dd { margin: 20px 0 0; font-family: var(--font-display); font-size: clamp(38px, 4vw, 58px); line-height: 1; font-weight: 700; letter-spacing: -0.045em; }
.spec-grid small { font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--cyan-bright); }

/* Company */
.company-section { padding: clamp(92px, 10vw, 156px) 0; background: var(--paper); color: var(--ink); }
.company-grid { display: grid; grid-template-columns: 1fr 0.92fr; gap: clamp(60px, 10vw, 160px); align-items: start; }
.company-section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}
.company-copy { padding-top: 36px; }
.company-copy > p { margin: 0 0 24px; color: #46545d; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.72; }
.company-copy em { color: var(--ink); }
.company-copy .location { display: flex; align-items: center; gap: 10px; margin-top: 42px; color: #9f470d; font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.company-copy .location i { font-size: 21px; }

/* Contact */
.contact-section { padding: clamp(92px, 10vw, 150px) 0; background: var(--navy-2); }
.contact-grid { display: grid; grid-template-columns: 1fr 0.8fr; gap: clamp(70px, 12vw, 180px); align-items: end; }
.contact-section h2 { margin: 0; font-family: var(--font-display); font-size: clamp(48px, 6vw, 88px); line-height: 0.98; letter-spacing: -0.06em; }
.contact-section h2 span { color: var(--cyan-bright); }
.contact-actions > p { margin: 0 0 32px; color: #b6c0c5; font-size: 19px; }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; }
.text-button { margin-top: 20px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--cyan); background: transparent; color: var(--cyan-bright); cursor: pointer; }

/* Footer */
.site-footer { padding: 42px 0; border-top: 1px solid var(--line); background: var(--void); }
.footer-inner { display: grid; grid-template-columns: 1fr auto auto; gap: 40px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 52px; height: auto; }
.footer-brand span { display: flex; flex-direction: column; }
.footer-brand strong { font-family: var(--font-display); letter-spacing: 0.08em; }
.footer-brand small { color: var(--muted); font-size: 10px; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer nav a { color: #b6c0c5; font-size: 13px; }
.site-footer p { margin: 0; color: #718087; font-size: 12px; }

/* ChatFi */
.chatfi-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 95;
  min-width: 64px;
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 2px solid var(--orange);
  border-radius: 999px;
  background: var(--void);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.36);
  transition: transform 180ms ease, background-color 180ms ease;
}
.chatfi-launcher:hover { transform: translateY(-3px); background: var(--navy-2); }
.chatfi-launcher i { color: var(--cyan-bright); font-size: 28px; }
.site-header:not([data-scrolled]) ~ .chatfi-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}
.chatfi-panel {
  --chatfi-vh: 100vh;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  width: min(410px, calc(100vw - 32px));
  height: min(660px, calc(var(--chatfi-vh) - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: #09131b;
  color: var(--white);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}
.chatfi-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 16px; border-bottom: 1px solid var(--line); }
.chatfi-header p { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.chatfi-header span { display: block; color: var(--muted); font-size: 11px; }
.chatfi-header button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.chatfi-header button:hover { background: rgba(255, 255, 255, 0.07); color: var(--white); }
.chatfi-header i { font-size: 22px; }
.chatfi-body { position: relative; min-height: 0; overflow: hidden; background: #09131b; }
.chatfi-chat { display: block; width: 100%; height: 100%; visibility: hidden; }
.chatfi-body.is-ready .chatfi-chat { visibility: visible; }
.chatfi-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 32px;
  background: #09131b;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.chatfi-loading::before {
  width: 10px;
  height: 10px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--cyan-bright);
  box-shadow: 0 0 0 0 rgba(104, 200, 220, 0.42);
  content: "";
  animation: chatfi-ready-pulse 1.5s ease-out infinite;
}
.chatfi-loading a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.chatfi-body.is-ready .chatfi-loading { display: none; }
.chatfi-disclosure { margin: 10px 18px 16px; color: #718087; font-size: 10px; line-height: 1.45; text-align: center; }

@keyframes chatfi-ready-pulse {
  70%, 100% { box-shadow: 0 0 0 14px rgba(104, 200, 220, 0); }
}

/* Enhancement hooks: content is visible without JS. */
[data-motion] { opacity: 1; transform: none; }

@media (max-width: 1120px) {
  .hero-copy { width: min(590px, 60vw); }
  .hero-scene { width: 1160px; right: -160px; }
  .signal-strip { margin-top: 20px; }
}

@media (min-width: 821px) {
  .brand-mini-copy strong { transform: translateX(-5px) scaleX(1.02); transform-origin: left center; }
  .brand-mini-copy small { transform: scaleX(0.985); transform-origin: left center; }
  .proof-chips li:nth-child(1) { width: 370px; }
  .proof-chips li:nth-child(2) { width: 174px; }
  .proof-chips li:nth-child(3) { width: 218px; }
}

@media (max-width: 820px) {
  :root { --pad: 22px; }
  html { scroll-padding-top: 70px; }
  .site-header { height: 88px; background: rgba(3, 7, 11, 0.96); border-bottom-color: rgba(86, 212, 223, 0.5); }
  .site-header[data-scrolled] { height: 64px; }
  .brand-mini { gap: 9px; }
  .brand-mini img { width: 54px; }
  .brand-mini-copy strong { font-size: 30px; }
  .brand-mini-copy small { margin-top: 5px; max-width: 210px; font-size: 8px; }
  .site-header[data-scrolled] .brand-mini { transform: scale(0.86); }
  .desktop-nav { display: none; }
  .nav-toggle {
    display: flex;
    width: 48px;
    height: 48px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    align-items: center;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .nav-toggle span { width: 24px; height: 2px; background: var(--white); transition: transform 180ms ease, opacity 180ms ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .mobile-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    padding: 18px 22px 24px;
    background: var(--void);
    border-bottom: 1px solid var(--line);
  }
  .mobile-nav a, .mobile-nav button { min-height: 50px; display: flex; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--white); text-align: left; }
  .mobile-nav button { color: var(--orange); cursor: pointer; }
  .hero { padding-top: 88px; }
  .hero-grid { min-height: calc(100svh - 88px); }
  .hero-copy { width: min(100%, 540px); padding-bottom: 34px; }
  .hero-message h1 { font-size: clamp(48px, 13vw, 64px); }
  .hero-visual { margin-left: calc(50% - 50vw); }
  .hero-scene { width: 980px; right: -330px; }
  .signal-strip { grid-template-columns: 1fr; padding-top: 0; }
  .signal-step, .signal-step:first-child, .signal-step:last-child { padding: 26px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .signal-step:last-child { border-bottom: 0; }
  .section-intro, .company-grid, .contact-grid { grid-template-columns: 1fr; gap: 42px; }
  .section-intro .eyebrow { grid-column: auto; }
  .journey-list { grid-template-columns: 1fr; }
  .journey-list li, .journey-list li:nth-child(even) { padding: 28px 0; border-right: 0; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .company-copy { padding-top: 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .site-footer nav { order: 3; }
  .chatfi-launcher span { display: none; }
  .chatfi-launcher { width: 60px; min-width: 60px; height: 60px; padding: 0; right: 16px; bottom: 16px; }
  .chatfi-panel { left: 8px; right: 8px; bottom: 8px; width: auto; height: min(680px, calc(var(--chatfi-vh) - 16px)); border-radius: 16px; }
}

@media (max-width: 520px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button { width: 100%; min-width: 0; }
  .hero-copy { padding-bottom: 28px; }
  .hero-message h1 { font-size: clamp(46px, 13.2vw, 58px); }
  .proof-chips { max-width: 350px; }
  .hero-scene { width: 860px; right: -350px; }
  .spec-grid { grid-template-columns: 1fr; }
  .spec-grid > div { min-height: 140px; }
  .signal-step { grid-template-columns: 34px 42px 1fr; gap: 12px; }
  .signal-step > i { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
