/* site.css — the public one-page site. Self-contained (no CDNs/fonts): works under the
   same helmet CSP as the portal. Themeable per client by editing the :root tokens. */

:root {
  --ink: #14161c;
  --body: #3c4250;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f5f6fa;
  --line: #e6e8ef;
  --brand: #4f46e5;
  --brand-deep: #3730a3;
  --brand-ink: #ffffff;
  --soft: #eef0ff;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 22, 28, 0.05), 0 12px 32px rgba(20, 22, 28, 0.08);
  --wrap: 1080px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 12px; }

a { color: var(--brand); }

/* ---------- edit-mode affordances ---------- */

.edit-banner {
  position: sticky; top: 0; z-index: 40;
  background: var(--brand-deep); color: #fff;
  text-align: center; padding: 9px 16px; font-size: 13.5px;
}
.edit-banner a { color: #cfd6ff; font-weight: 600; margin-left: 10px; }

body.editing [data-csp], body.editing [data-csp-md], body.editing [data-csp-list] {
  outline: 1.5px dashed rgba(79, 70, 229, 0.45);
  outline-offset: 3px;
  border-radius: 4px;
  position: relative;
}
body.editing [data-csp]::after, body.editing [data-csp-md]::after, body.editing [data-csp-list]::after {
  content: attr(data-csp) attr(data-csp-md) attr(data-csp-list);
  position: absolute; top: -9px; left: 4px;
  font: 500 9.5px/1.5 ui-monospace, Consolas, monospace;
  background: var(--brand-deep); color: #fff;
  padding: 1px 6px; border-radius: 4px;
  pointer-events: none;
}
.slot-empty .fallback { color: var(--muted); font-style: italic; }

/* ---------- nav ---------- */

.site-nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
body.editing .site-nav { top: 38px; }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.nav-brand {
  font-weight: 800; font-size: 18px; letter-spacing: -0.2px;
  color: var(--ink); text-decoration: none;
}
.nav-brand::before {
  content: "◆"; color: var(--brand); margin-right: 8px; font-size: 14px;
}

.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--body); font-size: 14.5px; font-weight: 600;
}
.nav-links a:hover { color: var(--brand); }
.nav-links .nav-portal {
  color: var(--brand); border: 1.5px solid var(--brand);
  padding: 7px 14px; border-radius: 999px;
}
.nav-links .nav-portal:hover { background: var(--soft); }

.nav-toggle {
  display: none; background: none; border: 0; font-size: 22px;
  color: var(--ink); cursor: pointer; padding: 4px 8px;
}

/* ---------- hero ---------- */

.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #151a3a 0%, #2b2a72 45%, #6f5bd8 100%);
  color: #fff;
  padding: 96px 0 110px;
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; }

.hero-kicker { color: #b9b4ff; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; font-size: 12.5px; margin: 0 0 14px; }

.hero-title {
  color: #fff; font-size: clamp(34px, 5.4vw, 56px); font-weight: 800;
  letter-spacing: -1px; margin: 0 0 18px;
}
.hero-sub { font-size: clamp(16px, 2.2vw, 19px); color: #d5d3ff; max-width: 560px; margin: 0 0 30px; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 15px;
  background: #fff; color: var(--brand-deep);
  padding: 13px 28px; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3); }

.hero-art { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; }
.orb-1 { width: 380px; height: 380px; background: #8b7bff; right: -80px; top: -120px; }
.orb-2 { width: 300px; height: 300px; background: #3f6fe0; right: 18%; bottom: -140px; }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(60% 80% at 70% 30%, #000 0%, transparent 70%);
}

/* ---------- sections ---------- */

.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.5px; }
.section-title.center, .section-lead.center { text-align: center; }
.section-lead { color: var(--muted); font-size: 17px; max-width: 620px; margin: 0 0 34px; }

.two-col { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: start; }

.prose { white-space: pre-line; }  /* keeps the portal's line breaks without HTML */
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose .md-heading { margin: 18px 0 8px; }
.prose code { background: var(--soft); padding: 1px 6px; border-radius: 5px; font-size: 0.92em; }
.team-note { color: var(--muted); font-style: italic; margin-top: 18px; }

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px 26px;
}
.card-title { font-size: 18px; font-weight: 800; margin: 0 0 12px; }

.story-card { position: relative; }
.story-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), #8b7bff);
  border-radius: var(--radius) var(--radius) 0 0;
}

.list-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); margin: 22px 0 8px; }
.values ul { margin: 0; padding-left: 20px; }
.values li { margin-bottom: 4px; }

/* ---------- services ---------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.service-card { transition: transform 140ms ease, box-shadow 140ms ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(20, 22, 28, 0.12); }
.service-card .card-title::before {
  content: "→"; display: inline-block; color: var(--brand); margin-right: 8px; font-weight: 800;
}

/* ---------- contact ---------- */

.contact-card { background: var(--ink); border: 0; color: #e5e7f0; }
.contact-card .card-title { color: #fff; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: grid; grid-template-columns: 86px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.contact-list li:last-child { border-bottom: 0; }
.c-label { color: #9aa0b5; font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; padding-top: 2px; }
.c-value { white-space: pre-line; font-weight: 600; color: #fff; }
.c-value a { color: #fff; }

/* ---------- footer ---------- */

.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.footer-note { margin: 0; flex: 1; min-width: 240px; }
.footer-copy { margin: 0; color: var(--muted); font-size: 13.5px; }
.footer-portal { font-size: 13.5px; font-weight: 600; text-decoration: none; }

/* ---------- degraded state ---------- */
.content-unavailable .hero { padding-bottom: 96px; }

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; gap: 30px; }
  .hero { padding: 72px 0 84px; }
  .section { padding: 60px 0; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; right: 0; left: 0;
    display: none; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 22px; width: 100%; }
  .nav-links .nav-portal { border: 0; border-radius: 0; border-top: 1px solid var(--line); }
  body.editing .nav-links { top: 38px; }
}
