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

body {
  font-family: 'Arial', sans-serif;
  background-color: #121212;
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 20px 0;
  transition: background 0.3s ease;
}

/* Helper class for Homepage Transparent Header */
.navbar.transparent {
  background: transparent;
  backdrop-filter: none;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #ffffff;
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.8;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-menu a {
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #ff4444;
}

.nav-dots {
  display: flex;
  gap: 8px;
}

.nav-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 0%;
  background: #444;
  transition: background 0.3s ease;
}

.nav-dots .dot:hover {
  background: #ff4444;
}

.nav-logo-img {
  height: 15px; 
  width: auto; 
  display: block;
}

@media (max-width: 768px) {
  .nav-logo-img { height: 15px; }
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(15, 15, 15, 0.98);
  backdrop-filter: blur(15px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.active {
  transform: translateY(0);
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
}

.mobile-menu li {
  margin: 30px 0;
}

.mobile-menu a {
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 3px;
  transition: color 0.3s;
}

.mobile-menu a:hover {
  color: #ff4444;
}

/* --- SUBPAGE BACKGROUNDS (Pixels & Lines) --- */
.subpage {
  padding-top: 120px;
}

.page-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  overflow: hidden;
}

.floating-pixel {
  position: absolute;
  width: 4px; /* Square size */
  height: 4px;
  background: #ff4444;
  border-radius: 0; /* Makes it a square */
  animation: floatPixel 6s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes floatPixel {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(45deg); }
}

.connecting-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.connecting-line path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 8s ease-in-out infinite;
}

@keyframes drawLine {
  0% { stroke-dashoffset: 1000; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1000; }
}

/* --- SCROLLYTELLING HERO --- */
.hero-spacer {
  height: 400vh;
  position: relative;
}

.hero-sticky-container {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: #121212;
  display: flex;
  align-items: center;
  justify-content: center;
}

#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; 
  opacity: 0; 
  transition: opacity 1.5s ease;
}

.hero-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: translateY(20px);
}
/*
.hero-stage.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
*/

.stage-1{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  filter: blur(15px);
  transform: scale(0.9) translateY(20px);
  will-change: transform, filter, opacity;
  transition: opacity 2.2s cubic-bezier(0.25, 1, 0.5, 1),
              transform 2.2s cubic-bezier(0.25, 1, 0.5, 1),
              filter 2.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-stage.active {
  opacity: 1;
  filter: blur(0px);
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.hero-content.centered {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
  max-width: 1200px;
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 300;
  letter-spacing: 3px;
  margin-bottom: 40px;
  line-height: 1.2;
  text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.corner-text {
  position: absolute;
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-align: left;
}

.corner-text .highlight {
  font-size: 2rem;
  display: block;
}

.top-left { top: 15%; left: 10%; text-align: left; }
.top-right { top: 15%; right: 10%; text-align: right; }
.bottom-left { bottom: 15%; left: 10%; text-align: left; }
.bottom-right { bottom: 15%; right: 10%; text-align: right; }

.highlight {
  color: #ff4444;
  font-weight: 700;
}

.cta-button {
  background: transparent;
  border: 2px solid #ff4444;
  color: #ff4444;
  padding: 15px 30px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  backdrop-filter: blur(5px);
  text-decoration: none;
  display: inline-block;
}

.cta-button:hover {
  background: #ff4444;
  color: #121212;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 1;
  transition: opacity 0.5s;
}

.scroll-indicator.hide {
  opacity: 0;
}

.scroll-indicator span {
  font-size: 10px;
  letter-spacing: 2px;
  color: #ff4444;
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid #fff;
  border-radius: 20px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: #ff4444;
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% { top: 6px; opacity: 1; }
  100% { top: 20px; opacity: 0; }
}

/* Services Section */
.services {
  padding: 120px 0;
  background: #0f0f0f;
  position: relative;
  z-index: 10;
}

.services h2 {
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 80px;
  position: relative;
}

.services h2::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 60px;
  height: 3px;
  background: #ff4444;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 60px;
}

.service-card {
  text-align: left;
  transition: transform 0.3s ease;
}

.service-card:hover { transform: translateY(-10px); }
.service-icon { margin-bottom: 30px; }
.service-card h3 { font-size: 1.5rem; color: #fff; margin-bottom: 20px; }
.service-card p { color: #aaa; font-size: 14px; }

.testimonials { padding: 120px 0; background: #0f0f0f; }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 60px; }
.testimonial-card { background: rgba(255,255,255,0.02); padding: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); transition: transform 0.3s ease; }
.testimonial-card:hover { transform: translateY(-5px); border-color: rgba(255,68,68,0.3); }
.testimonial-card p { color: #ccc; margin-bottom: 30px; }
.author-line { width: 40px; height: 2px; background: #ff4444; }

/* Contact Styles */
.contact-section { padding-bottom: 80px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
}

.contact-info-block h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.contact-info-block p {
  color: #aaa;
  margin-bottom: 40px;
}

.info-item {
  margin-bottom: 25px;
  color: #ccc;
  line-height: 1.6;
}

.info-item strong {
  color: #ff4444;
  letter-spacing: 1px;
}

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

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 4px;
  font-family: inherit;
  transition: border-color 0.3s, background 0.3s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #ff4444;
  background: rgba(255, 255, 255, 0.05);
}

.contact-form button {
  align-self: flex-start;
}

/* --- FOOTER REFACTORED (Side-by-Side) --- */
.footer {
  background: #0a0a0a;
  padding: 80px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 1. Container: Always Row (Side by Side) */
.footer-content {
  display: flex;
  flex-direction: row; 
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
  text-align: left;
}

/* 2. Brand Section: Left Side */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Align contents to start */
  gap: 20px;
  flex: 2; /* Takes ample space */
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-info p {
  color: #aaa;
  margin-bottom: 5px;
  font-size: 14px;
}

.contact-info a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: #ff4444;
}

.social-links {
  display: flex;
  gap: 15px;
  justify-content: flex-start; /* Align left */
}

.social-link {
  width: 40px;
  height: 40px;
  border: 1px solid #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  border-color: #ff4444;
  color: #ff4444;
}

/* 3. Links Section: Right Side */
.footer-links {
  display: flex;
  flex: 1;
  justify-content: flex-end; /* Align to right */
}

/* 4. The UL is Stacked (Column) */
.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column; /* Vertically stacked links */
  gap: 20px;
  padding: 0;
  text-align: right;
}

.footer-column a {
  color: #aaa;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.footer-column a:hover { color: #ff4444; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: #666;
  font-size: 14px;
}

.footer-dots {
  display: flex;
  gap: 8px;
}

.footer-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 0; /* Square */
  background: #333;
  transition: background 0.3s ease;
}

.footer-dots:hover .dot {
  background: #ff4444;
}

/* Portfolio Grid */
.portfolio-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 80px;
}

.portfolio-row {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, border-color 0.3s;
  height: 100%;
}

.portfolio-row:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 68, 68, 0.4);
}

.portfolio-row img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-row:hover img {
  transform: scale(1.05);
}

.portfolio-row-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.portfolio-row-content h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #ff4444;
}

.portfolio-row-content p {
  color: #aaa;
}

/* Modal */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #121212;
  z-index: 995;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding-top: 100px;
  padding-bottom: 60px;
}

.project-modal.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.modal-content {
  position: relative;
  background: transparent;
  border: none;
}

.close-modal {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #aaa;
  cursor: pointer;
  margin-bottom: 30px;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: #ff4444;
}

.modal-body img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 40px;
  background: #000;
}

.modal-body h2 {
  font-size: 2.5rem;
  color: #ff4444;
  margin-bottom: 20px;
}

.modal-body #modal-details {
  color: #ccc;
  line-height: 1.8;
  font-size: 1.1rem;
  max-width: 900px;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu { display: none; }
  .hero-content h1 { font-size: 2.5rem; }
  .services-grid, .testimonials-grid, .contact-grid { grid-template-columns: 1fr; }
  
  .portfolio-list { grid-template-columns: 1fr; }
  
  .modal-body img { height: auto; }
  
  /* Mobile Stage 2 Adjustment */
  .corner-text { font-size: 1rem; }
  .top-left { top: 15%; left: 5%; }
  .top-right { top: 15%; right: 5%; }
  .bottom-left { bottom: 20%; left: 5%; }
  .bottom-right { bottom: 20%; right: 5%; }
  
  /* Footer Mobile Logic: Keep Row, Adjust Spacing */
  .footer-content {
    gap: 15px; /* Tighter gap */
  }
  
  .footer-brand {
    flex: 2; /* Keep brand taking more space */
  }
  
  .social-links {
    flex-wrap: wrap; /* Ensure icons wrap if screen is very tiny */
  }
  
  .footer-links {
    flex: 1; 
  }
}

/* Enable smooth scrolling across the entire site */
html {
  scroll-behavior: smooth;
}

/* Prevent the fixed navbar from covering the form when using the anchor link */
#inquiry-form {
  scroll-margin-top: 120px; 
}

/* --- CUSTOM DROPDOWN STYLES --- */
.custom-select-wrapper {
  position: relative;
  user-select: none;
  width: 100%;
}

.custom-select-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff; /* Default text color */
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px; /* Matches your inputs */
}

/* Match the placeholder color for the initial "SUBJECT" text */
.custom-select-trigger .trigger-text {
    color: #757575; /* Similar to default placeholder grey */
}

/* When a selection is made, turn text white */
.custom-select-wrapper.selected .trigger-text {
    color: #ffffff;
}

.custom-select-trigger:hover {
  background: rgba(255, 255, 255, 0.05);
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: #ff4444;
  background: rgba(255, 255, 255, 0.05);
}

.arrow {
  position: relative;
  height: 8px;
  width: 8px;
}

.arrow::before, .arrow::after {
  content: "";
  position: absolute;
  bottom: 0px;
  width: 2px;
  height: 100%;
  background-color: #ff4444;
  transition: all 0.3s;
}

.arrow::before {
  left: -2px;
  transform: rotate(-45deg);
}

.arrow::after {
  left: 2px;
  transform: rotate(45deg);
}

/* Rotate arrow when open */
.custom-select-wrapper.open .arrow::before {
  left: -2px;
  transform: rotate(45deg);
}
.custom-select-wrapper.open .arrow::after {
  left: 2px;
  transform: rotate(-45deg);
}

.custom-options {
  position: absolute;
  display: block;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.5, 0, 0, 1.25);
}

.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateY(0);
}

.custom-option {
  padding: 15px 20px;
  cursor: pointer;
  transition: all 0.2s;
  color: #ccc;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.custom-option:last-of-type {
  border-bottom: none;
}

.custom-option:hover {
  background-color: #ff4444;
  color: #fff;
  padding-left: 25px; /* Slight movement effect */
}

.custom-option.selected {
  color: #ff4444;
  font-weight: bold;
}
.custom-option.selected:hover {
    color: #fff;
}