/* PublicWeave marketing site — shared layout styles.
   Identity tokens (colors, typography, .pw-* semantic classes, card primitive,
   buttons) come from colors_and_type.css — the canonical design-system file.
   Marketing site MUST import that file first; never re-declare tokens here. */
@import url('./colors_and_type.css');

/* ──────────────────────────────────────────────────────────────────────────
   Reset + base
   ────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--pw-sans);
  background: var(--pw-page);
  color: var(--pw-fg-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: rgba(29,158,117,0.2); }
a { color: inherit; text-decoration: none; }
input:focus, button:focus { outline: none; }
img { max-width: 100%; height: auto; }

/* ──────────────────────────────────────────────────────────────────────────
   Animation tokens — marketing-specific
   ────────────────────────────────────────────────────────────────────────── */
@keyframes pw-float       { 0%,100% { transform: translateY(0px) rotate(0deg); }    50% { transform: translateY(-20px) rotate(180deg); } }
@keyframes pw-glow        { 0%,100% { opacity:1; filter:brightness(1); }              50% { opacity:0.85; filter:brightness(1.15); } }
@keyframes pw-blink       { 0%,100% { opacity:1; }                                    50% { opacity:0; } }
@keyframes pw-pulse       { 0%,100% { opacity:1; }                                    50% { opacity:0.4; } }
@keyframes pw-scroll-hint { 0%,100% { transform: translateY(0); opacity:0.4; }       50% { transform: translateY(10px); opacity:0.15; } }

.reveal { opacity: 0; transform: translateY(36px); transition: all 0.9s var(--pw-ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ──────────────────────────────────────────────────────────────────────────
   Glass card + CTA — extends .pw-btn / .pw-card primitives
   ────────────────────────────────────────────────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--pw-radius-lg);
  padding: 28px;
  box-shadow: var(--pw-shadow-card);
  position: relative; overflow: hidden;
  transition: all 0.4s var(--pw-ease);
}
.glass.glow { box-shadow: var(--pw-shadow-glow); }
.glass.dark { background: rgba(15,27,77,0.55); border: 1px solid rgba(255,255,255,0.08); }
.glass:hover { transform: translateY(-2px); }

.cta-btn {
  padding: 16px 44px;
  border-radius: var(--pw-radius);
  border: none;
  background: linear-gradient(135deg, var(--pw-teal), #16A34A);
  color: #fff;
  font-family: var(--pw-sans);
  font-size: 16px; font-weight: 600;
  cursor: pointer;
  box-shadow: var(--pw-shadow-cta);
  transition: all 0.3s var(--pw-ease);
  display: inline-block;
  text-decoration: none;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(29,158,117,0.4); }
.cta-btn.lg { padding: 18px 52px; font-size: 17px; box-shadow: 0 4px 32px rgba(29,158,117,0.35); }
.cta-btn.ghost {
  background: transparent;
  border: 1px solid rgba(29,158,117,0.4);
  color: var(--pw-teal);
  box-shadow: none;
}
.cta-btn.ghost:hover { background: rgba(29,158,117,0.08); border-color: var(--pw-teal); }

/* ──────────────────────────────────────────────────────────────────────────
   Container
   ────────────────────────────────────────────────────────────────────────── */
.inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; width: 100%; }
.inner.narrow { max-width: 960px; }

/* ──────────────────────────────────────────────────────────────────────────
   Section heading scale — promote .pw-* underneath
   ────────────────────────────────────────────────────────────────────────── */
.sec-num {
  font-family: var(--pw-mono);
  font-size: clamp(88px, 14vw, 172px);
  font-weight: 100;
  line-height: 0.9;
  letter-spacing: -6px;
  color: rgba(27,43,107,0.08);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}
.sec-num.light { color: rgba(255,255,255,0.07); }
.sec-label {                                     /* marketing alias for .pw-eyebrow */
  font-family: var(--pw-sans);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; color: var(--pw-teal);
  margin-bottom: 10px;
}
.sec-h {                                         /* marketing alias for .pw-h1 — Fraunces serif */
  font-family: var(--pw-serif);
  font-size: clamp(34px, 4.8vw, 56px);
  font-weight: 200;
  line-height: 1.08;
  letter-spacing: -0.8px;
  color: var(--pw-navy);
}
.sec-h.light { color: #fff; }
.sec-sub {
  font-family: var(--pw-sans);
  font-size: 16px; color: var(--pw-fg-3); line-height: 1.7;
  margin-top: 16px; max-width: 620px;
}
.sec-sub.light { color: rgba(255,255,255,0.45); }

/* ──────────────────────────────────────────────────────────────────────────
   Top nav — dark glass + native <details> burger ≤640px
   ────────────────────────────────────────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 100;
  padding: 18px 48px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(15,27,77,0.85);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topnav a.nav-link { font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 500; transition: color 0.2s; }
.topnav a.nav-link:hover { color: var(--pw-teal); }
.topnav .brand img { filter: brightness(1.1); }

/* Burger (CSS-only, native <details>/<summary> — SES-safe, no React events) */
.pw-burger { display: none; position: relative; z-index: 2; }
details.pw-burger > summary {
  list-style: none; cursor: pointer;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  color: #fff; font-size: 18px; line-height: 1;
}
details.pw-burger > summary::-webkit-details-marker { display: none; }
details.pw-burger > summary .pw-burger-icon::before { content: '\2630'; }
details.pw-burger[open] > summary .pw-burger-icon::before { content: '\2715'; }
.pw-burger-drawer {
  display: none;
  position: fixed; top: 56px; left: 0; right: 0;
  width: 100vw;
  height: calc(100vh - 56px);
  background: var(--pw-navy);
  z-index: 2147483646;
  padding: 12px 0 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  border-bottom: 2px solid var(--pw-teal);
}
details.pw-burger[open] > .pw-burger-drawer { display: block; }
.pw-burger-drawer a {
  display: block;
  padding: 14px 22px;
  color: rgba(255,255,255,0.85);
  font-family: var(--pw-sans);
  font-size: 15px; font-weight: 500;
  border-left: 3px solid transparent;
  text-decoration: none;
}
.pw-burger-drawer a:hover {
  background: rgba(29,158,117,0.12);
  border-left-color: var(--pw-teal);
  color: var(--pw-teal);
}
.pw-burger-drawer a.cta { color: var(--pw-teal); font-weight: 600; margin-top: 8px; border-top: 1px solid rgba(255,255,255,0.1); }

/* ──────────────────────────────────────────────────────────────────────────
   Breadcrumb
   ────────────────────────────────────────────────────────────────────────── */
.crumb { font-size: 12px; color: var(--pw-fg-3); letter-spacing: .03em; padding: 20px 0 8px; font-family: var(--pw-mono); }
.crumb a { color: var(--pw-fg-3); transition: color 0.2s; }
.crumb a:hover { color: var(--pw-teal); }
.crumb .sep { margin: 0 8px; color: rgba(136,146,176,0.5); }

/* ──────────────────────────────────────────────────────────────────────────
   Hero on sub-pages
   ────────────────────────────────────────────────────────────────────────── */
.sub-hero {
  background: var(--pw-dark-gradient,
    linear-gradient(135deg,#0F1B4D 0%,#1B2B6B 50%,#1B4D40 100%));
  color: #fff;
  padding: 80px 0 100px;
  position: relative; overflow: hidden;
}
.sub-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: url(/images/dashboard_grid_dissolve.png);
  background-size: 800px; background-repeat: repeat;
  opacity: 0.04; pointer-events: none;
}
.sub-hero-inner { position: relative; z-index: 2; }
.sub-hero h1 {
  font-family: var(--pw-serif);
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 200;
  line-height: 1.08;
  letter-spacing: -1.2px;
  margin-bottom: 18px;
  color: #fff;
}
.sub-hero p.lede {
  font-family: var(--pw-sans);
  font-size: 18px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  max-width: 640px;
  font-weight: 300;
}
.sub-hero .eyebrow {
  font-family: var(--pw-sans);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--pw-teal); font-weight: 600;
  margin-bottom: 14px;
}

/* Agency-type illustration block */
.agency-illo { width: 100%; max-width: 560px; margin: 0 auto 28px; display: block; }

/* ──────────────────────────────────────────────────────────────────────────
   KPI row + KPI cards — uses .pw-card primitive for consistency
   Accent semantic via modifier class (default teal; .amber/.red/.blue/.violet)
   ────────────────────────────────────────────────────────────────────────── */
.kpi-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 28px 0; }
.kpi-card {
  padding: 22px 20px;
  border-radius: var(--pw-radius-md);
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--pw-border);
  border-top: 3px solid var(--pw-teal);
  transition: all 0.3s var(--pw-ease);
  font-family: var(--pw-sans);
}
.kpi-card.amber  { border-top-color: var(--pw-amber-soft); }
.kpi-card.red    { border-top-color: #DC2626; }
.kpi-card.blue   { border-top-color: var(--pw-blue); }
.kpi-card.violet { border-top-color: var(--pw-violet); }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--pw-shadow-lift); }
.kpi-card .label {
  font-family: var(--pw-mono);
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--pw-fg-3); font-weight: 500;
  margin-bottom: 8px;
}
.kpi-card .val {
  font-family: var(--pw-serif);
  font-size: 22px; font-weight: 300;
  color: var(--pw-navy); letter-spacing: -0.3px; line-height: 1.1;
  margin-bottom: 6px;
}
.kpi-card .desc {
  font-family: var(--pw-sans);
  font-size: 12px; color: var(--pw-fg-2); line-height: 1.6;
}
.kpi-card .src {                                  /* Decision-intelligence caption */
  margin-top: 10px;
  font-family: var(--pw-mono);
  font-size: 10px; letter-spacing: .04em;
  color: var(--pw-fg-3);
}
.kpi-card .src a { color: var(--pw-teal); border-bottom: 1px dotted rgba(29,158,117,0.4); }

/* ──────────────────────────────────────────────────────────────────────────
   Stat caption — for hero and inline numeric claims
   Pattern: VALUE · descriptor / fiscal-period · refreshed N · source
   ────────────────────────────────────────────────────────────────────────── */
.stat-caption {
  font-family: var(--pw-mono);
  font-size: 10px; letter-spacing: .08em;
  color: rgba(255,255,255,0.45);
  margin-top: 8px;
  line-height: 1.5;
}
.stat-caption a { color: rgba(45,212,168,0.85); border-bottom: 1px dotted rgba(45,212,168,0.3); }
.stat-caption a:hover { color: #2DD4A8; }
.stat-caption.dark { color: var(--pw-fg-3); }
.stat-caption.dark a { color: var(--pw-teal); border-bottom-color: rgba(29,158,117,0.3); }

/* ──────────────────────────────────────────────────────────────────────────
   Feature grid (sub-pages)
   ────────────────────────────────────────────────────────────────────────── */
.feat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.feat {
  padding: 20px 22px;
  border-radius: var(--pw-radius-md);
  background: #fff;
  border: 1px solid var(--pw-border);
  font-family: var(--pw-sans);
}
.feat h3 { font-family: var(--pw-serif); font-weight: 300; font-size: 18px; color: var(--pw-navy); margin-bottom: 6px; letter-spacing: -0.2px; }
.feat p { font-size: 13px; color: var(--pw-fg-2); line-height: 1.65; }

/* ──────────────────────────────────────────────────────────────────────────
   Footer
   ────────────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--pw-navy-deep);
  color: rgba(255,255,255,0.6);
  padding: 64px 0 28px;
  position: relative; overflow: hidden;
  font-family: var(--pw-sans);
}
.site-footer::before {
  content: ''; position: absolute; inset: 0;
  background-image: url(/images/dashboard_bg_texture.png);
  background-repeat: repeat; background-size: 512px;
  opacity: 0.02;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; position: relative; z-index: 1; }
.footer-col h4 {
  font-family: var(--pw-mono);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,0.4); font-weight: 600;
  margin-bottom: 14px;
}
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,0.6); padding: 4px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--pw-teal); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  position: relative; z-index: 1;
  font-family: var(--pw-mono);
  font-size: 11px; color: rgba(255,255,255,0.3); letter-spacing: .03em;
}
.footer-bottom a { color: rgba(29,158,117,0.6); }

/* ──────────────────────────────────────────────────────────────────────────
   Mobile
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .topnav { padding: 14px 20px; }
  .kpi-row { grid-template-columns: repeat(2,1fr) !important; gap: 12px !important; }
  .feat-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: repeat(2,1fr); gap: 28px; }
  .sec-num { font-size: 64px !important; letter-spacing: -3px !important; }
  .sub-hero-inner { grid-template-columns: 1fr !important; gap: 32px !important; text-align: center; }
  .sub-hero-inner .agency-illo { max-width: 360px; margin: 0 auto; }
  .sub-hero h1 { font-size: clamp(32px, 6vw, 52px) !important; }
}
@media (max-width: 640px) {
  .topnav { padding: 12px 16px; }
  /* Hide inline nav links and reveal the burger */
  .topnav .nav-inline { display: none !important; }
  .topnav .pw-burger { display: inline-block !important; }
  .topnav .cta-btn { padding: 8px 14px !important; font-size: 12px !important; }
  .inner { padding: 0 20px; }
  .sub-hero { padding: 48px 0 56px; }
  .sub-hero h1 { font-size: 30px !important; line-height: 1.12 !important; letter-spacing: -0.6px !important; }
  .sub-hero p.lede { font-size: 15px !important; }
  .sec-num { font-size: 48px !important; letter-spacing: -2px !important; }
  .kpi-row { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .cta-btn, .cta-btn.lg { padding: 14px 28px !important; font-size: 15px !important; width: 100%; text-align: center; }
  .cta-btn.ghost { padding: 14px 28px !important; }
  /* Lock body scroll while burger drawer is open */
  html:has(details.pw-burger[open]) { overflow: hidden; }
  body:has(details.pw-burger[open]) { overflow: hidden; }
}
