/* ProjEx Advisors — shared styles
   Dark theme, blue accent matching the app. */

:root {
  color-scheme: dark;
  --bg: #0e1116;
  --bg-elevated: #161b24;
  --bg-elevated-hover: #1c2230;
  --fg: #e8ebf0;
  --fg-strong: #ffffff;
  --muted: #8a93a0;
  --muted-strong: #b0b8c4;
  --accent: #4aa3ff;
  --accent-hover: #6ab3ff;
  --accent-dim: rgba(74, 163, 255, 0.15);
  --cta: #f5b342;
  --cta-hover: #ffbe58;
  --cta-fg: #1a1200;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --radius: 10px;
  --radius-lg: 16px;
  --max-w: 1200px;
  --nav-h: 64px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI", -apple-system, BlinkMacSystemFont,
                  "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--fg-strong);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

h1 { font-size: clamp(32px, 5.5vw, 56px); line-height: 1.1; }
h2 { font-size: clamp(24px, 3.5vw, 36px); line-height: 1.2; margin-top: 48px; }
h3 { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.3; margin-top: 32px; }

p { margin: 0 0 16px; }

img { max-width: 100%; height: auto; display: block; }

/* Layout ----------------------------------------------------------- */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-tight {
  padding: 40px 0;
}

.grid {
  display: grid;
  gap: 32px;
}

.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 800px) {
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
}

/* Nav -------------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 17, 22, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.site-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-strong);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 17px;
}

.site-nav .brand img {
  height: 32px;
  width: auto;
}

.site-nav .brand:hover { text-decoration: none; color: var(--fg-strong); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--muted-strong);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--fg-strong);
  background: var(--bg-elevated);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--fg-strong);
  background: var(--bg-elevated);
}

.nav-cta {
  display: inline-block;
  background: var(--cta);
  color: var(--cta-fg);
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: background 120ms ease;
  margin-left: 12px;
}

.nav-cta:hover {
  background: var(--cta-hover);
  color: var(--cta-fg);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--fg-strong);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px;
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-cta {
    padding: 14px 12px;
    margin: 0;
    border-radius: 8px;
    text-align: left;
  }
  .nav-cta { margin-top: 8px; text-align: center; }
}

/* Hero -------------------------------------------------------------- */

.hero {
  padding: 96px 0 64px;
  background: radial-gradient(1400px 700px at 50% -10%, #1a2130 0%, var(--bg) 60%);
  text-align: center;
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 20px;
}

.hero .subhead {
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 20px);
  max-width: 720px;
  margin: 0 auto 32px;
}

.hero .cta-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-graphic {
  margin: 48px auto 0;
  max-width: 900px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  background: var(--bg-elevated);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  padding: 24px;
  text-align: center;
}

/* Buttons ---------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 120ms ease;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--cta);
  color: var(--cta-fg);
}
.btn-primary:hover { background: var(--cta-hover); color: var(--cta-fg); text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--fg-strong);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-elevated); color: var(--fg-strong); text-decoration: none; }

/* Cards / pillars ----------------------------------------------------- */

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 120ms ease, transform 120ms ease;
}

.card:hover {
  border-color: var(--border-strong);
}

.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 20px;
}

.card h3 {
  margin-top: 0;
  font-size: 20px;
}

.card p {
  color: var(--muted-strong);
  margin-bottom: 0;
  font-size: 15px;
}

/* Feature groups (Features page) --------------------------------- */

.feature-group {
  margin-bottom: 56px;
}

.feature-group h2 {
  font-size: 26px;
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--fg-strong);
}

.feature-group .group-lead {
  color: var(--muted-strong);
  margin-bottom: 32px;
  max-width: 720px;
}

.feature-list {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 800px) {
  .feature-list { grid-template-columns: 1fr; }
}

.feature-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}

.feature-item h4 {
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--fg-strong);
}

.feature-item p {
  color: var(--muted-strong);
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
}

/* Video grid (Demos page) ---------------------------------------- */

.tour-hero {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 56px;
  text-align: center;
}

.tour-hero h2 { margin-top: 0; }

.video-placeholder {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(135deg, #1c2230 0%, #10141b 100%);
  border: 1px dashed var(--border-strong);
  margin: 20px auto 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  max-width: 800px;
}

.demo-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 800px) {
  .demo-grid { grid-template-columns: 1fr; }
}

.demo-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 120ms ease, transform 120ms ease;
}

.demo-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.demo-poster {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1c2230 0%, #10141b 100%);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  position: relative;
}

.demo-poster::after {
  content: "▶";
  position: absolute;
  font-size: 44px;
  color: rgba(255, 255, 255, 0.85);
  opacity: 0.8;
}

.demo-body {
  padding: 20px 24px 24px;
}

.demo-body h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.demo-body .duration {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.demo-body p {
  color: var(--muted-strong);
  margin: 0;
  font-size: 14.5px;
}

/* FAQs ------------------------------------------------------------- */

.faq-section {
  margin-bottom: 48px;
}

.faq-section h2 {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--fg-strong);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

details.faq {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  transition: border-color 120ms ease;
  overflow: hidden;
}

details.faq[open] {
  border-color: var(--border-strong);
}

details.faq summary {
  cursor: pointer;
  padding: 18px 24px;
  font-weight: 500;
  font-size: 16px;
  color: var(--fg-strong);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

details.faq summary::-webkit-details-marker { display: none; }

details.faq summary::after {
  content: "+";
  color: var(--muted);
  font-size: 22px;
  font-weight: 400;
  transition: transform 200ms ease;
  flex-shrink: 0;
}

details.faq[open] summary::after {
  content: "−";
  color: var(--accent);
}

details.faq .faq-body {
  padding: 0 24px 20px;
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.65;
}

details.faq .faq-body p:last-child { margin-bottom: 0; }

/* Closing CTA band ---------------------------------------------- */

.cta-band {
  background: linear-gradient(135deg, #182030 0%, #10141b 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
  text-align: center;
}

.cta-band h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.cta-band p {
  color: var(--muted-strong);
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 17px;
}

/* Footer ----------------------------------------------------------- */

.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.site-footer a { color: var(--muted-strong); }
.site-footer a:hover { color: var(--fg-strong); }

/* Utility -------------------------------------------------------------- */

.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-lg { margin-top: 48px; }

/* Page title band (used on non-Home pages) ---------------------- */

.page-title {
  padding: 72px 0 32px;
  background: radial-gradient(1200px 500px at 50% -20%, #1a2130 0%, var(--bg) 60%);
}

.page-title h1 {
  font-size: clamp(28px, 4.5vw, 44px);
  margin-bottom: 12px;
}

.page-title .lead {
  color: var(--muted-strong);
  font-size: 17px;
  max-width: 720px;
}
