/* Fluid Typography Base */
html {
  font-size: 100%; /* 16px base */
}

/* Global Utilities */
.section-padding {
  padding: 70px 0;
}

.shadow-md {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bg-primary {
  background-color: var(--primary-color);
  color: white;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.flex-column-start {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.caption-underline {
  font-size: 1.125rem;
  font-weight: 300;
  padding-bottom: 5px;
  display: inline-block;
  color: inherit;
  margin-top: 5px;
}

.caption-underline::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background-color: currentColor;
  margin-top: 10px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1.5rem; /* Global Body Font Size */
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
}

main {
  margin-top: 72px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: white; /* Changed for dark header visibility */
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* Utilities */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.mb-40 {
  margin-bottom: 40px;
}
.my-60 {
  margin-top: 60px;
  margin-bottom: 60px;
}
.mt-60 {
  margin-top: 60px;
}

/* Component Utilities */
.logo-img {
  height: 40px;
  width: auto;
}

.section-intro {
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.section-heading {
  margin-bottom: 40px;
  font-size: 2.5rem;
  color: var(--primary-color);
  font-weight: 900;
  text-align: left;
}

.dark.section-heading {
  color: white;
}

.section-intro p {
  margin-bottom: 40px;
}

.section-heading:after {
  content: "";
  display: block;
  width: 100px;
  height: 2px;
  margin-top: 20px;
  background-color: var(--primary-color);
}

.hidden {
  opacity: 0;
  height: 0;
}

.visible {
  opacity: 1;
  height: auto;
}

.dark.section-heading:after {
  background-color: white;
}

.js-player {
  border: 1px solid var(--accent-color);
  width: 100%;
  display: block;
}

/* Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(8, 67, 104, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
}

.logo img {
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  list-style: none;
}

.nav-links li a {
  position: relative;
  padding-bottom: 5px;
  font-size: 1.5rem; /* Nav Font Size */
  font-weight: 200;
  color: white; /* Changed to white for dark header */
}

.nav-links li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-links li a:hover::after {
  width: 100%;
}

.lang-switch {
  cursor: pointer;
  font-weight: bold;
  cursor: pointer;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 0; /* Sharp corners */
  transition: background 0.3s;
  color: white; /* White text for lang switch */
}

.lang-switch:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Sections */
section {
  padding: 100px 0; /* Increased spacing per source analysis */
  position: relative;
}

/* Hero */
#hero {
  background: transparent; /* Video covers this, but keep fallback color/gradient if transparency fails? No, video is z-0 */
  text-align: center;
  padding-top: 180px;
  padding-bottom: 120px;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%; /* Horizontal: Center, Vertical: 30% from top */
  z-index: 0;
}

#hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Align wrapper and text to left */
  text-align: left;
}

.hero-divider {
  width: 100%; /* Fill the wrapper (which is fit-content of H1) */
  height: 3px;
  background-color: white;
  margin: 20px 0; /* Vertical spacing */
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Dark overlay for text readability over video */
  background: rgba(8, 67, 104, 0.7);
  mix-blend-mode: multiply;
  z-index: 1;
}

#hero h1 {
  color: white;
  font-size: 4.5625rem; /* Precise source size */
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
  margin-bottom: 0;
}

.hero-subtitle {
  font-size: 2.25rem;
  font-weight: bold;
  letter-spacing: 2px;
}

/* Wrapper to lock divider width to H1 width */
.hero-title-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  max-width: 100%;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 15px 40px;
  background: white;
  color: var(--primary-color);
  border-radius: 0; /* Sharp corners */
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-sm {
  padding: 10px 25px;
  font-size: 0.9rem;
  background: var(--primary-color);
  color: white;
}

.btn-sm:hover {
  background: var(--accent-color);
  color: white;
}

/* Services Grid */
#services {
  background-color: var(--light-bg);
}

.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

/* Service Card Redesign */
.service-card {
  position: relative;
  padding: 0; /* Remove padding to let image fill */
  border-radius: 0; /* Sharp corners */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  overflow: hidden;
  height: 313px; /* Fixed height for consistent look */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: none;

  /* Flex sizing */
  flex: 1 1 287px;
  max-width: 287px;

  /* Animation Initial State */
  opacity: 0;
  transform: translateY(100px);
}

.card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  z-index: 1;
}

/* Add blue tint directly to image container */
.service-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(173, 210, 225, 0.13) 0%,
    rgba(155, 191, 219, 0.22) 10%,
    rgba(89, 133, 165, 0.56) 50%,
    rgba(5, 66, 140, 0.91) 90%,
    rgba(7, 54, 130, 1) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.card-overlay {
  position: relative;
  z-index: 2;
  padding: 40px 30px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.service-card:hover .card-bg {
  transform: scale(1.1);
}

.service-card h3 {
  margin-bottom: 20px;
  font-size: 1.6rem;
  color: white; /* White text for contrast */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.service-card .btn {
  background: #ffffff; /* Solid white background as notated */
  backdrop-filter: none;
  border: none;
  color: var(--primary-color); /* Deep blue text */
  padding: 12px 30px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.service-card .btn:hover {
  background: var(--light-bg);
  transform: translateY(-2px);
}

/* AR Section Text - Preserved for specific styling */
.ar-text-item {
  padding-right: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ar-text-item h3 {
  color: var(--primary-color);
  font-size: 1.75rem;
  margin-bottom: 15px;
  font-weight: 900;
}

.ar-text-item p {
  font-size: 1.375rem;
  line-height: 1.6;
  color: var(--primary-color);
  margin-bottom: 30px;
}

/* Animation Section Specifics */
.animation-section {
  padding: 100px 0;
  overflow: hidden;
}

.animation-l-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.animation-text-box {
  grid-row: span 2; /* Span 2 rows in the first column */
  background-color: var(--primary-color);
  color: white;
  padding: 60px; /* Matched padding */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  height: 100%; /* Fill the grid area */
}

.animation-text-box p {
  font-size: 1.375rem;
  margin-top: 50px;
  margin-bottom: 60px;
  line-height: 1.6;
}

.animation-list {
  list-style: none;
}

.animation-list li {
  margin-bottom: 30px;
  padding-left: 20px;
  position: relative;
  font-size: 1.375rem;
  line-height: 1.5;
}

.animation-list li::before {
  content: "•";
  color: white;
  position: absolute;
  left: 0;
  top: 0;
}

/* Contact Section */
#contact {
  background: #d6e8f4; /* Light Blue BG */
  position: relative;
  color: var(--primary-color);
}

.contact-skeleton {
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  background: white;
  border-radius: 4px;
}

.skeleton-line {
  background: #eee;
  margin-bottom: 20px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.skeleton-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.skeleton-line.title {
  height: 30px;
  width: 60%;
  margin-bottom: 30px;
}

.skeleton-line.input {
  height: 50px;
  width: 100%;
}

.skeleton-line.textarea {
  height: 150px;
  width: 100%;
}

.skeleton-line.button {
  height: 50px;
  width: 100%;
  margin-top: 20px;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center; /* Changed to start for better alignment with tall form */
  align-items: flex-start;
  gap: 40px;
}

.contact-details {
  margin-bottom: 40px;
}

.contact-form {
  width: 100%;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  transition: all 0.3s ease;
}

.contact-form iframe {
  border: none;
  width: 100%;
  height: 600px; /* Default height */
  display: block;
}

.contact-info {
  margin-top: 40px;
  font-size: 1.375rem;
}

.contact-info .company {
  font-weight: 700;
}

.contact-info a {
  color: var(--primary-color);
  text-decoration: underline;
}

.contact-info a:hover {
  color: var(--accent-color);
}

/* AI Section Icons Old (Can be removed or aliased) */
/* .ai-icons-grid was used previously, now replaced by .ai-icons-row in new structure but we keep style logic or redirect */

.ai-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.ai-icon-item p {
  color: white;
  font-weight: 400;
  font-size: 1.125rem;
}

.ai-icon-item img {
  height: 60px;
  width: auto;
  /* If icons are white line-art and background is light, we might need to invert.
       However, if section is same style as others, assume standard contrast or provided assets match.
       Adding a safe transition. */
  transition: transform 0.3s ease;
}

.ai-icon-item:hover img {
  transform: scale(1.1);
}

/* Footer */
footer {
  background: #052c45;
  color: rgba(255, 255, 255, 0.6);
  padding: 40px 0;
}

footer a {
  color: white;
  text-decoration: underline;
}

/* Responsive */

/* Large Screens */
@media (max-width: 1200px) {
  html {
    font-size: 87.5%; /* 14px base - Text shrinks ~12% */
  }
}

/* Tablet / Mobile */
@media (max-width: 768px) {
  html {
    font-size: 75%; /* 12px base - Text shrinks ~25% */
    scroll-padding-top: 65px; /* Adjust for smaller mobile header */
  }

  main {
    margin-top: 64px;
  }

  .logo {
    position: relative;
    z-index: 1001;
  }

  .contact-form {
    padding: 25px 0;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Mobile Spacing Optimizations */
  section,
  .section-padding,
  .animation-section {
    padding: 50px 0;
  }

  #hero {
    padding-top: 120px;
    padding-bottom: 80px;
  }

  .grid-4 {
    gap: 20px;
  }

  .contact-container {
    gap: 20px;
    align-items: stretch;
  }

  /* Compacting Spacing for Mobile */
  .section-intro p,
  .section-heading,
  .contact-details {
    margin-bottom: 20px;
  }

  .mb-50 {
    margin-bottom: 30px;
  }

  .my-60 {
    margin-top: 30px;
    margin-bottom: 30px;
  }

  .mt-60 {
    margin-top: 30px;
  }

  .card-overlay {
    padding: 20px 15px;
  }

  .animation-text-box p {
    margin-top: 25px;
    margin-bottom: 30px;
  }

  .animation-list li {
    margin-bottom: 15px;
  }
}

/* Phones */
@media (max-width: 480px) {
  main {
    margin-top: 60px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .animation-l-grid {
    grid-template-columns: 1fr;
  }

  .animation-text-box {
    grid-row: auto;
    padding: 40px 20px;
  }

  #hero h1 {
    font-size: 3.5rem;
  }
}

footer {
  font-size: 1.125rem;
}
