/* ══════════════════════════════════════════════════════════════════════
   IOBOXX Platform Shell — Toolbar, Nav Drawer, Footer
   UNTOUCHABLE. Same structure for every client site.
   Brand customisation via --shell-accent (set per client).
   ══════════════════════════════════════════════════════════════════════ */

/* ── Shell Variables ── */
:root {
  --shell-accent: #ae8c3a;           /* default gold — overridden per client */
  --shell-accent-dim: rgba(174,140,58,0.12);
  --shell-bg: rgba(4,8,15,0.97);
  --shell-surface: #04080f;
  --shell-border: rgba(255,255,255,0.07);
  --shell-text: rgba(255,255,255,0.85);
  --shell-muted: rgba(255,255,255,0.45);
  --shell-dim: rgba(255,255,255,0.25);
  --shell-faint: rgba(255,255,255,0.04);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 3px; background: var(--shell-surface); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
::selection { background: rgba(255,255,255,0.15); }
i[class*="ph-"] { font-style: normal; vertical-align: -0.125em; }
a { color: inherit; }
img { display: block; max-width: 100%; }

/* ══════════════════════════════════════════════════════════════════════
   TOOLBAR
   ══════════════════════════════════════════════════════════════════════ */

.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--shell-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--shell-border);
}

.nav-inner {
  display: flex; align-items: center;
  padding: 0 1.25rem; height: 66px; gap: 0.75rem;
  max-width: 1200px; margin: 0 auto; width: 100%;
}

.nav-hamburger {
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  color: var(--shell-muted);
  font-size: 1.4rem; cursor: pointer;
  padding: 0.5rem; border-radius: 6px;
  flex-shrink: 0; line-height: 1;
  height: 36px; width: 36px;
  transition: background 0.2s, color 0.2s;
}
.nav-hamburger:hover { color: #fff; background: rgba(255,255,255,0.08); }

.nav-logo {
  height: 36px; width: 36px;
  object-fit: contain; flex-shrink: 0;
  border-radius: 4px;
}

.nav-title {
  display: flex; flex-direction: column;
  justify-content: center; line-height: 1.2; min-width: 0;
}
.nav-title-main {
  font-weight: 700; font-size: 1rem;
  color: var(--shell-accent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-title-sub {
  font-size: 0.7rem; font-weight: 400;
  color: var(--shell-muted);
  letter-spacing: 0.03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════════════════
   DRAWER OVERLAY
   ══════════════════════════════════════════════════════════════════════ */

.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); z-index: 200;
  opacity: 0; transition: opacity 0.3s ease;
}
.nav-overlay.open { display: block; opacity: 1; }

/* ══════════════════════════════════════════════════════════════════════
   LEFT DRAWER
   ══════════════════════════════════════════════════════════════════════ */

.nav-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 280px; max-width: 80vw;
  background: var(--shell-surface);
  z-index: 300;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0,0,0,0.5);
}
.nav-drawer.open { transform: translateX(0); }

.nav-drawer-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--shell-faint);
  position: relative;
}
.nav-drawer-logo {
  height: 48px; width: 48px;
  object-fit: contain; margin-bottom: 0.5rem;
}
.nav-drawer-title {
  font-size: 1.15rem; font-weight: 700;
  color: var(--shell-accent);
  margin-bottom: 0.15rem;
}
.nav-drawer-subtitle {
  font-size: 0.72rem; color: var(--shell-muted);
  letter-spacing: 0.03em;
}
.nav-drawer-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none;
  color: var(--shell-muted);
  font-size: 1.25rem; cursor: pointer;
  padding: 0.25rem; border-radius: 4px;
}
.nav-drawer-close:hover { color: #fff; }

/* ── Nav Links ── */
.nav-links {
  display: flex; flex-direction: column;
  padding: 0.5rem 0; flex: 1; overflow-y: auto;
}

/* Level 1: Home */
.nav-links > a.nav-home {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.9rem; font-weight: 600;
  color: var(--shell-text); text-decoration: none;
  padding: 0.7rem 1.25rem;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.nav-links > a.nav-home:hover { color: #fff; background: rgba(255,255,255,0.04); }
.nav-links > a.nav-home.active {
  color: var(--shell-accent);
  background: var(--shell-accent-dim);
  border-left-color: var(--shell-accent);
}

/* Level 1: Section (collapsible) */
.nav-section { margin-top: 0.25rem; }
.nav-section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1.25rem;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--shell-accent);
  cursor: pointer; user-select: none;
  border-top: 1px solid var(--shell-faint);
  transition: background 0.15s;
}
.nav-section-header:hover { background: rgba(255,255,255,0.03); }
.nav-section-header .nav-chevron {
  font-size: 0.6rem; color: var(--shell-muted);
  transition: transform 0.2s;
}
.nav-section.open > .nav-section-header .nav-chevron { transform: rotate(90deg); }
.nav-section-body { display: none; }
.nav-section.open > .nav-section-body { display: block; }

/* Level 2: Sub-group (collapsible) */
.nav-group { margin: 0; }
.nav-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.45rem 1.25rem 0.45rem 1.75rem;
  font-size: 0.78rem; font-weight: 600;
  color: var(--shell-muted);
  cursor: pointer; user-select: none;
  transition: background 0.15s;
}
.nav-group-header:hover { color: #fff; background: rgba(255,255,255,0.03); }
.nav-group-header .nav-chevron {
  font-size: 0.55rem; color: var(--shell-dim);
  transition: transform 0.2s;
}
.nav-group.open > .nav-group-header .nav-chevron { transform: rotate(90deg); }
.nav-group.open > .nav-group-header { color: var(--shell-text); }
.nav-group-body { display: none; }
.nav-group.open > .nav-group-body { display: block; }

/* Level 3: Page links */
.nav-section-body a, .nav-group-body a {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 500;
  color: var(--shell-muted); text-decoration: none;
  padding: 0.5rem 1.25rem 0.5rem 1.75rem;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.nav-section-body a:hover, .nav-group-body a:hover {
  color: #fff; background: rgba(255,255,255,0.04);
}
.nav-section-body a.active, .nav-group-body a.active {
  color: var(--shell-accent);
  background: var(--shell-accent-dim);
  border-left-color: var(--shell-accent);
  font-weight: 600;
}

/* Phase badges */
.nav-links span.nav-future {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.82rem; font-weight: 400;
  color: var(--shell-dim);
  padding: 0.5rem 1.25rem 0.5rem 1.75rem;
  cursor: default;
}
.nav-phase-badge {
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.15rem 0.4rem; border-radius: 3px;
  background: var(--shell-accent-dim);
  color: var(--shell-accent);
}

/* ══════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════ */

.site-footer {
  background: var(--shell-surface);
  border-top: 1px solid var(--shell-border);
  padding: 3rem 2rem 1.5rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
}
.footer-columns {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 1fr;
  gap: 2.5rem; align-items: start;
  margin-bottom: 1.5rem;
}

/* Left column: client brand */
.footer-client .footer-brand {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.footer-client .footer-brand img {
  height: 44px; width: 44px;
  object-fit: contain; border-radius: 6px;
}
.footer-client .footer-brand span {
  font-size: 1.2rem; font-weight: 700; color: #fff;
}
.footer-client .footer-est {
  font-size: 0.78rem; color: var(--shell-dim);
  margin-bottom: 0.3rem;
}
.footer-client .footer-tagline {
  font-size: 0.78rem; color: var(--shell-muted);
  font-style: italic;
}

/* Middle column: quick links */
.footer-nav-title {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--shell-accent);
  margin-bottom: 0.75rem;
}
.footer-links {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.3rem 1.5rem;
}
.footer-links a {
  color: var(--shell-muted); text-decoration: none;
  font-size: 0.82rem; padding: 0.2rem 0;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--shell-accent); }

/* Right column: FORUS Digital credit */
.footer-credits { text-align: right; }
.footer-prepared-label {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--shell-dim);
  margin-bottom: 0.5rem;
}
.footer-provider-brand {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; justify-content: flex-end;
  margin-bottom: 0.3rem;
}
.footer-provider-brand img {
  height: 32px; width: 32px; object-fit: contain;
}
.footer-provider-brand span {
  font-size: 1rem; font-weight: 600; color: var(--shell-text);
}
.footer-provider-link {
  display: block; font-size: 0.78rem;
  color: var(--shell-accent); text-decoration: none;
  text-align: right; margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.footer-provider-link:hover { color: #fff; }
.footer-provider-desc {
  font-size: 0.72rem; color: var(--shell-dim);
  text-align: right; line-height: 1.5;
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid var(--shell-faint);
  margin-top: 1rem; padding-top: 1.25rem;
  text-align: center;
}
.footer-copy {
  font-size: 0.75rem; color: var(--shell-dim);
}

/* ══════════════════════════════════════════════════════════════════════
   PROTECTED PAGE BANNER
   ══════════════════════════════════════════════════════════════════════ */

.dataroom-banner {
  background: var(--shell-faint);
  border: 1px solid var(--shell-border);
  padding: 0.75rem 2rem; text-align: center;
  font-size: 0.78rem; color: var(--shell-muted);
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE — Shell
   ══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .nav-inner { height: 56px; }
  .nav-drawer { width: 260px; }
  .site-footer { padding: 2rem 1.25rem 1rem; }
  .footer-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem; text-align: center;
  }
  .footer-client .footer-brand { justify-content: center; }
  .footer-credits { text-align: center; }
  .footer-provider-brand { justify-content: center; }
  .footer-provider-desc { text-align: center; }
  .footer-links { justify-items: center; }
}

/* ══════════════════════════════════════════════════════════════════════
   PRINT — Shell
   ══════════════════════════════════════════════════════════════════════ */

@media print {
  .site-nav, .nav-overlay, .nav-drawer { display: none; }
  .site-footer { background: #f5f5f5; color: #666; border-top: 1px solid #ddd; }
  .footer-client .footer-brand span { color: #333; }
}
