/* Shared stylesheet for programmatically-generated pages.
   Core design language lifted verbatim from the hand-authored pages so
   generated pages render natively; pSEO-specific components appended below. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #0A0A0A; --mid: #5A5A5A; --soft: #9A9A9A; --line: #E8E6E0;
  --bg: #F7F5F0; --white: #FFFFFF;
  --green: #1A3A2A; --bright: #3D7A52;
  --tag-bg: #EBF4EF; --tag-txt: #1A3A2A;
  --red: #D85A30; --red-bg: #FAECE7; --red-line: #F0997B;
}
body { font-family: 'DM Sans', sans-serif; color: var(--ink); background: var(--white); margin: 0; }

.page { width: 100%; }
.inner { max-width: 1280px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }

/* NAV */
nav { border-bottom: 0.5px solid var(--line); background: var(--white); }
nav .inner { position: relative; display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.logo { font-size: 17px; font-weight: 600; letter-spacing: -0.3px; text-decoration: none; color: var(--ink); }
.logo span { color: var(--bright); }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 13px; }
.nav-links > a { text-decoration: none; color: var(--mid); }
.nav-cta { font-size: 13px; font-weight: 500; background: var(--green); color: #fff; padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; font-family: inherit; text-decoration: none; }
/* win over .nav-links a (site + static inline) so the CTA text stays white */
.nav-links a.nav-cta { color: #fff; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--ink); font-size: 22px; line-height: 1; padding: 4px; }

/* Solutions disclosure — button + aria-expanded (JS), CSS hover as enhancement */
.nav-item { position: relative; display: inline-flex; align-items: center; }
.nav-trigger { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; cursor: pointer; font: inherit; font-size: 13px; color: var(--mid); padding: 0; }
.nav-trigger i { font-size: 14px; transition: transform 0.15s ease; }
.nav-trigger[aria-expanded="true"] i { transform: rotate(180deg); }
.nav-item::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
.nav-dropdown {
  position: absolute; top: 100%; left: 0; margin-top: 12px;
  background: var(--white); border: 0.5px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.07); padding: 8px; min-width: 240px;
  display: none; flex-direction: column; gap: 1px; z-index: 50;
}
.nav-trigger[aria-expanded="true"] + .nav-dropdown { display: flex; }
@media (hover: hover) and (min-width: 769px) { .nav-item:hover .nav-dropdown { display: flex; } }
.nav-dropdown a { padding: 9px 12px; border-radius: 6px; font-size: 13px; color: var(--mid); text-decoration: none; white-space: nowrap; }
.nav-dropdown a:hover, .nav-dropdown a:focus { background: var(--bg); color: var(--ink); }

/* SHARED */
.sec-label { font-size: 11px; letter-spacing: 0.9px; text-transform: uppercase; color: var(--soft); font-weight: 500; margin-bottom: 12px; }
.sec-h { font-size: 34px; font-weight: 300; letter-spacing: -0.8px; line-height: 1.18; margin-bottom: 10px; }
.sec-h strong { font-weight: 600; }
.sec-p { font-size: 15px; color: var(--mid); line-height: 1.72; max-width: 640px; }
.btn-primary { background: var(--green); color: #fff; border: none; padding: 13px 26px; border-radius: 7px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; text-decoration: none; display: inline-block; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); padding: 13px 26px; border-radius: 7px; font-size: 14px; cursor: pointer; font-family: inherit; opacity: 0.7; text-decoration: none; display: inline-block; }

/* HERO */
.hero-wrap { background: var(--white); border-bottom: 0.5px solid var(--line); }
.hero-wrap .inner { padding-top: 80px; padding-bottom: 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--tag-bg); color: var(--tag-txt); font-size: 11px; font-weight: 500; letter-spacing: 0.8px; text-transform: uppercase; padding: 5px 12px; border-radius: 20px; margin-bottom: 28px; }
.hero-wrap h1 { font-size: 48px; font-weight: 300; line-height: 1.12; letter-spacing: -1.4px; max-width: 820px; margin-bottom: 22px; }
.hero-wrap h1 strong { font-weight: 600; }
.hero-sub { font-size: 17px; color: var(--mid); max-width: 660px; margin: 0 0 36px; line-height: 1.7; font-weight: 300; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* Centering applies ONLY to heroes explicitly marked .hero-center (pSEO + homepage).
   Static pages (.hero / left-aligned .hero-wrap) keep their own left alignment. */
.hero-center .inner { text-align: center; }
.hero-center h1 { margin-left: auto; margin-right: auto; }
.hero-center .hero-sub { margin-left: auto; margin-right: auto; }
.hero-center .hero-actions { justify-content: center; }

/* BANDS (generic section wrapper) */
.band { border-bottom: 0.5px solid var(--line); }
.band .inner { padding-top: 68px; padding-bottom: 68px; }
.band.white { background: var(--white); }
.band.alt { background: var(--bg); }
.band.dark { background: var(--green); border-bottom: none; }
.band.dark .sec-label { color: rgba(255,255,255,0.45); }
.band.dark .sec-h { color: #fff; }
.band.dark .sec-p { color: rgba(255,255,255,0.6); }

/* BREADCRUMB */
.crumbs { background: var(--white); border-bottom: 0.5px solid var(--line); }
.crumbs .inner { padding-top: 14px; padding-bottom: 14px; font-size: 12px; color: var(--soft); }
.crumbs a { color: var(--mid); text-decoration: none; }
.crumbs a:hover { color: var(--bright); }
.crumbs .sep { margin: 0 9px; color: var(--line); }

/* PROBLEM CARDS (reused look) */
.trad-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.trad-card { background: var(--white); border: 0.5px solid var(--line); border-radius: 10px; padding: 20px 18px; }
.trad-card i { font-size: 18px; color: var(--soft); margin-bottom: 10px; display: block; }
.trad-card-h { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.trad-card-p { font-size: 12px; color: var(--mid); line-height: 1.6; }

/* WARN CARDS (without a harness) */
.warn-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.warn-card { background: var(--red-bg); border: 0.5px solid var(--red-line); border-left: 3px solid var(--red); border-radius: 10px; padding: 16px 18px; }
.warn-card i { color: var(--red); font-size: 16px; margin-bottom: 8px; display: block; }
.warn-card-h { font-size: 13px; font-weight: 500; color: #993C1D; margin-bottom: 4px; }
.warn-card-p { font-size: 12px; color: #a85535; line-height: 1.55; }

/* HARNESS PILLARS */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 0.5px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 28px; }
.pillar { background: var(--white); padding: 22px 18px; }
.pillar-letter { font-family: 'DM Mono', monospace; font-size: 22px; font-weight: 500; color: var(--bright); margin-bottom: 8px; }
.pillar-name { font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.pillar-desc { font-size: 11px; color: var(--mid); line-height: 1.6; }

/* COMPARISON */
.comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.comp-card { background: var(--white); border: 0.5px solid var(--line); border-radius: 10px; padding: 20px; }
.comp-card.upware { border: 1.5px solid var(--bright); background: var(--tag-bg); }
.comp-card-label { font-size: 12px; font-weight: 600; margin-bottom: 14px; color: var(--ink); }
.comp-card.upware .comp-card-label { color: var(--green); }
.comp-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-size: 11px; padding: 8px 0; border-bottom: 0.5px solid var(--line); }
.comp-row:last-child { border-bottom: none; padding-bottom: 0; }
.comp-criteria { color: var(--soft); font-weight: 500; flex-shrink: 0; }
.comp-val { text-align: right; line-height: 1.45; display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.comp-val i { font-size: 12px; flex-shrink: 0; }
.bad-val { color: #993C1D; }
.good-val { color: var(--bright); font-weight: 500; }
.mid-val { color: var(--soft); }

/* ACTIONS / CHIPS */
.actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 26px; }
.action-item { display: flex; gap: 10px; align-items: flex-start; background: var(--white); border: 0.5px solid var(--line); border-radius: 8px; padding: 14px 16px; font-size: 13px; line-height: 1.5; }
.action-item i { color: var(--bright); font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { font-size: 12px; background: var(--white); border: 0.5px solid var(--line); border-radius: 7px; padding: 6px 12px; color: var(--ink); }

/* FLOW (worked example) */
.flow { margin-top: 28px; border: 0.5px solid var(--line); border-radius: 12px; overflow: hidden; max-width: 820px; }
.flow-step { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 18px 20px; border-bottom: 0.5px solid var(--line); background: var(--white); align-items: flex-start; }
.flow-step:last-child { border-bottom: none; }
.flow-num { width: 28px; height: 28px; border-radius: 50%; background: var(--tag-bg); color: var(--green); font-family: 'DM Mono', monospace; font-size: 13px; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.flow-sys { font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--soft); font-weight: 500; margin-bottom: 3px; }
.flow-t { font-size: 13px; color: var(--ink); line-height: 1.55; }

/* LINK GRID (hub -> spokes) */
.linkgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.link-card { display: block; background: var(--white); border: 0.5px solid var(--line); border-radius: 10px; padding: 18px; text-decoration: none; color: var(--ink); transition: border-color 0.15s; }
.link-card:hover { border-color: var(--bright); }
.link-card-h { font-size: 14px; font-weight: 500; margin-bottom: 5px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lc-name { display: inline-flex; align-items: center; min-width: 0; }
.lc-logo { border-radius: 3px; margin-right: 9px; flex-shrink: 0; object-fit: contain; background: #fff; }

/* Architecture-diagram chips: logos muted to mono by default, full color on hover */
.logo-chip img { filter: grayscale(1) opacity(0.7); transition: filter 0.2s ease, opacity 0.2s ease; }
.logo-chip:hover img { filter: none; opacity: 1; }

/* ===== Hero logos (system/agent hubs) ===== */
.herologo { width: 80px; height: 80px; border: 0.5px solid var(--line); border-radius: 18px; background: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(26,58,42,0.06); margin: 0 auto 26px; }
.herologo img { width: 46px; height: 46px; object-fit: contain; }
.herologo .mono, .bridgelogo .mono { font-weight: 600; color: var(--green); line-height: 1; }
.herologo .mono { font-size: 32px; }

/* ===== Connection bridge hero ===== */
.bridge { display: flex; align-items: flex-start; justify-content: center; margin-bottom: 36px; }
.bridge .node { display: flex; flex-direction: column; align-items: center; }
.bridgelogo { width: 76px; height: 76px; border: 0.5px solid var(--line); border-radius: 18px; background: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(26,58,42,0.07); position: relative; z-index: 2; }
.bridgelogo img { width: 42px; height: 42px; object-fit: contain; }
.bridgelogo .mono { font-size: 28px; }
.bridge .nlabel { font-size: 10px; letter-spacing: 0.7px; text-transform: uppercase; color: var(--soft); margin-top: 12px; font-weight: 500; }
.bridge .wire { flex: 0 0 60px; height: 2px; margin-top: 37px; background: linear-gradient(90deg, transparent, var(--line) 25%, var(--line) 75%, transparent); }
.bridge .umark { width: 50px; height: 50px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 13px; position: relative; z-index: 3; box-shadow: 0 0 0 6px rgba(61,122,82,0.10), 0 6px 16px rgba(26,58,42,0.18); }
.bridge .umark svg { width: 28px; height: 28px; }
.bridge .umark ellipse, .bridge .umark circle { fill: none; stroke: #F7F5F0; }
.bridge .umark circle.dot { fill: #F7F5F0; }

/* ===== Trust row ===== */
.trustrow { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-top: 32px; }
.trustrow span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--mid); }
.trustrow i { color: var(--bright); font-size: 15px; }
@media (max-width: 680px) { .bridge .wire { flex-basis: 30px; } .herologo, .bridgelogo { width: 68px; height: 68px; } }

/* ===== Legal / long-form pages (Privacy, Terms) ===== */
.legal-wrap { background: var(--white); }
.legal-wrap .inner { max-width: 860px; padding-top: 56px; padding-bottom: 80px; }
.legal-head { border-bottom: 0.5px solid var(--line); padding-bottom: 28px; margin-bottom: 40px; }
.legal-head h1 { font-size: 42px; font-weight: 300; letter-spacing: -1.2px; margin: 10px 0; }
.legal-head h1 strong { font-weight: 600; }
.legal-updated { font-size: 12px; color: var(--soft); font-family: 'DM Mono', monospace; letter-spacing: 0.3px; }
.legal { max-width: 720px; }
.legal h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.3px; margin: 42px 0 12px; }
.legal h3 { font-size: 15px; font-weight: 600; margin: 24px 0 8px; }
.legal p { font-size: 15px; color: var(--mid); line-height: 1.78; margin-bottom: 14px; }
.legal ul { margin: 0 0 16px 22px; }
.legal li { font-size: 15px; color: var(--mid); line-height: 1.7; margin-bottom: 7px; }
.legal a { color: var(--bright); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal .lead { font-size: 16px; color: var(--ink); }
.link-card-h i { color: var(--soft); font-size: 15px; }
.link-card-p { font-size: 12px; color: var(--mid); line-height: 1.6; }

/* FAQ */
.faq-list { margin-top: 24px; max-width: 800px; }
.faq-item { border-bottom: 0.5px solid var(--line); padding: 20px 0; }
.faq-item:first-child { padding-top: 4px; }
.faq-q { font-size: 16px; font-weight: 500; margin-bottom: 8px; letter-spacing: -0.2px; }
.faq-a { font-size: 14px; color: var(--mid); line-height: 1.72; }

/* CTA */
.cta-wrap { background: var(--ink); }
.cta-wrap .inner { padding-top: 72px; padding-bottom: 72px; text-align: center; }
.cta-wrap h2 { font-size: 34px; font-weight: 300; color: #fff; letter-spacing: -0.8px; margin-bottom: 12px; }
.cta-wrap h2 strong { font-weight: 600; }
.cta-wrap p { font-size: 14px; color: rgba(255,255,255,0.45); margin-bottom: 28px; }
.cta-wrap .btn-primary { background: #fff; color: var(--ink); }

/* FOOTER */
footer { background: var(--ink); border-top: 0.5px solid rgba(255,255,255,0.08); }
footer .inner { padding-top: 40px; padding-bottom: 40px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; }
.footer-logo { font-size: 16px; font-weight: 600; color: #fff; letter-spacing: -0.3px; text-decoration: none; }
.footer-logo span { color: var(--bright); }
.footer-tagline { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 6px; }
.footer-col-h { font-size: 11px; letter-spacing: 0.7px; text-transform: uppercase; color: rgba(255,255,255,0.35); font-weight: 500; margin-bottom: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.6); text-decoration: none; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 0.5px solid rgba(255,255,255,0.08); font-size: 12px; color: rgba(255,255,255,0.25); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .inner { padding-left: 24px; padding-right: 24px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-bottom: 0.5px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 24px 18px; box-shadow: 0 14px 30px rgba(0,0,0,0.06); z-index: 50;
  }
  nav.open .nav-links { display: flex; }
  .nav-links > a, .nav-trigger { padding: 12px 0; font-size: 15px; }
  .nav-item { display: block; }
  .nav-item::after { display: none; }
  .nav-dropdown { position: static; margin: 0 0 6px; box-shadow: none; border: none; border-radius: 0; padding: 0 0 0 14px; min-width: 0; }
  .nav-cta { margin-top: 10px; text-align: center; }
  .hero-wrap h1 { font-size: 34px; letter-spacing: -0.8px; }
  .hero-sub { font-size: 15px; }
  .sec-h { font-size: 26px; letter-spacing: -0.4px; }
  .sec-p { font-size: 14px; }
  .trad-cards, .warn-grid, .comp-grid, .actions-grid, .linkgrid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .cta-wrap h2 { font-size: 26px; }
  .footer-inner { flex-direction: column; }
}
@media (max-width: 480px) {
  .inner { padding-left: 20px; padding-right: 20px; }
  .hero-wrap h1 { font-size: 28px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-ghost { width: 100%; text-align: center; padding: 14px; }
  .pillars { grid-template-columns: 1fr; }
}
