/* ============================================================
   PeopleWeb — Marketing site styles (extends tokens.css)
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--pw-white);
  color: var(--fg-2);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ---- Tweakable brand variables (overridable by Tweaks panel) ---- */
:root {
  --brand: var(--pw-indigo-500);
  --brand-deep: var(--pw-indigo-700);
  --brand-soft: var(--pw-indigo-50);
  --brand-tint: var(--pw-indigo-100);
  --accent: var(--pw-violet-500);
  --grad-brand: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  --grad-soft: linear-gradient(180deg, #FAFBFF 0%, #FFFFFF 100%);
}

[data-palette="midnight"] {
  --brand: #2A3F6F;
  --brand-deep: #1B2E55;
  --brand-soft: #F1F4FB;
  --brand-tint: #DDE4F3;
  --accent: #4B6DA4;
  --grad-brand: linear-gradient(135deg, #2A3F6F 0%, #4B6DA4 100%);
}
[data-palette="teal"] {
  --brand: #0E7C86;
  --brand-deep: #075F67;
  --brand-soft: #E8F7F8;
  --brand-tint: #C5EAEC;
  --accent: #2BB3C0;
  --grad-brand: linear-gradient(135deg, #0E7C86 0%, #2BB3C0 100%);
}
[data-palette="coral"] {
  --brand: #C9445A;
  --brand-deep: #A8364A;
  --brand-soft: #FDF1F3;
  --brand-tint: #F8D7DC;
  --accent: #E89B3C;
  --grad-brand: linear-gradient(135deg, #C9445A 0%, #E89B3C 100%);
}

/* ============== Layout ============== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 96px 0;
  position: relative;
}
section.compact { padding: 64px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.eyebrow.no-rule::before { display: none; }

h1, h2, h3, h4 { color: var(--fg-1); margin: 0; }
.h-display {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--fg-1);
  text-wrap: balance;
}
.h-section {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.016em;
  color: var(--fg-1);
  text-wrap: balance;
  margin: 0 0 16px;
}
.h-section .accent { color: var(--brand); }
.h-section .underline-grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 60ch;
  text-wrap: pretty;
}
.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head.left { margin-left: 0; text-align: left; }

/* ============== Buttons ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 200ms var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn .mdi { font-size: 18px; }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px -2px color-mix(in srgb, var(--brand) 50%, transparent);
}
.btn-primary:hover {
  background: var(--brand-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -4px color-mix(in srgb, var(--brand) 55%, transparent);
  text-decoration: none;
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--fg-1);
  border-color: var(--pw-grey-300);
}
.btn-ghost:hover {
  border-color: var(--fg-1);
  background: var(--pw-grey-50);
  text-decoration: none;
  color: var(--fg-1);
}
.btn-light {
  background: #fff;
  color: var(--fg-1);
  border-color: var(--pw-grey-200);
  box-shadow: var(--shadow-xs);
}
.btn-light:hover { border-color: var(--fg-3); color: var(--fg-1); text-decoration: none; }
.btn-on-dark {
  background: #fff;
  color: var(--pw-navy-900);
}
.btn-on-dark:hover { background: #fff; color: var(--brand-deep); text-decoration: none; }
.btn-outline-on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-outline-on-dark:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; border-color: #fff; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }

/* ============== Navbar ============== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 72px;
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0);
  border-bottom: 1px solid transparent;
  transition: background 240ms ease, border-color 240ms ease, backdrop-filter 240ms ease, box-shadow 240ms ease;
}
.nav.scrolled {
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--pw-grey-200);
}
.nav-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img {
  height: 40px;
  width: auto;
  max-width: none;
  display: block;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 16px;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-2);
  border-radius: 8px;
  transition: all 150ms ease;
}
.nav-links a:hover {
  color: var(--fg-1);
  background: var(--pw-grey-100);
  text-decoration: none;
}
.nav-spacer { flex: 1; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-right .login {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-2);
}
.nav-right .login:hover { color: var(--fg-1); text-decoration: none; }
.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--fg-1);
  font-size: 24px;
  padding: 8px;
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-right .login { display: none; }
  .nav-mobile-toggle { display: inline-flex; }
}

/* ============== Hero ============== */
.hero {
  position: relative;
  padding-top: 144px;
  padding-bottom: 64px;
  overflow: hidden;
  background: var(--grad-soft);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 80% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%),
    radial-gradient(ellipse 60% 50% at 5% 30%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(17,32,61,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17,32,61,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 80%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 80%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 72px;
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: #fff;
  border: 1px solid var(--pw-grey-200);
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg-2);
  margin-bottom: 24px;
  box-shadow: var(--shadow-xs);
}
.hero-tag .pill {
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.024em;
  color: var(--fg-1);
  text-wrap: balance;
}
.hero-title .gradient {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 24px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--fg-2);
  max-width: 56ch;
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 36px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  color: var(--fg-3);
  font-size: 13px;
}
.hero-meta .check { color: var(--brand); }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
}

/* Viewport-based fallback: narrow the sidebar / hide it on small screens.
   The kpi-row uses auto-fit, so it always reflows to fit. */
@media (max-width: 1200px) {
  .mini-dash { grid-template-columns: 168px 1fr; }
  .mini-dash .sb { padding: 12px 8px; }
  .mini-dash .sb-item { font-size: 12px; padding: 7px 8px; gap: 8px; }
  .mini-dash .sb-item .mdi { font-size: 14px; }
  .mini-dash .main { padding: 12px; gap: 10px; }
  .mini-dash .hero-band { padding: 14px 16px; }
  .mini-dash .hero-band h4 { font-size: 16px; }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 20px; }
  .float-card.top-right { right: 0; }
  .float-card.bottom-left { left: -8px; }
}
@media (max-width: 720px) {
  .mini-dash { grid-template-columns: 1fr; }
  .mini-dash .sb { display: none; }
  .chart-card { grid-template-columns: 1fr; }
}

/* Hero visual — fake browser window with dashboard preview */
.hero-visual {
  position: relative;
  perspective: 1800px;
}
.window {
  background: #fff;
  border-radius: 14px;
  box-shadow:
    0 30px 80px -20px rgba(17, 32, 61, 0.32),
    0 8px 24px -8px rgba(17, 32, 61, 0.18);
  overflow: hidden;
  border: 1px solid var(--pw-grey-200);
  transform: rotateY(-6deg) rotateX(2deg);
  transform-origin: center;
}
.window-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--pw-grey-50);
  border-bottom: 1px solid var(--pw-grey-200);
}
.window-dots { display: flex; gap: 6px; }
.window-dots span {
  width: 11px; height: 11px; border-radius: 50%;
  display: block;
  background: var(--pw-grey-300);
}
.window-dots span:nth-child(1) { background: #FF5F57; }
.window-dots span:nth-child(2) { background: #FEBC2E; }
.window-dots span:nth-child(3) { background: #28C840; }
.window-url {
  flex: 1;
  background: #fff;
  border: 1px solid var(--pw-grey-200);
  border-radius: 6px;
  height: 26px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
}
.window-url .lock { font-size: 11px; color: var(--pw-success-500); }

.mini-dash {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 460px;
  background: var(--pw-grey-50);
}
.mini-dash .sb {
  background: #fff;
  border-right: 1px solid var(--pw-grey-200);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mini-dash .sb-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 16px;
  border-bottom: 1px solid var(--pw-grey-100);
  margin-bottom: 8px;
}
.mini-dash .sb-logo img { height: 26px; }
.mini-dash .sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--fg-2);
}
.mini-dash .sb-item.active {
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 600;
}
.mini-dash .sb-item .mdi { font-size: 16px; color: var(--fg-3); }
.mini-dash .sb-item.active .mdi { color: var(--brand); }

.mini-dash .main { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.mini-dash .hero-band {
  background: var(--grad-brand);
  border-radius: 12px;
  padding: 18px 22px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mini-dash .hero-band h4 { color: #fff; font-size: 18px; margin: 0 0 4px; font-weight: 700; }
.mini-dash .hero-band p { color: rgba(255,255,255,0.85); font-size: 12px; margin: 0; }
.mini-dash .hero-band .badges { display: flex; gap: 6px; }
.mini-dash .hero-band .badge {
  background: rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 10px;
}
.kpi {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--pw-grey-100);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg-1);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.kpi-delta {
  font-size: 11px;
  font-weight: 500;
}
.kpi-delta.up { color: var(--pw-success-700); }
.kpi-delta.down { color: var(--pw-danger-700); }
.kpi-delta.stable { color: var(--pw-warning-700); }
.kpi-chip {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
}
.kpi:nth-child(1) .kpi-chip { background: var(--pw-kpi-people); }
.kpi:nth-child(2) .kpi-chip { background: var(--pw-kpi-turnover); }
.kpi:nth-child(3) .kpi-chip { background: var(--pw-kpi-absence); }
.kpi:nth-child(4) .kpi-chip { background: var(--pw-kpi-cost); }

.chart-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--pw-grey-100);
  box-shadow: var(--shadow-xs);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.chart-card .head {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-1);
}
.chart-card .sub {
  font-size: 10px;
  color: var(--fg-3);
}
.bars { display: flex; align-items: flex-end; gap: 6px; height: 80px; margin-top: 10px; }
.bars span {
  flex: 1;
  background: linear-gradient(180deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: 3px 3px 0 0;
  opacity: 0.92;
}
.donut {
  position: relative;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--brand) 0deg 220deg, var(--accent) 220deg 300deg, var(--pw-grey-200) 300deg 360deg);
  margin: 6px auto 0;
}
.donut::after {
  content: "";
  position: absolute; inset: 14px;
  background: #fff; border-radius: 50%;
}
.donut + .legend {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10px;
  color: var(--fg-3);
}
.donut + .legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* Floating cards over hero visual */
.float-card {
  position: absolute;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--pw-grey-200);
  box-shadow: 0 12px 40px -12px rgba(17,32,61,0.28);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  z-index: 3;
}
.float-card .ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid; place-items: center;
  font-size: 18px;
}
.float-card strong { display: block; color: var(--fg-1); font-size: 13px; }
.float-card span { color: var(--fg-3); font-size: 12px; }
.float-card.top-right {
  top: -28px; right: -16px;
  animation: float 5s ease-in-out infinite;
}
.float-card.bottom-left {
  bottom: 36px; left: -36px;
  animation: float 5s ease-in-out infinite 1.5s;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (max-width: 980px) {
  .float-card.top-right, .float-card.bottom-left { display: none; }
  .window { transform: none; }
}

/* ============== Marquee / trust ============== */
.trust {
  padding: 48px 0;
  background: #fff;
  border-top: 1px solid var(--pw-grey-100);
  border-bottom: 1px solid var(--pw-grey-100);
}
.trust-label {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
}
.trust-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  align-items: center;
  justify-items: center;
}
.trust-row .industry {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--fg-2);
  letter-spacing: -0.01em;
  text-align: center;
  white-space: nowrap;
}
.trust-row .industry .mdi {
  color: var(--fg-4);
  margin-right: 6px;
  vertical-align: -2px;
}
@media (max-width: 800px) {
  .trust-row { grid-template-columns: repeat(2, 1fr); }
}

/* ============== Challenge / cards ============== */
.section-light { background: var(--pw-grey-50); }
.section-dark {
  background: var(--pw-navy-900);
  color: rgba(255,255,255,0.78);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark .h-section .accent { color: var(--pw-indigo-400); }
.section-dark .eyebrow { color: var(--pw-indigo-400); }

.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.problem-card {
  background: #fff;
  border: 1px solid var(--pw-grey-200);
  border-radius: 16px;
  padding: 28px;
  transition: all 250ms var(--ease-out);
}
.problem-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--pw-grey-300);
}
.problem-card .ico {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--pw-danger-100);
  color: var(--pw-danger-700);
  display: grid; place-items: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.problem-card h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.problem-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0;
}
@media (max-width: 780px) {
  .problem-grid { grid-template-columns: 1fr; }
}

/* ============== Before / After ============== */
.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: stretch;
}
.compare-col {
  background: #fff;
  border-radius: 18px;
  padding: 32px;
  border: 1px solid var(--pw-grey-200);
}
.compare-col.before {
  background: var(--pw-grey-50);
}
.compare-col.after {
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 8%, #fff) 0%, #fff 70%);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--pw-grey-200));
  box-shadow: 0 20px 40px -24px color-mix(in srgb, var(--brand) 30%, transparent);
}
.compare-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 16px;
}
.compare-col.before .compare-tag {
  background: var(--pw-grey-200);
  color: var(--fg-2);
}
.compare-col.after .compare-tag {
  background: var(--grad-brand);
  color: #fff;
}
.compare-col h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}
.compare-col ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.compare-col li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.5;
}
.compare-col li .mdi {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.compare-col.before li { color: var(--fg-3); }
.compare-col.before li .mdi { color: var(--pw-grey-400); }
.compare-col.after li { color: var(--fg-1); }
.compare-col.after li .mdi { color: var(--brand); }
.compare-arrow {
  display: grid; place-items: center;
  align-self: center;
}
.compare-arrow .circle {
  width: 56px; height: 56px;
  background: var(--grad-brand);
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  font-size: 26px;
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--brand) 50%, transparent);
}
@media (max-width: 880px) {
  .compare { grid-template-columns: 1fr; }
  .compare-arrow .circle { transform: rotate(90deg); }
}

/* ============== Pillars ============== */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pillar {
  background: #fff;
  border: 1px solid var(--pw-grey-200);
  border-radius: 18px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 300ms var(--ease-out);
}
.pillar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms var(--ease-out);
}
.pillar:hover::before { transform: scaleX(1); }
.pillar:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}
.pillar .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brand);
  font-weight: 500;
  letter-spacing: 0.08em;
}
.pillar h3 {
  margin-top: 12px;
  font-size: 22px;
  font-weight: 700;
}
.pillar p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-2);
}
@media (max-width: 880px) {
  .pillars { grid-template-columns: 1fr; }
}

/* ============== Modules tabs ============== */
.modules-wrap {
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--pw-grey-200);
  overflow: hidden;
}
.modules-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--pw-grey-50);
  border-bottom: 1px solid var(--pw-grey-200);
}
.modules-tab {
  padding: 18px 14px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  border-right: 1px solid var(--pw-grey-200);
  border-bottom: 3px solid transparent;
  transition: all 180ms ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.modules-tab:last-child { border-right: none; }
.modules-tab .mdi {
  font-size: 24px;
  color: var(--fg-3);
  margin-bottom: 4px;
}
.modules-tab .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-2);
}
.modules-tab .count {
  font-size: 11px;
  color: var(--fg-4);
  font-family: var(--font-mono);
}
.modules-tab:hover {
  background: #fff;
  color: var(--fg-1);
}
.modules-tab.active {
  background: #fff;
  border-bottom-color: var(--brand);
}
.modules-tab.active .mdi,
.modules-tab.active .title { color: var(--brand-deep); }

.modules-panels { padding: 40px; }
.modules-panel { display: none; }
.modules-panel.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  animation: fadeUp 360ms var(--ease-out);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.modules-panel .copy h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
}
.modules-panel .copy .lede {
  font-size: 16px;
  color: var(--fg-2);
}
.modules-panel .copy .features {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 14px;
}
.modules-panel .copy .features li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: flex-start;
}
.modules-panel .copy .features .mdi {
  width: 36px; height: 36px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 20px;
}
.modules-panel .copy .features strong {
  display: block;
  font-size: 14px;
  color: var(--fg-1);
  font-weight: 600;
}
.modules-panel .copy .features span {
  font-size: 14px;
  color: var(--fg-3);
  line-height: 1.45;
}
.modules-panel .visual {
  background: var(--pw-grey-50);
  border: 1px solid var(--pw-grey-200);
  border-radius: 14px;
  padding: 20px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (max-width: 1000px) {
  .modules-tabs { grid-template-columns: repeat(3, 1fr); }
  .modules-panel.active { grid-template-columns: 1fr; }
  .modules-tab { border-bottom: 1px solid var(--pw-grey-200); }
}
@media (max-width: 600px) {
  .modules-tabs { grid-template-columns: repeat(2, 1fr); }
  .modules-panels { padding: 24px; }
}

/* ============== Impact metrics ============== */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.metric {
  text-align: left;
  padding: 32px 24px;
  border-left: 3px solid var(--pw-indigo-400);
  background: rgba(255,255,255,0.04);
  border-radius: 0 12px 12px 0;
}
.metric .value {
  font-family: var(--font-display);
  font-size: clamp(42px, 4.5vw, 60px);
  line-height: 1;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.metric .value .sym { color: var(--pw-indigo-400); }
.metric .label {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,0.72);
}
@media (max-width: 880px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
}
.metrics-foot {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  align-items: center;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
}

/* ============== Audiences ============== */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.audience {
  background: #fff;
  border: 1px solid var(--pw-grey-200);
  border-radius: 18px;
  padding: 28px;
  transition: all 250ms var(--ease-out);
}
.audience:hover { box-shadow: var(--shadow-card); border-color: var(--brand); transform: translateY(-4px); }
.audience-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pw-grey-200);
  margin-bottom: 18px;
}
.audience-head .ico {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--grad-brand);
  color: #fff;
  display: grid; place-items: center;
  font-size: 22px;
}
.audience h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.audience h4 span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.audience ul {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: 10px;
}
.audience li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
  color: var(--fg-2);
}
.audience li .mdi {
  color: var(--brand);
  font-size: 18px;
  flex-shrink: 0;
}
@media (max-width: 880px) {
  .audience-grid { grid-template-columns: 1fr; }
}

/* ============== Ecosystem diagram ============== */
.eco {
  background: var(--pw-grey-50);
  border-radius: 22px;
  padding: 48px;
  border: 1px solid var(--pw-grey-200);
}
.eco-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}
.eco-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: 16px;
  text-align: center;
}
.eco-source {
  background: #fff;
  border: 1px solid var(--pw-grey-200);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.eco-source .mdi { color: var(--fg-3); font-size: 20px; }
.eco-source strong { display: block; font-size: 13px; color: var(--fg-1); font-weight: 600; }
.eco-source span { font-size: 12px; color: var(--fg-3); }

.eco-center {
  background: var(--grad-brand);
  border-radius: 20px;
  padding: 28px;
  color: #fff;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 50px -16px color-mix(in srgb, var(--brand) 50%, transparent);
}
.eco-center img { height: 32px; margin: 0 auto 12px; filter: brightness(0) invert(1); }
.eco-center h3 { color: #fff; font-size: 20px; margin: 0 0 16px; }
.eco-modules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.eco-mod {
  background: rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  backdrop-filter: blur(4px);
}
.eco-mod .mdi { display: block; font-size: 16px; margin-bottom: 4px; }

@media (max-width: 980px) {
  .eco-grid { grid-template-columns: 1fr; }
}

/* ============== PIPA section ============== */
.pipa-section {
  background: linear-gradient(135deg, var(--pw-navy-900) 0%, #1B2E55 60%, var(--brand-deep) 100%);
  color: rgba(255,255,255,0.82);
  position: relative;
  overflow: hidden;
}
.pipa-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
  background-size: 24px 24px;
}
.pipa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.pipa-section h2 { color: #fff; }
.pipa-section .lede { color: rgba(255,255,255,0.72); }
.pipa-features {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pipa-feature {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.pipa-feature .mdi {
  font-size: 22px;
  color: var(--pw-indigo-400);
  margin-bottom: 8px;
}
.pipa-feature strong {
  display: block;
  font-size: 14px;
  color: #fff;
  font-weight: 600;
}
.pipa-feature span {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.pipa-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.pipa-chat {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
}
.pipa-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 16px;
}
.pipa-header img { width: 48px; height: 48px; }
.pipa-header strong { display: block; color: #fff; font-size: 15px; font-weight: 600; }
.pipa-header span { font-size: 12px; color: var(--pw-success-500); display: flex; align-items: center; gap: 6px; }
.pipa-header span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  max-width: 85%;
  margin-bottom: 10px;
}
.bubble.user {
  background: var(--brand);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.bubble.bot {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.92);
  border-bottom-left-radius: 4px;
}
.pipa-poweredby {
  margin-top: 16px;
  font-size: 11px;
  text-align: center;
  color: rgba(255,255,255,0.5);
}
@media (max-width: 980px) {
  .pipa-grid { grid-template-columns: 1fr; }
  .pipa-features { grid-template-columns: 1fr; }
}

/* ============== Process steps ============== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 36px;
  left: 60px;
  right: 60px;
  height: 2px;
  background: linear-gradient(to right, var(--brand), var(--accent), transparent);
  z-index: 0;
}
.step {
  background: #fff;
  border: 1px solid var(--pw-grey-200);
  border-radius: 14px;
  padding: 28px 22px;
  position: relative;
  z-index: 1;
  transition: all 250ms var(--ease-out);
}
.step:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 14px;
}
.step h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step p {
  font-size: 14px;
  line-height: 1.45;
  color: var(--fg-3);
  margin: 0;
}
.step .time {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
  font-weight: 500;
}
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
}
@media (max-width: 540px) {
  .steps { grid-template-columns: 1fr; }
}

/* ============== Final CTA ============== */
.final-cta {
  background: var(--pw-navy-900);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 50% 40% at 30% 50%, color-mix(in srgb, var(--brand) 35%, transparent), transparent),
    radial-gradient(ellipse 40% 40% at 80% 20%, color-mix(in srgb, var(--accent) 28%, transparent), transparent);
  pointer-events: none;
}
.final-cta-inner {
  position: relative;
  text-align: center;
  z-index: 2;
}
.final-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.8vw, 60px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 24px;
  text-wrap: balance;
}
.final-cta .lede {
  color: rgba(255,255,255,0.74);
  margin: 0 auto 36px;
  font-size: 19px;
  max-width: 600px;
}
.final-cta .actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.final-cta .contact-meta {
  margin-top: 56px;
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.final-cta .contact-meta a { color: #fff; }
.final-cta .contact-meta .mdi { color: var(--pw-indigo-400); margin-right: 6px; }

/* ============== Footer ============== */
.footer {
  background: var(--pw-navy-900);
  color: rgba(255,255,255,0.6);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand img { height: 24px; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.55); max-width: 38ch; margin: 0; }
.footer-col h5 {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { font-size: 14px; color: rgba(255,255,255,0.6); }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom .pills { display: flex; gap: 14px; }
.footer-bottom .pills span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-bottom .pills .mdi { color: var(--pw-success-500); }
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ============== PIPA floating chat (bottom-right) ============== */
.pipa-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 14px 32px -8px color-mix(in srgb, var(--brand) 60%, transparent);
  cursor: pointer;
  display: grid;
  place-items: center;
  border: none;
  transition: transform 200ms var(--ease-out);
}
.pipa-fab:hover { transform: scale(1.06); }
.pipa-fab img { width: 38px; height: 38px; }
.pipa-fab::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  opacity: 0;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ============== Scroll-reveal ============== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============== Utilities ============== */
.muted { color: var(--fg-3); }
.mono { font-family: var(--font-mono); }
@media (max-width: 780px) {
  section { padding: 64px 0; }
  .hero { padding-top: 120px; }
}
