/* ============================================================
   WebFuse — custom.css
   Animations, utilities, and component styles not in Tailwind
   ============================================================ */

/* ---------- Scroll Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal="left"]  { transform: translateX(-80px); opacity: 0; }
[data-reveal="right"] { transform: translateX(80px);  opacity: 0; }
[data-reveal="scale"] { transform: scale(0.9);         opacity: 0; }
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Testimonial Marquee ---------- */
.marquee-wrapper {
  overflow: hidden;
  mask: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.marquee-track {
  display: flex;
  gap: 24px;
  animation: marquee 40s linear infinite;
  width: max-content;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Glassmorphism ---------- */
.glass {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.12);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass { background: rgba(8, 14, 40, 0.75); }
}

/* ---------- Nav Active Link ---------- */
.nav-link::after {
  content: '';
  display: block;
  height: 1px;
  background: white;
  width: 0;
  transition: width 0.3s ease;
  margin-top: 2px;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ---------- Hero Video ---------- */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---------- Section Label Badge ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1px solid #d4d4d4;
  border-radius: 9999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #080e28;
}
.section-label .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1735dd;
  flex-shrink: 0;
}
.section-label-light {
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}
.section-label-light .dot {
  background: #35e4fd;
}

/* ---------- CTA Section Split BG ---------- */
.cta-section {
  background: linear-gradient(180deg, #eaeff5 50%, #080e28 50.45%);
}

/* ---------- Divider ---------- */
.divider {
  width: 100%;
  max-width: 1152px;
  height: 1px;
  background: linear-gradient(270deg, #e9e9e9 0%, #d4d4d4 50%, #e9e9e9 100%);
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 24px;
  border-radius: 100px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5em;
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
}
.btn:hover { opacity: 0.85; }
.btn-light { background: #eaeff5; color: #080e28; }
.btn-dark  { background: #121b60; color: #fff; }
.btn-outline {
  padding: 10px 28px;
  border: 1.5px solid rgba(255,255,255,0.6);
  color: #fff;
  background: transparent;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.btn-arrow-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #121b60;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-light .btn-arrow-circle { background: #121b60; }
.btn-dark  .btn-arrow-circle { background: rgba(255,255,255,0.2); }

/* ---------- Service Cards ---------- */
.service-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-decoration: none;
  transition: box-shadow 0.25s;
}
.service-card:hover {
  box-shadow: 0 8px 40px rgba(8,14,40,0.12);
}

/* ---------- Stat Cards ---------- */
.stat-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 132px;
  justify-content: center;
}

/* ---------- Case Study Cards ---------- */
.case-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
}
.case-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.case-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,14,40,0) 20%, rgba(8,14,41,0.75) 65%);
}
.case-card-content {
  position: relative;
  z-index: 2;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- Testimonial Cards ---------- */
.testimonial-card {
  position: relative;
  width: 370px;
  min-height: 520px;
  border-radius: 24px;
  overflow: hidden;
  flex-shrink: 0;
}
.testimonial-card img.t-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.testimonial-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,14,40,0) 2%, rgba(8,14,40,0.72) 80%);
}
.testimonial-card-content {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #fff;
}

/* ---------- Process Cards ---------- */
.process-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 120px;
  margin-bottom: 24px;
}

/* ---------- Tech Stack / Logo Badges ---------- */
.logo-badge {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  flex-direction: column;
  gap: 12px;
}
.logo-badge img {
  object-fit: contain;
  max-height: 48px;
  width: auto;
}

/* ---------- Tech Scroll Strip ---------- */
.tech-strip {
  display: flex;
  gap: 32px;
  align-items: center;
  overflow: hidden;
  padding: 24px 0;
}
.tech-strip-inner {
  display: flex;
  gap: 32px;
  align-items: center;
  animation: marquee 20s linear infinite;
  width: max-content;
}
.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,14,40,0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open {
  display: flex;
}
.modal-box {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #eaeff5;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #080e28;
}

/* ---------- FAQ Accordion ---------- */
.faq-item {
  border-bottom: 1px solid #d4d4d4;
}
.faq-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 24px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  color: #121b60;
}
.faq-btn .faq-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eaeff5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.3s;
}
.faq-btn[aria-expanded="true"] .faq-icon {
  background: #1735dd;
  transform: rotate(45deg);
}
.faq-btn[aria-expanded="true"] .faq-icon svg { stroke: #fff; }
.faq-body {
  display: none;
  padding: 0 0 24px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #333;
  line-height: 1.7;
}
.faq-body.open { display: block; }

/* ---------- Form ---------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #080e28;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #d4d4d4;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #333;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #1735dd;
}
.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: #e53e3e;
}
.form-error {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #e53e3e;
  display: none;
}
.form-error.show { display: block; }
.form-textarea { resize: vertical; min-height: 140px; }

/* ---------- Flash Messages ---------- */
.flash-success {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  border-radius: 12px;
  padding: 16px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}
.flash-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #7f1d1d;
  border-radius: 12px;
  padding: 16px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}

/* ---------- Portfolio Filter Tabs ---------- */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1.5px solid #d4d4d4;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-tab:hover,
.filter-tab.active {
  background: #080e28;
  color: #fff;
  border-color: #080e28;
}

/* ---------- Portfolio Cards ---------- */
.portfolio-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.25s;
}
.portfolio-card:hover {
  box-shadow: 0 12px 40px rgba(8,14,40,0.15);
  transform: translateY(-4px);
}
.portfolio-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.portfolio-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .marquee-track,
  .tech-strip-inner,
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Utility: line-clamp ---------- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Mobile Nav Slide ---------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
#mobile-menu.open {
  max-height: 400px;
}

/* ---------- Footer ---------- */
.footer-grid {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  max-width: 1152px;
  margin: 0 auto;
}
.footer-col-heading {
  font-family: 'Instrument Serif', serif;
  font-size: 1.25rem;
  color: #fff;
  margin: 0 0 20px;
  line-height: 1.3;
}
.footer-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  line-height: 1.5em;
  display: block;
  margin-bottom: 12px;
  transition: color 0.2s;
}
.footer-link:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 48px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  flex-wrap: wrap;
  gap: 12px;
}

/* Tablet: 2×2 grid */
@media (min-width: 810px) and (max-width: 1199px) {
  .footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 48px;
  }
}
/* Mobile: single column */
@media (max-width: 809px) {
  .footer-grid {
    flex-direction: column;
    gap: 40px;
  }
}
