/* ============================================================
   SHARED STYLES — edit here, updates everywhere
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap');

:root {
  --cream: #EEF1F9; --warm-white: #F4F6FB; --ink: #1E2240; --ink-light: #3B4270;
  --ink-muted: #7E87B2; --warm-accent: #1B3A8C; --warm-accent-light: #B8C3E8;
  --warm-rule: #C5CEEF; --serif: 'Bricolage Grotesque', system-ui, sans-serif;
  --sans: 'DM Sans', system-ui, sans-serif; --poppins: 'Poppins', system-ui, sans-serif;
  --display-serif: 'Bricolage Grotesque', system-ui, sans-serif;
  /* Mobile full-screen menu — single source for bar + overlay (no seam) */
  --nav-flyout-bg: rgba(7, 13, 26, 0.96);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--warm-white); color: var(--ink); font-family: var(--sans); font-weight: 300; line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* NAV — light (all pages except homepage which overrides) */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 200; padding: 24px 48px; display: flex; justify-content: space-between; align-items: center; background: var(--cream); transition: background 0.4s ease, backdrop-filter 0.4s ease; }
.nav-name { font-family: var(--serif); font-size: 21.6px; color: var(--ink); text-decoration: none; transition: color 0.4s ease; display: inline-flex; align-items: center; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a { font-size: 15.6px; font-weight: 400; letter-spacing: 0.02em; color: var(--ink-light); text-decoration: none; transition: color 0.2s; position: relative; }
.nav-links a::after { content: ""; position: absolute; bottom: -3px; left: 0; width: 0; height: 1px; background: var(--ink); transition: width 0.3s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

/* FOOTER */
footer { padding: 32px 48px; display: flex; justify-content: space-between; align-items: center; background: var(--warm-white); }
.footer-name { font-family: var(--serif); font-size: 16.8px; color: var(--ink-muted); }
.footer-note { font-size: 16.8px; color: var(--ink-muted); }

/* ANIMATED UNDERLINES */
a.award-link, a.back-link { position: relative; text-decoration: none; }
a.award-link::after, a.back-link::after { content: ""; position: absolute; bottom: -2px; left: 0; width: 0; height: 1px; background: currentColor; transition: width 0.3s ease; }
a.award-link:hover::after, a.back-link:hover::after { width: 100%; }
.recognition-text { position: relative; text-decoration: none; transition: color 0.2s; }
.recognition-text::after { content: ""; position: absolute; bottom: -2px; left: 0; width: 0; height: 1px; background: currentColor; transition: width 0.3s ease; }
.recognition-text:hover { color: var(--warm-accent); }
.recognition-text:hover::after { width: 100%; }

/* CASE STUDY HERO */
.case-hero { padding: 160px 48px 80px; background: var(--cream); position: relative; overflow: hidden; }
#case-hero-dots { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.case-hero-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 2; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: 0.02em; color: var(--ink-muted); text-decoration: none; transition: color 0.2s; margin-bottom: 48px; }
.back-link:hover { color: var(--warm-accent); }
.back-link .arrow { display: inline-block; transition: transform 0.25s ease; margin-right: 4px; }
.back-link:hover .arrow { transform: translateX(-5px); }
.case-eyebrow { font-size: 18px; font-weight: 500; letter-spacing: 0.02em; color: var(--warm-accent); margin-bottom: 16px; }
.case-hero-title { font-family: var(--serif); font-size: clamp(48px,6vw,88px); font-weight: 400; line-height: 1.05; color: var(--ink); margin-bottom: 16px; }
.case-hero-subtitle { font-size: 18px; color: var(--ink-muted); margin-bottom: 48px; letter-spacing: 0.04em; }
.case-hero-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-top: 48px; }
.meta-item { display: flex; flex-direction: column; gap: 6px; }
.meta-label { font-size: 14px; letter-spacing: 0.02em; color: var(--warm-accent); font-weight: 500; }
.meta-value { font-size: 16px; color: var(--ink); font-weight: 400; }
.meta-recognition { display: flex; flex-direction: column; gap: 10px; }
.recognition-row { display: flex; align-items: center; gap: 10px; }
.recognition-text { font-size: 16px; color: var(--ink); font-weight: 400; line-height: 1.3; }

/* CASE BODY */
.case-body-wrap { position: relative; overflow: hidden; background: var(--warm-white); background-image: radial-gradient(circle, rgba(197,206,239,0.35) 0.8px, transparent 0.8px); background-size: 24px 24px; }
#case-body-dots { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.case-body { max-width: 1100px; margin: 0 auto; padding: 80px 48px; position: relative; z-index: 1; }
.case-section { margin-bottom: 80px; }
.case-section:last-child { margin-bottom: 0; }
.section-label { font-size: 18px; font-weight: 500; letter-spacing: 0.02em; color: var(--warm-accent); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--warm-rule); }
.section-heading { font-family: var(--serif); font-size: clamp(24px,3vw,36px); font-weight: 400; color: var(--ink); margin-bottom: 24px; line-height: 1.2; }
.section-body { font-family: var(--poppins); font-size: 17px; color: var(--ink-light); line-height: 1.8; max-width: 720px; }
.section-body + .section-body { margin-top: 20px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin: 32px 0; }
.two-col-item {}
.two-col-label { font-size: 16px; letter-spacing: 0.02em; color: var(--ink); margin-bottom: 12px; padding-bottom: 12px; font-weight: 500; }
.two-col-list { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 0; }
.two-col-list li { font-size: 15px; color: var(--ink-light); line-height: 1.6; padding-left: 16px; position: relative; }
.two-col-list li::before { content: '•'; position: absolute; left: 0; color: var(--warm-accent); font-weight: 400; }
.two-col-text { font-family: var(--poppins); font-size: 15px; color: var(--ink-light); line-height: 1.7; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 48px 0; background: transparent; border-radius: 4px; overflow: hidden; }
.metric-block { background: var(--warm-white); padding: 32px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.metric-block-num { font-family: var(--display-serif); font-size: clamp(38px,4vw,58px); color: var(--ink); line-height: 1; }
.metric-block-label { font-family: var(--poppins); font-size: 13px; color: var(--ink-muted); line-height: 1.4; }
.metric-block-sub { font-family: var(--poppins); font-size: 14px; color: var(--ink-light); line-height: 1.5; }
.insight-block { background: #EEF1F9; border-radius: 4px; padding: 32px; margin: 32px 0; }
.insight-label { font-size: 14px; letter-spacing: 0.02em; color: var(--warm-accent); margin-bottom: 12px; font-weight: 500; }
.insight-text { font-family: var(--serif); font-size: 20px; color: var(--ink); line-height: 1.5; font-style: italic; }
.scope-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.scope-tag { font-size: 13px; letter-spacing: 0.02em; color: var(--ink-light); border: 1px solid var(--warm-rule); padding: 5px 12px; border-radius: 100px; }
.customers { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.customer-chip { font-size: 13px; color: var(--ink-light); background: var(--cream); padding: 8px 16px; border-radius: 100px; border: 1px solid var(--warm-rule); }
.image-placeholder { width: 100%; background: var(--cream); border-radius: 4px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; }
.image-placeholder.tall { height: 480px; }
.image-placeholder.medium { height: 320px; }
.image-placeholder-label { font-size: 12px; letter-spacing: 0.02em; color: var(--ink-muted); }
.nav-case { max-width: 1100px; margin: 0 auto; padding: 80px 48px; display: flex; justify-content: space-between; align-items: center; }
.nav-case-link { text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.nav-case-label { font-size: 13px; letter-spacing: 0.02em; color: var(--ink-muted); }
.nav-case-title { font-family: var(--serif); font-size: clamp(28px,3.5vw,42px); color: var(--ink); transition: color 0.2s; }
.nav-case-link:hover .nav-case-title { color: var(--warm-accent); }
.nav-case-link.next { text-align: right; }

/* RESPONSIVE */
@media (max-width: 900px) {
  nav { padding: 20px 24px; } .nav-links { gap: 16px; }
  .case-hero { padding: 120px 24px 60px; } .case-body { padding: 60px 24px; }
  /* Single column: role/surfaces/recognition/partners stack so context isn’t squeezed side-by-side */
  .case-hero-meta { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
  .metrics-grid { grid-template-columns: 1fr; } .two-col { grid-template-columns: 1fr; }
  .nav-case { padding: 48px 24px; flex-direction: column; gap: 32px; }
  .nav-case-link.next { text-align: left; }
  footer { padding: 24px; flex-direction: column; gap: 8px; text-align: center; }
}
@media (min-width: 1600px) { html { font-size: 120%; } }

/* MOBILE NAV MENU */
/* If a second control is ever injected, keep a single visible icon */
nav .nav-hamburger ~ .nav-hamburger {
  display: none !important;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 200;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--nav-flyout-bg);
  backdrop-filter: blur(16px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.nav-mobile-overlay.open {
  opacity: 1;
  pointer-events: all;
  z-index: 250;
}
/* Keep the header + hamburger above the dimmed overlay when the menu is open */
body.nav-mobile-open nav {
  z-index: 260;
}
.nav-mobile-overlay ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.nav-mobile-overlay ul li a {
  font-family: var(--serif);
  font-size: clamp(32px, 9vw, 52px);
  font-weight: 400;
  color: rgba(200, 210, 240, 0.7);
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.3;
  transition: color 0.2s ease;
  display: block;
  padding: 8px 16px;
}
.nav-mobile-overlay ul li a:hover,
.nav-mobile-overlay ul li a.active { color: #F0F3FF; }
.nav-mobile-close-hint {
  position: absolute;
  bottom: 40px;
  font-size: 13px;
  color: rgba(200,210,240,0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .nav-hamburger { display: flex; }
  .nav-links { display: none !important; }
  .nav-mobile-overlay { display: flex; }

  /* Same fill + blur as overlay so the top bar reads as one surface with the flyout */
  body.nav-mobile-open nav {
    background: var(--nav-flyout-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: none;
    box-shadow: none;
  }
  body.nav-mobile-open nav .nav-name {
    color: #F0F3FF;
  }
  body.nav-mobile-open nav .nav-hamburger {
    color: #fff;
    -webkit-tap-highlight-color: transparent;
  }
  body.nav-mobile-open nav .nav-hamburger:focus {
    outline: none;
  }
  body.nav-mobile-open nav .nav-hamburger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 3px;
  }
}
