/* ParadigmShift — shared styles for tech-demo detail pages (demos/*.html).
   Mirrors the design tokens and chrome in ../index.html. The site's homepage
   keeps its CSS inline; these subpages share this sheet. If the brand tokens
   in ../index.html :root change, update the :root block below to match. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --purple: #7B2FBE;  --purple-soft: #9B5DD8;
  --teal: #0ED2B6;    --teal-soft: #5EE5D0;
  --dark: #0A0A11;    --dark-surface: #14141C;  --dark-elevated: #1B1B26;
  --text-primary: #F2F1F7;  --text-body: #C8C6D4;  --text-muted: #B5B3C2;  --text-dim: #8E8C9D;
  --gradient: linear-gradient(135deg, var(--purple), var(--teal));
  --font-sans: 'Instrument Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html {
  scroll-behavior: smooth; background: var(--dark); color: var(--text-primary);
  font-family: var(--font-sans); font-size: 17px;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body { min-height: 100vh; background: var(--dark); position: relative; }

/* ─── Background (CSS-only; no mesh canvas on subpages) ─── */
.orb { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0; }
.orb--purple { width: 600px; height: 600px; background: var(--purple); top: -10%; right: -5%; opacity: 0.09; }
.orb--teal { width: 500px; height: 500px; background: var(--teal); bottom: -15%; left: -8%; opacity: 0.06; }
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 256px;
}
.page { position: relative; z-index: 2; }

/* ─── Nav (matches homepage) ─── */
nav { display: flex; align-items: center; justify-content: space-between; padding: 2rem 3.5rem; }
.logo-group { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-mark { width: 36px; height: 36px; }
.logo-text {
  font-weight: 700; font-size: 1.2rem; letter-spacing: -0.03em;
  background: var(--gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); text-decoration: none; transition: color 0.25s;
}
.nav-link:hover { color: var(--text-primary); }

/* ─── Content wrapper ─── */
.demo-wrap { max-width: 860px; margin: 0 auto; padding: 3rem 2rem 1rem; }

.back-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim); text-decoration: none; margin-bottom: 2rem;
  transition: color 0.25s, gap 0.25s;
}
.back-link:hover { color: var(--teal-soft); gap: 0.75rem; }
.back-link svg { width: 13px; height: 13px; transform: rotate(180deg); }

/* ─── Page header ─── */
.demo-header { margin-bottom: 1.5rem; }
.demo-eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--teal-soft); display: block; margin-bottom: 1.2rem;
}
.demo-header h1 {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.035em;
  line-height: 1.1; color: var(--text-primary); margin-bottom: 1.1rem;
}
.demo-lead { font-size: 1.1rem; line-height: 1.6; color: var(--text-body); max-width: 65ch; }

.demo-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.demo-tag {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 100px; padding: 0.3rem 0.8rem;
  background: rgba(255,255,255,0.02);
}

/* ─── Action buttons (mirror homepage .oss-btn) ─── */
.demo-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.8rem 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.2rem;
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12); color: var(--text-muted); background: none;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.btn:hover { border-color: var(--teal); color: var(--text-primary); background: rgba(14,210,182,0.06); }
.btn--primary { background: rgba(14,210,182,0.1); border-color: rgba(14,210,182,0.3); color: var(--teal-soft); }
.btn--primary:hover { background: rgba(14,210,182,0.18); border-color: var(--teal); color: var(--text-primary); }
.btn svg { width: 14px; height: 14px; }

/* ─── Media figures (photos / videos) ─── */
.demo-figure {
  margin: 2rem 0; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px;
  overflow: hidden; background: var(--dark-surface);
}
.demo-figure img, .demo-figure video { display: block; width: 100%; height: auto; }
.demo-figure figcaption {
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-dim);
  padding: 0.8rem 1.1rem; border-top: 1px solid rgba(255,255,255,0.06);
}
/* placeholder shown until real media is dropped in */
.demo-figure--placeholder {
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-family: var(--font-mono); font-size: 0.8rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(123,47,190,0.25), transparent 60%),
    radial-gradient(120% 120% at 100% 100%, rgba(14,210,182,0.2), transparent 55%),
    var(--dark-elevated);
}

/* ─── Prose / long-form content ─── */
.prose { color: var(--text-body); }
.prose section { margin: 2.6rem 0; }
.prose h2 {
  font-family: var(--font-sans); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
  color: var(--text-primary); margin-bottom: 1.1rem;
  display: inline-flex; align-items: center; gap: 0.7rem;
}
.prose h2::before { content: ''; width: 26px; height: 2px; background: var(--gradient); border-radius: 2px; flex-shrink: 0; }
.prose h3 { font-family: var(--font-mono); font-size: 1rem; font-weight: 500; color: var(--text-primary); margin: 1.8rem 0 0.8rem; }
.prose p { line-height: 1.7; margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem 1.3rem; line-height: 1.7; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--teal-soft); text-decoration: none; border-bottom: 1px solid rgba(14,210,182,0.3); transition: color 0.2s, border-color 0.2s; }
.prose a:hover { color: var(--text-primary); border-bottom-color: var(--teal); }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose code { font-family: var(--font-mono); font-size: 0.86em; background: rgba(255,255,255,0.06); padding: 0.12em 0.4em; border-radius: 5px; color: var(--teal-soft); }
.prose pre { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 1.1rem 1.2rem; overflow-x: auto; margin: 0 0 1.2rem; }
.prose pre code { background: none; padding: 0; color: var(--text-body); font-size: 0.82rem; line-height: 1.6; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2rem; font-size: 0.9rem; }
.prose th, .prose td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid rgba(255,255,255,0.08); vertical-align: top; }
.prose th { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }

/* ─── Callouts ─── */
.callout {
  border: 1px solid rgba(255,255,255,0.08); border-left: 3px solid var(--teal); border-radius: 10px;
  background: rgba(14,210,182,0.05); padding: 1rem 1.2rem; margin: 1.4rem 0; line-height: 1.6; font-size: 0.95rem;
}
.callout--warn { border-left-color: var(--purple-soft); background: rgba(123,47,190,0.07); }
.callout strong { color: var(--text-primary); }

/* ─── Community band (end of demo page) ─── */
.demo-community {
  margin-top: 3rem; padding: 2.4rem 2rem; text-align: center;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 14px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(123,47,190,0.12), transparent 60%),
    radial-gradient(120% 140% at 100% 100%, rgba(14,210,182,0.10), transparent 55%),
    var(--dark-surface);
}
.demo-community h2 {
  font-family: var(--font-sans); font-size: 1.4rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text-primary); margin-bottom: 0.7rem;
}
.demo-community p { color: var(--text-body); line-height: 1.6; max-width: 56ch; margin: 0 auto 1.4rem; }
.demo-community .demo-actions { justify-content: center; margin: 0; }

/* ─── Footer (matches homepage) ─── */
footer {
  padding: 2.5rem 3.5rem; display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.08); margin-top: 3rem;
}
.footer-left { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; color: var(--text-dim); text-transform: uppercase; }
.footer-right { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.footer-right a { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; color: var(--text-dim); text-decoration: none; text-transform: uppercase; transition: color 0.3s; }
.footer-right a:hover { color: var(--text-primary); }

@media (max-width: 768px) {
  html { font-size: 16px; }
  nav { padding: 1.5rem 1.5rem; }
  .nav-links { display: none; }
  .demo-wrap { padding: 2rem 1.3rem 1rem; }
  footer { padding: 2rem 1.5rem; flex-direction: column; gap: 1rem; text-align: center; }
  .footer-right { flex-direction: column; gap: 1rem; }
}
