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

:root {
  /* Colors */
  --bg-deep: #06020f;
  --bg-dark: #0d081b;
  --bg-card: rgba(22, 16, 41, 0.6);
  --bg-card-hover: rgba(33, 25, 61, 0.8);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  
  --primary: #a855f7;       /* Violet */
  --primary-glow: rgba(168, 85, 247, 0.4);
  --primary-dark: #7e22ce;
  
  --secondary: #06b6d4;     /* Cyan */
  --secondary-glow: rgba(6, 182, 212, 0.3);
  
  --accent: #ec4899;        /* Pink */
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Layout & Spacing */
  --max-width: 1200px;
  --header-height-large: 90px;
  --header-height-small: 65px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESETS & GLOBAL STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Subtle background glows */
body::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -20%;
  width: 70%;
  height: 60%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  z-index: -2;
  filter: blur(80px);
  pointer-events: none;
}

body::after {
  content: '';
  position: absolute;
  top: 40%;
  right: -20%;
  width: 60%;
  height: 50%;
  background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
  z-index: -2;
  filter: blur(80px);
  pointer-events: none;
}

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

input, button, textarea {
  font-family: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.2);
  border-radius: 5px;
  border: 2px solid var(--bg-deep);
  transition: var(--transition-fast);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.4);
}

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

.section {
  padding: 8rem 0 6rem;
  position: relative;
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* Glassmorphism Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 2.5rem;
  transition: var(--transition-normal);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(168, 85, 247, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-normal);
  gap: 0.5rem;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  transition: 0.75s;
  opacity: 0;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
}

.btn-primary:hover::after {
  left: 125%;
  opacity: 1;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: #c084fc;
  margin-bottom: 1.5rem;
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height-large);
  z-index: 1000;
  background: rgba(6, 2, 15, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  transition: height var(--transition-normal), background-color var(--transition-normal);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 42px;
  width: auto;
}

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

nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

nav a:hover, nav a.active {
  color: var(--text-primary);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  transition: var(--transition-normal);
}

nav a:hover::after, nav a.active::after {
  width: 100%;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Native CSS Shrinking Header */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    header {
      animation: shrinkHeader auto linear both;
      animation-timeline: scroll(block root);
      animation-range: 0px 100px;
    }
    
    @keyframes shrinkHeader {
      to {
        height: var(--header-height-small);
        background: rgba(6, 2, 15, 0.85);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
      }
    }
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height-large);
  overflow: hidden;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  z-index: 10;
}

.hero-title {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 40%, #c084fc 80%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-mockup-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  z-index: 2;
}

.hero-mockup {
  width: 100%;
  height: auto;
  border-radius: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: block;
}

/* Ambient glow orb behind mockup */
.hero-glow-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 110%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 65%);
  z-index: 1;
  pointer-events: none;
  filter: blur(40px);
}

/* ==========================================================================
   APPLICATIONS / PORTFOLIO SECTION
   ========================================================================== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.app-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
}

.app-card:nth-child(2) .app-icon {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
}

.app-card:nth-child(3) .app-icon {
  background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
}

.app-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.app-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.9rem;
}

.app-link:hover {
  color: var(--primary);
}

.app-link svg {
  transition: transform var(--transition-fast);
}

.app-link:hover svg {
  transform: translateX(4px);
}

/* ==========================================================================
   SERVICES / NOTRE EXPERTISE
   ========================================================================== */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4.5rem;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 60%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.service-item {
  display: flex;
  gap: 1.5rem;
}

.service-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.7;
}

.service-content h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.service-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ==========================================================================
   TESTIMONIALS SECTION
   ========================================================================== */
.testimonials-slider {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
}

.quote-icon {
  font-size: 3rem;
  color: var(--primary);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 2rem;
  flex-grow: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--secondary);
}

.author-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.author-title {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.detail-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
}

.detail-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.detail-text span {
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-row .form-group {
  margin-bottom: 0;
}

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

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  transition: var(--transition-normal);
}

.form-control:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Form Submit State Styling */
.form-status {
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  display: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-status.success {
  display: block;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: #04010a;
  border-top: 1px solid var(--border-glass);
  padding: 4rem 0 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

.footer-brand p {
  margin-top: 1rem;
  max-width: 320px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.footer-links h4 {
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.social-icon:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   SCROLL-DRIVEN ENTRY/EXIT ANIMATIONS (NATIVE SUPPORT)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    
    /* Keyframes for scroll reveals */
    @keyframes revealUp {
      from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }
    
    @keyframes fadeOutDown {
      from {
        opacity: 1;
        transform: translateY(0);
      }
      to {
        opacity: 0;
        transform: translateY(-40px);
      }
    }
    
    /* Apply reveals to grid elements and section contents */
    .reveal-scroll {
      animation: 
        revealUp auto linear backwards,
        fadeOutDown auto linear forwards;
      animation-timeline: view();
      animation-range: entry, exit;
    }
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3.25rem;
  }
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 6rem 0 4rem;
  }
  
  /* Navigation mobile menu */
  .nav-toggle {
    display: block;
    z-index: 1001;
  }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: rgba(13, 8, 27, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-glass);
    padding: 8rem 2.5rem 2.5rem;
    transition: right var(--transition-normal);
    z-index: 1000;
  }
  
  nav.open {
    right: 0;
  }
  
  nav ul {
    flex-direction: column;
    gap: 2rem;
  }
  
  nav a {
    font-size: 1.15rem;
  }
  
  /* Hero */
  .hero {
    min-height: auto;
    padding: 8rem 0 4rem;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  
  /* Grids */
  .apps-grid {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .testimonials-slider {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-bottom {
    flex-direction: column-reverse;
    gap: 1.5rem;
    text-align: center;
  }
}
