/* ============================================================
   GLOBACOM — new-blue-design/case-study-whitepaper.css
   Phase 10 Plan 04 — SHARED stylesheet for both whitepaper
   case-study pages (case-study-whitepaper-1.html / -2.html), per
   RESEARCH.md's Open Question 2 recommendation given their
   near-total structural identity (same viewer-split/sidebar shape,
   differing only in copy and PDF config).

   FIRST: full @font-face + :root token block + base rules + hero
   block, duplicated verbatim from new-blue-design/case-study-bescom.css
   (chrome.css defines zero tokens of its own — every page must
   duplicate the full token block, per the CR-01 bug class already hit
   once in this project).

   THEN: the .hero-eyebrow/.detail-section/.detail-section-title/
   .detail-prose vocabulary this page actually uses (duplicated
   verbatim from case-study-bescom.css — same class names, same
   property values, no renaming). This page does not use
   .detail-step-flow/.detail-quote/.trust-stats, so those families are
   intentionally NOT duplicated here (D-82 — only this page's own
   content-specific rules).

   THEN: the sketch's own .viewer-split/.viewer-sidebar rules, copied
   property-for-property from .claude/skills/sketch-findings-globacom/
   references/case-studies-hub-and-detail-pages.md's CSS Patterns
   block, plus page-owned .viewer-sidebar-* content rules, plus minimal
   .pdf-loading/.pdf-canvas-container/.pdf-error styling adapted from
   old-design/css/case-studies.css's existing rule bodies (re-tokenized
   to this project's --color-*/--font-* custom properties, since this
   page's tokens differ from old-design's).

   Nav/mega-menu/footer CSS is chrome-owned (D-82) and deliberately NOT
   duplicated here — see redesign/_shared/chrome.css.
   ============================================================ */

@font-face {
  font-family: 'GothamBold';
  src: url('shared/fonts/GothamBold.woff2') format('woff2'),
       url('shared/fonts/GothamBold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GothamBook';
  src: url('shared/fonts/GothamBook.woff2') format('woff2'),
       url('shared/fonts/GothamBook.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GothamLight';
  src: url('shared/fonts/GothamLight.woff2') format('woff2'),
       url('shared/fonts/GothamLight.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-bg: #FAFAF8;
  --color-surface: #FFFFFF;
  --color-border: #E4E5E2;
  --color-text: #1A1D1F;
  --color-text-muted: #6C6E6B; /* WCAG-corrected per skill reference, ~4.93:1 on --color-bg */
  --color-blue: #ABC9E3;
  --color-blue-deep: #2E577A;
  --color-mint: #B9CFC0;
  --color-mint-deep: #8CA694;
  --color-footer-bg: #16181A;
  --color-text-on-dark: #F4F4F2;

  --font-display: 'GothamLight', 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'GothamBook', 'Helvetica Neue', Arial, sans-serif;
  --font-bold: 'GothamBold', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'GothamBook', 'Helvetica Neue', Arial, sans-serif;

  --wash-filter: saturate(0.7) brightness(1.08) contrast(0.92) sepia(0.04);
  --wash-filter-hero: saturate(0.45) brightness(1.02) contrast(0.88) sepia(0.08);

  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.04);
  --radius-md: 10px;
  --border-subtle: 1px solid rgba(0,0,0,0.06);
  --transition-fast: 150ms cubic-bezier(0.4,0,0.2,1);

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* CR-01 fix carried forward: redesign/_shared/chrome.css's
     mega-menu-group-label and badge-coming-soon rules reference
     --tracking-wide and --radius-sm — every page's own token block
     must define them. */
  --tracking-wide: 0.06em;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.gsap-animate {
  visibility: hidden;
}

a {
  text-decoration: none;
}

/* ============================================================
   Emphasis pattern — black/gray weight-mix, never color/size
   ============================================================ */

.em   { font-family: var(--font-bold); font-weight: 700; color: var(--color-text); }
.fade { color: var(--color-text-muted); font-weight: 400; }

/* ============================================================
   Hero (page-specific — chrome.css never defines these) —
   full-bleed photo hero, duplicated verbatim from
   case-study-bescom.css.
   ============================================================ */

.hero-section {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 92vh;
  padding-bottom: var(--space-3xl);
}

.hero-section .hero-headline,
.hero-section .hero-sub,
.hero-section .em {
  color: var(--color-text-on-dark);
  text-shadow: 0 1px 14px rgba(0,0,0,0.25);
}

.hero-section .hero-headline,
.hero-section .hero-eyebrow,
.hero-section .hero-sub {
  text-shadow: 0 2px 4px rgba(0,0,0,0.6), 0 4px 24px rgba(0,0,0,0.55);
}

.hero-section .fade {
  color: rgba(244,244,242,0.75);
  text-shadow: 0 1px 14px rgba(0,0,0,0.25);
}

.hero-section .btn-cta:focus-visible {
  outline: 2px solid var(--color-text-on-dark);
  outline-offset: 2px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(32px, 5.4vw, 68px);
  font-weight: 300;
  line-height: 1.05;
  margin: 0 0 var(--space-md);
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 var(--space-lg);
  max-width: 640px;
}

.hero-photo-frame {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 12%;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 65%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 65%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--wash-filter-hero);
}

.hero-photo-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(20,20,18,0.35) 100%),
    linear-gradient(180deg, rgba(10,12,14,0.55) 0%, rgba(10,12,14,0.12) 35%, rgba(20,20,18,0.55) 100%);
}

.hero-photo-grain {
  position: absolute; inset: 0; opacity: 0.05; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ============================================================
   Phase 9 shared detail-page vocabulary this page uses — duplicated
   verbatim from new-blue-design/case-study-bescom.css.
   ============================================================ */

.hero-eyebrow {
  display: block;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-mint);
  margin: 0 0 var(--space-sm);
  text-shadow: 0 1px 14px rgba(0,0,0,0.25);
}

.detail-section {
  padding-block: var(--space-2xl);
  background: var(--color-bg);
}

.detail-section:nth-of-type(even) {
  background: var(--color-surface);
}

.detail-section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  color: var(--color-blue-deep);
  margin: 0 0 var(--space-sm);
}

.detail-prose {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  max-width: 720px;
  margin: 0 0 var(--space-md);
}

/* ============================================================
   Whitepaper viewer + sticky sidebar — sketch-015 Variant B, copied
   property-for-property from case-studies-hub-and-detail-pages.md's
   CSS Patterns block.
   ============================================================ */

.viewer-split {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: var(--space-xl);
  align-items: start;
}

.viewer-sidebar {
  background: var(--color-blue-deep);
  color: var(--color-text-on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: sticky;
  top: 24px;
}

/* Page-owned sidebar content rules — not part of the sketch's copied
   CSS block above, but needed to lay out this page's "Key Result"
   stat/body/CTA content inside the sidebar panel. */

.viewer-sidebar-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-mint);
  margin: 0 0 var(--space-md);
}

.viewer-sidebar-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin: 0 0 var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(244,244,242,0.18);
}

.viewer-stat-value {
  font-family: var(--font-bold);
  font-size: clamp(40px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text-on-dark);
}

.viewer-stat-label {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  color: rgba(244,244,242,0.85);
}

.viewer-sidebar-body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(244,244,242,0.9);
  margin: 0 0 var(--space-lg);
}

.viewer-sidebar-cta {
  display: inline-block;
  background: var(--color-text-on-dark);
  color: var(--color-blue-deep);
  font-family: var(--font-bold);
  font-size: 14px;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.viewer-sidebar-cta:hover,
.viewer-sidebar-cta:focus-visible {
  color: var(--color-blue-deep);
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.viewer-sidebar-cta:focus-visible {
  outline: 2px solid var(--color-text-on-dark);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .viewer-split {
    grid-template-columns: 1fr;
  }

  .viewer-sidebar {
    position: static;
  }
}

/* ============================================================
   pdf.js viewer frame — minimal styling adapted from old-design/css/
   case-studies.css's existing .pdf-viewer-section/.pdf-loading/
   .pdf-canvas-container/.pdf-error rule bodies (re-tokenized to this
   project's --color-*/--font-* custom properties, since old-design's
   own --primary-color/--text-muted/--dark-color tokens don't exist in
   this page's :root block).
   ============================================================ */

.pdf-viewer-section {
  min-height: 60vh;
  background: var(--color-surface);
  border: var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.pdf-canvas-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  margin: 0;
}

.pdf-canvas-container canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
}

.pdf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.pdf-loading.hidden {
  display: none;
}

.pdf-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.pdf-error a {
  color: var(--color-blue-deep);
  text-decoration: underline;
}
