/* ============================================================
   PM360 — marketing home page
   One stylesheet. Loaded by index.html.

   Standalone: the Modernist accent ramp is inlined below rather
   than referenced, so this file has no external dependency
   beyond the Archivo webfont.
   ============================================================ */

:root {
  /* ground + ink */
  --pm-bg:        #f8f8f7;
  --pm-surface:   #ffffff;
  --pm-ink:       #101828;
  --pm-body:      #475467;
  --pm-muted:     #667085;
  --pm-line:      #e4e7ec;

  /* navy — section grounds */
  --pm-navy:      #12284c;
  --pm-navy-900:  #0b1c37;
  --pm-on-navy:   #b9c5d8;
  --pm-on-navy-2: #93a3bd;
  --pm-on-navy-3: #8393ad;

  /* brand red — the accent. Modernist's ramp, inlined. */
  --pm-red:       #ec3013;
  --pm-red-600:   #dd2b0f;
  --pm-red-700:   #ae1800;
  --pm-red-300:   #ff9783;

  /* blue — data viz only, never an action on this page */
  --pm-blue:      #1c62b9;

  /* status */
  --pm-ok:        #067647;
  --pm-warn:      #b54708;
  --pm-crit:      #d92d20;

  --pm-page:      1240px;
  --pm-gutter:    40px;
}

/* ---- reset + base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--pm-bg);
  color: var(--pm-ink);
  font-family: 'Archivo', system-ui, -apple-system, sans-serif;
  font-weight: 450;
  letter-spacing: -0.004em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { margin: 0; font-weight: 800; }
p { margin: 0; }
img, svg { display: block; }
input, button { font-family: inherit; }

a { color: var(--pm-blue); }
a:hover { color: var(--pm-red-600); }

/* Tabular figures for every number, so columns of them align. */
.num {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.018em;
}

.page {
  max-width: var(--pm-page);
  margin: 0 auto;
  padding-left: var(--pm-gutter);
  padding-right: var(--pm-gutter);
}

/* The eyebrow: a 2px red rule then spaced caps. Modernist's own device. */
.eyebrow {
  display: flex; align-items: center; gap: 11px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--pm-muted);
}
.eyebrow::before {
  content: ""; flex: none;
  width: 26px; height: 2px;
  background: var(--pm-red);
}
.eyebrow--navy { color: var(--pm-on-navy-3); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  padding: 12px 18px;
  font-size: 15px; font-weight: 600;
  border: 1px solid transparent; border-radius: 7px;
  text-decoration: none;
  transition: background .14s ease, border-color .14s ease,
              box-shadow .14s ease, transform .06s ease, color .14s ease;
}
.btn--solid {
  background: var(--pm-red); color: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.14), inset 0 1px 0 rgba(255,255,255,.16);
}
.btn--solid:hover {
  background: var(--pm-red-600); color: #fff;
  box-shadow: 0 4px 12px rgba(236,48,19,.28);
}
.btn--solid:active {
  background: var(--pm-red-700);
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(16,24,40,.14);
}
.btn--line {
  background: var(--pm-surface); border-color: #d0d5dd; color: #344054;
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
.btn--line:hover { background: #f9fafb; border-color: #a9b2c0; color: var(--pm-ink); }
.btn--line:active { background: #f2f4f7; transform: translateY(1px); box-shadow: none; }

.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--block { width: 100%; justify-content: center; }

.btn:focus-visible,
.field__input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--pm-red);
  outline-offset: 2px;
}

/* ============================================================
   Header
   ============================================================ */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(248,248,247,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pm-line);
}
.site-head__bar {
  height: 68px;
  display: flex; align-items: center; gap: 36px;
}
.site-head__nav { display: flex; align-items: center; gap: 26px; margin-left: 12px; }
.site-head__cta { margin-left: auto; }

.navlink {
  color: var(--pm-ink); text-decoration: none;
  font-size: 15px; font-weight: 500;
}
.navlink:hover { color: var(--pm-red); }

/* ---- wordmark: PM36 + the orbiting O ---- */
.mark {
  display: inline-flex; align-items: center;
  line-height: 1; text-decoration: none;
  font-weight: 800; font-size: 23px; letter-spacing: -0.045em;
  color: var(--pm-navy);
}
.mark svg { margin-left: 1px; }
.mark--sm { font-size: 19px; }

/* transform-box keeps the origin on the viewBox, not the bounding box,
   so the ring rotates around its own centre at any rendered size. */
.orb-spin {
  transform-box: view-box;
  transform-origin: 16px 16px;
  animation: orbit 18s linear infinite;
}
@keyframes orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  border-bottom: 1px solid var(--pm-line);
  overflow: hidden;
}
.hero__body { position: relative; padding-top: 76px; }
.hero__title {
  margin-top: 26px;
  max-width: 19ch;
  font-size: clamp(44px, 6.2vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero__title em { font-style: normal; color: var(--pm-red); }
.hero__lede {
  margin-top: 30px;
  max-width: 56ch;
  font-size: 19px; line-height: 1.62;
  color: var(--pm-body);
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---- animated background ----------------------------------
   Capped at 560px and masked to fade out before the portfolio
   panel, so nothing competes with the headline or the figures.
   Every layer sits at 5–30% opacity. */
.hero__bg {
  position: absolute; top: 0; left: 0; right: 0; height: 560px;
  pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 96%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 96%);
}
.hero__grid {
  position: absolute; top: -72px; left: -72px; right: -72px; bottom: -72px;
  background-image:
    linear-gradient(rgba(16,24,40,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,24,40,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  animation: grid-drift 34s linear infinite;
}
.hero__chart { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__sweep {
  position: absolute; top: 0; bottom: 0; width: 34%;
  background: linear-gradient(90deg, transparent,
    rgba(28,98,185,.07) 45%, rgba(28,98,185,.11) 55%, transparent);
  animation: sweep 17s cubic-bezier(.45,0,.55,1) infinite;
}
.draw { stroke-dasharray: 1200; animation: draw 15s ease-in-out infinite; }
.draw--late { animation-delay: 2.4s; }
.bar-grow { transform-origin: left center; animation: bar-grow 15s ease-in-out infinite; }
.dot-pulse { animation: pulse 4.5s ease-in-out infinite; }
.d-500  { animation-delay: .5s; }
.d-1000 { animation-delay: 1s; }
.d-1200 { animation-delay: 1.2s; }
.d-1500 { animation-delay: 1.5s; }
.d-2400 { animation-delay: 2.4s; }

@keyframes grid-drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-72px,-72px,0); } }
@keyframes sweep {
  0%   { transform: translateX(-30%); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(130%); opacity: 0; }
}
@keyframes draw     { 0% { stroke-dashoffset: 1200; } 55%, 100% { stroke-dashoffset: 0; } }
@keyframes bar-grow { 0% { transform: scaleX(0); } 60%, 100% { transform: scaleX(1); } }
@keyframes pulse    { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }

/* ============================================================
   Portfolio panel — the product as the proof
   ============================================================ */
.shot { position: relative; padding-top: 64px; }
.shot__frame {
  border: 1px solid var(--pm-line); border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: var(--pm-surface);
  box-shadow: 0 -1px 0 rgba(16,24,40,.02), 0 24px 60px -30px rgba(16,24,40,.22);
  overflow: hidden;
}
.shot__chrome {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--pm-line);
  background: #fcfcfc;
}
.shot__lights { display: flex; gap: 6px; }
.shot__lights span { width: 10px; height: 10px; border-radius: 50%; background: var(--pm-line); }
.shot__url { font-size: 12px; color: var(--pm-muted); }

/* Explicit 3 columns, NOT auto-fit: six tiles in a wrapping flex row
   fit five on the first line and orphan the sixth. */
.shot__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tile {
  padding: 22px 22px 24px;
  border-left: 1px solid var(--pm-line);
  border-bottom: 1px solid var(--pm-line);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.tile:hover {
  border-color: #b9c6da;
  box-shadow: 0 8px 24px rgba(16,24,40,.07);
  transform: translateY(-2px);
}
.tile__label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--pm-muted);
}
.tile__value {
  margin-top: 8px;
  font-weight: 800; font-size: 38px; line-height: 1;
  letter-spacing: -0.035em;
}
/* Status note: the dot carries the severity, the text states it. */
.tile__note {
  display: flex; align-items: center; gap: 7px;
  margin-top: 9px;
  font-size: 13px;
}
.tile__note::before {
  content: ""; flex: none;
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
}
.tile__note--ok    { color: var(--pm-ok); }
.tile__note--warn  { color: var(--pm-warn); }
.tile__note--crit  { color: var(--pm-crit); }
.tile__note--muted { color: var(--pm-muted); }

.tile__spark { width: 100%; height: 62px; margin-top: 16px; }
.tile__chain { width: 100%; height: 58px; margin-top: 16px; }

/* ---- money bars (EAC vs budget tile) ---- */
.bars { margin-top: 16px; display: grid; gap: 9px; }
.bars__row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) 54px;
  gap: 9px; align-items: center;
}
.bars__label { font-size: 11px; color: var(--pm-muted); }
.bars__track {
  display: block; height: 8px;
  background: #eef0f3; border-radius: 4px; overflow: hidden;
}
.bars__fill { display: block; height: 8px; border-radius: 4px; }
.bars__value { font-size: 11px; font-weight: 600; text-align: right; }

/* ---- project rows (active projects tile) ---- */
.rows { margin-top: 16px; display: grid; gap: 7px; }
.rows__row {
  display: grid; grid-template-columns: 8px minmax(0, 1fr) 34px;
  gap: 9px; align-items: center;
}
.rows__swatch { width: 8px; height: 8px; border-radius: 2px; }
.rows__track {
  display: block; height: 7px;
  background: #eef0f3; border-radius: 3.5px; overflow: hidden;
}
.rows__fill { display: block; height: 7px; border-radius: 3.5px; opacity: .55; }
.rows__pct { font-size: 10px; color: var(--pm-muted); text-align: right; }

/* ---- synced entities (Costpoint tile) ---- */
.sync { margin-top: 16px; display: grid; gap: 7px; }
.sync__row { display: flex; align-items: center; gap: 9px; font-size: 11px; }
.sync__row::before {
  content: ""; flex: none;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pm-ok);
}
.sync__name {
  color: var(--pm-body);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sync__count { margin-left: auto; flex: none; color: var(--pm-muted); }

/* ---- 5x5 risk matrix ---- */
.matrix { display: flex; align-items: flex-end; gap: 9px; margin-top: 16px; }
.matrix__grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 3px; width: 118px;
}
.matrix__cell { aspect-ratio: 1; border-radius: 2px; background: #f2f4f7; }
.matrix__cell--crit { background: var(--pm-crit); }
.matrix__cell--high { background: #f79009; }
.matrix__cell--med  { background: #fec84b; }
.matrix__axis { font-size: 10px; line-height: 1.5; color: var(--pm-muted); }

/* ============================================================
   Scale — navy band, figures against a ruled list
   ============================================================ */
.scale { background: var(--pm-navy); color: #fff; }
.scale__inner {
  padding: 56px 40px 60px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 52px; align-items: start;
}
.scale__title {
  margin-top: 18px;
  font-size: clamp(28px, 2.9vw, 38px);
  line-height: 1.08; letter-spacing: -0.032em;
}
.scale__lede {
  margin-top: 14px; max-width: 36ch;
  font-size: 15px; line-height: 1.58;
  color: var(--pm-on-navy);
  text-wrap: pretty;
}
.scale__list { border-top: 2px solid rgba(255,255,255,.28); }
.scale__item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px; align-items: baseline;
  padding: 17px 0 15px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.scale__name { font-weight: 800; font-size: 16px; letter-spacing: -0.02em; }
.scale__desc {
  margin-top: 4px;
  font-size: 13px; line-height: 1.5;
  color: var(--pm-on-navy-2);
  text-wrap: pretty;
}
.scale__figure {
  font-weight: 800;
  font-size: clamp(36px, 3.5vw, 50px);
  line-height: .9; letter-spacing: -0.04em;
  color: var(--pm-red-300);
}
.scale__unit { font-size: .42em; letter-spacing: -0.01em; }

/* ============================================================
   Roles + features
   ============================================================ */
.roles { border-bottom: 1px solid var(--pm-line); }
.roles__head { padding-top: 84px; }
.roles__title {
  margin-top: 24px; max-width: 22ch;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.04; letter-spacing: -0.035em;
}
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 30px; }
.chip {
  padding: 7px 14px;
  border: 1px solid var(--pm-line); border-radius: 999px;
  background: var(--pm-surface);
  font-size: 13px; font-weight: 500; color: #344054;
}

.features { margin-top: 56px; padding-bottom: 84px; }
/* 2px top rule + a visible grid. Six cells fill two rows of three exactly. */
.features__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--pm-ink);
  border-left: 1px solid var(--pm-line);
}
.feature {
  padding: 34px 30px 36px;
  border-right: 1px solid var(--pm-line);
  border-bottom: 1px solid var(--pm-line);
  transition: background .16s ease;
}
.feature:hover { background: var(--pm-surface); }
.feature__title { margin-top: 16px; font-size: 20px; letter-spacing: -0.022em; }
.feature__body {
  margin-top: 10px;
  font-size: 15px; line-height: 1.62;
  color: var(--pm-body);
  text-wrap: pretty;
}

/* ============================================================
   Demo — the close
   ============================================================ */
.demo {
  position: relative; overflow: hidden;
  background: var(--pm-navy); color: #fff;
}
.demo__grid {
  position: absolute; inset: 0; opacity: .4;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 72px 72px;
}
.demo__inner {
  position: relative;
  padding: 88px 40px 92px;
  display: grid; grid-template-columns: minmax(0, 1fr) 420px;
  gap: 56px; align-items: end;
}
.demo__title {
  max-width: 20ch;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.03; letter-spacing: -0.038em;
}
.demo__lede {
  margin-top: 22px; max-width: 44ch;
  font-size: 18px; line-height: 1.6;
  color: var(--pm-on-navy);
  text-wrap: pretty;
}
.demo__form { display: grid; gap: 12px; }

.field__label { font-size: 13px; font-weight: 600; color: #cdd7e6; }
.field__input {
  width: 100%;
  padding: 13px 15px;
  font-size: 15px; color: #fff;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.24); border-radius: 7px;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.field__input::placeholder { color: var(--pm-on-navy-2); }
.field__input:hover { border-color: rgba(255,255,255,.42); }
.field__input:focus {
  outline: none;
  background: rgba(255,255,255,.12);
  border-color: var(--pm-red-300);
  box-shadow: 0 0 0 3px rgba(255,151,131,.24);
}

/* ============================================================
   Footer
   ============================================================ */
.site-foot { background: var(--pm-bg); }
.site-foot__bar {
  padding-top: 34px; padding-bottom: 40px;
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap;
}
.site-foot__nav { display: flex; align-items: center; gap: 24px; }
.site-foot__nav .navlink { font-size: 14px; }
.site-foot__legal { margin-left: auto; font-size: 13px; color: var(--pm-muted); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
  .scale__inner,
  .demo__inner { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .demo__inner { align-items: start; }
  .shot__grid,
  .features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --pm-gutter: 20px; }
  .site-head__nav { display: none; }
  .shot__grid,
  .features__grid { grid-template-columns: minmax(0, 1fr); }
  .scale__inner { padding-left: 0; padding-right: 0; }
  .demo__inner { padding: 56px 20px 60px; }
  .roles__head { padding-top: 56px; }
  .features { padding-bottom: 56px; }
  .hero__body { padding-top: 48px; }
}

/* ============================================================
   Motion preference — final state kept, movement removed
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__grid, .hero__sweep, .draw, .bar-grow, .dot-pulse, .orb-spin {
    animation: none !important;
  }
  .draw { stroke-dasharray: none; }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
  .hero__bg, .demo__grid { display: none; }
  .site-head { position: static; }
  .scale, .demo { background: #fff; color: var(--pm-ink); }
  .scale__desc, .scale__lede, .demo__lede { color: var(--pm-body); }
  .scale__figure { color: var(--pm-red); }
}
