/* ═══════════════════════════════════════════════════════
   PRIME — Sub-page Design System
   Palette: construction steel + amber warning + concrete white
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --ink:        #0D0D14;   /* near-black */
  --steel:      #1C1F2E;   /* dark steel blue */
  --steel-mid:  #252940;   /* mid steel */
  --steel-lite: #2E334F;   /* lighter steel */
  --amber:      #F5A623;   /* construction amber */
  --amber-dim:  #C07B0A;   /* dark amber */
  --amber-glow: rgba(245,166,35,0.12);
  --concrete:   #F0EDE8;   /* off-white / concrete */
  --sand:       #E8E3DA;   /* warmer concrete */
  --mist:       rgba(240,237,232,0.06);
  --chalk:      rgba(240,237,232,0.55);
  --white:      #FFFFFF;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  14px;

  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;

  --max-w: 1100px;
  --col-gap: 48px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--steel);
  color: var(--concrete);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Shared Nav ──────────────────────────────────────────── */
.p-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,20,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245,166,35,0.18);
}
.p-nav__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 32px;
  height: 58px;
}
.p-nav__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--amber);
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}
.p-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.p-nav__links::-webkit-scrollbar { display: none; }
.p-nav__link {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--chalk);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color 0.18s, background 0.18s;
  letter-spacing: 0.02em;
}
.p-nav__link:hover { color: var(--concrete); background: var(--mist); }
.p-nav__link.active { color: var(--amber); background: var(--amber-glow); }
.p-nav__home {
  font-size: 0.78rem;
  color: var(--chalk);
  padding: 6px 11px;
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: border-color 0.18s, color 0.18s;
  flex-shrink: 0;
}
.p-nav__home:hover { border-color: var(--amber); color: var(--amber); }

/* ── Hamburger button (mobile only) ─────────────────────── */
.p-nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  margin-left: auto;
  cursor: pointer;
  background: none;
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.p-nav__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--chalk);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s, background 0.18s;
  transform-origin: center;
}
.p-nav__burger:hover span { background: var(--amber); }
/* open state — burger → X */
.p-nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.p-nav__burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.p-nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile drawer ───────────────────────────────────────── */
.p-nav__drawer {
  display: none; /* shown only on mobile */
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(13,13,20,0.98);
  /* collapsed */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.25s ease;
}
.p-nav__drawer.is-open {
  max-height: 420px;
  padding: 12px 16px 16px;
}
.p-nav__drawer .p-nav__link {
  font-size: 0.92rem;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.p-nav__drawer .p-nav__link:last-of-type { border-bottom: none; }
.p-nav__drawer .p-nav__home {
  margin-top: 8px;
  display: block;
  text-align: center;
  padding: 10px 14px;
}

/* ── Page Hero ───────────────────────────────────────────── */
.p-hero {
  padding: 80px 32px 64px;
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}
.p-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 20px;
}
.p-hero__eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--amber);
  flex-shrink: 0;
}
.p-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--white);
  max-width: 760px;
  margin-bottom: 22px;
}
.p-hero__title em {
  font-style: normal;
  color: var(--amber);
}
.p-hero__intro {
  font-size: 1.05rem;
  color: var(--chalk);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 36px;
}
.p-hero__rule {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, var(--amber), transparent);
  margin-top: 48px;
  opacity: 0.4;
}

/* ── Main content wrapper ───────────────────────────────── */
.p-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px 100px;
}

/* ── Section ─────────────────────────────────────────────── */
.p-section {
  margin-top: 72px;
}
.p-section__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
  opacity: 0.85;
}
.p-section__heading {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 18px;
  line-height: 1.25;
}
.p-section__body {
  font-size: 0.96rem;
  color: var(--chalk);
  line-height: 1.75;
  max-width: 760px;
  margin-bottom: 14px;
}
.p-section__body + .p-section__body { margin-top: -2px; }

/* ── Feature Table ───────────────────────────────────────── */
.p-ftable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 0.9rem;
}
.p-ftable tr {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s;
}
.p-ftable tr:last-child { border-bottom: none; }
.p-ftable tr:hover { background: var(--mist); }
.p-ftable td {
  padding: 14px 16px;
  vertical-align: top;
  line-height: 1.55;
}
.p-ftable td:first-child {
  font-weight: 600;
  color: var(--concrete);
  white-space: nowrap;
  padding-right: 28px;
  width: 240px;
  font-family: var(--font-display);
  font-size: 0.88rem;
}
.p-ftable td:last-child { color: var(--chalk); }

/* ── Bullet list ─────────────────────────────────────────── */
.p-list {
  list-style: none;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.p-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.93rem;
  color: var(--chalk);
  line-height: 1.6;
}
.p-list li::before {
  content: '▸';
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 0.8rem;
}

/* ── Card grid ───────────────────────────────────────────── */
.p-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.p-card {
  background: var(--steel-mid);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  position: relative;
}
.p-card:hover {
  border-color: rgba(245,166,35,0.35);
  background: var(--steel-lite);
  transform: translateY(-2px);
}
.p-card__icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
  display: block;
}
.p-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.p-card__body {
  font-size: 0.875rem;
  color: var(--chalk);
  line-height: 1.65;
}
.p-card--amber {
  border-color: rgba(245,166,35,0.3);
  background: rgba(245,166,35,0.07);
}
.p-card--amber .p-card__title { color: var(--amber); }

/* ── Engine / Step cards ─────────────────────────────────── */
.p-engines {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 20px;
}
.p-engine {
  background: var(--steel-mid);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.p-engine__header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 32px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.p-engine__num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--amber);
  opacity: 0.35;
  line-height: 1;
  width: 52px;
  flex-shrink: 0;
}
.p-engine__meta { flex: 1; }
.p-engine__tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 6px;
}
.p-engine__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
}
.p-engine__body {
  padding: 24px 32px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.p-engine__what { }
.p-engine__what-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chalk);
  opacity: 0.7;
  margin-bottom: 8px;
}
.p-engine__what-text {
  font-size: 0.9rem;
  color: var(--chalk);
  line-height: 1.7;
  margin-bottom: 16px;
}
.p-engine__output-box {
  background: rgba(245,166,35,0.08);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 0.86rem;
  color: var(--concrete);
  line-height: 1.65;
}
.p-engine__output-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}

/* ── Finacials revenue flow ──────────────────────────────── */
.p-fin-stages {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 20px;
}
.p-fin-stage {
  background: var(--steel-mid);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
}
.p-fin-stage__head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(0,0,0,0.15);
}
.p-fin-stage__num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.p-fin-stage__title-wrap { flex: 1; }
.p-fin-stage__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 2px;
}
.p-fin-stage__sub {
  font-size: 0.78rem;
  color: var(--amber);
  font-weight: 500;
}
.p-fin-stage__body {
  padding: 22px 28px 26px;
}
.p-fin-stage__desc {
  font-size: 0.92rem;
  color: var(--chalk);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ── Placeholder blocks ──────────────────────────────────── */
.p-placeholder {
  border: 1px dashed rgba(245,166,35,0.35);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 18px;
  background: rgba(245,166,35,0.04);
}
.p-placeholder__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: 0.7;
  margin-bottom: 8px;
}
.p-placeholder__text {
  font-size: 0.88rem;
  color: rgba(240,237,232,0.5);
  font-style: italic;
  line-height: 1.6;
}

/* ── Two-col layout ──────────────────────────────────────── */
.p-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--col-gap);
  margin-top: 20px;
}

/* ── Stat strip ──────────────────────────────────────────── */
.p-stats {
  display: flex;
  gap: 0;
  margin: 48px 0 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--steel-mid);
}
.p-stat {
  flex: 1;
  padding: 24px 20px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.07);
}
.p-stat:last-child { border-right: none; }
.p-stat__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 6px;
}
.p-stat__label {
  font-size: 0.78rem;
  color: var(--chalk);
  line-height: 1.4;
}

/* ── CTA footer strip ────────────────────────────────────── */
.p-cta-strip {
  margin-top: 80px;
  padding: 48px 40px;
  background: linear-gradient(135deg, rgba(245,166,35,0.1) 0%, rgba(245,166,35,0.03) 100%);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.p-cta-strip__text { }
.p-cta-strip__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}
.p-cta-strip__heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
}
.p-cta-strip__sub {
  font-size: 0.9rem;
  color: var(--chalk);
}
.p-cta-strip__actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.p-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.p-btn--primary {
  background: var(--amber);
  color: var(--ink);
}
.p-btn--primary:hover { background: #e8980f; transform: translateY(-1px); }
.p-btn--ghost {
  background: transparent;
  border: 1px solid rgba(245,166,35,0.4);
  color: var(--amber);
}
.p-btn--ghost:hover { background: var(--amber-glow); border-color: var(--amber); }

/* ── Footer ──────────────────────────────────────────────── */
.p-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.78rem;
  color: rgba(240,237,232,0.35);
}
.p-footer__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--amber);
}

/* ── Divider ─────────────────────────────────────────────── */
.p-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 48px 0;
}

/* ── Sub-heading within section ──────────────────────────── */
.p-subhead {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--concrete);
  margin: 24px 0 8px;
  letter-spacing: 0.01em;
}

/* ── Tag chip ────────────────────────────────────────────── */
.p-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(245,166,35,0.15);
  color: var(--amber);
  margin-right: 6px;
  margin-bottom: 4px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav: hide desktop link strip and home link; show burger + drawer */
  .p-nav__bar { padding: 0 16px; gap: 12px; }
  .p-nav__links { display: none; }
  .p-nav__home { display: none; }
  .p-nav__burger { display: flex; }
  .p-nav__drawer { display: flex; }

  .p-hero { padding: 40px 20px 36px; }
  .p-content { padding: 0 20px 64px; }
  .p-two-col { grid-template-columns: 1fr; }
  .p-engine__body { grid-template-columns: 1fr; }
  .p-cta-strip { flex-direction: column; }
  .p-cta-strip__actions { width: 100%; }
  .p-btn { flex: 1; justify-content: center; }
  .p-stats { flex-wrap: wrap; }
  .p-stat { min-width: 120px; }
  .p-ftable td:first-child { white-space: normal; min-width: 120px; }
  .p-footer { flex-direction: column; text-align: center; }
  .p-cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
