/* ============================================
   MARK SLATER PORTFOLIO v3 — GLOBAL STYLES
   Light, warm, personality-first redesign
   ============================================

   Contents:
   1.  Fonts + CSS custom properties
   2.  Reset & base
   3.  Utilities (container, section label, img placeholder, fade-in)
   4.  Navigation — frosted glass, always visible
   5.  Hero — two-column, light bg
   6.  Ticker strip — scrolling marquee
   7.  Selected Work — image-top cards
   8.  Approach section
   9.  AI section — accent-light tint bg
   10. Impact section
   11. About section
   12. Contact section — dark bg
   13. Footer
   14. Case study — shared (hero, impact cards)
   15. Case study — problem, role, process, outcome
   16. Password page
   17. Responsive ≤768px, ≤480px
   ============================================ */


/* ----------------------------------------
   1. Fonts + CSS custom properties
   ---------------------------------------- */

/* DM Sans: UI, body, nav
   Fraunces: display headlines, numbers, serif-italic accents */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;1,9..144,300;1,9..144,400&display=swap');

:root {
  --bg:             #F5F3EF;   /* warm off-white */
  --bg-card:        #FFFFFF;
  --text-primary:   #111111;
  --text-secondary: #666666;
  --text-muted:     #999999;
  --accent:         #0057FF;
  --accent-light:   #EEF3FF;   /* very faint blue — used for decorative numbers, AI bg */
  --border:         #E5E2DD;
  --dark:           #111111;

  --container:    1200px;
  --gutter:       60px;
  --section-pad:  100px;
}


/* ----------------------------------------
   2. Reset & base
   ---------------------------------------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 16px;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img  { display: block; max-width: 100%; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }


/* ----------------------------------------
   3. Utilities
   ---------------------------------------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Section eyebrow label */
.section-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

/* Inline Fraunces italic — the "word with personality" in headlines */
.serif-italic {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

/* Image placeholder div — replaced with <img> when real photos are ready.
   Set background + centred filename label so it's clear what goes here. */
.img-placeholder {
  background: #E8E5E0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  color: #999999;
  text-align: center;
  padding: 16px;
  user-select: none;
  pointer-events: none;
  line-height: 1.5;
}
.img-placeholder-label {
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  color: #999999;
  text-align: center;
  padding: 16px;
  user-select: none;
  pointer-events: none;
  line-height: 1.5;
}

/* Fade-in on scroll — JS adds .visible via IntersectionObserver */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Screen-reader only (accessibility) */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* ----------------------------------------
   4. Navigation — frosted glass
   Always opaque enough to read over any bg.
   No scroll detection needed.
   ---------------------------------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(245, 243, 239, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
}
.nav .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo — circular icon + name */
.nav-logo {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}
.nav-logo-icon svg { display: block; }
.nav-logo-text {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: inherit;
  letter-spacing: -0.01em;
}
.nav-logo-serif {
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 15px;
}

/* Desktop nav links */
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text-primary); }

/* Back link on case study / inner pages */
.nav-back {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-back:hover { color: var(--text-primary); }


/* ----------------------------------------
   5. Hero — single column, animated gradient
   ---------------------------------------- */

.hero {
  background: var(--bg);
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 85vh;
  padding-top: calc(80px + 60px);
  padding-bottom: 80px;
  background: var(--bg);
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 65% 55% at 65% 35%,
      rgba(0, 87, 255, 0.18) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 55% 65% at 30% 75%,
      rgba(0, 87, 255, 0.13) 0%,
      transparent 55%
    );
  animation: heroFloat 14s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes heroFloat {
  0%   { opacity: 0.7;  transform: translate(0%, 0%)     scale(1);    }
  25%  { opacity: 1;    transform: translate(1%, -1.5%)  scale(1.03); }
  50%  { opacity: 0.8;  transform: translate(-1%, 1%)    scale(0.98); }
  75%  { opacity: 0.95; transform: translate(1.5%, 0.5%) scale(1.02); }
  100% { opacity: 0.7;  transform: translate(0%, 0%)     scale(1);    }
}

.hero-section > .container { position: relative; z-index: 1; }

.hero-single {
  max-width: 800px;
  text-align: left;
}

.hero-avatar {
  margin-bottom: 0;
}

.accent-italic {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.hero-section .hero-headline {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.05;
  color: var(--text-primary);
  margin-top: 24px;
  letter-spacing: -0.02em;
}

/* "ship." — Fraunces italic in accent blue */
.hero-headline .accent-italic {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  font-size: inherit;
  letter-spacing: 0;
}

/* legacy two-column grid — kept for reference */
.hero-grid {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 64px;
  align-items: center;
}

/* Left: text */
/* Availability badge with pulsing dot */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: badgePulse 1.5s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1;   }
}

/* Main headline — DM Sans body, .serif-italic for the key word */
.hero-headline {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(44px, 6vw, 80px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.hero-subheading {
  font-size: 18px;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* Light credential pills */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.hero-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  padding: 8px 16px;
  border-radius: 100px;
  white-space: nowrap;
}

/* CTA buttons */
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}
.btn-primary:hover { background: #0048D4; }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 400;
  padding: 14px 28px;
  border-radius: 8px;
  border: 1px solid #CECBC7;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.btn-secondary:hover { background: var(--bg-card); border-color: #C8C4BE; }

/* Right: profile photo placeholder */
.hero-photo-wrap { display: flex; justify-content: center; }
.hero-photo {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  background: #E8E5E0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* To swap in a real photo, replace the placeholder span with:
     <img src="images/profile-photo.jpg" alt="Mark Slater" loading="eager"> */
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }


/* ----------------------------------------
   6. Ticker strip — auto-scrolling marquee
   Duplicate content in HTML for seamless loop.
   translateX(-50%) = exactly one full set width.
   ---------------------------------------- */

.ticker-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  overflow: hidden;
}
.ticker-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  width: max-content;
  animation: tickerScroll 20s linear infinite;
  will-change: transform;   /* browser perf hint */
}
/* Pause on hover — gives users a moment to read */
.ticker-section:hover .ticker-inner { animation-play-state: paused; }

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.ticker-sep { color: var(--border); font-size: 14px; flex-shrink: 0; }


/* ----------------------------------------
   7. Selected Work
   Image on top, card body below.
   ---------------------------------------- */

.work-section { padding: var(--section-pad) 0; background: #242424; }

/* Header row: heading left, count right */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.section-heading {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 36px;
  color: var(--text-primary);
  line-height: 1.1;
}
.section-count { font-size: 14px; color: var(--text-muted); }

/* 2-column grid */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Card — light bg, border, rounded corners */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;   /* anchor for NDA overlay */
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.project-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Image area — fixed height, placeholder fills it */
.card-img-area {
  height: 320px;
  position: relative;
  overflow: hidden;
}
.card-img-area .img-placeholder { height: 100%; }
.card-img-area img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.project-card:hover .card-img-area img { transform: scale(1.04); }

/* Floating type pill — top-left of image */
.card-tag-pill {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 1;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Card body */
.card-body { padding: 24px; }
.card-company-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.card-company {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.card-year { font-size: 13px; color: var(--text-muted); }
.card-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}
.card-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}
.card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.card-tag {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
}
.card-arrow {
  margin-left: auto;
  color: var(--accent);
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.project-card:hover .card-arrow { transform: translateX(3px); }

/* Coming-soon variant — greyed out, non-interactive */
.project-card.coming-soon {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
.project-card.coming-soon:hover {
  box-shadow: none;
  transform: none;
}

/* NDA overlay — light frosted glass, entire card is clickable */
.nda-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(245, 243, 239, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.nda-eyebrow {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: #111111;
  margin: 0;
}
.nda-lock-icon { color: var(--text-secondary); }
.nda-password-btn {
  display: inline-block;
  background: #FFFFFF;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.nda-overlay:hover .nda-password-btn { border-color: var(--accent); color: var(--accent); }
/* Legacy aliases kept for any remaining references */
.nda-lock-icon { width: 32px; height: 32px; color: var(--text-secondary); }
.nda-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.nda-request-btn {
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nda-request-btn:hover { border-color: var(--accent); color: var(--accent); }


/* ----------------------------------------
   7b. Selected Work — dark mode treatment
   Scoped to .work-section so no other
   section is affected.
   ---------------------------------------- */

/* Section label + gradient accent line */
.work-section .section-label {
  color: rgba(255, 255, 255, 0.55);
}
.work-section .section-label::after {
  content: '';
  display: block;
  margin-top: 10px;
  height: 1px;
  width: 48px;
  background: linear-gradient(to right, rgba(0, 100, 255, 0.6), transparent);
}

/* Section heading */
.work-section .section-heading { color: #FFFFFF; }
.work-section .section-count   { color: rgba(255, 255, 255, 0.3); }

/* Cards */
.work-section .project-card {
  background: #1E1E1E;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.work-section .project-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Card body */
.work-section .project-card-body {
  background: #181818;
  padding: 20px 24px;
}
.work-section .project-card-company {
  color: rgba(255, 255, 255, 0.55);
}
.work-section .project-card-title {
  color: #FFFFFF;
  font-weight: 500;
}
.work-section .project-card-desc {
  color: rgba(255, 255, 255, 0.75);
}

/* Tag pills */
.work-section .project-card-tags span {
  background: rgba(0, 87, 255, 0.15);
  border: 1px solid rgba(0, 87, 255, 0.25);
  color: rgba(100, 160, 255, 0.9);
}

/* Arrow */
.work-section .card-arrow { color: rgba(0, 120, 255, 0.8); }

/* NDA overlay — dark frosted for dark section */
.work-section .nda-overlay {
  background: rgba(20, 20, 20, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.work-section .nda-eyebrow {
  color: rgba(255, 255, 255, 0.7);
}
.work-section .nda-password-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
}
.work-section .nda-overlay:hover .nda-password-btn {
  background: rgba(0, 87, 255, 0.2);
  border-color: rgba(0, 120, 255, 0.5);
  color: #FFFFFF;
}


/* ----------------------------------------
   8. Approach section
   White bg, 3 columns, top-border on hover
   ---------------------------------------- */

.approach-section { padding: var(--section-pad) 0; background: var(--bg-card); }
.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  margin-top: 48px;
}
.approach-step {
  padding-top: 28px;
  border-top: 1px solid var(--border);
  transition: border-top-width 0.2s ease, border-color 0.2s ease;
}
.approach-step:hover {
  border-top: 2px solid var(--accent);
  padding-top: 27px; /* compensate for extra 1px so content doesn't jump */
}

/* Large faint Fraunces number — decorative */
.step-num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 64px;
  color: var(--accent-light);
  line-height: 1;
  display: block;
}
/* Title overlaps the number slightly for visual rhythm */
.step-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: -16px;
  margin-bottom: 10px;
  position: relative;
}
.step-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}


/* ----------------------------------------
   9. AI section — light blue tint bg
   ---------------------------------------- */

.ai-section {
  padding: var(--section-pad) 0;
  background: linear-gradient(
    to top,
    #c8d9f8 0%,
    #d8e6fb 20%,
    #e4eefb 45%,
    #eef4ff 70%,
    #f0f4ff 100%
  ) !important;
  position: relative;
  overflow: hidden;
}
.ai-section > .container { position: relative; z-index: 1; }
.ai-tool-logos {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.ai-tool-logo {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-tool-logo img {
  width: 36px !important;
  height: 36px !important;
  display: block;
  object-fit: contain;
  border-radius: 0;
}
.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.ai-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}
.ai-headline {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.ai-body {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.8;
}
/* 2x2 card grid */
.ai-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ai-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.ai-card-icon { width: 24px; height: 24px; color: var(--accent); margin-bottom: 8px; }
.ai-card-title { font-size: 14px; font-weight: 500; color: var(--text-primary); }


/* ----------------------------------------
   10. Impact section
   ---------------------------------------- */

.impact-section { padding: var(--section-pad) 0; background: var(--bg); }
.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 48px;
}
.impact-grid--4col { grid-template-columns: repeat(4, 1fr); }
.impact-stat {
  padding: 0 40px;
  border-right: 1px solid var(--border);
}
.impact-stat:first-child { padding-left: 0; }
.impact-stat:last-child  { border-right: none; padding-right: 0; }
.impact-number {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(48px, 6vw, 72px);
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0;
}
.impact-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 8px;
  line-height: 1.4;
}
.impact-sublabel {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 4px;
  max-width: 180px;
  line-height: 1.5;
}


/* ----------------------------------------
   11. About section
   ---------------------------------------- */

.about-section { padding: var(--section-pad) 0; background: var(--bg-card); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #E8E5E0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-headline {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 36px;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.2;
}
.about-body {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.about-link {
  display: block;
  font-size: 15px;
  color: var(--accent);
  text-decoration: none;
  margin-top: 20px;
  transition: opacity 0.2s ease;
}
.about-link:hover { opacity: 0.7; }


/* ----------------------------------------
   12. Contact section — dark background
   ---------------------------------------- */

.contact-section { padding: var(--section-pad) 0; background: var(--dark); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.contact-eyebrow {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}
.contact-headline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(36px, 5vw, 64px);
  color: #FFFFFF;
  line-height: 1.1;
  margin-bottom: 20px;
}
.contact-body {
  font-size: 17px;
  color: #AAAAAA;
  line-height: 1.7;
  max-width: 480px;
}
.contact-info-block { margin-bottom: 32px; }
.contact-info-block:last-child { margin-bottom: 0; }
.contact-info-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: #555555;
  margin-bottom: 6px;
  display: block;
}
/* Email with animated underline on hover */
.contact-email {
  display: inline-block;
  font-size: 22px;
  font-weight: 400;
  color: #FFFFFF;
  text-decoration: none;
  position: relative;
}
.contact-email::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.35s ease;
}
.contact-email:hover::after { width: 100%; }
.contact-linkedin {
  font-size: 16px;
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.2s ease;
}
.contact-linkedin:hover { color: #AAAAAA; }


/* ----------------------------------------
   13. Footer
   ---------------------------------------- */

.footer {
  background: #111111;
  border-top: 1px solid #222222;
  padding: 24px 0;
}
.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-left { font-size: 13px; color: #595959; }
.footer-right { display: flex; gap: 20px; }
.footer-right a {
  font-size: 13px;
  color: #595959;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-right a:hover { color: #111111; }


/* ----------------------------------------
   14. Case study — shared styles
   ---------------------------------------- */

/* Dark hero with Fraunces title */
.cs-hero {
  background: var(--dark);
  padding: 80px 0;
  padding-top: calc(56px + 80px);
}
.cs-breadcrumb {
  display: inline-block;
  font-size: 14px;
  color: #555555;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}
.cs-breadcrumb:hover { color: #AAAAAA; }
.cs-label-tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: #555555;
  margin-bottom: 12px;
  display: block;
}
.cs-title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(40px, 6vw, 72px);
  color: #FFFFFF;
  line-height: 1.05;
  margin-bottom: 20px;
  max-width: 800px;
}
.cs-summary-text {
  font-size: 18px;
  font-weight: 300;
  color: #888888;
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 40px;
}
.cs-meta-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-meta-pill {
  background: #1F1F1F;
  border: 1px solid #333333;
  color: #AAAAAA;
  font-size: 12px;
  font-weight: 400;
  padding: 8px 16px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
}

/* Impact dashboard — three stat cards */
.cs-impact-section { background: var(--bg); padding: 60px 0; }
.cs-impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.cs-impact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
/* Fraunces number in accent colour */
.cs-impact-number {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(40px, 5vw, 64px);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.cs-impact-label   { font-size: 15px; font-weight: 500; color: var(--text-primary); margin-bottom: 6px; }
.cs-impact-context { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

/* Full-width image block */
.cs-full-img-wrap { width: 100%; }
.cs-full-img-placeholder {
  width: 100%;
  height: 480px;
  background: #E8E5E0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-full-img { width: 100%; max-height: 560px; object-fit: cover; display: block; }


/* ----------------------------------------
   15. Case study — problem / role / process / outcome
   ---------------------------------------- */

/* Alternating section backgrounds */
.cs-section         { padding: 80px 0; }
.cs-section.white   { background: var(--bg-card); }
.cs-section.light   { background: var(--bg); }
.cs-section.dark    { background: var(--dark); }

/* Narrow reading column — problem, role body */
.cs-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
/* Medium width — process grid */
.cs-wide {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Section eyebrow within case study */
.cs-section-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--accent);
  margin-bottom: 24px;
  display: block;
}
/* Dark-section variant */
.cs-section.dark .cs-section-label { color: #555555; }

/* Fraunces italic pull quote */
.cs-pull-quote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 28px;
  color: var(--text-primary);
  border-left: 3px solid var(--accent);
  padding-left: 24px;
  line-height: 1.45;
  margin: 32px 0;
}
/* Support paragraph beneath pull quote */
.cs-para {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 28px;
}

/* Dark challenge pill tags */
.cs-challenge-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.cs-challenge-pill {
  background: var(--dark);
  color: #FFFFFF;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
}

/* Role section two-column */
.cs-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.cs-role-list { display: flex; flex-direction: column; gap: 16px; }
.cs-role-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.55;
}
.cs-role-dot { color: var(--accent); font-size: 14px; flex-shrink: 0; line-height: 1.55; }
.cs-role-body { font-size: 15px; color: var(--text-secondary); line-height: 1.8; }

/* 2-column bullet grid */
.cs-bullets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  margin-top: 28px;
}
.cs-bullets-grid .cs-role-list { gap: 14px; }
@media (max-width: 600px) {
  .cs-bullets-grid { grid-template-columns: 1fr; }
}

/* Process 2x2 grid */
.cs-process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.cs-process-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
.cs-process-num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 52px;
  color: var(--accent-light);
  line-height: 1;
  display: block;
}
.cs-process-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: -10px;
  margin-bottom: 10px;
}
.cs-process-body { font-size: 14px; color: var(--text-secondary); line-height: 1.75; }

/* Full-width placeholder beneath process grid */
.cs-process-img-placeholder {
  width: 100%;
  height: 480px;
  background: #E8E5E0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Outcome dark section */
.cs-outcome-headline {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 44px);
  color: #FFFFFF;
  line-height: 1.3;
  max-width: 780px;
  margin-bottom: 48px;
}
.cs-outcome-list { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.cs-outcome-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: #AAAAAA;
  line-height: 1.65;
}
.cs-outcome-check { color: var(--accent); font-size: 16px; flex-shrink: 0; margin-top: 2px; }


/* ----------------------------------------
   16. Password page
   ---------------------------------------- */

.pass-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px var(--gutter);
}
/* Fraunces italic monogram — brand anchor */
.password-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.password-logo img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: block;
}
.pass-headline {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 28px;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-align: center;
}
.pass-subtext {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  text-align: center;
  max-width: 340px;
  line-height: 1.6;
}
.pass-form { display: flex; flex-direction: column; width: 320px; }
.pass-input {
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
}
.pass-input:focus { border-color: var(--accent); }
.pass-btn {
  height: 48px;
  background: var(--accent);
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: 0 0 8px 8px;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s ease;
}
.pass-btn:hover { background: #0048D4; }
.pass-error { display: none; font-size: 13px; color: #CC0000; margin-top: 12px; text-align: center; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}


/* ----------------------------------------
   17. Responsive
   ---------------------------------------- */

@media (max-width: 1024px) {
  .case-study-hero-image { padding: 40px 60px 0 60px; }
}

@media (max-width: 768px) {
  :root { --section-pad: 80px; --gutter: 24px; }

  /* Nav: hide name on mobile, show icon only */
  .nav-logo-text { display: none; }
  .nav-logo-icon { width: 32px; height: 32px; }
  .nav-links  { gap: 20px; }
  .nav-links a { font-size: 13px; }

  /* Hero: stack, photo moves above text */
  .hero { padding-top: calc(56px + 48px); padding-bottom: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo-wrap { order: -1; }
  .hero-photo { max-width: 280px; margin: 0 auto; }
  .hero-headline { font-size: 40px; }

  /* Hero single-column — mobile */
  .hero-section { min-height: auto; padding-top: calc(70px + 40px); padding-bottom: 60px; }

  /* Work grid: single column */
  .project-grid { grid-template-columns: 1fr; }

  /* Approach: single column */
  .approach-grid { grid-template-columns: 1fr; gap: 40px; }

  /* AI section: stack */
  .ai-grid { grid-template-columns: 1fr; gap: 48px; }
  .ai-headline { font-size: 32px; }

  /* Impact: 2×2 grid on mobile */
  .impact-grid,
  .impact-grid--4col { grid-template-columns: 1fr 1fr; gap: 0; }
  .impact-stat {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 24px 20px;
  }
  /* Remove right border on even items, remove bottom on last row */
  .impact-stat:nth-child(2n)   { border-right: none; }
  .impact-stat:nth-last-child(-n+2) { border-bottom: none; }
  .impact-stat:first-child     { padding-left: 0; }
  .impact-stat:nth-child(2)    { padding-right: 0; }

  /* About: stack */
  .about-grid { grid-template-columns: 1fr; gap: 40px; }

  /* Contact: stack */
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-headline { font-size: 36px; }

  /* Footer: stack */
  .footer .container { flex-direction: column; gap: 16px; text-align: center; }

  /* Case study */
  .cs-title { font-size: 36px; }
  .cs-impact-grid  { grid-template-columns: 1fr; }
  .cs-role-grid    { grid-template-columns: 1fr; gap: 40px; }
  .cs-process-grid { grid-template-columns: 1fr; }
  .cs-pull-quote   { font-size: 22px; }
  .cs-outcome-headline { font-size: 28px; }
}

@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .hero-headline  { font-size: 34px; }
  .hero-ctas      { flex-direction: column; }
  .btn-primary, .btn-secondary { text-align: center; }
  .pass-form { width: 100%; }
}


/* ============================================================
   HTML BRIDGE — aliases and additions to match HTML class names
   ============================================================ */

/* Nav */
.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Hero */
.hero-badge-dot { /* same as .badge-dot */
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: badgePulse 1.5s ease-in-out infinite;
}
.hero-sub { /* same as .hero-subheading */
  font-size: 17px;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 32px;
}
/* hero-photo already in CSS but using .hero-photo as a wrapper
   to accept an img-placeholder child */
.hero-photo {
  display: flex;
  align-items: stretch;
}
.hero-photo .img-placeholder {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
}

/* Ticker — .ticker is the outer wrapper, .ticker-section was old name */
.ticker {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  overflow: hidden;
}
.ticker:hover .ticker-inner { animation-play-state: paused; }

/* Generic section wrapper */
.section { padding: var(--section-pad) 0; }

/* Section header + horizontal rule */
.section-header { margin-bottom: 48px; }
.section-rule {
  height: 1px;
  background: var(--border);
  margin-top: 0;
}

/* Project card — inner link wrapper */
.project-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
/* Image area */
.project-card-img {
  height: 320px;
  position: relative;
  overflow: hidden;
}
.project-card-img .img-placeholder { height: 100%; }
.project-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card-img img { transform: scale(1.04); }

/* Card body */
.project-card-body { padding: 24px; }
.project-card-company {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.project-card-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}
.project-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}
.project-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.project-card-tags span {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
}

/* Coming-soon card variant */
.project-card--soon {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
.project-card--soon:hover { box-shadow: none; transform: none; }
.project-card-img--soon {
  height: 320px;
  background: #E8E5E0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.soon-label {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

/* NDA overlay children */
.nda-lock { font-size: 24px; line-height: 1; }
.nda-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}
.nda-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}
.nda-btn { /* same as .nda-request-btn */
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nda-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Approach step — mapped class names */
.approach-number { /* same as .step-num */
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 64px;
  color: var(--accent-light);
  line-height: 1;
  display: block;
}
.approach-title { /* same as .step-title */
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: -16px;
  margin-bottom: 10px;
  position: relative;
}
.approach-body { /* same as .step-body */
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}
.approach-grid { margin-top: 48px; }

/* AI section additions */
.ai-intro {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.8;
  margin-bottom: 48px;
}
.ai-card-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 8px;
}
/* Override AI grid to 2x2 cards (all same column) */
.ai-section .ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 0;
  align-items: start;
}

/* Impact */
.impact-desc { /* same as .impact-label */
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 200px;
  line-height: 1.6;
}
.impact-grid { margin-top: 48px; }

/* About */
.about-links { margin-top: 24px; display: flex; flex-direction: column; gap: 0; }
.about-headline {
  font-size: clamp(28px, 3.5vw, 44px);
}
.about-body { margin-bottom: 16px; }

/* Contact — centred single column */
.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.contact-sub {
  font-size: 17px;
  color: #AAAAAA;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 480px;
}
.btn-primary--light {
  background: #FFFFFF;
  color: var(--dark);
  margin-bottom: 40px;
}
.btn-primary--light:hover { background: #F0F0F0; }
.contact-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.contact-links a {
  font-size: 14px;
  color: #AAAAAA;
  text-decoration: none;
  transition: color 0.2s ease;
}
.contact-links a:hover { color: #FFFFFF; }

/* Footer inner */
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---- Case study bridge ---- */

/* cs-label / cs-summary / cs-meta-row / cs-pill */
.cs-label { /* same as .cs-label-tag */
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: #555555;
  margin-bottom: 12px;
  display: block;
}
.cs-summary { /* same as .cs-summary-text */
  font-size: 18px;
  font-weight: 300;
  color: #888888;
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 40px;
}
.cs-meta-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-pill { /* same as .cs-meta-pill */
  background: #1F1F1F;
  border: 1px solid #333333;
  color: #AAAAAA;
  font-size: 12px;
  font-weight: 400;
  padding: 8px 16px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
}

/* cs-full-img as a div wrapper */
.cs-full-img { width: 100%; line-height: 0; }
.cs-full-img .img-placeholder { width: 100%; }

/* Hero image — flush between dark hero and impact stats */
.case-study-hero-image {
  width: 100%;
  background: #F0EEF8;
  padding: 48px 120px 0 120px;
  box-sizing: border-box;
  line-height: 0;
}
.case-study-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px 12px 0 0;
  object-fit: contain;
}

/* Screenshot showcase — framed product image within case study body */
.cs-screenshot-section {
  background: #F0F0F0;
  padding: 60px 0;
  width: 100%;
}
.cs-screenshot-frame {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  overflow: hidden;
}
.cs-screenshot-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* Pair variant — two frames side by side */
.cs-screenshot-section--pair { padding: 60px 0; }
.cs-screenshot-pair-grid {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cs-screenshot-pair-grid .cs-screenshot-frame {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* cs-content — main body wrapper */
.cs-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px var(--gutter);
}

/* When cs-content contains the two-col page layout,
   remove horizontal constraints — cs-page-layout handles them */
.cs-content:has(.cs-page-layout) {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* ----------------------------------------
   Case study page layout — side nav + content
   ---------------------------------------- */

.cs-page-layout {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  gap: 60px;
}

.cs-main-content {
  flex: 1;
  min-width: 0;
  max-width: 860px;
}

.cs-main-content img {
  max-width: 100%;
  height: auto;
}

.cs-main-content .img-block-full,
.cs-main-content .img-block-pair,
.cs-main-content .process-grid-wide,
.cs-main-content .img-captioned-block {
  max-width: 75%;
  width: 100%;
  margin-left: 0;
  margin-right: auto;
}

.cs-side-nav {
  width: 140px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  padding-top: 40px;
}

.cs-side-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-side-nav a {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text-muted, #999999);
  text-decoration: none;
  display: block;
  padding: 4px 10px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.cs-side-nav a:hover {
  color: var(--text-primary);
  border-left-color: var(--accent);
}

.cs-side-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

@media (max-width: 1024px) {
  .cs-side-nav { display: none; }
  .cs-page-layout { padding: 0 var(--gutter); }
  /* Images restore to full width on tablet/mobile */
  .cs-main-content .img-block-full,
  .cs-main-content .img-block-pair,
  .cs-main-content .process-grid-wide,
  .cs-main-content .img-captioned-block {
    max-width: 100%;
  }
  /* Inner containers: layout provides the gutter, no extra padding needed */
  .cs-main-content .container,
  .final-designs-section .container,
  .process-exploration-section .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* ----------------------------------------
   Findings grid
   ---------------------------------------- */

.ideation-block {
  margin-bottom: 32px;
}
.ideation-block:last-child {
  margin-bottom: 0;
}
.ideation-caption {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 10px 0 0 0;
  padding: 0;
}

.findings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 32px;
}

.finding-item {
  padding: 28px 0;
  border-top: 2px solid var(--accent);
}

.finding-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--text-primary);
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.finding-body {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
}

@media (max-width: 768px) {
  .findings-grid { grid-template-columns: 1fr; gap: 0; }
  .finding-item { padding: 20px 0; }
}

/* cs-section within cs-content */
.cs-content .cs-section {
  padding: 0;
  margin-bottom: 72px;
}
.cs-section-title {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--accent);
  margin-bottom: 24px;
  display: block;
}
.cs-section-body { }
.cs-section-body p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}
.cs-section-body p:last-child { margin-bottom: 0; }

/* NDA banner within case study */
.cs-nda-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--border);
  padding: 20px 24px;
  border-radius: 8px;
  margin-bottom: 64px;
}
.cs-nda-icon { font-size: 18px; line-height: 1.4; flex-shrink: 0; }
.cs-nda-banner p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}
.cs-nda-banner a { color: var(--accent); text-decoration: underline; }

/* cs-process-number — faint Fraunces italic */
.cs-process-number { /* same as .cs-process-num */
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 52px;
  color: var(--accent-light);
  line-height: 1;
  display: block;
}

/* Outcome section on dark bg — standalone full-width section */
/* Impact grid — 3-column variant (portal stats) */
.impact-grid--3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.impact-grid--3col .impact-stat {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 40px;
}
.impact-grid--3col .impact-stat:nth-child(3n) { border-right: none; }
.impact-grid--3col .impact-stat:nth-last-child(-n+3) { border-bottom: none; }
@media (max-width: 768px) {
  .impact-grid--3col { grid-template-columns: repeat(2, 1fr); }
  .impact-grid--3col .impact-stat:nth-child(3n)       { border-right: 1px solid var(--border); }
  .impact-grid--3col .impact-stat:nth-child(2n)       { border-right: none; }
  .impact-grid--3col .impact-stat:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .impact-grid--3col .impact-stat:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 480px) {
  .impact-grid--3col { grid-template-columns: 1fr; }
  .impact-grid--3col .impact-stat { border-right: none; border-bottom: 1px solid var(--border); }
  .impact-grid--3col .impact-stat:last-child { border-bottom: none; }
}

#portal-stats {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 80px 0;
  margin-top: -80px;
}
#portal-stats .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 60px;
  box-sizing: border-box;
  width: 100%;
}
#portal-stats .impact-grid--3col { width: 100%; }
#portal-stats .section-header {
  padding-left: 40px;
  margin-bottom: 0;
}

/* Outcome section in paddle-portal sits outside .cs-content,
   so constrain it to match the box style of other pages */
#portal-stats ~ .cs-outcome-section {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 80px;
}

.cs-outcome-section {
  background: var(--dark);
  padding: var(--section-pad) 0;
  margin-top: 0;
}
.cs-outcome-section .section-label { color: #4D9FFF; }
.cs-outcome-section .section-rule  { background: #2A2A2A; }
.cs-outcome-statement { /* same as .cs-outcome-headline */
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 44px);
  color: #FFFFFF;
  line-height: 1.3;
  max-width: 780px;
  margin-bottom: 48px;
  margin-top: 40px;
}
.cs-outcome-bullets { /* same as .cs-outcome-list */
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* cs-img and cs-img-pair */
.cs-img { margin-top: 40px; border-radius: 8px; overflow: hidden; }
.cs-img .img-placeholder { width: 100%; border-radius: 8px; overflow: hidden; }
.cs-img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}
.cs-img-pair .img-placeholder { border-radius: 8px; overflow: hidden; }

/* cs-stat-row — outcome stats (used in harmonic) */
.cs-stat-row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.cs-stat-item { }
.cs-stat-number {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 48px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.cs-stat-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 260px;
  line-height: 1.6;
}

/* Process grid inside cs-content */
.cs-content .cs-process-grid { margin-top: 32px; }

/* cs-role-grid inside cs-content */
.cs-content .cs-section-body.cs-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* "Enter password →" secondary link inside NDA overlay */
.nda-password-link {
  display: block;
  text-align: center;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  color: #FFFFFF;
  opacity: 0.6;
  text-decoration: none;
  margin-top: 8px;
  transition: opacity 0.2s ease;
}
.nda-password-link:hover { opacity: 1; }

/* Project name subtitle on password page */
.pass-project-name {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-align: center;
  min-height: 1.4em;
}

/* Inline screenshot section — used within cs-content, breaks out of narrow column */
.cs-screenshot-section--inline {
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  width: calc(100% + var(--gutter) * 2);
}

/* ----------------------------------------
   Process & Exploration section (case studies)
   ---------------------------------------- */

.process-exploration-section {
  padding: 80px 40px;
  background: var(--bg);
}
.section-research-summary {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 8px 0 20px;
  max-width: 640px;
}

.section-research-bullets {
  margin-bottom: 40px;
}

.cs-main-content .process-exploration-section,
.cs-main-content .final-designs-section {
  padding-left: 0;
  padding-right: 0;
}

/* Ideation / process image placeholder boxes */
.img-block-full .img-placeholder,
.img-block-half .img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #2a2a2a;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.25);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.img-block-half .img-placeholder {
  aspect-ratio: 4 / 3;
  min-height: 280px;
}
.final-designs-section {
  padding: 80px 40px;
  background: var(--bg);
  overflow: visible;
}
.process-exploration-section .container,
.final-designs-section .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  margin-bottom: 40px;
}

/* Shared image block styles */
.img-block-full {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 12px auto;
  border-radius: 16px;
  overflow: hidden;
  background: #E8E5E0;
  line-height: 0;
}
.img-block-full img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

.img-block-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto 12px auto;
}
.img-block-half {
  border-radius: 16px;
  overflow: hidden;
  background: #E8E5E0;
  line-height: 0;
}
.img-block-half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  min-height: 280px;
}

@media (max-width: 768px) {
  .process-exploration-section,
  .final-designs-section { padding: 60px 20px; }
  .img-block-pair { grid-template-columns: 1fr; }
  .img-block-half img { min-height: 220px; }
}


/* ----------------------------------------
   Final Designs — title
   ---------------------------------------- */

.final-designs-title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 44px);
  color: var(--text-primary);
  margin-top: 8px;
}


/* ----------------------------------------
   Lightbox — expand icon + overlay
   ---------------------------------------- */

/* Expand icon on image hover */
.img-block-full,
.img-block-half {
  position: relative;
  cursor: pointer;
}

.img-expand-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 5;
  cursor: pointer;
  border: none;
  pointer-events: none;
}

.img-expand-btn svg {
  width: 16px;
  height: 16px;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.img-block-full:hover .img-expand-btn,
.img-block-half:hover .img-expand-btn {
  opacity: 1;
  pointer-events: auto;
}

/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  transform: scale(0.96);
  transition: transform 0.3s ease;
  display: block;
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}

.lightbox-counter {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 16px;
  border-radius: 100px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  color: white;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close svg {
  width: 18px;
  height: 18px;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: white;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
}

.lightbox-prev svg,
.lightbox-next svg {
  width: 20px;
  height: 20px;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
  opacity: 0.25;
  cursor: default;
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next { display: none; }
  .lightbox-img { max-width: 96vw; }
}


/* ----------------------------------------
   Captioned image blocks
   ---------------------------------------- */

.img-captioned-block {
  max-width: 1100px;
  margin: 0 auto 40px auto;
}

.img-captioned-block .img-block-full,
.img-captioned-block .img-block-half {
  margin-bottom: 12px;
}

.img-captioned-block .img-block-full:last-of-type,
.img-captioned-block .img-block-half:last-of-type {
  margin-bottom: 0;
}

/* Within cs-main-content, img-captioned-block itself is already constrained
   to 75% — the inner img-block-full must fill 100% of that, not apply 75% again */
.cs-main-content .img-captioned-block .img-block-full {
  max-width: 100%;
}

.img-pair-captioned {
  max-width: 1100px;
  margin: 0 auto 40px auto;
}

.img-pair-captioned .img-block-pair {
  margin-bottom: 0;
}

.img-caption {
  padding: 16px 0 0 0 !important;
  border-top: none !important;
  border: none !important;
  margin-top: 0 !important;
  text-align: left;
}

.img-caption-title {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 500 !important;
  font-size: 18px !important;
  color: #111111 !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
}

.img-caption-bullets {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.img-caption-bullets p {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #666666;
  line-height: 1.7;
  margin: 0 0 2px 0;
  padding: 0;
}

.img-caption-bullets li {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 14px !important;
  color: #666666 !important;
  line-height: 1.7 !important;
  margin-bottom: 2px !important;
  padding-left: 0 !important;
  list-style: none !important;
}

.img-caption-bullets li::before {
  content: none !important;
  display: none !important;
}

/* Lightbox caption */
.lightbox-caption {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 700px;
  width: 90%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 20px 24px;
  display: none;
}

.lightbox-caption.has-content {
  display: block;
}

.lightbox-caption-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: white;
  margin: 0 0 8px 0;
}

.lightbox-caption-bullets {
  list-style: disc;
  padding-left: 16px;
  margin: 0;
}

.lightbox-caption-bullets li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.65;
  margin-bottom: 3px;
}


/* Password back link */
.pass-back {
  margin-top: 48px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.pass-back:hover { color: var(--text-primary); }

/* Responsive additions for bridge classes */
@media (max-width: 768px) {
  .ai-section .ai-grid { grid-template-columns: 1fr; }
  .cs-img-pair { grid-template-columns: 1fr; }
  .cs-stat-row { gap: 32px; }
  .contact-inner { padding: 0 var(--gutter); }
  .cs-content .cs-section-body.cs-role-grid { grid-template-columns: 1fr; gap: 32px; }
  .case-study-hero-image        { padding: 32px 20px 0 20px; }
  .cs-screenshot-section        { padding: 40px 0; }
  .cs-screenshot-section--pair  { padding: 40px 0; }
  .cs-screenshot-frame          { padding: 0 20px; }
  .cs-screenshot-pair-grid      { padding: 0 20px; grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .contact-links { flex-direction: column; align-items: center; gap: 12px; }
}


/* ----------------------------------------
   Section label universal left-alignment
   ---------------------------------------- */

/* All section labels start from same point */
.cs-main-content .section-label,
.cs-section .section-label,
.cs-section--outcome .section-label,
.final-designs-section .section-label,
.process-exploration-section .section-label,
#portal-stats .section-label,
.impact-section .section-label,
.cs-outcome-section .section-label {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Ensure full-width sections that break out of the main content column
   use the same left edge as the main content */
#portal-stats .container,
.impact-section .container {
  padding-left: 60px !important;
  padding-right: 60px !important;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* cs-main-content carries no extra horizontal padding */
.cs-main-content {
  padding-left: 0;
  padding-right: 0;
}

/* Sections inside cs-main-content use their own container for padding */
.cs-main-content .container {
  padding-left: 60px;
  padding-right: 60px;
  max-width: 100%;
  box-sizing: border-box;
}

/* Images in these sections are outside .container and left-aligned at 0,
   so the container must also have 0 padding to keep labels in sync */
.final-designs-section .container,
.process-exploration-section .container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media (max-width: 768px) {
  #portal-stats .container,
  .impact-section .container,
  .final-designs-section .container,
  .process-exploration-section .container,
  .cs-main-content .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}
