/*
  ═══════════════════════════════════════════════════════
  SITE.CSS — Shared Design System
  Nikolay Chigirev Portfolio
  Version: 1.0  |  Date: 2026-05-29
  ═══════════════════════════════════════════════════════

  This file is the single source of truth for:
  — Design tokens (colors, type, spacing, motion, radius, shadows)
  — Reset and base styles
  — Navigation (both home-page and case-study variants)
  — Scroll progress bar
  — Scroll reveal system
  — Button components
  — Section scaffolding
  — Case-study page components (tension hero, context, accordion,
    screen rows, lightbox, closing, footer)
  — Responsive breakpoints (1024 / 768 / 480)
  — Reduced-motion accessibility

  Page-specific styles live in an inline <style> block in the
  relevant HTML file and override or extend this file.
  ═══════════════════════════════════════════════════════
*/


/* ═══════════════════════════════════════════════════════
   1. DESIGN TOKENS
   ═══════════════════════════════════════════════════════ */
:root {
  /* ── Colors ── */
  --c-bg:             #f5f4f0;
  --c-bg-warm:        #eeecea;
  --c-bg-dark:        #111111;
  --c-bg-darker:      #0c0c0c;
  --c-surface:        #efeee9;
  --c-surface-white:  #ffffff;
  --c-surface-dk:     #1e1e1e;
  --c-text:           #1a1a1a;
  --c-text-2:         #5a5a5a;   /* secondary text */
  --c-text-3:         #999999;   /* muted / placeholder */
  /* Aliases — some pages (b2c/b2b) reference these legacy names */
  --c-text-secondary: var(--c-text-2);
  --c-text-muted:     var(--c-text-3);
  --c-text-light:     #f0efeb;   /* text on dark sections */
  --c-text-light-dim: #a0a09c;   /* secondary text on dark */
  --c-accent:         #1a56db;
  --c-accent-hover:   #1d63f5;
  --c-accent-dim:     rgba(26, 86, 219, 0.12);
  --c-border:         rgba(26, 26, 26, 0.10);
  --c-border-dk:      rgba(255, 255, 255, 0.09);
  --c-divider:        rgba(26, 26, 26, 0.07);

  /* ── Typography ── */
  --ff-serif:   'Cormorant Garamond', Georgia, serif;
  --ff-sans:    'Inter', system-ui, -apple-system, sans-serif;

  /* ── Type scale ── */
  --text-hero:    clamp(52px, 7vw, 92px);
  --text-h2:      clamp(36px, 4.5vw, 64px);
  --text-h3:      clamp(22px, 2.5vw, 32px);
  --text-body-lg: clamp(17px, 1.2vw, 19px);
  --text-body:    17px;
  --text-small:   15px;
  --text-label:   12px;

  /* ── Spacing ── */
  --space-section: clamp(80px, 8vw, 120px);
  --space-half:    clamp(40px, 5vw, 70px);
  --gutter:        clamp(24px, 4vw, 64px);
  --max-w:         1280px;
  --max-text:      680px;

  /* ── Motion ── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:    200ms;
  --dur-std:     300ms;
  --dur-mid:     400ms;
  --dur-reveal:  700ms;

  /* ── Radius ── */
  --radius-sm:   3px;    /* screens — deliberately tight */
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-pill: 100px;

  /* ── Shadows ── */
  --shadow-card:   0 2px 16px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-lift:   0 8px 40px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-screen: 0 24px 80px rgba(0,0,0,0.18), 0 4px 20px rgba(0,0,0,0.10);
}


/* ═══════════════════════════════════════════════════════
   2. RESET & BASE
   ═══════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--ff-sans);
  background: var(--c-bg);
  color: var(--c-text);
  font-size: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
button { font-family: inherit; }


/* ═══════════════════════════════════════════════════════
   3. SCROLL PROGRESS BAR
   ═══════════════════════════════════════════════════════ */
/* Supports both id="scroll-bar" (case study pages)
   and id="scroll-progress" (home page) */
#scroll-bar,
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 2px;
  background: var(--c-accent);
  z-index: 1000;
  transition: width 100ms linear;
}


/* ═══════════════════════════════════════════════════════
   4. NAVIGATION
   ═══════════════════════════════════════════════════════ */

/* ── Shared nav shell ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 0 var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Home-page nav: transparent until scroll ── */
.nav--home {
  transition: background var(--dur-mid) var(--ease-out),
              backdrop-filter var(--dur-mid) var(--ease-out),
              box-shadow var(--dur-mid) var(--ease-out);
}
.nav--home.scrolled {
  background: rgba(245, 244, 240, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--c-border);
}

/* ── Case-study nav: always frosted ── */
.nav--case {
  background: rgba(245, 244, 240, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
  transition: background var(--dur-std);
}

/* ── Logo ── */
.nav-logo {
  font-family: var(--ff-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--c-text);
  transition: opacity var(--dur-fast);
}
.nav-logo:hover { opacity: 0.6; }

/* Home logo starts hidden, appears on scroll */
.nav-logo--home {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
}
.nav-logo--home.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Back link (case study pages) ── */
.nav-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-2);
  transition: color var(--dur-fast);
}
.nav-back:hover { color: var(--c-accent); }
.nav-back svg   { transition: transform var(--dur-fast); }
.nav-back:hover svg { transform: translateX(-3px); }

/* ── B2C / B2B section switcher (case study pages) ──
   Active side = "you are here" indicator; inactive side
   navigates to the sibling page. Compact version of the
   homepage segmented control. */
.nav-switch {
  display: inline-flex;
  align-items: center;
  background: #e6e4df;
  border: 1px solid rgba(26,26,26,0.06);
  border-radius: var(--radius-pill);
  padding: 5px;
  gap: 3px;
}
.nav-switch-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-text-2);
  white-space: nowrap;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-switch-item span {
  font-weight: 400;
  font-size: 12.5px;
  opacity: 0.75;
}
.nav-switch-item:hover:not(.active) {
  background: rgba(26,26,26,0.07);
  color: var(--c-text);
}
.nav-switch-item.active {
  background: var(--c-text);
  color: var(--c-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
@media (max-width: 900px) {
  .nav-switch-item span { display: none; }
  .nav-switch-item { padding: 9px 16px; }
}
@media (max-width: 480px) {
  .nav-switch-item { padding: 8px 13px; font-size: 13px; }
}

/* ── Nav links ── */
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-2);
  position: relative;
  transition: color var(--dur-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--c-accent);
  transition: width var(--dur-mid) var(--ease-out);
}
.nav-links a:hover        { color: var(--c-text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active        { color: var(--c-text); }

/* Case-study nav links are simpler (no underline animation) */
.nav--case .nav-links a {
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 13px;
}
.nav--case .nav-links a::after { display: none; }

/* ── Hamburger menu button (always visible, right side) ── */
.nav-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast);
  flex-shrink: 0;
  margin-left: 8px;
}
.nav-menu-btn:hover { background: rgba(26,26,26,0.06); }
.nav-menu-btn span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform 350ms var(--ease-out),
              opacity 200ms,
              width 300ms var(--ease-out);
  transform-origin: center;
}
/* Animate to X when drawer is open */
.nav-menu-btn.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-menu-btn.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-menu-btn.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Dark nav context (home hero before scroll, case study dark sections) */
.nav--home:not(.scrolled) .nav-menu-btn span { background: var(--c-text); }

/* ── Slide-in drawer ── */
.nav-drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms var(--ease-out);
}
.nav-drawer-scrim.open {
  opacity: 1;
  pointer-events: all;
}

.nav-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(480px, 88vw);
  height: 100dvh;
  background: var(--c-bg);
  z-index: 850;
  display: flex;
  flex-direction: column;
  padding: 80px 48px 48px;
  transform: translateX(100%);
  transition: transform 420ms var(--ease-out);
  overflow-y: auto;
  box-shadow: -8px 0 40px rgba(0,0,0,0.12);
}
.nav-drawer.open {
  transform: translateX(0);
}

/* Drawer header */
.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 56px;
}
.nav-drawer-brand {
  font-family: var(--ff-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-drawer-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: none;
  border: 1px solid var(--c-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-2);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-drawer-close:hover {
  background: var(--c-text);
  color: var(--c-bg);
}

/* Primary nav links */
.nav-drawer-nav {
  list-style: none;
  margin-bottom: 48px;
}
.nav-drawer-nav li {
  border-bottom: 1px solid var(--c-divider);
}
.nav-drawer-nav li:first-child {
  border-top: 1px solid var(--c-divider);
}
.nav-drawer-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  font-family: var(--ff-serif);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--c-text);
  text-decoration: none;
  transition: color var(--dur-fast), padding-left var(--dur-mid) var(--ease-out);
}
.nav-drawer-nav a svg {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity var(--dur-fast), transform var(--dur-mid) var(--ease-out);
  flex-shrink: 0;
  color: var(--c-accent);
}
.nav-drawer-nav a:hover {
  color: var(--c-accent);
  padding-left: 8px;
}
.nav-drawer-nav a:hover svg {
  opacity: 1;
  transform: translateX(0);
}
.nav-drawer-nav .nav-drawer-tag {
  font-family: var(--ff-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-text-3);
  background: var(--c-surface);
  border-radius: 100px;
  padding: 3px 8px;
  margin-left: 12px;
  flex-shrink: 0;
}

/* Secondary links section */
.nav-drawer-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-3);
  margin-bottom: 16px;
}
.nav-drawer-secondary {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 48px;
}
.nav-drawer-secondary a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-2);
  padding: 8px 0;
  text-decoration: none;
  transition: color var(--dur-fast);
}
.nav-drawer-secondary a:hover { color: var(--c-text); }

/* Footer strip inside drawer */
.nav-drawer-footer {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid var(--c-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.nav-drawer-footer-name {
  font-family: var(--ff-serif);
  font-size: 14px;
  color: var(--c-text-3);
}
.nav-drawer-socials {
  display: flex;
  gap: 12px;
}
.nav-drawer-socials a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--c-text-3);
  text-decoration: none;
  transition: color var(--dur-fast);
}
.nav-drawer-socials a:hover { color: var(--c-text); }

/* Stagger entrance animation for drawer items */
.nav-drawer.open .nav-drawer-nav li {
  animation: drawerItemIn 400ms var(--ease-out) both;
}
.nav-drawer.open .nav-drawer-nav li:nth-child(1) { animation-delay: 60ms; }
.nav-drawer.open .nav-drawer-nav li:nth-child(2) { animation-delay: 100ms; }
.nav-drawer.open .nav-drawer-nav li:nth-child(3) { animation-delay: 140ms; }
.nav-drawer.open .nav-drawer-nav li:nth-child(4) { animation-delay: 180ms; }
.nav-drawer.open .nav-drawer-nav li:nth-child(5) { animation-delay: 220ms; }
.nav-drawer.open .nav-drawer-nav li:nth-child(6) { animation-delay: 260ms; }
@keyframes drawerItemIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Mobile hamburger (old, kept for compat — hidden in favour of nav-menu-btn) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--c-text);
  transition: transform var(--dur-mid) var(--ease-out),
              opacity var(--dur-mid);
}


/* ═══════════════════════════════════════════════════════
   5. SCROLL REVEAL
   ═══════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }
.reveal-delay-5 { transition-delay: 400ms; }


/* ═══════════════════════════════════════════════════════
   6. SECTION SCAFFOLDING
   ═══════════════════════════════════════════════════════ */
.section {
  padding: var(--space-section) var(--gutter);
}

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

/* Section eyebrow label */
.section-label {
  font-family: var(--ff-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 20px;
}
.section-label.light { color: rgba(240, 239, 235, 0.45); }


/* ═══════════════════════════════════════════════════════
   7. BUTTONS
   ═══════════════════════════════════════════════════════ */

/* ── Base button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast),
              color var(--dur-fast);
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg    { width: 14px; height: 14px; flex-shrink: 0; transition: transform var(--dur-fast) var(--ease-out); }
.btn:hover svg { transform: translateX(2px); }

/* Dark filled — used on light sections */
.btn-primary {
  background: var(--c-text);
  color: var(--c-bg);
}
.btn-primary:hover {
  background: #2a2a2a;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

/* Ghost — used on light sections */
.btn-secondary {
  background: transparent;
  color: var(--c-text-2);
  border: 1px solid var(--c-border);
  padding: 13px 27px;
}
.btn-secondary:hover {
  color: var(--c-text);
  border-color: rgba(26,26,26,0.25);
  background: rgba(26,26,26,0.04);
}

/* Accent filled — used on dark sections (closing CTA) */
.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--c-accent);
  text-decoration: none;
  transition: transform var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}
.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(26,86,219,0.35);
  background: var(--c-accent-hover);
}
.btn-accent svg { transition: transform var(--dur-fast); }
.btn-accent:hover svg { transform: translateX(3px); }

/* Ghost on dark — used on dark sections */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 500;
  color: rgba(240,239,235,0.55);
  border: 1px solid var(--c-border-dk);
  text-decoration: none;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.btn-ghost:hover {
  color: var(--c-text-light);
  border-color: rgba(240,239,235,0.3);
}

/* Expand/collapse all (accordion) */
.btn-toggle-all {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--c-border-dk);
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  font-family: var(--ff-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(240,239,235,0.50);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color var(--dur-fast), border-color var(--dur-fast);
  white-space: nowrap;
}
.btn-toggle-all:hover {
  color: rgba(240,239,235,0.85);
  border-color: rgba(240,239,235,0.28);
}
.btn-toggle-all svg { transition: transform 300ms var(--ease-out); }
.btn-toggle-all.all-open svg { transform: rotate(180deg); }

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  background: var(--c-text);
  color: var(--c-bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur-mid) var(--ease-out),
              transform var(--dur-mid) var(--ease-out),
              background var(--dur-fast);
  z-index: 99;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-top:hover { background: #2a2a2a; }
.scroll-top svg   { width: 16px; height: 16px; }


/* ═══════════════════════════════════════════════════════
   8. CASE STUDY — TENSION HERO (dark)
   ═══════════════════════════════════════════════════════ */
.tension {
  background: var(--c-bg-dark);
  padding: 160px var(--gutter) 120px;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

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

.tension-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}

.tension-breadcrumb {
  font-size: 13px;
  font-weight: 400;
  color: rgba(240,239,235,0.35);
}
.tension-breadcrumb a {
  color: rgba(240,239,235,0.45);
  transition: color 200ms;
}
.tension-breadcrumb a:hover { color: rgba(240,239,235,0.75); }
.tension-breadcrumb .sep    { margin: 0 6px; opacity: 0.3; }

.tension-case-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(240,239,235,0.80);
  background: rgba(240,239,235,0.09);
  border: 1px solid rgba(240,239,235,0.14);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
}

.tension-statement {
  font-family: var(--ff-serif);
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--c-text-light);
  max-width: 860px;
  margin-bottom: 48px;
}
.tension-statement em {
  font-style: italic;
  color: rgba(240,239,235,0.65);
}

.tension-sub {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(240,239,235,0.55);
  max-width: 560px;
}


/* ═══════════════════════════════════════════════════════
   9. CASE STUDY — CONTEXT SECTION (light)
   ═══════════════════════════════════════════════════════ */
.context {
  background: var(--c-bg);
  padding: var(--space-section) var(--gutter);
}

.context-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}

.context-text h2 {
  font-family: var(--ff-serif);
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: 28px;
}

.context-text p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--c-text-2);
  margin-bottom: 16px;
  max-width: 560px;
}
.context-text p:last-child { margin-bottom: 0; }

/* Read-more truncation */
.context-body { position: relative; }
.context-body.collapsed {
  max-height: 200px;
  overflow: hidden;
}
.context-body.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--c-bg));
  pointer-events: none;
}

.context-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity var(--dur-fast);
}
.context-read-more:hover { opacity: 0.7; }
.context-read-more svg   { transition: transform var(--dur-fast); }
.context-read-more.expanded svg { transform: rotate(180deg); }

/* Scope pills */
.scope-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.scope-pill {
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-2);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
}

/* Generic journey/flow card used in the context column */
.journey-card-base,
.booking-flow {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
}
.journey-card-base-title,
.booking-flow-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-text-3);
  margin-bottom: 32px;
}

/* Static timeline steps (used in air-v1 booking flow) */
.flow-steps { display: flex; flex-direction: column; }
.flow-step  {
  display: flex;
  gap: 16px;
  position: relative;
}
.flow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 28px; bottom: 0;
  width: 1px;
  background: var(--c-border);
}
.flow-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  color: var(--c-text-3);
  transition: background 300ms, border-color 300ms, color 300ms;
}
.flow-dot.active {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}
.flow-content { padding: 4px 0 28px; }
.flow-step:last-child .flow-content { padding-bottom: 0; }
.flow-content strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 3px;
}
.flow-content span {
  font-size: 12px;
  color: var(--c-text-3);
  line-height: 1.5;
}


/* ═══════════════════════════════════════════════════════
   10. CASE STUDY — PROBLEMS / ACCORDION (dark)
   ═══════════════════════════════════════════════════════ */
.problems {
  background: var(--c-bg-dark);
  padding: var(--space-section) var(--gutter);
}

.problems-header {
  margin-bottom: clamp(40px, 5vw, 60px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.problems-header h2 {
  font-family: var(--ff-serif);
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--c-text-light);
  max-width: 600px;
}

.problems-grid {
  display: flex;
  flex-direction: column;
}

/* Accordion item */
.accordion-item {
  border-top: 1px solid var(--c-border-dk);
  overflow: hidden;
}
.accordion-item:last-child { border-bottom: 1px solid var(--c-border-dk); }

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 22px 16px;
  display: grid;
  grid-template-columns: 44px 1fr 28px;
  gap: 20px;
  align-items: center;
  text-align: left;
  transition: background var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}
.accordion-trigger:hover,
.accordion-item.open .accordion-trigger {
  background: rgba(240,239,235,0.03);
}

.accordion-num {
  font-family: var(--ff-serif);
  font-size: 22px;
  font-weight: 400;
  color: rgba(240,239,235,0.55);
  line-height: 1;
}
.accordion-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text-light);
  line-height: 1.45;
  transition: color var(--dur-fast);
}
.accordion-item.open .accordion-title { color: #fff; }

.accordion-chevron {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: rgba(240,239,235,0.30);
  transition: transform 350ms var(--ease-out), color var(--dur-fast);
}
.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
  color: rgba(240,239,235,0.60);
}

/* Smooth height via grid-template-rows technique */
.accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 350ms var(--ease-out);
}
.accordion-item.open .accordion-body { grid-template-rows: 1fr; }
.accordion-body-inner { overflow: hidden; }

.accordion-content {
  padding: 0 0 28px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.accordion-problem-text {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(240,239,235,0.48);
}

/* Staggered slide-in on open */
.accordion-content > * {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.accordion-item.open .accordion-content > *:nth-child(1) {
  opacity: 1; transform: translateX(0); transition-delay: 80ms;
}
.accordion-item.open .accordion-content > *:nth-child(2) {
  opacity: 1; transform: translateX(0); transition-delay: 160ms;
}

.accordion-decision {
  background: rgba(240,239,235,0.05);
  border: 1px solid rgba(240,239,235,0.10);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}
.decision-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 10px;
}
.accordion-decision p {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(240,239,235,0.68);
}


/* ═══════════════════════════════════════════════════════
   11. CASE STUDY — SCREEN ROWS (the work section)
   ═══════════════════════════════════════════════════════ */
.work-section { padding: 0; }

.work-header-block {
  padding: var(--space-section) var(--gutter) var(--space-half);
  background: var(--c-bg);
}
.work-header-block-inner { max-width: var(--max-w); margin: 0 auto; }
.work-header-block h2 {
  font-family: var(--ff-serif);
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--c-text);
  max-width: 500px;
}

/* Alternating row backgrounds */
.screen-row { padding: clamp(48px, 5vw, 72px) var(--gutter); }
.screen-row:nth-child(odd)  { background: var(--c-bg); }
.screen-row:nth-child(even) { background: var(--c-surface); }

.screen-row-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}
.screen-row-inner.reverse { grid-template-columns: 1fr 360px; }
.screen-row-inner.reverse .screen-visual { order: 2; }
.screen-row-inner.reverse .screen-text   { order: 1; }

/* Thumbnail: fixed 360×280px, crops from bottom */
.screen-visual {
  width: 360px;
  height: 280px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  cursor: zoom-in;
  background: #d8d6d0;
}
.screen-visual img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: top center;
  transition: transform 500ms var(--ease-out);
}
.screen-visual:hover img { transform: scale(1.03); }

.screen-visual::after {
  content: 'View full screen';
  position: absolute;
  bottom: 12px; right: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.55);
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  opacity: 0;
  transition: opacity var(--dur-std);
  pointer-events: none;
}
.screen-visual:hover::after { opacity: 1; }

.screen-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 16px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.45), transparent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.screen-num  { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: rgba(255,255,255,0.65); }
.screen-name { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.85); }

.screen-text h3 {
  font-family: var(--ff-serif);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--c-text);
  margin-bottom: 20px;
}
.screen-text p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-text-2);
  max-width: 480px;
  margin-bottom: 16px;
}
.screen-text p:last-child { margin-bottom: 0; }

.screen-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-accent);
  background: var(--c-accent-dim);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  margin-bottom: 20px;
}


/* ═══════════════════════════════════════════════════════
   12. LIGHTBOX
   ═══════════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18,18,20,0.50);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms;
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}
/* tab row pinned at the top of the popup — same steps as the card it opened from */
.lightbox-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  background: rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 100px;
  max-width: min(92vw, 760px);
  flex-shrink: 0;
}
.lightbox-tabs:empty { display: none; }
.lightbox-tab {
  padding: 8px 16px;
  border-radius: 100px;
  font-family: var(--ff-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 200ms, color 200ms;
}
.lightbox-tab:hover:not(.active) { background: rgba(255,255,255,0.14); color: #fff; }
.lightbox-tab.active { background: #fff; color: #1a1a1a; }

.lightbox img {
  /* never exceed ~80% of the viewport, and never upscale past the image's
     native resolution — keeps screenshots crisp instead of blowing up soft.
     Slightly under 80vh to leave room for the tab row + caption. */
  width: auto;
  height: auto;
  max-width: min(80vw, 960px);
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  transform: scale(0.95);
  transition: transform 350ms var(--ease-out);
  flex-shrink: 0;
}
.lightbox.open img { transform: scale(1); }

/* Caption card below image */
.lightbox-caption {
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 350ms 80ms, transform 350ms 80ms var(--ease-out);
  pointer-events: none;
  max-width: 520px;
  width: 100%;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 4px;
  padding: 14px 20px;
}
.lightbox.open .lightbox-caption {
  opacity: 1;
  transform: translateY(0);
}
.lightbox-caption-title {
  font-family: var(--ff-sans);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}
.lightbox-caption-desc {
  font-family: var(--ff-sans);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
}

.lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background var(--dur-fast);
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }


/* ═══════════════════════════════════════════════════════
   13. CASE STUDY — CLOSING (dark)
   ═══════════════════════════════════════════════════════ */
.closing {
  background: var(--c-bg-dark);
  padding: clamp(80px, 10vw, 140px) var(--gutter);
}
.closing-inner { max-width: 820px; margin: 0 auto; }

.closing-statement {
  font-family: var(--ff-serif);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(240,239,235,0.85);
  margin-bottom: 48px;
}
.closing-statement strong {
  color: var(--c-text-light);
  font-weight: 500;
}

.closing-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--c-border-dk);
}
.closing-meta-item dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(240,239,235,0.30);
  margin-bottom: 8px;
}
.closing-meta-item dd {
  font-size: 15px;
  color: rgba(240,239,235,0.70);
  line-height: 1.5;
}

.closing-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}


/* ═══════════════════════════════════════════════════════
   14. FOOTER (case study pages)
   ═══════════════════════════════════════════════════════ */
.footer {
  background: #0d0d0d;
  padding: 40px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-name { font-family: var(--ff-serif); font-size: 16px; color: rgba(240,239,235,0.40); }
.footer-copy { font-size: 12px; color: rgba(240,239,235,0.22); }


/* ═══════════════════════════════════════════════════════
   15. HERO LOAD ANIMATION (home page)
   ═══════════════════════════════════════════════════════ */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow.animate  { animation: fadeUp var(--dur-reveal) var(--ease-out) 100ms forwards; }
.hero-headline.animate { animation: fadeUp 800ms var(--ease-out) 250ms forwards; }
.hero-sub.animate      { animation: fadeUp var(--dur-reveal) var(--ease-out) 450ms forwards; }
.hero-actions.animate  { animation: fadeUp 600ms var(--ease-out) 620ms forwards; }

/* Gallery card-deal animation (home page) */
@keyframes cardDeal {
  from { opacity: 0; transform: translateY(28px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}


/* ═══════════════════════════════════════════════════════
   16. RESPONSIVE
   ═══════════════════════════════════════════════════════ */

/* ── Tablet ── */
@media (max-width: 1024px) {
  .accordion-content {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-left: 0;
  }
  .context-layout { gap: clamp(40px, 5vw, 64px); }
}

/* ── Mobile landscape / small tablet ── */
@media (max-width: 768px) {
  /* Nav */
  .nav-links {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(245,244,240,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 0;
    border-bottom: 1px solid var(--c-border);
    z-index: 899;
  }
  .nav-links.open { display: flex; }
  .nav-links li   { border-bottom: 1px solid var(--c-divider); }
  .nav-links a    { display: block; padding: 14px 0; font-size: 14px; }
  .nav-toggle     { display: flex; }

  /* Case study nav: keep links visible but simpler */
  .nav--case .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    background: none;
    backdrop-filter: none;
    border: none;
    padding: 0;
    gap: 20px;
  }
  .nav--case .nav-links li { border: none; }
  .nav--case .nav-links a  { padding: 0; font-size: 13px; display: inline; }

  /* Tension hero */
  .tension { padding: 120px var(--gutter) 80px; min-height: auto; }

  /* Context */
  .context-layout { grid-template-columns: 1fr; gap: 48px; }

  /* Accordion */
  .accordion-trigger { grid-template-columns: 32px 1fr 24px; gap: 14px; }

  /* Screen rows */
  .screen-row-inner,
  .screen-row-inner.reverse { grid-template-columns: 1fr; gap: 28px; }
  .screen-row-inner.reverse .screen-visual,
  .screen-row-inner.reverse .screen-text { order: unset; }
  .screen-visual { width: 100%; height: 240px; }

  /* Closing */
  .closing-meta { grid-template-columns: 1fr 1fr; gap: 24px; }

  /* Scroll to top */
  .scroll-top { bottom: 20px; right: 20px; }
}

/* ── Mobile portrait ── */
@media (max-width: 480px) {
  :root { --gutter: 20px; }

  .tension-statement { font-size: clamp(28px, 9vw, 36px); }

  .closing-meta { grid-template-columns: 1fr; }
  .closing-nav  { flex-direction: column; align-items: stretch; }
  .btn-accent, .btn-ghost {
    text-align: center;
    justify-content: center;
    width: 100%;
  }
}


/* ═══════════════════════════════════════════════════════
   17. REDUCED MOTION
   ═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
