/* ===========================================================
   HOMEPAGE (index.html only) � loads after site-theme.css
=========================================================== */

:root {
  --card-bg: linear-gradient(to bottom, #0C1817, #060D0D);
  --card-border: rgba(232, 242, 241, 0.1);
  --card-shadow: 0 -24px 80px -40px rgba(0, 0, 0, 0.8), 0 40px 100px -40px rgba(0, 0, 0, 0.8);
  --card-shade: #020606;
  --tile-bg: rgba(232, 242, 241, 0.035);
  --tile-hover: rgba(31, 107, 107, 0.16);
  --window-bg: rgba(5, 12, 12, 0.42);
  --window-line: rgba(143, 208, 203, 0.16);
  --window-glow: rgba(31, 107, 107, 0.22);
  --window-highlight: rgba(232, 242, 241, 0.08);
  --flow-line: rgba(232, 242, 241, 0.2);
  --flow-card-bg: rgba(232, 242, 241, 0.045);
  --flow-card-line: rgba(143, 208, 203, 0.18);
  --flow-card-key: rgba(95, 176, 172, 0.1);
  --flow-glow-bg: rgba(95, 176, 172, 0.14);
  --flow-glow-line: rgba(95, 176, 172, 0.6);

  scrollbar-gutter: stable;
}

html.lp-light {
  --card-bg: linear-gradient(to bottom, #FFFFFF, #F4F8F7);
  --card-border: rgba(10, 26, 26, 0.08);
  --card-shadow: 0 -24px 80px -40px rgba(10, 26, 26, 0.25), 0 40px 100px -40px rgba(10, 26, 26, 0.3);
  --card-shade: #D7E4E2;
  --tile-bg: #F6F9F9;
  --tile-hover: #EDF5F4;
  --window-bg: rgba(255, 255, 255, 0.5);
  --window-line: rgba(31, 107, 107, 0.18);
  --window-glow: rgba(143, 208, 203, 0.28);
  --window-highlight: rgba(255, 255, 255, 0.7);
  --flow-line: rgba(10, 26, 26, 0.18);
  --flow-card-bg: rgba(255, 255, 255, 0.78);
  --flow-card-line: rgba(31, 107, 107, 0.16);
  --flow-card-key: rgba(237, 245, 244, 0.95);
  --flow-glow-bg: rgba(31, 107, 107, 0.07);
  --flow-glow-line: rgba(31, 107, 107, 0.5);
}

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

html,
body {
  margin: 0;
}

body {
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.5;
  overflow-x: clip;
}

h1, h2, h3, h4, p {
  margin: 0;
}

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

img {
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}


/* The homepage hero needs the painting brighter than content pages do. */
.lp-sky::after {
  background: linear-gradient(to bottom, rgba(6, 14, 14, 0.3) 0%, rgba(6, 14, 14, 0.42) 55%, rgba(6, 14, 14, 0.68) 100%);
}

html.lp-light .lp-sky::after {
  background: linear-gradient(to bottom, rgba(242, 246, 245, 0.35) 0%, rgba(242, 246, 245, 0.48) 55%, rgba(242, 246, 245, 0.72) 100%);
}

main {
  position: relative;
  z-index: 1;
}

.landing-container {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Hero ---------- */

.lp-hero {
  padding: clamp(56px, 9vh, 96px) 0 clamp(72px, 12vh, 128px);
  text-align: center;
}

.lp-title {
  max-width: 26ch;
  margin: 0 auto;
  color: #F3F8F7;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5.6vw, 4.1rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

.lp-sub {
  max-width: 56ch;
  margin: 20px auto 0;
  color: rgba(232, 242, 241, 0.86);
  font-size: 1.08rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.lp-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

html.lp-light .lp-title {
  color: #0A1A1A;
  text-shadow: none;
}

.lp-title-icon {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-left: 0.12em;
  vertical-align: -0.16em;
  background: var(--accent-bright);
  -webkit-mask: url("images/team-icon.png") center / contain no-repeat;
  mask: url("images/team-icon.png") center / contain no-repeat;
}

html.lp-light .lp-sub {
  color: rgba(10, 26, 26, 0.72);
}

.lp-demo {
  max-width: 1000px;
  margin: 64px auto 0;
}

/* Frosted glass so the painted sky stays visible behind the diagram. */
.lp-window {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--window-line);
  border-radius: 28px;
  background:
    radial-gradient(60% 80% at 50% 0%, var(--window-glow), transparent 70%),
    var(--window-bg);
  box-shadow: inset 0 1px 0 var(--window-highlight), 0 40px 90px -40px rgba(0, 0, 0, 0.6);
  text-align: left;
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}

html.lp-light .lp-window {
  box-shadow: inset 0 1px 0 var(--window-highlight), 0 30px 70px -36px rgba(10, 26, 26, 0.25);
}

.lp-window-body {
  padding: clamp(20px, 3.6vw, 44px) clamp(12px, 3vw, 44px);
}

/* Flow diagram */

.story-flow__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.story-flow .flow-lines use {
  fill: none;
  stroke: var(--flow-line);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.story-flow .flow-card {
  fill: var(--flow-card-bg);
  stroke: var(--flow-card-line);
  stroke-width: 1;
}

.story-flow .flow-node--key .flow-card {
  fill: var(--flow-card-key);
  stroke: var(--flow-glow-line);
}

.story-flow .flow-glow {
  fill: var(--flow-glow-bg);
  stroke: var(--flow-glow-line);
  stroke-width: 1.2;
}

.story-flow .flow-ico {
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.story-flow .flow-check {
  stroke-width: 1.7;
}

.story-flow .flow-label {
  fill: var(--text);
  font: 600 12px var(--sans);
  text-anchor: middle;
}

.story-flow .flow-dot {
  fill: var(--accent-bright);
}

@media (prefers-reduced-motion: reduce) {
  .story-flow .flow-dot,
  .story-flow .flow-glow {
    display: none;
  }
}

/* ---------- Stacked panels ---------- */

.lp-stack {
  position: relative;
}

.lp-panel {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  height: 100vh;
  height: 100svh;
  padding: calc(var(--header-h) + 12px) 0 24px;
  scroll-margin-top: calc(-12px - var(--header-h));
}

.lp-panel + .lp-panel {
  margin-top: 55vh;
}

.lp-panel > .landing-container {
  width: min(1240px, 100%);
}

.lp-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 40px;
  height: min(680px, calc(100svh - var(--header-h) - 36px));
  padding: 36px 36px 36px 48px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 28px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  transform-origin: 50% 0;
}

.lp-card-shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: var(--card-shade);
  opacity: 0;
  pointer-events: none;
}

.lp-card-copy {
  min-width: 0;
}

.lp-card-title {
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.08;
  text-wrap: balance;
}

.lp-card-copy p {
  max-width: 40ch;
  margin-top: 16px;
  color: var(--text-2);
  font-size: 1.02rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.lp-card-copy .lp-btn {
  margin-top: 28px;
}

.lp-card-stage {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
}

.lp-card-stage > * {
  width: 100%;
}

/* Copy and stage rise in the first time a panel comes into view. */

html.lp-anim .lp-card-copy > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

html.lp-anim .lp-card-copy > :nth-child(2) { transition-delay: 60ms; }
html.lp-anim .lp-card-copy > :nth-child(3) { transition-delay: 120ms; }

html.lp-anim .lp-card-stage > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease-out) 120ms, transform 800ms var(--ease-out) 120ms;
}

html.lp-anim .lp-panel.is-seen .lp-card-copy > *,
html.lp-anim .lp-panel.is-seen .lp-card-stage > * {
  opacity: 1;
  transform: none;
}

/* ---------- Tiles inside the cards ---------- */

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

.lp-tiles--rows {
  grid-template-columns: minmax(0, 1fr);
}

.lp-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 20px 22px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--tile-bg);
  color: var(--text);
  transition: background-color 200ms ease, border-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .lp-tile:hover {
    border-color: var(--accent-line);
    background: var(--tile-hover);
  }
}

.lp-tile h3 {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.lp-tile p {
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.lp-tile {
  position: relative;
}

.lp-tile h3 {
  padding-right: 30px;
}

.lp-tile__go {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--accent-bright);
  transition: transform 200ms var(--ease-out), background-color 200ms ease;
}

.lp-tile__go svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) and (pointer: fine) {
  .lp-tile:hover .lp-tile__go {
    background: var(--accent-surface);
    transform: translate(2px, -2px);
  }
}

.lp-tile__ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--accent-surface);
  color: var(--accent-bright);
}

.lp-tile__ico svg {
  width: 26px;
  height: 26px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lp-tile__ico .ico-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.lp-tile__ico .ico-tilt,
.lp-tile__ico .ico-bar,
.lp-tile__ico .ico-capsule,
.lp-tile__ico .ico-bubble,
.lp-tile__ico .ico-door {
  transform-box: fill-box;
}

.lp-tile__ico .ico-tilt,
.lp-tile__ico .ico-bar {
  transform-origin: 50% 100%;
}

.lp-tile__ico .ico-capsule,
.lp-tile__ico .ico-bubble {
  transform-origin: center;
}

.lp-tile__ico .ico-door {
  transform-origin: 0 50%;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .lp-tile:hover .lp-tile__ico--form .ico-draw {
    animation: ico-write 420ms var(--ease-out) both;
  }
  .lp-tile:hover .lp-tile__ico--form .ico-draw:nth-of-type(2) { animation-delay: 110ms; }
  .lp-tile:hover .lp-tile__ico--form .ico-draw:nth-of-type(3) { animation-delay: 220ms; }

  .lp-tile:hover .lp-tile__ico--headset .ico-tilt {
    animation: ico-answer 700ms var(--ease-in-out) both;
  }
  .lp-tile:hover .lp-tile__ico--headset .ico-draw {
    animation: ico-write 420ms var(--ease-out) 160ms both;
  }

  .lp-tile:hover .lp-tile__ico--watch .ico-draw,
  .lp-tile:hover .lp-tile__ico--medtech .ico-draw {
    animation: ico-pulse 1200ms var(--ease-in-out) infinite;
  }

  .lp-tile:hover .lp-tile__ico--chart .ico-bar {
    animation: ico-grow 520ms var(--ease-out) both;
  }
  .lp-tile:hover .lp-tile__ico--chart .ico-bar:nth-of-type(3) { animation-delay: 80ms; }
  .lp-tile:hover .lp-tile__ico--chart .ico-bar:nth-of-type(4) { animation-delay: 160ms; }

  .lp-tile:hover .lp-tile__ico--pharma .ico-capsule {
    animation: ico-roll 700ms var(--ease-in-out) both;
  }
  .lp-tile:hover .lp-tile__ico--biotech .ico-bubble {
    animation: ico-bubble-rise 1100ms var(--ease-out) infinite;
  }
  .lp-tile:hover .lp-tile__ico--biotech .ico-bubble:nth-of-type(2) {
    animation-delay: 260ms;
  }
  .lp-tile:hover .lp-tile__ico--sites .ico-door {
    animation: ico-door-open 620ms var(--ease-in-out) both;
  }
}

@keyframes ico-write {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes ico-answer {
  0% { transform: rotate(0); }
  30% { transform: rotate(-9deg); }
  60% { transform: rotate(6deg); }
  100% { transform: rotate(0); }
}

@keyframes ico-pulse {
  0% { stroke-dashoffset: 1; }
  55% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}

@keyframes ico-grow {
  from { transform: scaleY(0.25); }
  to { transform: scaleY(1); }
}

@keyframes ico-roll {
  0% { transform: translateX(0) rotate(0); }
  45% { transform: translateX(-3px) rotate(-14deg); }
  75% { transform: translateX(2px) rotate(8deg); }
  100% { transform: translateX(0) rotate(0); }
}

@keyframes ico-bubble-rise {
  0% { opacity: 0.35; transform: translateY(2px); }
  55% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-5px); }
}

@keyframes ico-door-open {
  0% { transform: scaleX(1); }
  45% { transform: scaleX(0.35); }
  100% { transform: scaleX(1); }
}

/* Outcomes */

.lp-outcome {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--tile-bg);
}

.lp-outcome img {
  display: block;
  width: 100%;
  height: clamp(72px, 13vh, 150px);
  object-fit: contain;
}

.lp-outcome strong {
  display: block;
  padding: 14px 18px 0;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lp-outcome span {
  display: block;
  padding: 6px 18px 18px;
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Case studies */

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

.lp-case {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--tile-bg);
}

.lp-case__tag {
  color: var(--accent-bright);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.lp-case h3 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.lp-case p {
  margin: 10px 0 18px;
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.6;
}

.lp-case__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.lp-case__stats > div + div {
  padding-left: 14px;
  border-left: 1px solid var(--hairline);
}

.lp-case__stats b {
  display: block;
  color: var(--accent-bright);
  font-size: clamp(1.15rem, 7cqi, 1.35rem);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.lp-case__stats b span {
  margin-left: 0.15em;
  font-size: 0.6em;
  font-weight: 600;
}

.lp-case__stats small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

/* Newsletter */

.lp-paper {
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
  border-radius: 18px;
  background: #FFFFFF;
}

.lp-paper iframe {
  display: block;
  width: 100%;
  height: 460px;
  border: 0;
}

/* ---------- Pager ---------- */

.lp-pager {
  position: fixed;
  right: 24px;
  top: 50%;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 280ms var(--ease-out);
}

.lp-pager.is-on {
  opacity: 1;
  pointer-events: auto;
}

.lp-pager-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  background: #0C1817;
  color: var(--text);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out);
}

.lp-pager-btn .lp-ico {
  width: 20px;
  height: 20px;
}

.lp-pager-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.lp-pager-btn:disabled {
  opacity: 0.28;
  cursor: default;
}

html.lp-light .lp-pager-btn {
  background: #FFFFFF;
}

@media (hover: hover) and (pointer: fine) {
  .lp-pager-btn:hover:not(:disabled) {
    border-color: var(--accent-line);
    color: var(--accent-bright);
  }
}

/* ---------- Contact ---------- */

.lp-final-section {
  padding: 112px 0;
}

.lp-final {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.lp-final-logo {
  display: block;
  height: 64px;
  margin: 0 0 12px -10px;
}

.lp-final h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.lp-final-copy p {
  max-width: 42ch;
  margin-top: 16px;
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.6;
}

.demo-card {
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
  border-radius: 20px;
  background: #FFFFFF;
  color: #0A1A1A;
}

.demo-card-head {
  padding: 24px 24px 0;
}

.lp-final .demo-card-head h2 {
  color: #0A1A1A;
  font-size: 1.7rem;
}

.demo-card-head p {
  max-width: 42ch;
  margin-top: 6px;
  color: #4B5C5B;
  font-size: 0.92rem;
}

.demo-card-body {
  min-height: 240px;
  padding: 8px 8px 12px;
}

@media (max-width: 900px), (max-height: 620px) {
  .lp-pager {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 20px;
    flex-direction: row;
    transform: translateX(-50%);
  }

  .lp-panel {
    position: relative;
    height: auto;
    padding: 12px 0;
    scroll-margin-top: 0;
  }

  .lp-panel + .lp-panel {
    margin-top: 0;
  }

  .lp-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    height: auto;
    padding: 36px 28px;
  }

  .lp-card-copy p {
    max-width: 60ch;
  }

  .lp-outcome img {
    height: 150px;
  }
}

@media (max-width: 900px) {
  .lp-final {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-final-section {
    padding: 72px 0 96px;
  }
}

@media (max-width: 640px) {
  .landing-container {
    padding: 0 18px;
  }

  .lp-tiles,
  .lp-cases {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-card {
    padding: 26px 18px;
    border-radius: 22px;
  }

  .lp-final {
    padding: 28px 18px;
    border-radius: 22px;
  }

  .lp-demo {
    margin-top: 44px;
  }

  .lp-window-body {
    padding: 14px 6px;
  }
}
