/* ============================================
   CREATIVE HOUSE MARKETING - Case Studies
   ============================================ */

:root {
  --primary: #006A4E;
  --secondary: #444444;
  --tertiary: #FFFFFF;
  --neutral: #E5E7EB;
  --surface: #FFFFFF;
  --on-surface: #000000;
  --bg: #FFFFFF;
  --bg-alt: #F8F9FA;
  --text: #444444;
  --text-dim: #666666;
  --text-muted: #999999;
  --accent: #006A4E;
  --accent-hover: #00523D;
  --border: #E5E7EB;
  --border-hover: #006A4E;
  --error: #C0392B;
  --radius-none: 0px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --space-xs: 16px;
  --space-sm: 26px;
  --space-md: 40px;
  --space-lg: 56px;
  --space-xl: 194px;
  --t: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --primary: #006A4E;
  --secondary: #CCCCCC;
  --tertiary: #FFFFFF;
  --neutral: #333333;
  --surface: #1E1E1E;
  --on-surface: #FFFFFF;
  --bg: #121212;
  --bg-alt: #1A1A1A;
  --text: #E0E0E0;
  --text-dim: #AAAAAA;
  --text-muted: #777777;
  --accent: #00A87A;
  --accent-hover: #00C48E;
  --border: #333333;
  --border-hover: #00A87A;
  --error: #E74C3C;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Raleway', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 27px;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.45px;
  overflow-x: hidden;
}
::selection { background: var(--primary); color: var(--tertiary); }
a { text-decoration: none; color: inherit; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 var(--space-sm); }

/* Nav */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1080px; margin: 0 auto; padding: 0 var(--space-sm);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo img { height: 36px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-links { display: flex; gap: var(--space-md); list-style: none; margin: 0; padding: 0; }
.nav-link {
  font-family: 'Raleway', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--text-dim); text-transform: uppercase;
  position: relative; padding: 4px 0;
  transition: color 0.2s;
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; background: var(--primary);
  transition: width 0.3s var(--t);
}
.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { width: 100%; }
.nav-toggle {
  display: none; cursor: pointer; z-index: 102;
  width: 28px; height: 20px; position: relative;
}
.nav-toggle span {
  display: block; position: absolute; height: 2px; width: 100%;
  background: var(--text); border-radius: 2px;
  transition: 0.3s var(--t);
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }
.nav-toggle.active span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { top: 9px; transform: rotate(-45deg); }
.back-link {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Raleway', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--text-dim); text-transform: uppercase;
  transition: color 0.2s;
}
.back-link:hover { color: var(--primary); }
.back-link i { transition: transform 0.2s; font-size: 12px; }
.back-link:hover i { transform: translateX(-4px); }

/* Theme Toggle */
.theme-toggle {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim); font-size: 14px; cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
[data-theme="light"] .theme-toggle .fa-moon { display: inline; }
[data-theme="light"] .theme-toggle .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
[data-theme="dark"] .theme-toggle .fa-sun { display: inline; }
:not([data-theme]) .theme-toggle .fa-moon { display: none; }
:not([data-theme]) .theme-toggle .fa-sun { display: inline; }

/* Hero */
.case-hero {
  padding: 120px var(--space-sm) var(--space-lg);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.case-hero-content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}
.case-tag {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--primary); text-transform: uppercase; margin-bottom: var(--space-xs);
}
.case-hero-title {
  font-family: 'Raleway', sans-serif;
  font-size: 31px; font-weight: 800; line-height: 34px;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text); margin-bottom: var(--space-xs);
}
.case-hero-sub {
  font-family: 'Raleway', sans-serif;
  font-size: 15px; font-weight: 400; line-height: 27px;
  letter-spacing: 0.45px;
  color: var(--text-dim); margin-bottom: var(--space-sm);
}
.case-meta { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.meta-pill {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  border: 1px solid var(--border); background: var(--surface);
  font-family: 'Raleway', sans-serif;
  font-size: 13px; font-weight: 400; letter-spacing: 0.3px;
  color: var(--text-dim);
}
.meta-pill i { color: var(--primary); font-size: 12px; }
.meta-pill strong {
  font-family: 'Raleway', sans-serif;
  font-weight: 600; letter-spacing: 0.6px;
  color: var(--text);
}

/* Content */
.case-content {
  padding: var(--space-lg) var(--space-sm) var(--space-lg);
  max-width: 1080px;
  margin: 0 auto;
}
.content-section { margin-bottom: var(--space-lg); }
.content-section h2 {
  font-family: 'Raleway', sans-serif;
  font-size: 24px; font-weight: 800; line-height: 34px;
  letter-spacing: 3.2px; text-transform: uppercase;
  color: var(--text); margin-bottom: var(--space-sm);
  display: flex; align-items: center; gap: var(--space-xs);
}
.content-section:last-child h2 {
  justify-content: center;
}

/* Goal */
.goal-card {
  padding: var(--space-sm); border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  background: var(--surface);
}
.goal-card p {
  font-family: 'Raleway', sans-serif;
  font-size: 15px; font-weight: 400; line-height: 27px;
  letter-spacing: 0.45px;
  color: var(--text-dim);
}

/* Strategy */
.strategy-list { display: flex; flex-direction: column; gap: var(--space-xs); }
.strategy-item {
  padding: var(--space-sm); border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.3s;
}
.strategy-item:hover { border-color: var(--primary); }
.strategy-item h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 19px; font-weight: 800; letter-spacing: 1.8px;
  color: var(--text); text-transform: uppercase;
  margin-bottom: var(--space-xs);
  display: flex; align-items: center; gap: 8px;
}
.strategy-item h3 i { font-size: 14px; }
.strategy-item p {
  font-family: 'Raleway', sans-serif;
  font-size: 15px; font-weight: 400; line-height: 27px;
  letter-spacing: 0.45px;
  color: var(--text-dim);
}

/* Results */
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); }
.result-card {
  padding: var(--space-sm); border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.3s;
}
.result-card:hover { border-color: var(--primary); }
.result-icon {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--primary); font-size: 14px; margin-bottom: var(--space-xs);
}
.result-card h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 15px; font-weight: 600; letter-spacing: 0.6px;
  color: var(--text); margin-bottom: 8px; text-transform: uppercase;
}
.result-card p {
  font-family: 'Raleway', sans-serif;
  font-size: 13px; font-weight: 400; line-height: 22px;
  letter-spacing: 0.3px;
  color: var(--text-muted);
}

/* Insights */
.insights-list { display: flex; flex-direction: column; gap: var(--space-xs); }
.insight-item {
  display: flex; align-items: flex-start; gap: var(--space-xs); padding: 20px;
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color 0.3s;
}
.insight-item:hover { border-color: var(--primary); }
.insight-icon {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--primary); font-size: 12px; flex-shrink: 0;
}
.insight-item p {
  font-family: 'Raleway', sans-serif;
  font-size: 15px; font-weight: 400; line-height: 27px;
  letter-spacing: 0.45px;
  color: var(--text-dim);
}
.insight-item strong {
  font-family: 'Raleway', sans-serif;
  font-weight: 600; letter-spacing: 0.6px;
  color: var(--text);
}

/* Tools */
.tools-section { padding: var(--space-sm); border: 1px solid var(--border); background: var(--surface); }
.tools-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-tag {
  padding: 6px 12px; border: 1px solid var(--border);
  font-family: 'Raleway', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--text-dim); text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s;
}
.tool-tag:hover { border-color: var(--primary); color: var(--primary); }

/* Proof */
.proof-gallery {
  column-count: 3;
  column-gap: var(--space-xs);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0 var(--space-sm);
  box-sizing: border-box;
}
.proof-item {
  break-inside: avoid;
  margin-bottom: var(--space-xs);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s;
}
.proof-item:hover { border-color: var(--primary); }
.proof-item img {
  width: 100%; height: auto; display: block;
  transition: transform 0.5s var(--t);
}
.proof-item:hover img { transform: scale(1.03); }
.proof-label {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 10px 14px;
  background: rgba(255,255,255,0.9);
  font-family: 'Raleway', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--text); text-transform: uppercase;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  transition: opacity 0.3s var(--t);
}
.lightbox.active .lightbox-overlay { opacity: 1; }
.lightbox-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 85vh;
  z-index: 1;
}
.lightbox-image {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.2s var(--t);
}
.lightbox-image.loaded { opacity: 1; }
.lightbox-caption {
  margin-top: 14px;
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  text-align: center;
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  z-index: 2;
}
.lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  z-index: 2;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover,
.lightbox-next:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lightbox-counter {
  position: fixed;
  top: 28px;
  left: 24px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.8);
  z-index: 2;
}
.lightbox-autoplay {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  z-index: 2;
}
.lightbox-autoplay:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.lightbox-autoplay.playing {
  border-color: var(--accent);
  color: var(--accent);
}
body.lightbox-open { overflow: hidden; }

/* Nav between cases */
.case-nav {
  padding: 0 var(--space-sm) var(--space-lg);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs);
}
.case-nav-link {
  padding: var(--space-sm); border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.3s;
  display: inline-flex; flex-direction: column; gap: 8px;
  width: fit-content;
}
.case-nav-link.prev { justify-self: start; }
.case-nav-link.next { justify-self: end; text-align: right; }
.case-nav-link:hover { border-color: var(--primary); }
.case-nav-link .nav-direction {
  font-family: 'Raleway', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--primary); text-transform: uppercase;
}
.case-nav-link .nav-title {
  font-family: 'Raleway', sans-serif;
  font-size: 19px; font-weight: 800; letter-spacing: 1.8px;
  color: var(--text);
}

/* Footer */
.footer {
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo img { height: 36px; width: auto; }
.footer-links {
  display: flex;
  gap: var(--space-xs);
}
.footer-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
  transition: border-color 0.3s, color 0.3s;
}
.footer-links a:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.footer-copy {
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .container { padding: 0 var(--space-xs); }
  .nav-container { padding: 0 var(--space-xs); }
  .case-hero { padding: 100px var(--space-xs) var(--space-lg); }
  .case-content { padding: var(--space-md) var(--space-xs) var(--space-md); }
  .case-nav { padding: 0 var(--space-xs) var(--space-md); }
  .case-hero-title { font-size: 24px; line-height: 30px; letter-spacing: 1.5px; }
  .case-meta { flex-direction: column; }
  .results-grid { grid-template-columns: 1fr; }
  .case-nav { grid-template-columns: 1fr; }
  .proof-gallery { column-count: 1; }
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 250px; height: 100vh;
    background: var(--surface); flex-direction: column; justify-content: center; gap: var(--space-sm);
    transition: right 0.3s var(--t); border-left: 1px solid var(--border); z-index: 101;
    padding: 0 var(--space-sm);
  }
  .nav-links.active { right: 0; }
  .nav-toggle { display: block; }
  .lightbox-prev,
  .lightbox-next { display: none; }
  .lightbox-image { max-width: 95vw; max-height: 80vh; }
  .lightbox-caption { font-size: 11px; }
  .footer-inner { flex-direction: column; gap: var(--space-xs); text-align: center; }
}
