@import url(./header.css);
@import url(./hero.css);
@import url(./how-it-works.css);
@import url(./upload.css);
@import url(./use-cases.css);
@import url(./contact.css);
@import url(./footer.css);

:root {
  --primary-blue: #2c4a6f;
  --primary-dark: #1e3350;
  --secondary-blue: #1b8ac9;
  --accent-teal: #17a2b8;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --background: #ffffff;
  --background-alt: #f8f9fa;
  --border: #e5e7eb;
}

.dark {
  --text-dark: #f9fafb;
  --text-light: #e5e7eb;
  --background: #1a2332;
  --background-alt: #2c3e50;
  --border: #374151;
  --primary-blue: #5ea0db;
  --secondary-blue: #3498db;
}

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

body {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-dark);
  background-color: var(--background);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  color: var(--text-dark);
}

/* ===== HOW IT WORKS SECTION ===== */
.how-it-works-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #0d1424;
}

.how-it-works-container {
  min-height: 100vh;
  background-image: url("../images/HIW-Image.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  padding: 80px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-it-works-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8, 20, 40, 0.82) 0%,
    rgba(12, 32, 58, 0.65) 50%,
    rgba(8, 14, 28, 0.85) 100%
  );
  z-index: 0;
}

.how-it-works-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  min-height: 620px;
}

.how-it-works-content .section-title {
  text-align: center;
  font-size: 48px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 80px;
  margin-top: -40px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.hiw-connector {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.connector-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 2.5;
  stroke-dasharray: 8 12;
  animation: connectorDash 15s linear infinite;
  stroke-linecap: round;
}

.connector-line-1 {
  animation-delay: 0s;
}

.connector-line-2 {
  animation-delay: 0.3s;
}

.connector-line-3 {
  animation-delay: 0.6s;
}

.connector-line-4 {
  animation-delay: 0.9s;
}

.step-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 48px 24px 28px;
  max-width: 240px;
  color: #ffffff;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(7, 19, 37, 0.35);
  transition: all 0.3s ease;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
}

.step-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-5px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.step-3:hover {
  transform: translateX(-50%) translateY(-5px);
}

.step-card.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.step-card.animate-in.step-1 {
  animation-delay: 0.1s;
}
.step-card.animate-in.step-2 {
  animation-delay: 0.2s;
}
.step-card.animate-in.step-3 {
  animation-delay: 0.3s;
}
.step-card.animate-in.step-4 {
  animation-delay: 0.4s;
}
.step-card.animate-in.step-5 {
  animation-delay: 0.5s;
}

.step-number {
  font-size: 64px;
  font-weight: 800;
  opacity: 0.3;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.6) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: absolute;
  top: -18px;
  left: 18px;
}

.step-title {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
}

.step-description {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin: 0;
}

.step-1 {
  top: 6%;
  right: 1%;
}
.step-2 {
  top: 52%;
  right: 2%;
}
.step-3 {
  bottom: 0%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
}
.step-4 {
  top: 52%;
  left: 2%;
}
.step-5 {
  top: 12%;
  left: 2%;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-3.animate-in {
  animation: fadeInUpCenter 0.6s ease forwards;
}

@keyframes fadeInUpCenter {
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ===== AI EFFECTS ===== */

/* Card glow effect */
.card-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    45deg,
    rgba(23, 162, 184, 0.3),
    rgba(27, 138, 201, 0.3),
    rgba(93, 160, 219, 0.3),
    rgba(27, 138, 201, 0.3),
    rgba(23, 162, 184, 0.3)
  );
  border-radius: 17px;
  opacity: 0;
  filter: blur(8px);
  animation: glowPulse 3s ease-in-out infinite;
  z-index: -1;
}

.step-card:hover .card-glow {
  opacity: 1;
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.02);
  }
}

/* Scan line effect */
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(23, 162, 184, 0.8),
    rgba(27, 138, 201, 1),
    rgba(23, 162, 184, 0.8),
    transparent
  );
  opacity: 0;
  animation: scanDown 4s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(27, 138, 201, 0.8);
}

.step-card.animate-in .scan-line {
  opacity: 1;
}

@keyframes scanDown {
  0% {
    top: 0;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

/* PDF Flow Animation */
.pdf-flow {
  opacity: 0;
  animation: pdfFloat 8s linear infinite;
}

.pdf-flow-1 {
  animation-delay: 0s;
}

.pdf-flow-2 {
  animation-delay: 2s;
}

.pdf-flow-3 {
  animation-delay: 4s;
}

.pdf-flow-4 {
  animation-delay: 6s;
}

@keyframes pdfFloat {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  5% {
    opacity: 1;
  }
  20% {
    transform: translateY(0) scale(1);
  }
  80% {
    transform: translateY(0) scale(1);
  }
  95% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
}

/* AI Particles */
.ai-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ai-particles::before,
.ai-particles::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(23, 162, 184, 0.6);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(23, 162, 184, 0.8);
  animation: floatParticle 15s ease-in-out infinite;
}

.ai-particles::before {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.ai-particles::after {
  top: 60%;
  right: 15%;
  animation-delay: 7.5s;
}

@keyframes floatParticle {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  50% {
    transform: translate(100px, -100px) scale(1.5);
    opacity: 1;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translate(200px, -200px) scale(0.5);
    opacity: 0;
  }
}

/* Data stream effect on connectors */
.connector-line {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.4));
}

@keyframes connectorDash {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -300;
  }
}

@media (max-width: 1200px) {
  .step-1 {
    top: 8%;
    right: 1%;
  }
  .step-2 {
    top: 54%;
    right: 1%;
  }
  .step-3 {
    bottom: 0%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
  }
  .step-4 {
    top: 55%;
    left: 1%;
  }
  .step-5 {
    top: 15%;
    left: 1%;
  }
}

@media (max-width: 992px) {
  .how-it-works-container {
    padding: 60px 24px;
  }

  .how-it-works-content {
    min-height: unset;
  }

  .how-it-works-content .section-title {
    font-size: 42px;
    margin-bottom: 48px;
  }

  .hiw-connector {
    display: none;
  }

  .step-card {
    position: relative;
    max-width: 100%;
    width: min(420px, 100%);
    margin: 0 auto 24px;
    transform: translateY(20px);
  }

  .step-card:last-of-type {
    margin-bottom: 0;
  }

  .step-1,
  .step-2,
  .step-3,
  .step-4,
  .step-5 {
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
  }
}

@media (max-width: 768px) {
  .how-it-works-content .section-title {
    font-size: 36px;
  }

  .step-number {
    font-size: 48px;
  }

  .step-title {
    font-size: 18px;
  }
}



/* ===== BUTTONS ===== */
.btn-primary {
  background-color: white;
  border-color: white;
  color: #2c4a6f;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-primary:hover {
  background-color: #1b8ac9;
  border-color: #1b8ac9;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ===== DARK MODE ===== */
html.dark body {
  background-color: var(--background);
  color: var(--text-dark);
}

html.dark .hero-section {
  background: radial-gradient(
    circle at 10% 20%,
    #1f3c7a 0%,
    #182d5d 45%,
    #0c1836 100%
  );
}

html.dark .site-header,
html.dark .site-footer {
  background-color: #1a2332;
}

html.dark .contact-section {
  background: linear-gradient(135deg, #0f1924 0%, #1a2332 50%, #0a0f16 100%);
}

html.dark .upload-card,
html.dark .use-case-card {
  background-color: #34495e;
  color: var(--text-dark);
}

html.dark .contact-form-card,
html.dark .contact-info-card {
  background: linear-gradient(
    145deg,
    rgba(26, 35, 50, 0.6) 0%,
    rgba(15, 25, 36, 0.7) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.05);
}

html.dark .form-control {
  background-color: #2c3e50;
  border-color: #4a5568;
  color: var(--text-dark);
}

html.dark .upload-zone {
  background-color: #2c3e50;
  border-color: #4a5568;
}

html.dark .use-cases-section {
  background: linear-gradient(135deg, #0f4c75 0%, #1b8ac9 100%);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-section {
    padding: 3rem 0;
  }

  .hero-content {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0;
  }

  .hero-image {
    flex: 0 0 100%;
    max-width: 100%;
    margin-top: 2.5rem;
  }

  .hero-image::before {
    display: none;
  }

  .hero-image img {
    width: 100%;
    max-width: 100%;
    clip-path: none;
    border-radius: 1.25rem;
  }

  .btn-hero {
    width: 100%;
    justify-content: center;
  }

  .how-it-works-section,
  .upload-section,
  .use-cases-section,
  .contact-section {
    padding: 3rem 0;
  }
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--secondary-blue);
  color: white;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  font-size: 1.5rem;
}

.scroll-to-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  background-color: var(--primary-blue);
}

/* ===== UTILITIES ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
