@import 'variables.css';

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom Cursor */
@media (pointer: fine) {
  body {
    cursor: none;
  }
  
  .cursor-dot,
  .cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease-in-out, height 0.3s ease-in-out, background-color 0.3s ease-in-out, opacity 0.3s ease-in-out;
  }

  .cursor-dot {
    width: 6px;
    height: 6px;
    background-color: #48A7DD;
  }

  .cursor-outline {
    width: 25px;
    height: 25px;
    border: 1.2px solid #48A7DD;
    opacity: 0.5;
  }

  body.cursor-on-interactive .cursor-dot,
  body.cursor-on-interactive .cursor-outline {
    opacity: 0;
  }
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

img:hover {
  transform: scale(1.03);
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary-navy);
  margin-bottom: var(--spacing-4);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

.text-center { text-align: center; }
.text-green { color: var(--primary-green); }
.text-navy { color: var(--primary-navy); }

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-4);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--spacing-2); }
.gap-4 { gap: var(--spacing-4); }
.gap-6 { gap: var(--spacing-6); }
.gap-8 { gap: var(--spacing-8); }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--spacing-3) var(--spacing-6);
  border-radius: var(--border-radius-full);
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 0%;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-green);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-green-hover);
}

.btn-outline {
  border: 1px solid var(--primary-green);
  color: var(--primary-green);
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--primary-green);
  color: white;
}

/* Header & Topbar */
.topbar {
  background-color: var(--primary-navy);
  color: white;
  padding: var(--spacing-2) 0;
  font-size: 0.875rem;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar {
  padding: var(--spacing-4) 0;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: var(--spacing-6);
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 0%;
  color: #000;
}

.nav-links li a:hover {
  color: var(--primary-navy);
}

.nav-links .active {
  background-color: #93c5fd;
  color: #000;
}

/* Dropdown Menu Styling */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 220px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 10px;
  z-index: 100;
  margin-top: 10px;
}

.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 10px;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li {
  margin-bottom: 0;
}

.dropdown-menu li:not(:last-child) {
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 4px;
  padding-bottom: 4px;
}

.dropdown-menu li:not(:first-child) {
  margin-top: 4px;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: #000;
  border-radius: 8px;
  transition: background-color 0.2s;
  font-weight: 400;
  font-size: 14px;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background-color: #cbe4f4; /* Subtle light blue match */
}

/* Sections */
section {
  padding: var(--spacing-16) 0;
}

.section-subtitle {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.15em;
  color: #48A7DD;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #000;
  margin: 0;
}

.hero-title {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: center;
  color: #000;
  margin-bottom: 1.5rem;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}


/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-4);
  background-color: white;
  border-radius: var(--border-radius-full);
  box-shadow: var(--shadow-md);
}

.badge-text {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
  color: #000;
}

/* Cards */
.card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Hero Carousel */
.hero-carousel-container {
  max-width: 700px !important;
  height: 400px;
  margin: 0 auto;
  position: relative;
}

.hero-slides-wrapper {
  position: relative;
  width: 100%;
  max-width: 700px;
  height: 300px;
  overflow: hidden;
  border-radius: 20px;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  object-fit: cover;
  border-radius: 20px;
}

.hero-slide.active {
  opacity: 1;
  position: relative;
}

.hero-progress-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 15px; /* Closer to image */
}

.hero-progress-bar {
  width: 80px; /* Adjusted for 4 items */
  height: 4px;
  background-color: #E2E8F0;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background-color: #48A7DD;
}

.hero-progress-bar.active .progress-fill {
  animation: fill-progress 5s linear forwards;
}



@keyframes fill-progress {
  from { width: 0%; }
  to { width: 100%; }
}

/* ── Scroll-triggered pop animation ── */
@keyframes pop-card-anim {
  0%   { opacity: 0; transform: scale(0.82) translateY(32px); }
  70%  { transform: scale(1.04) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.pop-card { opacity: 0; transform: scale(0.82) translateY(32px); }
.pop-card.is-popped { animation: pop-card-anim 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.pop-card.pop-card-done { opacity: 1; transform: none; animation: none; }

/* ── Page loader ── */
#page-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#page-loader.hide {
  opacity: 0;
  visibility: hidden;
}
@keyframes loader-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}
#page-loader .loader-logo {
  width: 80px;
  height: 80px;
  animation: loader-spin 0.35s linear infinite;
}

/* ── Logo spin (first visit) ── */
@keyframes logo-spin-once {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}
.logo-icon { display: block; }
.logo-icon.spinning { animation: logo-spin-once 0.6s linear forwards; }

/* ── Scroll reveal system ── */
[data-reveal] {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal="up"]    { transform: translateY(48px); }
[data-reveal="left"]  { transform: translateX(-60px); }
[data-reveal="right"] { transform: translateX(60px); }
[data-reveal].revealed { opacity: 1 !important; transform: none !important; }

/* ── Scroll-to-top button ── */
#scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--primary-navy);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s ease, background-color 0.25s ease;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}
#scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#scroll-top-btn:hover { background-color: var(--primary-green); }

/* ── Sticky header shrink ── */
.header-main {
  transition: box-shadow 0.35s ease;
}
.header-main.header-scrolled .header-row {
  padding-top: 0.55rem !important;
  padding-bottom: 0.55rem !important;
}
.header-main.header-scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1) !important;
}

/* ── Typewriter cursor ── */
.typewriter-cursor::after {
  content: '|';
  color: #48A7DD;
  animation: blink-cursor 0.75s step-end infinite;
  margin-left: 2px;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Button ripple ── */
.btn, .send-btn, .btn-next, .btn-partnership {
  position: relative;
  overflow: hidden;
}
.ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  pointer-events: none;
  animation: ripple-expand 0.65s linear forwards;
}
@keyframes ripple-expand {
  to { transform: scale(4); opacity: 0; }
}

/* ── Hero parallax (moves the ::before gradient layer) ── */
.hero-section::before {
  transform: translateY(var(--parallax-y, 0));
  will-change: transform;
}

/* ── Image hover zoom — contain within parent ── */
.who-images img,
.card img,
.compliance-card img {
  overflow: hidden;
}
.who-images {
  overflow: hidden;
  border-radius: 20px;
}

/* ── Toast notifications ── */
.ark-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: white;
  z-index: 99998;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  white-space: nowrap;
}
.ark-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ark-toast--success { background: #22c55e; }
.ark-toast--error   { background: #ef4444; }
