@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Core Brand Colors (Matched to Logo) */
  --primary: #76cbf4; /* Light Sky Blue from "Algorithms" */
  --primary-dark: #5eb5de;
  --secondary: #000c66; /* Navy Blue from "Kasi" */
  --secondary-dark: #000844;
  --accent: #ff833e; /* Orange kept as an accent color */
  
  /* Neutral/Premium Light Palette */
  --bg-color: #ffffff;
  --surface: #f9f9fa;
  --surface-elevated: #ffffff;
  --text-main: #111111;
  --text-muted: #666666;
  --border: #e6e6e6;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Layout & Spacing */
  --max-width: 1280px;
  --section-padding: 8rem 2rem;
  --border-radius: 12px;
  --border-radius-lg: 24px;
  
  /* Motion */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, #111 0%, #555 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-brand {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1 { font-size: clamp(3rem, 6vw, 5.5rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.5rem, 2vw, 2rem); margin-bottom: 1rem; }
p.lead { font-size: clamp(1.1rem, 1.5vw, 1.35rem); color: var(--text-muted); margin-bottom: 2rem; max-width: 700px; }

/* Layout Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.section {
  padding: var(--section-padding);
  position: relative;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 100px;
  font-weight: 500;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  gap: 0.5rem;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  background-color: var(--secondary-dark);
  box-shadow: 0 10px 20px rgba(0, 12, 102, 0.2);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--surface);
  border-color: var(--text-muted);
}

/* Navbar (Modern Light) */
.navbar-modern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

.navbar-modern.scrolled {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

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

.nav-logo {
  height: 40px;
}

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

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

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

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
  text-align: left;
}

/* Floating Icons Background */
.floating-icon {
  position: absolute;
  color: var(--secondary);
  opacity: 0.05;
  font-size: 2rem;
  z-index: 0;
  animation: float 10s infinite ease-in-out alternate;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-30px) rotate(15deg); }
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(118, 203, 244, 0.15) 0%, rgba(255,255,255,0) 70%);
  top: -100px;
  right: -100px;
  border-radius: 50%;
  z-index: -1;
  filter: blur(60px);
}

.hero::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 12, 102, 0.05) 0%, rgba(255,255,255,0) 70%);
  bottom: 0;
  left: -100px;
  border-radius: 50%;
  z-index: -1;
  filter: blur(60px);
}

.hero-content {
  width: 100%;
  max-width: 1300px;
  z-index: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-content h1 {
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  width: 100%;
}

/* Typewriter Cursor */
.typewriter-cursor {
  display: inline-block;
  width: 4px;
  height: 1em;
  background-color: var(--primary);
  margin-left: 5px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* Services / Features */
.service-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: rgba(118, 203, 244, 0.15); /* Light Sky Blue tinted background */
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--secondary); /* Navy Icon */
}

/* Carousel Section */
.carousel-header {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .carousel-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.carousel-title {
  max-width: 400px;
}

.carousel-title h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.1;
  margin: 0;
}

.carousel-desc {
  max-width: 500px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 2rem;
  margin-left: -2rem; /* Bleed edge */
  padding-left: 2rem;
  margin-right: -2rem;
  padding-right: 2rem;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-card {
  scroll-snap-align: center;
  flex: 0 0 85%;
  max-width: 800px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.04);
}

.carousel-image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  background: #eaeaea;
}

.carousel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 3rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
}

.carousel-content h3 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.carousel-controls {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

.carousel-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-main);
}

.carousel-btn:hover {
  background: var(--surface);
  border-color: var(--text-muted);
}

/* Trust Section */
.trust-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.metric h4 {
  font-size: 3rem;
  margin-bottom: 0.2rem;
  color: var(--secondary);
}

.metric p {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Motion Classes for IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Footer */
.footer-modern {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 5rem 0 2rem;
}

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

@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 576px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-col h5 {
  color: var(--text-main);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

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

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

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

.footer-links a:hover {
  color: var(--accent); /* Pop of orange on hover */
}

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