/* BCG Design Studios — Global Styles */

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--color-onix);
  background: var(--color-white);
  display: flex;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Layout shell ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  overflow-y: auto;
  background: var(--color-white);
  border-right: 1px solid var(--color-gray-200);
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.site-main {
  margin-left: var(--nav-width);
  flex: 1;
  min-width: 0;
}

/* ── Nav styles ── */
.nav-top {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-gray-200);
}
.nav-brand { display: inline-flex; }
.nav-brand-img { width: 32px; height: 32px; object-fit: contain; }

.nav-group { padding: 12px 8px 4px; }

.nav-group-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-onix);
  padding: 6px 8px;
  margin-bottom: 2px;
}

.nav-divider {
  height: 1px;
  background: var(--color-gray-200);
  margin: 4px 0;
}

.nav-item {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  border-radius: 6px;
  background: none;
  border: none;
  transition: background 0.15s;
  font-family: var(--font-body);
}
.nav-item:hover { background: var(--color-gray-100); }
.nav-item.active { background: var(--color-lilac-light); }
.nav-item.active .nav-item-link { color: var(--color-onix); font-weight: 500; }
.nav-item:hover .nav-item-link { color: var(--color-onix); }

.nav-item-link {
  flex: 1;
  padding: 8px 8px;
  color: var(--color-gray-700);
  font-size: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-chevron-btn {
  background: transparent;
  border: none;
  padding: 0 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 6px 6px 0;
}
.nav-chevron-btn:hover { background: rgba(0,0,0,0.05); }

.nav-item-wrap { display: flex; flex-direction: column; }

.nav-chevron {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--color-gray-300);
  transition: transform 0.2s;
}

/* Sub-menu */
.nav-sub { list-style: none; padding: 0 0 4px 12px; }
.nav-sub--hidden { display: none; }

.nav-sub-link {
  display: block;
  padding: 7px 8px;
  font-size: 13px;
  color: var(--color-muted);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-sub-link:hover { color: var(--color-onix); background: var(--color-gray-100); }
.nav-sub-link.active { color: var(--color-onix); font-weight: 500; }

/* ── Page canvas — 1:1 Figma scaling ── */
/*
  Strategy: the .figma-canvas div matches the Figma frame dimensions.
  All children use absolute positioning with cqw units (figma_px / 1920 * 100).
  container-type: inline-size makes cqw relative to the canvas width.
  aspect-ratio keeps proportions fluid at any viewport width.
*/
.figma-canvas {
  position: relative;
  width: 100%;
  container-type: inline-size;
  overflow: hidden;
  background: var(--color-white);
}

/* ── Mobile Nav Toggle Button ── */
.nav-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 201;
  width: 44px;
  height: 44px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
}
.nav-overlay.open {
  display: block;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .site-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    border-right: 1px solid var(--color-gray-200);
    border-bottom: none;
    transition: left 0.3s ease;
    z-index: 200;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }
  .site-nav.open {
    left: 0;
  }
  .site-main {
    margin-left: 0;
    /* Top padding so hamburger doesn't overlap the first section */
    padding-top: 0;
  }
  .figma-canvas {
    aspect-ratio: unset !important;
    height: auto !important;
  }
}

/* ── Shared Component: Pill Tag ── */
.hero-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  background: rgba(205, 85, 227, 0.15);
  border-radius: 9999px;
  width: fit-content;
}
.hero-eyebrow-text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .08em;
  color: var(--color-magenta-pulse);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── RULE: Full-Width Image Breakout ── */
/* 
  Use this utility when an image needs to span 100% of the canvas, ignoring lateral padding.
  WARNING: Do NOT use `min-height` with `cqw` units to maintain container height.
  Because `.figma-canvas` is the container, `cqw` inside it evaluates relative to the parent,
  which falls back to the viewport width (vw), causing massive unintended vertical gaps.
  
  SOLUTION: Use `padding-bottom` with a pure percentage (based on image aspect ratio) 
  so it resolves strictly relative to the container's mathematical width.
*/
.u-fw-breakout-container {
  position: relative;
  /* e.g., style="padding-bottom: calc(60.14% + 4cqw);" */
}

.u-fw-breakout-image {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  display: block;
}

/* ── Shared Component: Section Subtitle ── */
.pp-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 4.286cqw, 60px);
  color: var(--color-onix);
  line-height: 1.1;
  margin-bottom: 4cqw;
}
