/* SupraOS v3 shared styles. Tokens, nav, footer, typography, buttons, page-hero base. Page-specific styles stay inline in each HTML file. */

/* ---------- Design tokens ---------- */
:root {
  --bg: #0D1118;
  --bg2: #111822;
  --bg3: #161E28;
  --surface: #141C26;
  --surface-hov: #1A2430;
  --border: #1C2836;
  --border-lt: #253445;
  --fg: #F5F0E6;
  --fg2: #D4CCBC;
  --dim: #7A8594;
  --dim2: #4A5668;
  --green: #34D399;
  --green-dim: #10B981;
  --amber: #F59E0B;
  --rose: #FB7185;
  --blue: #60A5FA;
  --cyan: #22D3EE;
  --purple: #A78BFA;
  --brand-grad: linear-gradient(135deg, #6B2E9E 0%, #B83A8E 50%, #E94B6F 100%);

  --f-sans: 'DM Sans', sans-serif;
  --f-serif: 'Cormorant Garamond', serif;
  --f-mono: 'JetBrains Mono', monospace;
}

/* ---------- Global reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  font-weight: 400;
  overflow-x: hidden;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: rgba(230,75,111,0.25); color: var(--fg); }

/* ---------- Utility containers ---------- */
.section { padding: 120px 32px; position: relative; }
.container { max-width: 1200px; margin: 0 auto; }
.narrow { max-width: 860px; margin: 0 auto; }
.divider { height: 1px; background: var(--border); margin: 0 32px; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: 20px;
}

h1, h2, h3 {
  font-family: var(--f-serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--fg);
}
h1 { font-size: clamp(40px, 6vw, 68px); }
h2 { font-size: clamp(32px, 4vw, 48px); }
h3 { font-size: 22px; font-family: var(--f-sans); font-weight: 600; letter-spacing: -0.005em; }

p { color: var(--fg2); font-size: 17px; }
p + p { margin-top: 16px; }

.subhead {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--fg2);
  margin-top: 18px;
  line-height: 1.4;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 6px;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn-primary { background: var(--brand-grad); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-lt);
}
.btn-secondary:hover { background: var(--surface); border-color: var(--dim); }
.btn-ghost {
  color: var(--dim);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
}
.btn-ghost:hover { color: var(--fg); }

/* ---------- Nav + mega menu ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,24,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}
.logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--fg);
}
.logo .dot {
  display: inline-block;
  width: 32px;
  height: 32px;
  margin-right: 10px;
  background-image: url('SupraOS_logo.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
/* Compact button for in-nav use so the nav stays short */
.nav .btn {
  padding: 9px 18px;
  font-size: 12px;
}
.nav-links { display: flex; gap: 28px; justify-content: center; }
.nav-link {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--dim);
  padding: 8px 0;
  position: relative;
  cursor: pointer;
}
.nav-link:hover,
.nav-link.active { color: var(--fg); }
.nav-link.deep-active { color: var(--fg2); }
.nav-link.has-menu { position: relative; }
.nav-link.has-menu::after {
  content: "▾";
  margin-left: 6px;
  font-size: 9px;
  opacity: 0.6;
}
.mega {
  position: absolute;
  top: calc(100% + 4px);
  left: -16px;
  min-width: 420px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all .15s;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.nav-link.has-menu:hover .mega,
.mega:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 6px;
  transition: background .12s;
}
.mega-item:hover { background: var(--surface); }
.mega-item.active-deep { background: var(--surface); }
.mega-item-title {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
  min-width: 80px;
  letter-spacing: -0.01em;
}
.mega-item-blurb {
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--dim);
}
.nav-spacer { display: none; }
.nav-inner > .btn { justify-self: end; }

/* ---------- Footer ---------- */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 48px 32px 40px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.foot {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  color: var(--dim);
}
.foot a { color: var(--dim); }
.foot a:hover { color: var(--fg); }
.foot-brand .logo { font-size: 13px; }
.foot-brand p {
  margin-top: 8px;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-family: var(--f-mono);
}
.foot-col { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Page hero (base) ----------
   Used by about, memory, agents, data, build, faq.
   use-cases and vs-openclaw override padding and drop ::before inline. */
.page-hero {
  padding: 120px 32px 100px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% -10%, rgba(184,58,142,0.08), transparent 55%);
  pointer-events: none;
}
.page-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.page-hero h1 { font-size: clamp(44px, 5.2vw, 68px); }
.page-hero .subhead {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Final CTA section ----------
   Used by about, memory, agents, data, build, faq with .final-inner wrapper.
   use-cases and vs-openclaw use simpler overrides inline. */
.final {
  background: var(--bg);
  padding: 140px 32px;
  text-align: center;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.final::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(184,58,142,0.07), transparent 55%);
  pointer-events: none;
}
.final-inner { max-width: 720px; margin: 0 auto; position: relative; }
.final h2 {
  font-size: clamp(36px, 4.6vw, 58px);
  margin: 0 auto 36px;
}
.final-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.stats-strip {
  margin-top: 40px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--dim);
  text-transform: uppercase;
}

/* ---------- Deep-page stub shell ----------
   Shared across memory, agents, data, build. Opening letter + placeholder
   card + cross-link grid. */
.opening-section {
  padding: 120px 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.opening-inner { max-width: 680px; margin: 0 auto; }
.opening-body {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.7;
  color: var(--fg);
}
.opening-body p {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.7;
  color: var(--fg);
  margin-bottom: 24px;
}
.opening-body p:last-of-type { margin-bottom: 0; }

.placeholder-section {
  padding: 80px 32px 120px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.placeholder-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px;
  background: var(--bg2);
  border: 1px dashed var(--border-lt);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.placeholder-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(52,211,153,0.05), transparent 55%);
  pointer-events: none;
}
.placeholder-card > * { position: relative; }
.placeholder-tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--green);
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid rgba(52,211,153,0.35);
  border-radius: 4px;
  margin-bottom: 20px;
}
.placeholder-card h3 {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(24px, 2.8vw, 32px);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--fg);
}
.placeholder-card p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg2);
  margin-bottom: 24px;
}
.placeholder-link {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(245,158,11,0.35);
}
.placeholder-link:hover { color: var(--fg); border-bottom-color: var(--fg); }

.cross-section {
  padding: 96px 32px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.cross-header {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}
.cross-header h2 { font-size: clamp(28px, 3.2vw, 38px); }
.cross-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cross-card {
  display: block;
  padding: 28px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: transform .15s, border-color .15s, background .15s;
}
.cross-card:hover { transform: translateY(-2px); border-color: var(--border-lt); background: var(--surface); }
.cross-card-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.cross-card-title {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--fg);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.cross-card-blurb {
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--dim);
  line-height: 1.5;
}

/* ---------- Shared keyframes ---------- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
}
@media (max-width: 860px) {
  .cross-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 80px 20px; }
  .page-hero { padding: 80px 20px 64px; }
  .opening-section,
  .placeholder-section,
  .cross-section,
  .final { padding: 80px 20px; }
  .placeholder-card { padding: 32px 24px; }
}
