/* ════════════════════════════════════════════
   INSIGHT — Navigation, Pipeline Bar,
             Hero layouts, Sections, Footer
   ════════════════════════════════════════════ */

/* ────────────────────────────────────────────
   NAV
──────────────────────────────────────────── */
/* ── Test phase banner ── */
.dev-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1100;
    background: #f59e0b; color: #1c1400;
    text-align: center; font-size: 0.78rem; font-weight: 600;
    padding: 0.35rem 3rem 0.35rem 1rem;
    letter-spacing: 0.2px;
}
.dev-banner a { color: inherit; text-decoration: underline; margin-left: 0.5rem; }
.dev-banner-close {
    position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    font-size: 1rem; line-height: 1; color: inherit; opacity: 0.7;
}
.dev-banner-close:hover { opacity: 1; }
body.has-dev-banner nav { top: 32px; }
body.has-dev-banner .page-start,
body.has-dev-banner .pipeline-bar { top: calc(64px + 32px); }

nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: 64px;
    display: flex; align-items: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.nav-inner {
    max-width: 1200px; width: 100%;
    margin: 0 auto; padding: 0 2rem;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 1.35rem; font-weight: 800;
    color: var(--primary); letter-spacing: -0.5px; text-decoration: none;
}
.nav-rgu-logo {
    height: 40px; width: 220px; object-fit: contain;
}
@media (max-width: 480px) {
    .nav-rgu-logo { width: 140px; height: 32px; }
}
.nav-logo-text { color: var(--primary); }
.nav-logo-text .accent-dot { color: var(--accent); }

.nav-links {
    display: flex; align-items: center; gap: 2rem; list-style: none;
}
.nav-links a {
    color: var(--text); font-size: 0.9rem; font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-back {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    border: 1.5px solid var(--border); border-radius: 20px;
    font-size: 0.85rem; font-weight: 600; color: var(--text);
    transition: all 0.2s; background: transparent;
}
.nav-back:hover { border-color: var(--accent); color: var(--accent); }

.nav-cta {
    padding: 0.5rem 1.25rem;
    background: var(--accent); color: white !important;
    border-radius: 6px; font-weight: 600;
}
.nav-cta:hover { background: var(--accent-light) !important; }

/* ── Hamburger button ── */
.nav-hamburger {
    display: none;
    flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; width: 36px; height: 36px;
    background: transparent; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .nav-hamburger { display: flex; }
    .nav-links {
        display: none;
        position: absolute; top: 64px; left: 0; right: 0;
        background: var(--bg); border-bottom: 1px solid var(--border);
        flex-direction: column; align-items: flex-start;
        gap: 0; padding: 0.5rem 0; z-index: 999;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a { display: block; padding: 0.75rem 2rem; font-size: 0.95rem; }
    .nav-cta { display: none; }
}
.nav-mobile-contact { display: none; }
@media (max-width: 768px) { .nav-mobile-contact { display: block; } }


  /* Theme Grid Styling */
  .research-themes { padding: 3rem 0; background: var(--bg); }
  .themes-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 2rem;
      margin-top: 3rem;
  }
  @media (max-width: 900px) { .themes-grid { grid-template-columns: 1fr; } }
  
  .theme-card {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
      transition: transform 0.3s, box-shadow 0.3s;
      display: flex;
      flex-direction: column;
  }
  .theme-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 15px 35px rgba(0,0,0,0.06);
  }
  
  .theme-canvas-wrap {
      aspect-ratio: 16 / 9;
      background: var(--bg);
      position: relative;
      overflow: hidden;
      border-bottom: 1px solid var(--border);
  }
  .theme-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
  
  .theme-content {
      padding: 2rem;
      flex: 1;
      display: flex;
      flex-direction: column;
  }
  .theme-content h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.75rem; letter-spacing: -0.3px; }
  .theme-content p { color: var(--text-light); margin-bottom: 1.5rem; line-height: 1.6; flex: 1; }

/* ────────────────────────────────────────────
   GLOBAL PIPELINE INDICATOR BAR
──────────────────────────────────────────── */
.pipeline-bar {
    position: fixed; top: 64px; left: 0; right: 0; z-index: 999;
    height: 44px;
    background: var(--bg-subtle);
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease, border-color 0.3s ease;
}
.pipeline-pill {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.35rem 1rem; border-radius: 20px;
    font-size: 0.8rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
    color: var(--text-light);
    border: 1px solid var(--border);
}
.pipeline-pill .dot { font-size: 0.65rem; }
.pipeline-pill.active-teal   { background: var(--color-capture); color: #fff; border-color: var(--color-capture); }
.pipeline-pill.active-indigo { background: var(--color-sim);     color: #fff; border-color: var(--color-sim); }
.pipeline-pill.active-green  { background: var(--color-ai);      color: #fff; border-color: var(--color-ai); }
.pipeline-arrow { color: var(--text-light); font-size: 0.8rem; font-weight: 600; }

/* ────────────────────────────────────────────
   PAGE OFFSET  (nav 64px + pipeline bar 44px)
──────────────────────────────────────────── */
.page-start { padding-top: 108px; }

/* ────────────────────────────────────────────
   HERO — Landing page  (full-viewport)
──────────────────────────────────────────── */
.hero-full {
    position: relative; min-height: 100vh; padding-top: 108px;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
#hero-canvas-full {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}
.hero-full-content {
    position: relative; z-index: 2;
    max-width: 900px; text-align: center; padding: 2rem;
}
.hero-full-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800; color: var(--text);
    line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -1px;
}
.hero-full-subtitle {
    font-size: 1.2rem; color: var(--text); margin-bottom: 1.2rem;
    max-width: 680px; margin-inline: auto;
}
.hero-full-desc {
    font-size: 0.95rem; color: var(--text-light); max-width: 580px;
    margin: 0 auto 2.5rem; line-height: 1.7;
}

/* ────────────────────────────────────────────
   HERO — Department pages  (split layout)
──────────────────────────────────────────── */
/* ── HERO: video fills full section, text overlaid on top ── */
.hero-dept {
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 0;
}

/* ── video background (positions to hero-dept because hero-inner is static) ── */
.hero-right {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: 0;
    overflow: hidden;
}
.hero-right video {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    filter: blur(3px);
    opacity: 0.5;
    transform: scale(1.07); /* prevent blur edges showing */
}
/* dark overlay sits on top of the video, inside hero-right's stacking context */
.hero-right::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}
#hero-canvas { width: 100%; height: 100%; display: block; }

/* ── hero-inner: static (no position) so hero-right escapes to hero-dept ── */
.hero-inner {
    position: static;
    max-width: 1200px; width: 100%; margin: 0 auto;
    padding: 5rem 2rem 4rem;
}

/* ── text: z-index:2 lifts it above the video (z-index:0) and overlay ── */
.hero-left {
    position: relative;
    z-index: 2;
    max-width: 680px;
    color: #fff;
}

.hero-title, .hero h1, .hero-left h1 {
    color: #fff;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800; line-height: 1.15;
    margin-bottom: 1.2rem; letter-spacing: -0.5px;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1rem; line-height: 1.6;
}
.hero-para {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.72);
    margin-bottom: 2rem; line-height: 1.7;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-pipeline-pos {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.current-teal   { color: #38bdf8; }
.current-indigo { color: #a5b4fc; }
.current-green  { color: #34d399; }

.stage-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.35rem 1rem; border-radius: 20px;
    font-size: 0.78rem; font-weight: 700;
    margin-bottom: 1.5rem; letter-spacing: 0.5px; text-transform: uppercase;
}
.badge-teal   { background: rgba(14,165,233,0.2);  color: #38bdf8; border: 1px solid rgba(14,165,233,0.4); }
.badge-indigo { background: rgba(99,102,241,0.2);  color: #a5b4fc; border: 1px solid rgba(99,102,241,0.4); }
.badge-green  { background: rgba(16,185,129,0.2);  color: #34d399; border: 1px solid rgba(16,185,129,0.4); }

@media (max-width: 900px) {
    .hero-dept  { min-height: 70vh; }
    .hero-inner { padding: 4rem 1.5rem 3rem; }
}

/* ────────────────────────────────────────────
   SECTION BASE
──────────────────────────────────────────── */
section { padding: 3rem 0; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-label {
    display: inline-block;
    font-size: 0.75rem; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--accent-light); margin-bottom: 0.75rem;
}
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800;
    color: var(--text); margin-bottom: 0.75rem; letter-spacing: -0.3px;
}
.section-title-white { color: white; }
.section-sub { font-size: 1rem; color: var(--text-light); max-width: 560px; margin: 0 auto; }
.bg-subtle { background: var(--bg-subtle); }

/* ────────────────────────────────────────────
   PIPELINE CONTEXT  (section on dept pages)
──────────────────────────────────────────── */
.pipeline-context { background: var(--bg-subtle); padding: 5rem 0; }
.pipeline-flow {
    display: flex; align-items: center; justify-content: center;
    gap: 1rem; flex-wrap: wrap; margin: 2.5rem 0;
}
.pipe-step {
    display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
    padding: 1.25rem 1.75rem; border-radius: 12px;
    background: var(--bg); border: 1.5px solid var(--border);
    transition: all 0.2s; min-width: 140px; text-align: center;
}
.pipe-step:hover { transform: translateY(-2px); }
.pipe-step.s-teal       { border-color: rgba(14,165,233,0.4); }
.pipe-step.s-teal:hover { border-color: var(--teal); }
.pipe-step.s-green       { border-color: rgba(16,185,129,0.4); }
.pipe-step.s-green:hover { border-color: var(--green); }
.pipe-step.s-teal-active   { border-color: var(--teal);  background: rgba(14,165,233,0.12); box-shadow: 0 0 0 1px rgba(14,165,233,0.3); }
.pipe-step.s-indigo-active { border-color: var(--accent); background: rgba(79,70,229,0.12);  box-shadow: 0 0 0 1px rgba(79,70,229,0.3); }
.pipe-step.s-green-active  { border-color: var(--green); background: rgba(16,185,129,0.12); box-shadow: 0 0 0 1px rgba(16,185,129,0.3); }
.pipe-step-icon { font-size: 1.5rem; margin-bottom: 0.2rem; }
.pipe-step-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.pipe-step.s-teal .pipe-step-label,
.pipe-step.s-teal-active .pipe-step-label       { color: var(--teal); }
.pipe-step.s-indigo-active .pipe-step-label     { color: var(--accent); }
.pipe-step.s-green .pipe-step-label,
.pipe-step.s-green-active .pipe-step-label      { color: var(--green); }
.pipe-arrow-big { color: var(--text-light); font-size: 1.4rem; }
.pipeline-context-desc {
    text-align: center; color: var(--text-light);
    font-size: 0.95rem; max-width: 620px; margin: 0 auto; line-height: 1.7;
}

/* ────────────────────────────────────────────
   PIPELINE CONNECTORS  (bottom of dept pages)
──────────────────────────────────────────── */
.pipeline-connectors { background: var(--bg); padding: 5rem 0; }
.connectors-grid {
    display: grid; grid-template-columns: 1fr 1px 1fr;
    max-width: 700px; margin: 0 auto;
}
@media (max-width: 640px) {
    .connectors-grid { grid-template-columns: 1fr; }
    .connectors-divider { display: none; }
}
.connector-panel { padding: 2rem; text-align: center; }
.connector-label {
    font-size: 0.73rem; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 0.6rem;
}
.connector-label.teal-label  { color: var(--teal); }
.connector-label.indigo-label { color: var(--accent); }
.connector-label.green-label { color: var(--green); }
.connector-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 1rem; font-weight: 700; transition: opacity 0.2s;
}
.connector-link.teal-link   { color: var(--teal); }
.connector-link.indigo-link { color: var(--accent); }
.connector-link.green-link  { color: var(--green); }
.connector-link:hover { opacity: 0.8; }
.connector-sub { font-size: 0.82rem; color: var(--text-light); margin-top: 0.5rem; }
.connectors-divider { background: var(--border); }

/* ────────────────────────────────────────────
   IMPACT METRICS  (landing page)
──────────────────────────────────────────── */
.metrics-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 2rem; text-align: center;
}
.metric-val {
    font-size: 3.5rem; font-weight: 800; color: var(--color-sim);
    line-height: 1; margin-bottom: 0.5rem;
}
.metric-label {
    font-size: 1rem; font-weight: 600; color: var(--text-dark);
    text-transform: uppercase; letter-spacing: 1px;
}
@media (max-width: 900px) {
    .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 3rem; }
}

/* ────────────────────────────────────────────
   INTERACTIVE PIPELINE TABS  (landing page)
──────────────────────────────────────────── */
.interactive-pipeline {
    display: grid; grid-template-columns: 1fr 1.2fr;
    gap: 4rem; background: var(--bg);
    border: 1px solid var(--border); border-radius: 16px;
    padding: 3rem; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
}
.pipeline-nav { position: relative; display: flex; flex-direction: column; gap: 2rem; }
.nav-line {
    position: absolute; top: 20px; bottom: 20px; left: 23px;
    width: 2px; background: var(--border); z-index: 0;
}
.pipe-tab {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 1.5rem;
    background: transparent; border: none; cursor: pointer;
    text-align: left; opacity: 0.5; transition: all 0.3s; padding-right: 1rem;
}
.pipe-tab:hover { opacity: 0.8; }
.pipe-tab.active { opacity: 1; transform: translateX(10px); }
.tab-num {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; font-weight: 800; color: white;
    box-shadow: 0 0 0 6px var(--bg); transition: transform 0.3s;
}
.pipe-tab.active .tab-num { transform: scale(1.15); }
.tab-title { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.pipeline-display {
    background: var(--bg-subtle); border-radius: 12px;
    padding: 2.5rem; position: relative; overflow: hidden;
}
.pipe-pane { display: none; animation: fadeIn 0.4s ease forwards; }
.pipe-pane.active { display: block; }
.pipe-pane h3 { font-size: 1.8rem; margin-bottom: 1rem; font-weight: 800; letter-spacing: -0.5px; }
.pipe-pane p  { color: var(--text-light); margin-bottom: 1.5rem; font-size: 1.1rem; line-height: 1.7; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 900px) {
    .interactive-pipeline { grid-template-columns: 1fr; gap: 2rem; padding: 2rem; }
    .pipe-tab.active { transform: translateX(5px); }
}

/* ────────────────────────────────────────────
   FOOTER
──────────────────────────────────────────── */
footer {
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
    padding: 3rem 0 2rem;
    color: var(--text);
}
.footer-logo { color: var(--text); }
.footer-copy { color: var(--text-light); }
.footer-links a { color: var(--text-light); }
.footer-links a:hover { color: var(--accent); }

.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.footer-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.footer-logo {
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 1.2rem; font-weight: 800; color: var(--text); text-decoration: none;
}
.footer-rgu-logo {
    height: 40px; width: 220px; object-fit: contain; opacity: 0.9;
}
.footer-logo-text { color: var(--text); }
.footer-logo-text span { color: var(--accent); }
.footer-copy { font-size: 0.8rem; color: var(--text-light); margin-top: 0.3rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; }
.footer-links a {
    font-size: 0.85rem; color: var(--text-light); transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border); padding-top: 1.25rem;
    display: flex; align-items: center; justify-content: center; gap: 1rem;
}
.footer-pipe-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.82rem; font-weight: 600; color: var(--text-light);
    padding: 0.4rem 1rem; border: 1px solid var(--border);
    border-radius: 20px; transition: all 0.2s;
}
.footer-pipe-link:hover { color: var(--text); border-color: var(--border); }

/* ════════════════════════════════════════════
   DARK MODE OVERRIDES — main.css
   ════════════════════════════════════════════ */

/* Nav — explicit override (CSS variable inheritance can be unreliable
   with backdrop-filter + rgba, so we set the property directly) */
[data-theme="dark"] nav {
    background: rgba(13, 13, 26, 0.97) !important;
    border-bottom-color: rgba(42, 42, 64, 1) !important;
}
[data-theme="dark"] nav .nav-links a  { color: #94a3b8; }
[data-theme="dark"] nav .nav-links a:hover { color: #f1f5f9; }
[data-theme="dark"] nav .nav-logo-text { color: #f1f5f9; }
[data-theme="dark"] nav .nav-back   { color: #94a3b8; border-color: rgba(42,42,64,1); }
[data-theme="dark"] nav .nav-back:hover { color: #f1f5f9; border-color: var(--accent); }
[data-theme="dark"] .nav-hamburger span { background: #f1f5f9; }
[data-theme="dark"] .nav-links { background: #0f0f1a; border-color: rgba(42,42,64,1); }

/* Pipeline bar */
[data-theme="dark"] .pipeline-bar {
    background: #13131f !important;
    border-bottom-color: rgba(42,42,64,1) !important;
}
[data-theme="dark"] .pipeline-pill {
    background: #181828; border-color: rgba(42,42,64,1); color: #94a3b8;
}
[data-theme="dark"] .pipeline-arrow { color: #94a3b8; }

[data-theme="dark"] .hero-full       { background: var(--bg); }
[data-theme="dark"] .hero-full-title { color: var(--text); }
[data-theme="dark"] .hero-dept       { background: var(--bg); }
[data-theme="dark"] .pipeline-context { background: var(--bg-subtle); }
[data-theme="dark"] .pipeline-connectors { background: var(--bg); }
[data-theme="dark"] .pipe-step        { background: var(--card-bg); border-color: var(--border); }
[data-theme="dark"] .interactive-pipeline {
    background: var(--card-bg); border-color: var(--border);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.4);
}
[data-theme="dark"] .pipeline-display { background: var(--bg-subtle); }
[data-theme="dark"] .research-themes  { background: var(--bg); }
[data-theme="dark"] .theme-canvas-wrap { background: var(--bg); border-bottom-color: var(--border); }
[data-theme="dark"] .theme-card        { background: var(--card-bg); border-color: var(--border); }

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1.5px solid var(--border);
    background: transparent; cursor: pointer;
    font-size: 1.05rem; transition: all 0.2s;
    color: var(--text-light); flex-shrink: 0;
}
.theme-toggle:hover {
    border-color: var(--accent); color: var(--accent);
    background: rgba(79,70,229,0.06);
}
