@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Hanken+Grotesk:wght@400;500;600&display=swap');

:root {
  /* Colors */
  --bg-deep: #20242A;
  --bg: #2B3036;
  --surface: #343B43;
  --surface-2: #3E454E;
  --primary: #007AB3;
  --primary-hover: #0091D1;
  --primary-press: #005E8A;
  --text: #F4F7FA;
  --text-muted: #AAB3BD;
  --border: rgba(255, 255, 255, 0.09);
  --ring: rgba(0, 122, 179, 0.55);
  --success: #2FAE66;

  /* Typography */
  --font-heading: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  /* Fluid Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.83rem + 0.22vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.38vw, 1.3125rem);
  --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 1.88vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem);
  --text-5xl: clamp(2.5rem, 1.8rem + 3.5vw, 4.5rem);

  /* Spacing */
  --section-py: clamp(64px, 9vw, 120px);
  --container-px: 24px;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.5;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.modal-open {
  overflow: hidden;
}

dialog {
  color: var(--text);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.1;
  font-weight: 700;
}

h1 { font-size: var(--text-5xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-4xl); letter-spacing: -0.01em; margin-bottom: 2rem; }
h3 { font-size: var(--text-2xl); }
p { font-size: var(--text-base); color: var(--text-muted); }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 200ms ease;
}

a:hover {
  color: var(--primary-hover);
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1248px; /* 1200 + padding */
  margin: 0 auto;
  padding: 0 var(--container-px);
}

section {
  padding: var(--section-py) 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus State */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 200ms ease;
  min-height: 48px;
  min-width: 48px;
  text-align: center;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 122, 179, 0.3);
}

.btn-primary:active {
  background-color: var(--primary-press);
  transform: translateY(0);
}

.btn-primary:disabled {
  background-color: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background-color: rgba(0, 122, 179, 0.1);
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(32, 36, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

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

.logo img {
  height: 48px;
  width: auto;
}

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

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: var(--text-sm);
}

.nav-links a:hover {
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero Section */
.hero {
  position: relative;
  padding: calc(var(--section-py) + 4rem) 0 var(--section-py);
  background-color: var(--bg-deep);
  overflow: hidden;
  text-align: center;
}

.hero-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.15;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: fadeSlide 24s infinite linear;
}

.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 6s; }
.hero-slide:nth-child(3) { animation-delay: 12s; }
.hero-slide:nth-child(4) { animation-delay: 18s; }

@keyframes fadeSlide {
  0% { opacity: 0; }
  10% { opacity: 1; }
  25% { opacity: 1; }
  35% { opacity: 0; }
  100% { opacity: 0; }
}

.hero .container {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero p.subheadline {
  font-size: var(--text-xl);
  margin: 1.5rem auto 2.5rem;
  max-width: 800px;
  color: var(--text);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Trust Bar */
.trust-bar {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  align-items: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.trust-item svg {
  color: var(--primary);
  width: 20px;
  height: 20px;
}

/* Solutions Grid */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 200ms ease;
  cursor: pointer;
  text-align: left;
  padding: 0;
  width: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  background: var(--surface-2);
  border-color: rgba(0, 122, 179, 0.4);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.product-card:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 4px;
}

.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-deep);
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.product-card:hover .card-img img {
  transform: scale(1.04);
}

.card-content {
  padding: 1.25rem;
  background: #fff;
  color: #000;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-content h3 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0;
}

.card-icon {
  color: var(--primary);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 200ms ease;
}

.product-card:hover .card-icon {
  opacity: 1;
  transform: translateX(0);
}

/* Process Section */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.process-step {
  background: var(--surface);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  position: relative;
  transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

.process-step:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(0, 122, 179, 0.25);
  border-color: var(--primary);
}

.process-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.2;
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-weight: 800;
}

.process-step h3 {
  margin-bottom: 0.75rem;
  color: var(--text);
}

/* Chips / Industries */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: var(--text-sm);
  transition: all 200ms ease;
}

.chip:hover {
  background: var(--surface-2);
  border-color: var(--primary);
}

/* Projects Marquee */
.projects-marquee-container {
  width: 100%;
  overflow: hidden;
  padding: 1rem 0;
  position: relative;
}

.projects-marquee-container::before,
.projects-marquee-container::after {
  content: "";
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.projects-marquee-container::before {
  left: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}
.projects-marquee-container::after {
  right: 0;
  background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}

.projects-marquee {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scrollMarquee 30s linear infinite;
}

.projects-marquee:hover {
  animation-play-state: paused;
}

.marquee-item {
  width: 280px;
  aspect-ratio: 3/4;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: var(--bg-deep);
}

.marquee-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.marquee-item:hover img {
  transform: scale(1.05);
}

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 0.75rem)); }
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-question svg {
  transition: transform 200ms ease;
}

.faq-question[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease, padding 300ms ease;
}

.faq-question[aria-expanded="true"] + .faq-answer {
  padding-bottom: 1.5rem;
  max-height: 500px;
}

/* Contact Form */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: flex-start;
}

.contact-info {
  background: var(--surface);
  padding: 3rem;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item svg {
  color: var(--primary);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color 200ms ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--ring);
}

.phone-wrapper {
  display: flex;
}

.phone-prefix {
  padding: 0.875rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: var(--text-muted);
}

.phone-input {
  border-radius: 0 8px 8px 0;
}

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-primary.loading .spinner {
  display: block;
}
.btn-primary.loading .btn-text {
  display: none;
}

/* Footer */
footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  height: 40px;
  margin-bottom: 1.5rem;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  margin-bottom: 1.5rem;
  color: #fff;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Modal / Lightbox */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(32, 36, 42, 0.92);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  margin: 0;
}

.modal-counter {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background 200ms ease;
}

.btn-close:hover {
  background: var(--surface);
}

.modal-body {
  flex-grow: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 4rem;
}

.modal-image-container {
  width: 100%;
  height: 100%;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 250ms ease, transform 250ms ease;
}

.modal-image.loaded {
  opacity: 1;
  transform: scale(1);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
  z-index: 10;
}

.modal-nav:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev {
  left: 2rem;
}

.modal-nav.next {
  right: 2rem;
}

.modal-footer {
  padding: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-wrapper { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(32, 36, 42, 0.98);
    backdrop-filter: blur(12px);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 300ms ease;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.is-open {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
  }
  .mobile-menu-btn { display: block; }
  .header-actions .btn { display: none; }
  .hero-actions { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto 3rem; }
  .hero-actions .btn { width: 100%; }
  .process-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .modal-body { padding: 0 1rem; }
  .modal-nav { display: none; } /* rely on swipe */
}
