/* ==========================================================================
   Industrial Grow Design - Main Stylesheet
   ========================================================================== */

:root, [data-theme="dark"] {
  --bg-primary: #0f1115;
  --bg-surface: #181b22;
  --bg-surface-elevated: #222630;
  --text-primary: #f0f2f5;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --heading-color: #ffffff;
  --nav-link-color: #f8fafc;
  --nav-link-hover: #ffffff;
  --accent: #2e7d32;
  --accent-light: #4caf50;
  --accent-glow: rgba(46, 125, 50, 0.25);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --header-bg: rgba(15, 17, 21, 0.92);
  --mobile-drawer-bg: rgba(18, 20, 26, 0.97);
  --header-frosted: rgba(15, 17, 21, 0.28);
  --header-hero-border: rgba(255, 255, 255, 0.12);
  --header-hero-link-color: #ffffff;
  --header-hero-btn-bg: rgba(15, 17, 21, 0.4);
  --header-hero-btn-color: #ffffff;
  --header-hero-btn-border: rgba(255, 255, 255, 0.2);
  --hero-fade-base: 15, 17, 21;
  --hero-fade-top: rgba(15, 17, 21, 0.55);
  --hero-fade-top-subtle: rgba(15, 17, 21, 0.25);
  --hero-fade-clear: rgba(15, 17, 21, 0);
  --hero-fade-bottom: var(--bg-primary);
  --hero-title-color: #ffffff;
  --hero-title-shadow: 0 2px 16px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.95);
  --hero-breadcrumb-color: #d1d5db;
  --hero-breadcrumb-link: #ffffff;
  --font-heading: 'Raleway', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.25s ease;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  --brand-gradient: linear-gradient(135deg, #ffffff 40%, #4caf50);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --heading-color: #0f172a;
  --nav-link-color: #0f172a;
  --nav-link-hover: #2e7d32;
  --accent: #2e7d32;
  --accent-light: #388e3c;
  --accent-glow: rgba(46, 125, 50, 0.18);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.18);
  --header-bg: rgba(248, 250, 252, 0.92);
  --mobile-drawer-bg: rgba(255, 255, 255, 0.97);
  --header-frosted: rgba(248, 250, 252, 0.4);
  --header-hero-border: rgba(0, 0, 0, 0.08);
  --header-hero-link-color: #0f172a;
  --header-hero-btn-bg: rgba(255, 255, 255, 0.65);
  --header-hero-btn-color: #0f172a;
  --header-hero-btn-border: rgba(0, 0, 0, 0.12);
  --hero-fade-base: 248, 250, 252;
  --hero-fade-top: rgba(248, 250, 252, 0.85);
  --hero-fade-top-subtle: rgba(248, 250, 252, 0.45);
  --hero-fade-clear: rgba(248, 250, 252, 0);
  --hero-fade-bottom: var(--bg-primary);
  --hero-title-color: #0f172a;
  --hero-title-shadow: 0 2px 16px rgba(255, 255, 255, 0.95), 0 1px 4px rgba(255, 255, 255, 0.9);
  --hero-breadcrumb-color: #475569;
  --hero-breadcrumb-link: #0f172a;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.06);
  --brand-gradient: linear-gradient(135deg, #0f172a 40%, #2e7d32);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow {
  max-width: 800px;
}

.text-center {
  text-align: center;
}

/* ==========================================================================
   Typography & Links
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--heading-color);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* ==========================================================================
   Site Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background-color: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition:
    background-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    -webkit-backdrop-filter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  border-bottom-color: var(--border-hover);
}

[data-theme="light"] .site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: 2px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-full-text {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
}

.desktop-nav .nav-list {
  display: flex;
  list-style: none;
  gap: 28px;
}

.nav-item a {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--nav-link-color);
  padding: 8px 0;
  position: relative;
  transition: color 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-light);
  transition: var(--transition);
}

.nav-item a:hover,
.nav-item.active a {
  color: var(--nav-link-hover);
}

.nav-item.active a::after,
.nav-item a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition:
    background-color 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon-btn:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--accent-light);
  color: var(--text-primary);
}

.social-svg {
  display: block;
  width: 17px;
  height: 17px;
}

/* ==========================================================================
   Day / Night Theme Toggle Button
   ========================================================================== */

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  transition:
    background-color 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-toggle-btn:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--accent-light);
}

.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Dark mode (Night) active: show Sun icon to switch to Day */
[data-theme="dark"] .moon-icon,
:root:not([data-theme="light"]) .moon-icon {
  display: none !important;
}

[data-theme="dark"] .sun-icon,
:root:not([data-theme="light"]) .sun-icon {
  display: inline-flex !important;
  color: #fbbf24; /* Warm sun gold */
}

/* Light mode (Day) active: show Moon icon to switch to Night */
[data-theme="light"] .sun-icon {
  display: none !important;
}

[data-theme="light"] .moon-icon {
  display: inline-flex !important;
  color: #4f46e5; /* Deep night indigo */
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
}

.mobile-toggle:hover {
  background-color: var(--bg-surface-elevated);
}

.mobile-toggle .bar {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease;
  transform-origin: center;
}

.mobile-toggle.active .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer Overlay: floats directly below header, does not push page layout */
.mobile-drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10001;
  background: var(--mobile-drawer-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  padding: 24px 28px 30px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.mobile-drawer.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

[data-theme="light"] .mobile-drawer {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

/* Ensure header bar background becomes solid/unified while menu is open */
.site-header.menu-open,
.site-header:has(.mobile-drawer.open) {
  background-color: var(--header-bg) !important;
  border-bottom-color: transparent !important;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}

.mobile-nav-list li a {
  display: flex;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--nav-link-color);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: color 0.2s ease, padding 0.2s ease;
}

[data-theme="light"] .mobile-nav-list li a {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.mobile-nav-list li.active a,
.mobile-nav-list li a:hover {
  color: var(--accent-light);
  padding-left: 8px;
}

.mobile-social {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
}

/* ==========================================================================
   Hero & Page Headers
   ========================================================================== */

.hero-title,
.page-title,
.section-title {
  font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 3.5px;
  line-height: 1.25;
  color: var(--heading-color);
}

.hero-section {
  padding: 70px 0 50px;
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin-bottom: 20px;
}

.hero-lead {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto;
}

.page-header-section {
  padding: 60px 0 40px;
}

.page-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 12px;
}

/* ==========================================================================
   Projects Grid & Cards
   ========================================================================== */

.projects-section {
  padding: 30px 0 80px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
}

.project-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.project-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-surface-elevated);
}

.project-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-thumb {
  transform: scale(1.05);
}

.project-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(6px);
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card-body {
  padding: 24px;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--heading-color);
  transition: color 0.25s ease;
}

.project-card:hover .project-title {
  color: var(--accent-light);
}

.project-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 18px;
}

.read-more {
  display: inline-block;
  color: var(--accent-light);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ==========================================================================
   ME & PARTNERS (Team)
   ========================================================================== */

.team-section {
  padding: 20px 0 80px;
}

.team-grid {
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 880px;
  margin: 0 auto;
}

.team-card {
  display: flex;
  gap: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  align-items: center;
}

.team-avatar-wrap {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.1);
}

.team-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.team-role {
  color: var(--accent-light);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.team-bio {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   Revit & 3D Model Viewers
   ========================================================================== */

.revit-section, .configurator-section {
  padding: 30px 0 80px;
}

.revit-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.revit-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 28px;
}

.revit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.model-viewer-frame {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
}

.model-viewer-frame iframe {
  border: none;
  display: block;
}

/* Project Video Walkthrough / Fly-Through */
.project-video-container {
  width: 100%;
  max-width: 800px;
  margin: 32px auto 44px auto;
  padding: 0 24px;
}

.project-video-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  background: #000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 24px;
}

.project-video-frame:last-child {
  margin-bottom: 0;
}

.project-video-frame iframe,
.project-video-frame video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.revit-body {
  color: var(--text-secondary);
  font-size: 1rem;
}

.revit-footer {
  margin-top: 14px;
}

/* ==========================================================================
   Project Detail View
   ========================================================================== */

/* ==========================================================================
   Project Detail View & 50vh Parallax Hero
   ========================================================================== */

/* Frosted Glass Blur Header on Hero Pages (at top / unscrolled) & during Transition to/from Hero */
body.has-hero-banner .site-header:not(.is-scrolled),
body.transitioning-to-hero .site-header,
body.transitioning-from-hero .site-header,
.site-wrapper:has(.project-parallax-hero) .site-header:not(.is-scrolled) {
  background-color: var(--header-frosted);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--header-hero-border);
}

body.has-hero-banner .site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  margin-bottom: -80px;
  z-index: 10000;
  transition:
    background-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    -webkit-backdrop-filter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

body.has-hero-banner .site-header:not(.is-scrolled) .nav-item a,
body.transitioning-to-hero .nav-item a,
body.transitioning-from-hero .nav-item a {
  color: var(--header-hero-link-color);
}

body.has-hero-banner .site-header:not(.is-scrolled) .social-icon-btn,
body.transitioning-to-hero .social-icon-btn,
body.transitioning-from-hero .social-icon-btn,
body.has-hero-banner .site-header:not(.is-scrolled) .theme-toggle-btn,
body.transitioning-to-hero .theme-toggle-btn,
body.transitioning-from-hero .theme-toggle-btn {
  background-color: var(--header-hero-btn-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--header-hero-btn-color);
  border-color: var(--header-hero-btn-border);
}

/* Scrolled Sticky Header on Hero Pages */
body.has-hero-banner .site-header.is-scrolled {
  background-color: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] body.has-hero-banner .site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.project-detail-article {
  padding-bottom: 60px;
  position: relative;
  overflow-x: hidden;
}

.project-parallax-hero {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 50vh;
  min-height: 400px;
  max-height: 580px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-top: 80px;
  padding-bottom: 50px;
  margin-bottom: 40px;
  background-color: var(--bg-primary);
  box-shadow: none;
}

[data-theme="light"] .project-parallax-hero {
  background-color: var(--bg-primary);
  box-shadow: none;
}

.parallax-bg-layer {
  position: absolute;
  top: -12.5%;
  left: 0;
  width: 100%;
  height: 125%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 1;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: transform 0.08s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.parallax-bg-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  will-change: transform;
  animation: heroImageEnlarge 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes heroImageEnlarge {
  0% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

.parallax-overlay {
  position: absolute;
  inset: 0;
  /* Top soft fade behind frosted menu bar, clear in middle, bottom fade into exact page background color */
  background: linear-gradient(
    180deg,
    var(--hero-fade-top) 0%,
    var(--hero-fade-top-subtle) 80px,
    var(--hero-fade-clear) 140px,
    var(--hero-fade-clear) 45%,
    rgba(var(--hero-fade-base), 0.6) 75%,
    rgba(var(--hero-fade-base), 0.9) 90%,
    var(--hero-fade-bottom) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.parallax-content {
  position: relative;
  z-index: 2;
  width: 100%;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0 24px;
}

.parallax-content .breadcrumb {
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--hero-breadcrumb-color);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  animation: heroBreadcrumbReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.parallax-content .breadcrumb a.project-back-link {
  color: var(--hero-breadcrumb-link);
  font-weight: 500;
  letter-spacing: 1.5px;
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.82;
}

.parallax-content .breadcrumb a.project-back-link:hover {
  color: var(--accent);
  opacity: 1;
}

.parallax-content .breadcrumb .breadcrumb-separator {
  opacity: 0.5;
  font-weight: 400;
  padding: 0 2px;
}

.parallax-content .breadcrumb .breadcrumb-slug,
.parallax-content .breadcrumb span:not(.breadcrumb-separator) {
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--hero-title-color);
}

.project-hero-meta {
  margin-bottom: 12px;
}

.project-hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  animation: heroBadgeReveal 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

[data-theme="light"] .project-hero-badge {
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
}

.project-hero-title {
  font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3.5px;
  color: var(--hero-title-color);
  line-height: 1.25;
  text-shadow: var(--hero-title-shadow);
  width: 100%;
  max-width: 100%;
  margin: 0;
  animation: heroTitleReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}
  animation: heroTitleReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

@keyframes heroBreadcrumbReveal {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroBadgeReveal {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes heroTitleReveal {
  0% {
    opacity: 0;
    transform: translateY(18px);
    letter-spacing: 5px;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: 3.5px;
  }
}

/* ==========================================================================
   Rollout from Behind Background
   ========================================================================== */

.project-rollout-container {
  position: relative;
  z-index: 5;
  will-change: transform, opacity, clip-path;
  animation: rolloutFromHero 1.05s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

@keyframes rolloutFromHero {
  0% {
    opacity: 0;
    transform: translateY(-80px);
    clip-path: inset(0 0 100% 0);
  }
  35% {
    opacity: 0.65;
    clip-path: inset(0 0 35% 0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0% 0);
  }
}

.project-rollout-container .model-container,
.project-rollout-container .project-video-container {
  animation: rolloutItemFade 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
}

.project-rollout-container .project-description p {
  animation: rolloutItemFade 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.project-rollout-container .project-description p:nth-child(1) { animation-delay: 0.38s; }
.project-rollout-container .project-description p:nth-child(2) { animation-delay: 0.48s; }
.project-rollout-container .project-description p:nth-child(3) { animation-delay: 0.58s; }
.project-rollout-container .project-description p:nth-child(4) { animation-delay: 0.68s; }
.project-rollout-container .project-description p:nth-child(n+5) { animation-delay: 0.78s; }

@keyframes rolloutItemFade {
  0% {
    opacity: 0;
    transform: translateY(22px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-content {
  margin-top: 36px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.project-content p {
  margin-bottom: 20px;
}

.model-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.related-section {
  padding: 40px 0 80px;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.contact-section {
  padding: 80px 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
}

.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-group.half {
  flex: 1;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-group label .required {
  color: #ef5350;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-light);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent-light);
  color: #ffffff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.form-feedback {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  margin-top: 16px;
}

.form-feedback.success {
  background: rgba(46, 125, 50, 0.2);
  color: #81c784;
  border: 1px solid #2e7d32;
}

.form-feedback.error {
  background: rgba(211, 47, 47, 0.2);
  color: #e57373;
  border: 1px solid #d32f2f;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  padding: 36px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-social {
  display: flex;
  gap: 10px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 900px) {
  .desktop-nav, .header-social {
    display: none;
  }

  .header-actions {
    margin-left: auto;
    margin-right: 8px;
  }

  .mobile-toggle {
    display: flex;
  }

  .brand-full-text {
    display: none;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    flex-direction: column;
    text-align: center;
  }

  .form-row {
    flex-direction: column;
    gap: 16px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 18px;
    text-align: center;
  }
}

@media (min-width: 901px) {
  .mobile-drawer {
    display: none !important;
  }
}

/* ==========================================================================
   Project Transitions: Gallery <-> Hero Two-Way Animation
   ========================================================================== */

.project-transition-clone {
  position: fixed;
  z-index: 9000;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  overflow: hidden;
  will-change: top, left, width, height, border-radius;
  transition:
    top 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    left 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-transition-clone.expanding {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 50vh !important;
  min-height: 400px;
  max-height: 580px;
  border-radius: 0 !important;
  box-shadow: none !important;
}

[data-theme="light"] .project-transition-clone {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .project-transition-clone.expanding,
[data-theme="light"] .project-transition-clone.reverse {
  box-shadow: none !important;
}

.project-transition-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--hero-fade-top) 0%,
    var(--hero-fade-top-subtle) 80px,
    var(--hero-fade-clear) 140px,
    var(--hero-fade-clear) 45%,
    rgba(var(--hero-fade-base), 0.6) 75%,
    rgba(var(--hero-fade-base), 0.9) 90%,
    var(--hero-fade-bottom) 100%
  );
  opacity: 0;
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-transition-clone.expanding .project-transition-overlay {
  opacity: 1;
}

/* Reverse transition: Hero to Gallery Card */
.project-transition-clone.reverse {
  border-radius: 0 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
}

.project-transition-clone.reverse .project-transition-overlay {
  opacity: 1;
}

.project-transition-clone.reverse.shrinking .project-transition-overlay {
  opacity: 0;
}

/* Roll-back animation when leaving project page */
.project-rollout-container.rolling-back {
  animation: rollBackToHero 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes rollBackToHero {
  0% {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0% 0);
  }
  100% {
    opacity: 0;
    transform: translateY(-70px);
    clip-path: inset(0 0 100% 0);
  }
}

.parallax-content.fading-out {
  opacity: 0 !important;
  transform: translateY(-10px) !important;
  transition: opacity 0.22s ease, transform 0.22s ease !important;
}

.gallery-entering {
  animation: galleryEnterFade 0.38s ease both;
}

@keyframes galleryEnterFade {
  0% {
    opacity: 0.75;
  }
  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .parallax-bg-image,
  .project-rollout-container,
  .project-rollout-container .model-container,
  .project-rollout-container .project-video-container,
  .project-rollout-container .project-description p,
  .project-hero-badge,
  .project-hero-title,
  .parallax-content .breadcrumb {
    animation: none !important;
    transform: none !important;
    clip-path: none !important;
    opacity: 1 !important;
  }
  .project-transition-clone {
    transition: none !important;
  }
}

/* ==========================================================================
   Project Photo Gallery & Lightbox
   ========================================================================== */

.project-gallery-section {
  margin-top: 48px;
  margin-bottom: 48px;
}

.project-gallery-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.project-gallery-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 42px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

@media (max-width: 640px) {
  .project-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--card-bg, #1a202c);
  aspect-ratio: 16 / 10;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  outline: none;
}

.gallery-thumb-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover .gallery-thumb-wrap img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-visible .gallery-overlay {
  opacity: 1;
}

.gallery-expand-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.85);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover .gallery-expand-icon {
  transform: scale(1);
}

/* --------------------------------------------------------------------------
   Fullscreen Lightbox Modal
   -------------------------------------------------------------------------- */

.igd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  user-select: none;
  touch-action: pan-y;
}

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

body.lightbox-open {
  overflow: hidden !important;
  touch-action: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 18, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox-stage {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 100%;
  max-height: 100%;
}

.lightbox-image {
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  pointer-events: auto;
}

.igd-lightbox.active .lightbox-image {
  transform: scale(1);
  opacity: 1;
}

.lightbox-bar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-counter {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f1f5f9;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Lightbox Navigation & Close Buttons */
.lightbox-btn {
  position: absolute;
  z-index: 10;
  background: rgba(15, 23, 42, 0.65);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Close Button: Pure White Cross */
.lightbox-close {
  top: 24px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 38px;
  line-height: 1;
  font-family: inherit;
  font-weight: 300;
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.lightbox-close:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.25);
}

/* Prev / Next Arrows */
.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-prev:hover {
  transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
  transform: translateY(-50%) scale(1.1);
}

@media (max-width: 768px) {
  .lightbox-image {
    max-width: 94vw;
    max-height: 75vh;
  }
  .lightbox-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 32px;
  }
  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
  }
  .lightbox-prev {
    left: 10px;
  }
  .lightbox-next {
    right: 10px;
  }
}
