/*
Theme Name: SHV Proposal
Theme URI: https://www.skyhighvisions.com/
Author: Sky High Visions
Author URI: https://www.skyhighvisions.com/
Description: Single-page proposal theme for hosted, password-protected client proposals. Renders one Page using the page template, ignores everything else.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: Proprietary - internal use only
Text Domain: shv-proposal
*/

:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-3: #f1f5f9;
  --primary: #1e3a8a;
  --primary-2: #1e40af;
  --primary-3: #3b82f6;
  --good: #047857;
  --warn: #b45309;
  --bad: #b91c1c;
  --crit-bg: #fef2f2;
  --crit-bd: #fecaca;
  --high-bg: #fff7ed;
  --high-bd: #fed7aa;
  --med-bg: #fefce8;
  --med-bd: #fef08a;
  --low-bg: #f0fdf4;
  --low-bd: #bbf7d0;
  --max: 1080px;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.12);
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--primary-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand-link { display: inline-flex; align-items: center; }
.brand-logo {
  height: 32px;
  width: auto;
  display: block;
  filter: invert(1) brightness(0.15) contrast(1.2);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.cta-mini {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: white !important;
  padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.cta-mini:hover { background: var(--primary-2); text-decoration: none; }

.burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
}
.burger:hover { background: var(--bg-3); border-color: var(--line-2); }
.burger svg { width: 20px; height: 20px; }
.burger .icon-close { display: none; }
.burger[aria-expanded="true"] .icon-open { display: none; }
.burger[aria-expanded="true"] .icon-close { display: block; }

.menu-panel {
  position: fixed;
  top: 60px; right: 16px;
  width: min(320px, calc(100vw - 32px));
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 14px;
  z-index: 60;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.menu-panel[data-open="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.menu-panel-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 4px 8px 8px;
}
.menu-panel ol {
  list-style: none; counter-reset: m; padding: 0; margin: 0;
}
.menu-panel li { counter-increment: m; margin: 0; }
.menu-panel a {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
  line-height: 1.35;
}
.menu-panel a::before {
  content: counter(m, decimal-leading-zero);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  flex-shrink: 0;
  width: 22px;
}
.menu-panel a:hover { background: var(--bg-3); text-decoration: none; color: var(--ink); }

@media (max-width: 760px) {
  .menu-panel { right: 8px; }
}

.hero {
  position: relative;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(59,130,246,0.15), transparent 60%),
    radial-gradient(800px 400px at 0% 0%, rgba(14,165,233,0.10), transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 24px 36px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--ink);
  max-width: 760px;
}
.hero-lede {
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 28px;
}
.meta-row {
  display: flex; flex-wrap: wrap; gap: 18px 28px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 28px;
}
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.meta-value { font-size: 14px; color: var(--ink); font-weight: 600; }

.toc-block {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 8px;
}
.toc {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.toc-title { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { columns: 2; column-gap: 32px; padding-left: 18px; margin: 0; font-size: 14px; }
.toc li { break-inside: avoid; margin-bottom: 4px; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--primary-2); }
@media (max-width: 700px) { .toc ol { columns: 1; } }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 56px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }

h2 {
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.02em; font-weight: 800;
  margin: 0 0 8px;
  color: var(--ink);
  scroll-margin-top: 90px;
}
.section-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary-2);
  margin-bottom: 6px;
}
.section-lede { color: var(--muted); margin: 0 0 28px; max-width: 800px; font-size: 17px; }

h3 { font-size: 19px; margin: 28px 0 8px; letter-spacing: -0.01em; font-weight: 700; }
h4 { font-size: 15px; margin: 18px 0 6px; font-weight: 700; color: var(--ink-2); }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card-tight { padding: 16px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { font-size: 14px; color: var(--muted); margin: 0; }

.kpi-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.kpi-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.kpi-value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.kpi-sub { font-size: 13px; color: var(--muted); }

.callout {
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--primary-2);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0;
}
.callout strong { color: var(--primary-2); }

.callout-warn {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  border: 1px solid #fde68a;
  border-left: 4px solid #b45309;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0;
}

.range-display {
  text-align: center;
  padding: 32px 24px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border-radius: 16px;
  margin: 8px 0 16px;
  position: relative;
  overflow: hidden;
}
.range-display::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 100% 0%, rgba(255,255,255,0.12), transparent 60%);
}
.range-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; position: relative; }
.range-amount { font-size: clamp(40px, 6vw, 64px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: 6px 0 4px; position: relative; }
.range-sub { font-size: 14px; opacity: 0.85; position: relative; max-width: 640px; margin: 0 auto; }

.t-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 16px 0; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--bg-3); text-align: left; padding: 12px 14px; font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.subtotal td { background: var(--bg-2); font-weight: 700; }
tr.total td { background: var(--primary); color: white; font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.pill {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 999px;
}
.pill-crit { background: var(--crit-bg); color: var(--bad); border: 1px solid var(--crit-bd); }
.pill-high { background: var(--high-bg); color: var(--warn); border: 1px solid var(--high-bd); }
.pill-med  { background: var(--med-bg);  color: #854d0e; border: 1px solid var(--med-bd);  }
.pill-low  { background: var(--low-bg);  color: var(--good); border: 1px solid var(--low-bd);  }

.phases { display: grid; gap: 14px; margin-top: 16px; }
.phase {
  display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.phase-num {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-3));
  color: white; font-weight: 800; font-size: 18px;
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.phase-title { font-weight: 700; font-size: 16px; margin: 0 0 4px; }
.phase-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.phase-desc { font-size: 14px; color: var(--ink-2); margin: 0; }

.cta-block {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: white;
  border-radius: 16px;
  padding: 40px;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 100% 0%, rgba(59,130,246,0.30), transparent 60%);
  pointer-events: none;
}
.cta-block h3 { font-size: 24px; margin: 0 0 8px; color: white; letter-spacing: -0.01em; }
.cta-block p { color: rgba(255,255,255,0.78); margin: 0 0 20px; max-width: 580px; position: relative; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; position: relative; }
.cta-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: white; color: var(--ink) !important;
  padding: 14px 22px; border-radius: 10px;
  font-weight: 700; font-size: 15px;
  box-shadow: var(--shadow-md);
}
.cta-primary:hover { transform: translateY(-1px); text-decoration: none; box-shadow: var(--shadow-lg); }
.cta-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: white !important;
  padding: 14px 22px; border-radius: 10px;
  font-weight: 600; font-size: 15px;
  border: 1px solid rgba(255,255,255,0.30);
}
.cta-secondary:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.cta-icon { width: 18px; height: 18px; }

.docusign-mark {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: rgba(255,255,255,0.65);
  margin-top: 18px; position: relative;
}
.docusign-mark svg { width: 16px; height: 16px; }

.research-link {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px;
  margin: 16px 0;
}
.research-link svg { width: 28px; height: 28px; color: var(--primary-2); flex-shrink: 0; }
.research-link-body { flex: 1; }
.research-link-title { font-weight: 700; font-size: 15px; color: var(--ink); margin: 0; }
.research-link-meta { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.research-link a { font-weight: 600; }

footer.shv-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  margin-top: 48px;
}
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
  font-size: 13px;
}
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }
footer.shv-footer h5 { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
footer.shv-footer p, footer.shv-footer a { color: var(--muted); }
footer.shv-footer a { display: block; padding: 3px 0; }
.footer-logo {
  height: 28px;
  width: auto;
  margin-bottom: 14px;
  filter: invert(1) brightness(0.15) contrast(1.2);
}

/* WordPress password-protected page styling */
.shv-password-gate {
  min-height: 70vh;
  display: grid; place-items: center;
  padding: 48px 24px;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(59,130,246,0.15), transparent 60%),
    radial-gradient(800px 400px at 0% 0%, rgba(14,165,233,0.10), transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.shv-password-card {
  max-width: 440px; width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.shv-password-card .gate-logo {
  height: 32px; width: auto; margin-bottom: 18px;
  filter: invert(1) brightness(0.15) contrast(1.2);
}
.shv-password-card h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.01em; }
.shv-password-card p { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.shv-password-card form { display: flex; flex-direction: column; gap: 10px; }
.shv-password-card label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2);
}
.shv-password-card input[type="password"] {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: 10px;
  font-size: 15px; font-family: var(--font);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.shv-password-card input[type="password"]:focus {
  border-color: var(--primary-3);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.shv-password-card input[type="submit"] {
  background: var(--primary); color: white;
  padding: 12px 18px; border: 0; border-radius: 10px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  margin-top: 4px; font-family: var(--font);
  transition: background 0.15s;
}
.shv-password-card input[type="submit"]:hover { background: var(--primary-2); }
.shv-password-card .gate-meta { margin-top: 16px; font-size: 12px; color: var(--muted-2); }

@media print {
  .topbar, .cta-block, footer.shv-footer { display: none; }
  body { font-size: 11pt; }
  section { padding: 16pt 0; page-break-inside: avoid; }
  .hero { background: white; }
  a { color: var(--ink); text-decoration: none; }
}

/* Long-form pages (services agreement, legal docs) */
.long-form {
  padding: 56px 0 96px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 220px);
}
.wrap-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.long-form-title {
  font-size: 32px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--ink);
}
.long-form-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
}
.long-form-body h1 { font-size: 28px; margin: 40px 0 8px; color: var(--ink); letter-spacing: -0.01em; }
.long-form-body h2 { font-size: 21px; margin: 36px 0 8px; color: var(--ink); letter-spacing: -0.005em; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.long-form-body h3 { font-size: 17px; margin: 24px 0 6px; color: var(--ink); }
.long-form-body h4 { font-size: 14px; margin: 18px 0 4px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; }
.long-form-body p { margin: 0 0 14px; }
.long-form-body ul, .long-form-body ol { margin: 0 0 14px; padding-left: 22px; }
.long-form-body li { margin-bottom: 6px; }
.long-form-body strong { color: var(--ink); }
.long-form-body em { color: var(--ink-2); }
.long-form-body table { width: 100%; border-collapse: collapse; margin: 14px 0 22px; font-size: 14px; }
.long-form-body th, .long-form-body td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.long-form-body th { background: var(--bg-3); font-weight: 700; color: var(--ink); }
.long-form-body .doc-meta { color: var(--muted); font-size: 13px; margin: 0 0 28px; }
.long-form-body .legal-callout {
  background: var(--bg-2);
  border-left: 3px solid var(--primary-3);
  padding: 14px 18px;
  margin: 16px 0;
  border-radius: 4px;
  font-size: 14px;
}
.long-form-body .signature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--line);
}
.long-form-body .sig-party { font-size: 14px; }
.long-form-body .sig-line { border-bottom: 1px solid var(--ink-2); margin: 24px 0 6px; height: 18px; }
@media (max-width: 640px) {
  .long-form-body .signature-block { grid-template-columns: 1fr; }
  .long-form-title { font-size: 24px; }
  .long-form-body h1 { font-size: 22px; }
  .long-form-body h2 { font-size: 18px; }
}

@keyframes fadeup {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero h1, .hero-lede, .hero .meta-row { animation: fadeup 0.6s ease-out backwards; }
.hero-lede { animation-delay: 0.05s; }
.hero .meta-row { animation-delay: 0.1s; }
