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

body {
  background-color: #010208; /* Deep Midnight / Near Black */
  overflow-x: hidden;
  color: #fff;
  font-family: "Courier New", Courier, monospace;
}

.ambient-glow {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translate(30%, -50%);
  width: 1100px;
  height: 1100px;
  background: radial-gradient(
    circle,
    rgba(29, 78, 216, 0.35) 0%,
    rgba(0, 4, 15, 0) 70%
  ); /* Increased opacity */
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(80px);
}

.ambient-glow-left {
  position: fixed;
  bottom: -10%;
  left: 0;
  transform: translate(-30%, 20%);
  width: 900px;
  height: 900px;
  background: radial-gradient(
    circle,
    rgba(30, 64, 175, 0.25) 0%, /* Dark Blue */
    rgba(0, 4, 15, 0) 70%
  ); /* Blue - Increased opacity */
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(80px);
}

#hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100lvh;
  z-index: -1;
  display: block;
}

.scroll-container {
  height: 400vh; /* Reduced to 400vh */
  position: relative;
  z-index: 10;
}

.scroll-indicator {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  color: #fff;
  opacity: 1;
  animation: bounce 2s infinite;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

#contact-overlay {
  font-family:
    "Mona Sans",
    "Mona Sans Fallback",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100lvh;
  background: rgba(0, 0, 0, 0.6); /* Dimmed background to see canvas */
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px; /* Margins X and Y as requested */
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.6s ease-in-out;
}

#contact-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.split-layout {
  display: flex;
  width: 100%;
  height: 100%;
  max-width: 1600px; /* Optional cap */
  background-color: #02040a;
  color: #fff;
  overflow: hidden;
  border: 1px solid #333; /* Gray border */
  border-radius: 16px; /* Rounded corners */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); /* Deep shadow */
}

/* --- Left Panel --- */
.left-panel {
  flex: 0 0 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 4rem;
  border-right: 1px dashed rgba(255, 255, 255, 0.1); /* Dashed divider */
  overflow: hidden;
}

.glow-effect {
  position: absolute;
  top: 0;
  right: 0; /* Align to right border */
  width: 50%; /* Spread into the panel */
  height: 100%;
  /* Gradient centered on the right edge (the divider) */
  background: radial-gradient(
    circle at right center,
    rgba(29, 78, 216, 0.15) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* Constellation Mouse Graphic */
.constellation-mouse {
  position: absolute;
  top: 5%;
  right: 5%;
  left: auto; /* Reset left */
  width: 200px;
  height: 320px;
  transform: rotate(10deg);
  z-index: 0;
  opacity: 0.25;
  pointer-events: none;
}

.constellation-lines {
  fill: none;
  stroke: #3b82f6;
  stroke-width: 0.5;
  stroke-dasharray: 2 4; /* Dashed connection lines */
  opacity: 0.7;
}

.star-node {
  fill: #fff;
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.8));
  animation: pulse-glow 3s infinite ease-in-out;
}

/* Stagger animation for each node */
.star-node:nth-of-type(1) {
  animation-delay: 0s;
}
.star-node:nth-of-type(2) {
  animation-delay: 0.3s;
}
.star-node:nth-of-type(3) {
  animation-delay: 0.6s;
}
.star-node:nth-of-type(4) {
  animation-delay: 0.9s;
}
.star-node:nth-of-type(5) {
  animation-delay: 1.2s;
}
.star-node:nth-of-type(6) {
  animation-delay: 1.5s;
}
.star-node:nth-of-type(7) {
  animation-delay: 1.8s;
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.5;
    filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.4));
    r: 2;
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.8));
    r: 2.5;
  }
}

.panel-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-logo {
  height: 38px; /* Reduced scale */
  width: auto;
  display: block;
  /* Invert colors to make black text white */
  filter: invert(1) brightness(1.2);
  margin-bottom: 15px;
  margin-left: 5px;
  object-fit: cover;
  object-position: left;
}

.main-content h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 600;
  background: linear-gradient(to right, #fff, #94a3b8);
  background-clip: text; /* Standard property */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.description {
  font-size: 1.1rem;
  color: #94a3b8; /* Slate 400 */
  max-width: 400px;
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* Form Styles */
.contact-form label {
  display: block;
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 0.7rem;
  margin-bottom: 1rem;
  max-width: 500px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-form label {
  font-size: 0.85rem;
  color: #cbd5e1;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 12px 16px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.submit-btn {
  align-self: flex-start;
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.submit-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05); /* Subtle separator */
  padding-top: 2rem;
  margin-top: auto;
}

.socials {
  display: flex;
  gap: 1.5rem;
}

.socials a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}

.socials a:hover {
  color: #fff;
}

.credit {
  font-size: 0.85rem;
  color: #64748b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif; /* Fallback to Inter if Mona Sans fails */
  overflow-x: hidden; /* Prevent horizontal scroll */
  background-color: #00040f; /* Deepest Blue/Black */
  color: #e2e8f0;
}

/* --- Right Panel --- */
/* --- Right Panel --- */
.right-panel {
  flex: 1;
  background: #00040f; /* Deep Navy Blue */
  position: relative; /* Container for absolute arrow */
  overflow: hidden;   /* Disable scroll on container */
  padding: 0;         /* Padding moved to scroll-content */
}

.scroll-content {
  height: 100%;
  overflow-y: auto;
  padding: 4rem;      /* Padding moved here */
}

/* Services Scroll Indicator (Arrow) */
.services-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  right: 1rem; /* Moved further right */
  color: #fff;
  opacity: 0.8;
  animation: bounce 2s infinite;
  pointer-events: none; /* Click-through */
  z-index: 10;
}

/* Custom Scrollbar for Contact Section */
.scroll-content::-webkit-scrollbar,
.split-layout::-webkit-scrollbar {
  width: 6px;
}

.scroll-content::-webkit-scrollbar-track,
.split-layout::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.scroll-content::-webkit-scrollbar-thumb,
.split-layout::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2); /* Slate 400 low opacity */
  border-radius: 10px;
}

.scroll-content::-webkit-scrollbar-thumb:hover,
.split-layout::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5); /* Blue on hover */
}

.scroll-content h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.section-intro {
  color: #94a3b8;
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.tech-grid {
  display: grid;
  /* Tighter grid */
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.tech-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1rem; /* Reduced padding */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem; /* Reduced gap */
  transition: all 0.3s ease;
  cursor: default;
}

.tech-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
}

.tech-item img {
  height: 32px; /* Smaller Icons */
  width: 32px;
}

.tech-item span {
  font-size: 0.8rem; /* Smaller text */
  color: #cbd5e1;
  font-weight: 500;
}

.invert-icon {
  filter: invert(1);
}

.services-section h2 {
  font-size: 2rem;
  background: linear-gradient(to right, #fff, #fff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block; /* Required for background-clip on some browsers */
}

.services-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.service-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.service-list {
  margin-top: 1rem;
  list-style: none;
  padding-left: 0.5rem;
}

.service-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.service-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: #3b82f6; /* Blue bullet */
}

.service-card h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.service-card p {
  color: #94a3b8;
  line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  html,
  body {
    overflow: hidden; /* Lock native scroll */
    touch-action: none; /* Disable browser gestures */
    width: 100%;
    position: relative;
    height: 100%; /* Ensure full height for lock */
  }

  /* ... other mobile styles ... */

  /* Contact Overlay */
  #contact-overlay {
    /* ... existing props ... */
    pointer-events: none; /* Default: locked */
    overflow-y: hidden;   /* Default: locked */
    transition: opacity 0.5s ease-in-out;
  }

  /* Active state driven by JS */
  #contact-overlay.active-overlay {
    pointer-events: auto;
    overflow-y: auto; /* Enable internal scroll */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y; /* explicit vertical scroll permission */
  }

  .split-layout {
    display: flex; /* Ensure flex context */
    flex-direction: column; /* Stack vertically (Top to Bottom) */
    overflow: visible; /* Let overlay handle scroll */
    height: auto;
  }
  .left-panel,
  .right-panel {
    flex: none;
    width: 100%;
    padding: 2rem;
    overflow: visible;
  }
  
  /* Reset Scroll Content for Mobile */
  .scroll-content {
      height: auto;
      overflow: visible;
      padding: 0;
  }
  
  /* Hide Services Arrow on Mobile */
  .services-scroll-indicator {
      display: none !important;
  }

  /* Put Services (Right Panel) FIRST on mobile */
  .right-panel {
    order: -1;
    background: #00040f;
  }
  .left-panel {
    order: 0;
    height: auto;
    min-height: auto;
    border-right: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.1); /* Divider above form */
    border-bottom: none;
  }
  .right-panel {
    background: #00040f;
  }
  .main-content h1 {
    font-size: 2.5rem;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  #hero-canvas {
    display: block !important;
  }

  #mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-logo {
    height: 24px;
    width: auto;
    filter: invert(1) brightness(1.2);
  }

  /* Restore Scroll Container */
  .scroll-container {
    display: block !important;
  }

  /* Mobile Hero Text (Slides) */
  #mobile-hero-text {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100lvh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    pointer-events: none;
    z-index: 10;
    padding: 20px;
  }

  .mobile-text-slide {
    position: absolute;
    top: 35%; /* Moved up from 50% */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    font-family: "Mona Sans", sans-serif;
    font-weight: 300; /* Thinner weight */
    color: white;
    font-size: 1.5rem; /* Smaller size */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;

    /* Gradient Text */
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .mobile-text-slide.active {
    opacity: 1;
  }

  /* Contact Overlay - Hidden initially, fades in */
  #contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100lvh;
    opacity: 0; /* JS will handle this */
    background: rgba(0, 0, 0, 0.9); /* Dark background */
    backdrop-filter: blur(10px);
    display: flex; /* Flex to center/stretch */
    flex-direction: column;
    justify-content: flex-start; /* Ensure starts at top */
    padding: 40px 0 0 0; /* Reduced top padding (No header) */
    z-index: 100;
    pointer-events: none; /* Wait for opacity */
    overflow-y: hidden; /* Scrollable content inside - BLOCKED initially */
    overflow-x: hidden; /* Prevent horizontal scroll */
    -webkit-overflow-scrolling: touch;
  }

  /* Unlock scroll only after transition */
  #contact-overlay.scroll-active {
    overflow-y: auto;
  }

  .split-layout {
    flex-direction: column;
    height: auto;
    width: 100%;
    background: transparent;
    box-shadow: none;
    border: none;
    overflow: visible;
  }

  .left-panel,
  .right-panel {
    height: auto;
    overflow: visible;
    padding: 2rem 1.5rem;
  }

  /* Reorder: Services/Stack (Right) on top, Contact (Left) below */
  .right-panel {
    order: -1;
    padding: 0rem 1.5rem;
  }

  .left-panel {
    order: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  /* ... previous mobile styles ... */

  /* MOBILE SPECIFIC LOGO RULES */
  /* Show the new logo in the Right Panel (Services) */
  .mobile-logo-header {
    display: block;
    margin-bottom: 35px;
  }
  .mobile-logo-header .brand-logo {
    height: 32px;
    width: auto;
    margin-bottom: 25px; /* Requested gap */
    margin-left: 0;
  }

  /* Hide the original logo in the Left Panel (Contact) */
  .left-panel header {
    display: none;
  }
} /* END MOBILE MEDIA QUERY */

/* Desktop Only Adjustments */
@media (min-width: 769px) {
  /* Hide the Mobile Logo (Right Panel) on Desktop */
  .mobile-logo-header {
    display: none !important;
  }

  /* Ensure the Original Logo (Left Panel) is VISIBLE on Desktop */
  .left-panel header {
    display: block !important;
  }

  /* Hide other mobile-only elements */
  #mobile-header,
  #mobile-hero-text {
    display: none !important;
  }

  .mobile-only {
    display: none !important;
  }
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  top: -100%; /* Hidden by default (above viewport) */
  left: 0;
  width: 100%;
  background: rgba(2, 6, 23, 0.95); /* Matches dark theme */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 2000; /* Above everything */
  transition: top 0.5s cubic-bezier(0.16, 1, 0.3, 1); /* Smooth slide in */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.cookie-banner.visible {
  top: 0;
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
  justify-content: space-between;
}

.cookie-content p {
  margin: 0;
  font-size: 0.95rem;
  color: #e2e8f0;
  font-family: "Mona Sans", sans-serif;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
}

.cookie-btn {
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cookie-btn.accept {
  background: #3b82f6;
  color: #fff;
}

.cookie-btn.accept:hover {
  background: #2563eb;
}

.cookie-btn.decline {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-btn.decline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile responsive for banner */
@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
}

/* --- Fix for Short Screens (Laptop/Landscape Tablets) --- */
@media (max-height: 850px) and (min-width: 769px) {
  .left-panel {
    padding: 2.5rem !important; /* Reduce padding significantly */
  }

  .main-content h1 {
    font-size: 2.2rem !important; /* Smaller title */
    margin-bottom: 0.75rem !important;
  }

  .description {
    font-size: 0.95rem !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.4 !important;
  }

  .brand-logo {
    height: 30px !important;
    margin-bottom: 10px !important;
  }

  .contact-form {
    gap: 0.6rem !important; /* Tighter form spacing */
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }

  .form-group {
    gap: 0.25rem !important;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 8px 12px !important; /* Smaller inputs */
    font-size: 0.9rem !important;
  }
  
  .contact-form textarea {
      height: 80px !important; /* Override rows attribute height */
  }

  .submit-btn {
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
  }
  
  footer {
    padding-top: 1rem !important;
    margin-top: 0.5rem !important;
  }
  
  .socials {
      gap: 1rem !important;
  }
  
  .panel-content {
      justify-content: space-between !important;
  }
}

/* Delay scroll on right panel for Desktop */
@media (min-width: 769px) {
  #contact-overlay .scroll-content {
      overflow-y: hidden;
      pointer-events: none;
  }

  #contact-overlay.scroll-active .scroll-content {
      overflow-y: auto;
      pointer-events: auto;
  }
}
