@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* Ambia unified brand system — Performance Matters structure, Ambia red. */
:root {
  --white: #ffffff;
  --paper: #ffffff;
  --paper-soft: #f7f7f4;
  --cream: #f0ede8;
  --black: #050505;
  --ink: #050505;
  --surface: #ffffff;
  --surface-2: #f7f7f4;
  --text: #050505;
  --muted: #555555;
  --quiet: #625f5b;
  --rule: #d8d8d8;
  --rule-dark: #050505;
  --red: #c0272d;
  --red-bright: #e3262e;
  --red-dark: #8b1a1e;
  --red-wash: rgba(192,39,45,0.075);
}

html { background: var(--paper); }

body {
  background: var(--paper);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  background:
    radial-gradient(circle at 78% 18%, rgba(192,39,45,0.075), transparent 0 18%, transparent 30%),
    linear-gradient(90deg, rgba(5,5,5,0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(5,5,5,0.035) 1px, transparent 1px);
  background-size: clamp(42px, 6vw, 86px) clamp(42px, 6vw, 86px);
  mask-image: linear-gradient(90deg, rgba(0,0,0,0.9), rgba(0,0,0,0.1) 68%, transparent);
}

body::after {
  opacity: 1;
  background: linear-gradient(90deg, transparent, rgba(192,39,45,0.2), transparent);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  transform: translateY(-12vh);
  animation: ambia-scanline 7s cubic-bezier(0.76,0,0.24,1) infinite;
  mask-image: none;
}

@keyframes ambia-scanline {
  0%, 12% { transform: translateY(-12vh); opacity: 0; }
  20% { opacity: 1; }
  70% { opacity: 0.45; }
  82%, 100% { transform: translateY(112vh); opacity: 0; }
}

/* Keep the original Ambia decorative field active beneath the brand layer. */

nav {
  background: rgba(255,255,255,0.9);
  color: var(--text);
  border-bottom-color: var(--rule);
  backdrop-filter: blur(14px);
}

.nav-logo,
.f-logo,
.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.nav-logo::after,
.f-logo::after,
.logo::after,
.footer-logo::after {
  display: none;
}

.brand-mark {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

.f-logo .brand-mark,
.footer-logo .brand-mark { width: 24px; height: 24px; }

.logo .brand-mark { width: 25px; height: 25px; }

.nav-tag,
.nav-cta,
.nav-menu-link,
.btn-red,
.btn-ghost,
.eyebrow,
.sec-label,
.t-item,
.m-item,
.proof-sub,
.proof-attr,
.video-label,
.panel-n,
.row-n,
.f-link,
.f-copy,
.s-eyebrow,
.slide-counter,
.offer-label,
.step-eyebrow,
.success-eyebrow,
.progress-meta,
.field label,
.pill,
.nav-back,
.top-bar {
  font-family: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;
}

.hero-hed,
.sec-title,
.cta-h,
.proof-num,
.s-body,
.step-headline,
.success-title,
.offer-num {
  color: var(--text);
  font-family: 'Archivo Black', 'Arial Black', 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.94;
  text-wrap: balance;
}

.hero-hed {
  max-width: 1420px;
  font-size: clamp(48px,5.5vw,88px);
  line-height: 1.06;
}

.hero {
  overflow: hidden;
  border-bottom-color: var(--text);
}

.hero::before {
  content: "PERFORMANCE / MATTERS /";
  position: absolute;
  top: 13%;
  right: -5vw;
  z-index: 0;
  width: 5.4ch;
  color: transparent;
  -webkit-text-stroke: 1px rgba(5,5,5,0.08);
  font-family: 'Inter',sans-serif;
  font-size: clamp(6rem,16vw,16rem);
  font-weight: 800;
  line-height: 0.78;
  letter-spacing: -0.08em;
  pointer-events: none;
}

.hero-left { position: relative; z-index: 1; }

.hero-hed em,
.hero-hed .stroke {
  display: inline;
  padding: 0.01em 0.08em 0.025em;
  color: #fff;
  background: var(--red);
  box-shadow: 0.045em 0.045em 0 var(--text);
  -webkit-text-stroke: 0;
  text-stroke: 0;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.sec-title { font-size: clamp(40px,4.55vw,68px); }
.case-study-title { font-size: clamp(40px,4.2vw,62px); }
.cta-h { font-size: clamp(46px,5.8vw,82px); line-height: 0.92; }
.proof-num { letter-spacing: -0.065em; line-height: 0.82; }

.panel-h,
.row h3 {
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hero-sub,
.sec-body,
.cta-sub,
.panel-p,
.row p,
.step-sub,
.success-body,
.offer-desc {
  color: var(--muted);
}

.eyebrow,
.sec-label,
.s-eyebrow,
.step-eyebrow,
.success-eyebrow,
.offer-label,
.panel-n,
.row-n,
.video-label span:first-child {
  color: var(--red);
}

.nav-cta,
.btn-red,
.cta-btn,
.btn-next,
.btn-submit {
  min-height: 44px;
  padding-inline: 24px;
  border: 1px solid var(--red);
  border-radius: 0;
  background: var(--red);
  color: #fff;
  box-shadow: none;
}

.nav-cta { font-size: 12px; }

.nav-cta:hover,
.btn-red:hover,
.cta-btn:hover,
.btn-next:hover,
.btn-submit:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: #fff;
  box-shadow: none;
}

.nav-menu-link,
.nav-text-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 3px;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  border: 0;
  border-bottom: 2px solid transparent;
  font-family: 'IBM Plex Mono','SF Mono',Consolas,monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}
.nav-menu-link:hover,
.nav-menu-link:focus-visible,
.nav-text-link:hover,
.nav-text-link:focus-visible {
  color: var(--red);
  background: transparent;
  border-bottom-color: var(--red);
  outline: none;
}
.tools-menu { position: relative; }
.tools-menu summary { cursor: pointer; list-style: none; }
.tools-menu summary::-webkit-details-marker { display: none; }
.tools-menu summary::after {
  content: '▾';
  color: var(--red-bright);
  font-size: 12px;
  line-height: 1;
  transition: transform 0.18s ease;
}
.tools-menu[open] summary::after { transform: rotate(180deg); }
.tools-menu-panel {
  position: absolute;
  top: calc(100% + 13px);
  right: 0;
  width: min(310px,calc(100vw - 32px));
  padding: 8px;
  background: rgba(255,255,255,0.98);
  border: 1px solid var(--text);
  box-shadow: 10px 10px 0 rgba(192,39,45,0.2);
}
.tools-menu-panel a {
  display: block;
  padding: 13px 14px;
  color: var(--text);
  border-bottom: 1px solid var(--rule);
  font-family: 'IBM Plex Mono','SF Mono',Consolas,monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-decoration: none;
}
.tools-menu-panel a:last-child { border-bottom: 0; }
.tools-menu-panel a:hover,
.tools-menu-panel a:focus-visible { color: #fff; background: var(--red); }
.btn-ghost::after { color: var(--red); }

.ticker,
.marquee {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.t-item,
.m-item { color: rgba(255,255,255,0.78); border-color: rgba(255,255,255,0.2); }
.t-item.r,
.m-item.r { color: #ff4b50; }

.section.alt,
.slide.accent { background: var(--paper-soft); }

.panel,
.proof-card,
.video-frame,
.field input,
.field select,
.field textarea,
.pill {
  background: #fff;
  border-color: var(--text);
  border-radius: 0;
  box-shadow: none;
}

.grid-3,
.grid-2 { gap: 0; background: transparent; border-color: var(--text); }
.panel { border: 0; border-right: 1px solid var(--text); }
.panel:last-child { border-right: 0; }
.panel:hover {
  background: linear-gradient(135deg,var(--red-wash),transparent 42%),var(--paper-soft);
  transform: none;
}

.proof-card::before {
  width: 3px;
  background: linear-gradient(to bottom,var(--red-bright),var(--red-dark));
}
.proof-num em { color: var(--red); -webkit-text-stroke: 0; }
.rows,
.row,
.proof-quote,
.video-label { border-color: var(--text); }

.pm-signal-console {
  width: min(100%,960px);
  min-height: 176px;
  display: grid;
  grid-template-columns: minmax(150px,0.34fr) minmax(280px,1fr) minmax(150px,0.32fr);
  margin-top: clamp(38px,6vh,72px);
  color: #fff;
  background:
    repeating-linear-gradient(90deg,transparent 0 23px,rgba(255,255,255,0.065) 23px 24px),
    var(--text);
  border: 1px solid var(--text);
  box-shadow: 14px 14px 0 var(--red),14px 14px 0 1px var(--red-dark);
  position: relative;
  overflow: hidden;
}

.pm-signal-console::before {
  content: '';
  position: absolute;
  left: -32%;
  right: -32%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg,transparent,var(--red-bright),transparent);
  transform: translateY(-180px) rotate(-18deg);
  animation: pm-diagonal-sweep 5.5s cubic-bezier(0.76,0,0.24,1) infinite;
  pointer-events: none;
}

.pm-console-id,
.pm-console-output {
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 22px;
  position: relative;
  z-index: 1;
}

.pm-console-id { border-right: 1px solid rgba(255,255,255,0.35); }
.pm-console-output {
  border-left: 1px solid rgba(255,255,255,0.35);
  overflow: hidden;
}

.pm-console-output::before {
  content: '';
  width: 112px;
  height: 112px;
  position: absolute;
  right: -42px;
  top: 30px;
  border: 1px dashed rgba(227,38,46,0.52);
  border-radius: 50%;
  box-shadow: inset 0 0 0 12px rgba(227,38,46,0.05),inset 0 0 0 13px rgba(227,38,46,0.25);
  animation: pm-seal-spin 16s linear infinite;
}

.pm-console-output > * { position: relative; z-index: 1; }

.pm-console-kicker,
.pm-console-foot,
.pm-console-output span {
  color: rgba(255,255,255,0.68);
  font-family: 'IBM Plex Mono','SF Mono',Consolas,monospace;
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pm-console-id strong,
.pm-console-output strong {
  color: #ff4b50;
  font-family: 'Archivo Black','Arial Black','Inter',sans-serif;
  font-weight: 400;
}

.pm-console-id strong {
  align-self: center;
  font-size: clamp(52px,6vw,88px);
  line-height: 0.76;
  letter-spacing: -0.075em;
}

.pm-console-output strong {
  max-width: 8ch;
  font-size: clamp(18px,2vw,27px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.pm-signal-stage {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 22px 24px;
  position: relative;
  z-index: 1;
}

.pm-signal-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255,255,255,0.72);
  font-family: 'IBM Plex Mono','SF Mono',Consolas,monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pm-signal-stage-head span:last-child::before {
  content: '';
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 8px;
  background: var(--red-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(227,38,46,0.15);
  animation: pm-status-pulse 1.8s ease-in-out infinite;
}

.pm-signal-bars {
  height: 82px;
  display: grid;
  grid-template-columns: repeat(14,minmax(6px,1fr));
  align-items: end;
  gap: clamp(4px,0.65vw,8px);
  border-bottom: 1px solid rgba(255,255,255,0.42);
}

.pm-signal-bars i {
  display: block;
  height: var(--h);
  background: #fff;
  opacity: 0.46;
  transform-origin: center bottom;
  animation: pm-bars 1.8s ease-in-out infinite;
  animation-delay: var(--d);
}

.pm-signal-bars i:nth-child(3n + 1),
.pm-signal-bars i:nth-child(3n + 2) { background: var(--red-bright); opacity: 0.72; }
.pm-signal-bars i:nth-child(1) { --h: 28%; --d: 0s; }
.pm-signal-bars i:nth-child(2) { --h: 52%; --d: 0.1s; }
.pm-signal-bars i:nth-child(3) { --h: 78%; --d: 0.2s; }
.pm-signal-bars i:nth-child(4) { --h: 36%; --d: 0.3s; }
.pm-signal-bars i:nth-child(5) { --h: 68%; --d: 0.4s; }
.pm-signal-bars i:nth-child(6) { --h: 44%; --d: 0.5s; }
.pm-signal-bars i:nth-child(7) { --h: 88%; --d: 0.6s; }
.pm-signal-bars i:nth-child(8) { --h: 58%; --d: 0.7s; }
.pm-signal-bars i:nth-child(9) { --h: 34%; --d: 0.8s; }
.pm-signal-bars i:nth-child(10) { --h: 72%; --d: 0.9s; }
.pm-signal-bars i:nth-child(11) { --h: 48%; --d: 1s; }
.pm-signal-bars i:nth-child(12) { --h: 82%; --d: 1.1s; }
.pm-signal-bars i:nth-child(13) { --h: 62%; --d: 1.2s; }
.pm-signal-bars i:nth-child(14) { --h: 92%; --d: 1.3s; }

.pm-console-scale {
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,0.48);
  font-family: 'IBM Plex Mono','SF Mono',Consolas,monospace;
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

@keyframes pm-bars {
  0%,100% { transform: scaleY(0.58); opacity: 0.34; }
  50% { transform: scaleY(1); opacity: 0.82; }
}
@keyframes pm-status-pulse {
  0%,100% { transform: scale(0.72); opacity: 0.36; }
  50% { transform: scale(1); opacity: 1; }
}
@keyframes pm-seal-spin { to { transform: rotate(360deg); } }
@keyframes pm-diagonal-sweep {
  0%,28% { transform: translateY(-180px) rotate(-18deg); opacity: 0; }
  50% { opacity: 0.62; }
  76%,100% { transform: translateY(180px) rotate(-18deg); opacity: 0; }
}

.faq-list {
  margin-top: 56px;
  border-top: 1px solid var(--text);
  counter-reset: faq;
}

.faq-item {
  counter-increment: faq;
  border-bottom: 1px solid var(--text);
}

.faq-item summary {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) 32px;
  gap: 18px;
  align-items: center;
  min-height: 96px;
  padding: 20px 0;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  font-family: 'Inter',sans-serif;
  font-size: clamp(20px,2vw,29px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: counter(faq,decimal-leading-zero);
  color: var(--red);
  font-family: 'IBM Plex Mono','SF Mono',Consolas,monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.faq-item summary::after {
  content: '+';
  color: var(--red);
  font-family: 'IBM Plex Mono','SF Mono',Consolas,monospace;
  font-size: 28px;
  font-weight: 400;
  text-align: right;
  transition: transform 0.18s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer {
  max-width: 820px;
  padding: 0 32px 34px 74px;
  color: var(--muted);
  font-size: clamp(16px,1.3vw,19px);
  line-height: 1.65;
}

.cta-wrap {
  background: var(--text);
  color: #fff;
}
.cta-wrap::before {
  background:
    repeating-radial-gradient(circle,rgba(255,255,255,0.08) 0 1px,transparent 1px 28px),
    radial-gradient(circle,rgba(192,39,45,0.3),transparent 66%);
}
.cta-wrap .sec-label,
.cta-wrap .cta-h,
.cta-wrap .cta-sub,
.cta-wrap .btn-ghost { color: #fff; }
.cta-wrap em {
  display: inline-block;
  padding: 0.03em 0.12em 0.08em;
  color: #fff;
  background: var(--red);
  -webkit-text-stroke: 0;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.cta-wrap .btn-ghost::after { color: #ff4b50; }

footer { background: #fff; border-top: 1px solid var(--text); }
.f-link,
.f-copy { color: var(--quiet); }
.f-link:hover { color: var(--text); }

nav,
.hero,
.ticker,
.marquee,
.proof-section,
.section,
.cta-wrap,
footer,
.page-wrap,
.deck {
  box-shadow: inset 3px 0 0 var(--red);
}

/* Corporate-finance presentation routes. */
.deck { color: var(--text); }
.slide { background: rgba(255,255,255,0.82); }
.slide.accent { background: rgba(247,247,244,0.9); }
.s-body { color: var(--text); font-size: clamp(38px,4.4vw,70px); }
.s-list li { color: var(--text); border-bottom-color: var(--rule); }
.progress-wrap,
.progress-track { background: var(--cream); }
.progress-bar,
.progress-fill { background: var(--red); }
.slide-counter .cur { color: var(--red); }

/* Qualification route. */
.page-wrap { position: relative; z-index: 2; }
.left-panel { background: var(--text); color: #fff; }
.left-panel .offer-label,
.left-panel .offer-num,
.left-panel .offer-desc { color: #fff; }
.left-panel .offer-num span { color: #ff4b50; }
.right-panel { background: rgba(255,255,255,0.96); }
.top-bar { background: var(--text); color: #fff; }
.offer-badge-dot,
.pill.selected .pill-dot { background: var(--red); }
.pill.selected { border-color: var(--red); }

@media (max-width: 900px) {
  .hero-hed { font-size: clamp(44px,8.2vw,70px); line-height: 1.07; }
  .sec-title { font-size: clamp(38px,7vw,56px); }
  .cta-h { font-size: clamp(44px,8vw,64px); }
  .panel { border-right: 0; border-bottom: 1px solid var(--text); }
  .panel:last-child { border-bottom: 0; }
  .hero::before { right: -20vw; opacity: 0.7; }
  .pm-signal-console { grid-template-columns: 120px minmax(0,1fr); }
  .pm-console-output { display: none; }
}

@media (max-width: 540px) {
  body::before {
    background:
      linear-gradient(90deg,rgba(5,5,5,0.035) 1px,transparent 1px),
      linear-gradient(180deg,rgba(5,5,5,0.03) 1px,transparent 1px);
    background-size: 48px 48px;
  }

  .hero-hed {
    font-size: clamp(34px,10.8vw,49px);
    line-height: 1.1;
    letter-spacing: -0.04em;
  }
  .sec-title,
  .case-study-title {
    font-size: clamp(34px,9.8vw,46px);
    line-height: 0.98;
  }
  .cta-h { font-size: clamp(38px,11vw,52px); line-height: 0.95; }
  .nav-logo,
  .f-logo { font-size: 14px; }
  .brand-mark { width: 23px; height: 23px; }
  nav { padding-inline: 12px; gap: 8px; }
  .nav-actions { gap: 6px; }
  .nav-actions > .nav-text-link { display: none; }
  .nav-menu-link { min-height: 40px; padding-inline: 8px; font-size: 11px; }
  .nav-cta { min-height: 42px; padding-inline: 12px; font-size: 11px; }
  .tools-menu-panel {
    position: fixed;
    top: calc(60px + env(safe-area-inset-top, 0px));
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 76px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .hero::before { top: 22%; right: -42vw; }
  .pm-signal-console {
    min-height: 0;
    grid-template-columns: 1fr;
    margin-top: 34px;
    box-shadow: 8px 8px 0 var(--red),8px 8px 0 1px var(--red-dark);
  }
  .pm-console-id {
    min-height: 92px;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.35);
  }
  .pm-console-id strong { font-size: 54px; }
  .pm-console-foot { display: none; }
  .pm-signal-stage { padding: 18px; }
  .pm-signal-bars { height: 68px; gap: 4px; }
  .faq-list { margin-top: 38px; }
  .faq-item summary { grid-template-columns: 34px minmax(0,1fr) 24px; gap: 10px; min-height: 84px; font-size: 19px; }
  .faq-answer { padding: 0 24px 28px 44px; font-size: 16px; }

  nav,
  .hero,
  .ticker,
  .marquee,
  .proof-section,
  .section,
  .cta-wrap,
  footer,
  .page-wrap,
  .deck { box-shadow: inset 2px 0 0 var(--red); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .pm-signal-bars i,
  .pm-signal-stage-head span:last-child::before,
  .pm-signal-console::before,
  .pm-console-output::before { animation: none; }
}
