@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* ==========================================================================
   Design Tokens & Variables
   ========================================================================== */
:root {
  /* Light Theme (Default) */
  --bg-color: #f9f9f9;
  --bg-card: #ffffff;
  --text-color: #3e3f3d;
  --text-muted: #7e7f7d;
  --border-color: #e0e0de;
  --accent-color: #3e3f3d;
  --selection-bg: #e0e0de;
  --selection-text: #3e3f3d;
  
  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Space Mono', Monaco, Consolas, "Courier New", monospace;
  
  /* Layout */
  --grid-gap: 0px;
  --padding-x: 1.5rem;
  --padding-y: 3rem;
  
  /* Animation */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-speed: 0.6s;
  --hover-speed: 0.3s;
}

.dark-mode {
  /* Dark Theme */
  --bg-color: #3e3f3d;
  --bg-card: #494a48;
  --text-color: #f9f9f9;
  --text-muted: #b9bab8;
  --border-color: #4f504e;
  --accent-color: #f9f9f9;
  --selection-bg: #4f504e;
  --selection-text: #f9f9f9;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  line-height: 1.5;
  transition: background-color var(--transition-speed) var(--ease-out-expo), 
              color var(--transition-speed) var(--ease-out-expo);
  overflow-x: hidden;
}

::selection {
  background-color: var(--selection-bg);
  color: var(--selection-text);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--hover-speed) var(--ease-out-expo);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Grid & Border Details (Nothing Studio / Swiss Style)
   ========================================================================== */
.structural-grid {
  display: grid;
  grid-template-columns: 100%;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
}

@media (min-width: 768px) {
  .structural-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.grid-cell {
  border-bottom: 1px solid var(--border-color);
  padding: var(--padding-x);
  position: relative;
}

@media (min-width: 768px) {
  .grid-cell.span-2 {
    grid-column: span 2;
  }
  .grid-cell.span-3 {
    grid-column: span 3;
  }
  .grid-cell.span-4 {
    grid-column: span 4;
  }
  
  .grid-cell:not(:last-child) {
    border-right: 1px solid var(--border-color);
  }
}

/* Swiss Corner Plus Signs (+) */
.grid-cell::before, .grid-cell::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--border-color);
  position: absolute;
  pointer-events: none;
  font-weight: 400;
  line-height: 1;
}
.grid-cell::before {
  top: -6px;
  left: -4px;
}
.grid-cell::after {
  bottom: -7px;
  right: -4px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: rgba(249, 249, 249, 0.85);
  transition: background-color var(--transition-speed) var(--ease-out-expo),
              border-color var(--transition-speed) var(--ease-out-expo);
}

.dark-mode header {
  background-color: rgba(62, 63, 61, 0.85);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.2rem var(--padding-x);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-svg {
  width: 24px;
  height: 24px;
  fill: var(--text-color);
  transition: fill var(--transition-speed) var(--ease-out-expo),
              transform var(--hover-speed) var(--ease-out-expo);
}

@media (hover: hover) {
  .logo-link:hover .logo-svg {
    transform: scale(1.1);
  }
}

.logo-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

/* Hamburger Menu toggle button styles */
.menu-toggle-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 200;
  flex-direction: column;
  gap: 6px;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-color);
  transition: transform var(--hover-speed) var(--ease-out-expo),
              opacity var(--hover-speed) var(--ease-out-expo),
              background-color var(--transition-speed) var(--ease-out-expo);
}

/* Transform lines into an 'X' */
.menu-toggle-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 991px) {
  .menu-toggle-btn {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem var(--padding-x) 3rem var(--padding-x);
    gap: 2.2rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.6s var(--ease-out-expo),
                opacity 0.6s var(--ease-out-expo),
                background-color var(--transition-speed) var(--ease-out-expo);
    z-index: 99;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-item {
    font-size: 1.6rem;
    font-weight: 500;
    text-align: center;
    width: 100%;
    display: block;
  }

  .lang-switcher {
    margin-top: 1rem;
    font-size: 1.05rem;
  }

  .theme-toggle {
    margin-top: 0.5rem;
    padding: 0.6rem 1.4rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 600px) {
  /* Hide text inside theme toggle on small screens to prevent header wrap */
  .toggle-text {
    display: none;
  }
  .theme-toggle {
    padding: 0.50rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    justify-content: center;
  }
  .nav-container {
    padding: 1rem var(--padding-x);
  }
}

.nav-item {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-item:hover {
  color: var(--text-muted);
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem; /* Spaced out language buttons cleanly without divider dots */
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-color);
  opacity: 0.4;
  cursor: pointer;
  padding: 0 0.1rem;
  font-family: inherit;
  font-size: inherit;
  transition: opacity var(--hover-speed) var(--ease-out-expo);
}

.lang-btn:hover {
  opacity: 0.8;
}

.lang-btn.active {
  opacity: 1;
  font-weight: 700;
}

.lang-divider {
  color: var(--text-color);
  opacity: 0.3;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.4rem 0.8rem;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color var(--hover-speed) var(--ease-out-expo),
              border-color var(--hover-speed) var(--ease-out-expo),
              color var(--hover-speed) var(--ease-out-expo);
}

.theme-toggle:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
}

.theme-toggle svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 80vh;
  position: relative;
}

.hero-cell-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 60vh;
  padding: 4rem var(--padding-x);
}

.hero-intro {
  margin-top: 2rem;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
}

.hero-title {
  font-size: clamp(3.5rem, 11vw, 7.5rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  color: var(--text-color);
}

/* Subtitle Cycle Styling */
.hero-subtitle-container {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.8rem);
  color: var(--text-color);
  margin-bottom: 3rem;
  height: 1.35em; /* Proportional to font-size to prevent cropping */
  overflow: hidden;
  position: relative;
}

.subtitle-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  line-height: 1.2;
  filter: blur(10px);
  transform: translateY(10px);
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.5s ease;
}

.subtitle-item.active {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
  position: relative;
}

/* Call to Action Buttons */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 2rem;
  border: 1px solid var(--border-color);
  transition: border-color var(--hover-speed) var(--ease-out-expo),
              background-color var(--hover-speed) var(--ease-out-expo),
              color var(--hover-speed) var(--ease-out-expo);
}

.cta-button.primary {
  background-color: var(--text-color);
  color: var(--bg-color);
  border-color: var(--text-color);
}

.cta-button.primary:hover {
  background-color: transparent;
  color: var(--text-color);
}

.cta-button.secondary:hover {
  border-color: var(--text-color);
  background-color: var(--text-color);
  color: var(--bg-color);
}

.cta-icon {
  transition: transform var(--hover-speed) var(--ease-out-expo);
}

.cta-button:hover .cta-icon {
  transform: translateX(4px);
}

/* Half Logo Background Presentation */
.hero-half-logo-container {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.half-logo-svg {
  height: 95%;
  width: auto;
  max-width: none;
  transform: translateX(10%);
  color: var(--text-color);
  opacity: 1;
  transition: fill var(--transition-speed) var(--ease-out-expo),
              color var(--transition-speed) var(--ease-out-expo);
}

/* ==========================================================================
   Section Layouts & Headers
   ========================================================================== */
.section-header {
  padding: 2rem var(--padding-x);
  border-bottom: 1px solid var(--border-color);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* ==========================================================================
   Featured Work (Large Cards)
   ========================================================================== */
.featured-grid {
  display: grid;
  grid-template-columns: 100%;
}

@media (min-width: 768px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  display: block;
}

@media (min-width: 768px) {
  .project-card:nth-child(odd) {
    border-right: 1px solid var(--border-color);
  }
}

.project-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--border-color);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo), filter 0.8s var(--ease-out-expo);
  filter: grayscale(10%);
}

.project-card:hover .project-image {
  transform: scale(1.04);
  filter: grayscale(0%);
}

.project-info {
  padding: 1.5rem var(--padding-x);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background-color: var(--bg-card);
  transition: background-color var(--transition-speed) var(--ease-out-expo);
}

.project-meta-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.project-name {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.project-link-arrow {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  transition: transform var(--hover-speed) var(--ease-out-expo);
}

.project-card:hover .project-link-arrow {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   Project Lists (Mini Grids)
   ========================================================================== */
.project-list {
  display: flex;
  flex-direction: column;
}

.project-list-item {
  display: grid;
  grid-template-columns: 1fr;
  padding: 1.5rem var(--padding-x);
  border-bottom: 1px solid var(--border-color);
  align-items: center;
  gap: 1rem;
  transition: background-color var(--hover-speed) var(--ease-out-expo);
}

@media (min-width: 768px) {
  .project-list-item {
    grid-template-columns: 120px 2fr 1fr 100px;
    gap: 2rem;
  }
}

.project-list-item:hover {
  background-color: var(--bg-card);
}

.list-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.list-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.list-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.list-view-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: right;
  opacity: 0.6;
  transition: opacity var(--hover-speed) var(--ease-out-expo);
}

.project-list-item:hover .list-view-link {
  opacity: 1;
}

/* Hero supporting statement */
.hero-desc {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 2.5rem;
  max-width: 420px;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .hero-desc {
    font-size: 0.8rem;
    margin-bottom: 1.8rem;
  }
}

/* ==========================================================================
   Approach Section
   ========================================================================== */
.approach-section {
  padding: var(--padding-y) var(--padding-x);
  border-bottom: 1px solid var(--border-color);
}

.approach-text {
  font-size: clamp(1.4rem, 4.2vw, 2.5rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: var(--text-color);
  max-width: none;
}

/* ==========================================================================
   Selected Capabilities Section
   ========================================================================== */
.capabilities-grid-simple {
  display: grid;
  grid-template-columns: 1fr;
}

.capability-item-simple {
  padding: 2.5rem var(--padding-x);
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  position: relative;
}

@media (min-width: 768px) {
  .capabilities-grid-simple {
    grid-template-columns: repeat(2, 1fr);
  }
  .capability-item-simple:nth-child(odd) {
    border-right: 1px solid var(--border-color);
  }
}

@media (min-width: 992px) {
  .capabilities-grid-simple {
    grid-template-columns: repeat(3, 1fr);
  }
  .capability-item-simple:nth-child(odd) {
    border-right: none; /* Reset */
  }
  .capability-item-simple:not(:nth-child(3n)) {
    border-right: 1px solid var(--border-color);
  }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.about-image-cell {
  position: relative;
  background-color: var(--border-color);
  border-bottom: 1px solid var(--border-color);
  min-height: 400px;
  overflow: hidden;
}

@media (min-width: 992px) {
  .about-image-cell {
    border-bottom: none;
    border-right: 1px solid var(--border-color);
  }
}

.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter var(--hover-speed) var(--ease-out-expo);
}

.about-image-cell:hover .about-image {
  filter: grayscale(0%);
}

.about-content-cell {
  padding: var(--padding-y) var(--padding-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-intro-text {
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.about-story-text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.contact-card {
  padding: var(--padding-y) var(--padding-x);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
  transition: background-color var(--hover-speed) var(--ease-out-expo);
}

@media (min-width: 768px) {
  .contact-card:not(:last-child) {
    border-right: 1px solid var(--border-color);
  }
}

.contact-card:hover {
  background-color: var(--bg-card);
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.contact-value {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.contact-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.contact-link::after {
  content: '↗';
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  border-bottom: 1px solid var(--border-color);
}

.footer-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 2rem var(--padding-x);
  max-width: 1440px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
  }
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-credits {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Bespoke Case Study Detail Styling
   ========================================================================== */
.project-header-section {
  border-bottom: 1px solid var(--border-color);
}

.project-hero-wrapper {
  width: 100%;
  aspect-ratio: auto;
  background-color: var(--border-color);
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.project-hero-image {
  width: 100%;
  height: auto;
  display: block;
}

.project-intro-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .project-intro-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.project-desc-cell {
  padding: var(--padding-y) var(--padding-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .project-desc-cell {
    border-right: 1px solid var(--border-color);
  }
}

.project-desc-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.project-desc-para {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 1.5;
  color: var(--text-muted);
}

.project-specs-cell {
  padding: var(--padding-y) var(--padding-x);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.5rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.spec-value {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Project Layout Blocks (Presentation board style) */
.project-layout-block {
  border-bottom: 1px solid var(--border-color);
}

.editorial-layout {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 992px) {
  .editorial-layout.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.editorial-cell {
  padding: var(--padding-y) var(--padding-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 992px) {
  .editorial-cell:not(:last-child) {
    border-right: 1px solid var(--border-color);
  }
}

.editorial-cell.bg-muted {
  background-color: var(--bg-card);
}

.editorial-cell h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.editorial-cell p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.editorial-cell p:last-child {
  margin-bottom: 0;
}

/* Image grid in case study */
.image-showcase {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--border-color);
  overflow: hidden;
}

.image-showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Back Link Header */
.back-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem var(--padding-x);
}

.back-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
}

.back-link:hover {
  transform: translateX(-4px);
}

/* ==========================================================================
   Micro-animations & Reveal effects
   ========================================================================= */
.reveal-element {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(20px);
  transition: opacity 1s var(--ease-out-expo), 
              filter 1s var(--ease-out-expo), 
              transform 1s var(--ease-out-expo);
}

.reveal-element.revealed {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* ==========================================================================
   Mobile-First Responsive Refinements (< 768px)
   ========================================================================= */
@media (max-width: 767px) {
  :root {
    --padding-x: 1rem;
    --padding-y: 2.2rem;
  }

  body {
    font-size: 15px;
  }

  .structural-grid {
    width: 100%;
    overflow: hidden;
    border-left: none;
    border-right: none;
  }

  .grid-cell {
    padding: var(--padding-x);
  }

  /* Nav Adjustments */
  .nav-container {
    padding: 0.8rem var(--padding-x);
  }

  .logo-svg {
    width: 20px;
    height: 20px;
  }

  .logo-text {
    font-size: 0.8rem;
    letter-spacing: 0.02em;
  }

  .nav-links {
    gap: 0.8rem;
  }

  .nav-item {
    font-size: 0.75rem;
  }

  /* Theme Toggle Icon-Only on Mobile */
  .toggle-text {
    display: none;
  }

  .theme-toggle {
    padding: 0.4rem;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    justify-content: center;
    align-items: center;
  }

  /* Typography Scale Overrides */
  .hero-title {
    font-size: clamp(2.4rem, 12vw, 4.2rem);
    margin-bottom: 1.5rem;
  }

  .hero-subtitle-container {
    font-size: clamp(0.95rem, 4vw, 1.3rem);
    height: 1.35em;
    margin-bottom: 2rem;
  }

  .section-header {
    padding: 1.8rem var(--padding-x);
  }

  .section-title {
    font-size: clamp(1.4rem, 8vw, 2.2rem);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Hero Actions */
  .hero-cell-main {
    padding: 3rem var(--padding-x);
    min-height: 50vh;
  }

  .cta-button {
    padding: 0.8rem 1.4rem;
    font-size: 0.75rem;
    width: 100%;
    justify-content: center;
  }

  /* Featured Work */
  .project-name {
    font-size: 1.2rem;
  }

  .project-info {
    padding: 1.2rem var(--padding-x);
  }

  /* Project Lists */
  .project-list-item {
    padding: 1.2rem var(--padding-x);
    gap: 0.5rem;
  }

  .list-title {
    font-size: 1.1rem;
  }

  .list-desc {
    font-size: 0.85rem;
  }

  /* Capabilities */
  .capability-block {
    padding: 2rem var(--padding-x);
  }

  .capability-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  /* About */
  .about-image-cell {
    min-height: 300px;
  }

  .about-content-cell {
    padding: 2.2rem var(--padding-x);
  }

  .about-intro-text {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
  }

  /* Contact */
  .contact-card {
    min-height: 180px;
    padding: 2rem var(--padding-x);
  }

  .contact-value {
    font-size: 1.15rem;
    margin-top: 1.2rem;
    word-break: break-all;
  }

  /* Bespoke Case Study Overrides */
  .project-hero-wrapper {
    aspect-ratio: auto;
  }

  .project-desc-cell {
    padding: 2.2rem var(--padding-x) 1rem var(--padding-x);
  }

  .project-desc-title {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
    margin-bottom: 1.2rem;
  }

  .project-desc-para {
    font-size: 1.05rem;
  }

  .project-specs-cell {
    padding: 1rem var(--padding-x) 2.2rem var(--padding-x);
    gap: 1rem;
  }

  .editorial-cell {
    padding: 2.2rem var(--padding-x);
  }

  .editorial-cell h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  /* Half Logo Responsive Adjustments */
  .hero-half-logo-container {
    width: 100%;
    justify-content: flex-end;
    opacity: 0.05;
    z-index: 0;
  }
  .half-logo-svg {
    height: 70%;
    transform: translateX(25%);
  }
}

/* ==========================================================================
   Google Translate Minimalist Customization
   ========================================================================== */
iframe[class*="goog-te-banner-frame"],
iframe[id*="goog-te-banner-frame"],
.goog-te-banner-frame,
.goog-te-banner,
.goog-te-ftab,
.goog-te-menu-frame,
.goog-te-menu,
.goog-te-menu2,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-translate-skiptranslate,
iframe.skiptranslate {
  display: none !important;
  visibility: hidden !important;
}

html,
body,
.translated-ltr,
.translated-rtl {
  top: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  position: static !important;
}

/* ==========================================================================
   Project Specific Enhancements (Gallery, Video, PDF Cards)
   ========================================================================== */
.tab-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tab-button {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  text-transform: uppercase;
  transition: background-color var(--hover-speed) var(--ease-out-expo),
              color var(--hover-speed) var(--ease-out-expo),
              border-color var(--hover-speed) var(--ease-out-expo);
}

.tab-button:hover {
  border-color: var(--text-color);
}

.tab-button.active {
  background-color: var(--text-color);
  color: var(--bg-color);
  border-color: var(--text-color);
}

.gallery-category {
  display: none;
  width: 100%;
}

.gallery-category.active {
  display: block;
}

@media (min-width: 768px) {
  .gallery-category {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery-image-wrapper {
  overflow: hidden;
  background-color: var(--border-color);
  aspect-ratio: auto;
  height: auto;
}

.gallery-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-speed) var(--ease-out-expo);
}

.gallery-image-wrapper:hover img {
  transform: scale(1.03);
}

/* Video Wrapper */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--border-color);
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* PDF Card / Download Link Block */
.pdf-download-card {
  border: 1px solid var(--border-color);
  padding: 2rem var(--padding-x);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  background-color: var(--bg-card);
  transition: border-color var(--hover-speed) var(--ease-out-expo);
  text-decoration: none;
  color: inherit;
}

.pdf-download-card:hover {
  border-color: var(--text-color);
}

.pdf-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pdf-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pdf-size {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Gallery Slider Component
   ========================================================================== */
.gallery-slider {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.gallery-slider-viewport {
  position: relative;
  width: 100%;
  background-color: var(--border-color);
  overflow: hidden;
  cursor: pointer;
}

.slider-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
  z-index: 1;
}

.slider-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.slider-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.slider-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 1rem;
}

.slider-btn {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.slider-btn:hover {
  color: var(--text-muted);
}

.slider-counter {
  color: var(--text-muted);
  font-weight: 400;
}

/* ==========================================================================
   Gallery Horizontal Chain Component
   ========================================================================== */
.gallery-chain {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 1.5rem;
  width: 100%;
  padding: var(--padding-y) var(--padding-x);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar defaults and style minimally */
.gallery-chain::-webkit-scrollbar {
  height: 6px;
}
.gallery-chain::-webkit-scrollbar-track {
  background: transparent;
}
.gallery-chain::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
.gallery-chain::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.chain-item {
  flex: 0 0 auto;
  width: 70vw;
  max-width: 500px;
  scroll-snap-align: start;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--hover-speed) var(--ease-out-expo);
}

@media (min-width: 768px) {
  .chain-item {
    width: 40vw;
    max-width: 600px;
  }
}

.chain-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease-out-expo);
}

.chain-item:hover {
  border-color: var(--text-color);
}

.chain-item:hover img {
  transform: scale(1.02);
}

/* ==========================================================================
   Brand Colors Grid Layout
   ========================================================================== */
.colors-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .colors-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .color-swatch-card:not(:last-child) {
    border-right: 1px solid var(--border-color) !important;
  }
  .color-swatch-card {
    border-bottom: none !important;
  }
}

/* ==========================================================================
   Lightbox Overlay System
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(35, 34, 40, 0.98); /* Brand dark shade background */
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out-expo), visibility 0.3s var(--ease-out-expo);
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 85%;
  max-height: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  user-select: none;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: #f3f0f9;
  font-size: 2.2rem;
  cursor: pointer;
  z-index: 1010;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-family: inherit;
}

.lightbox-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #f3f0f9;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2rem 1.5rem;
  z-index: 1010;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lightbox-nav:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #f3f0f9;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0.6;
  z-index: 1010;
  letter-spacing: 0.05em;
}



