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

:root {
  /* Diambil dari warna html.dark sebelumnya */
  --background: 216 28% 7%;
  --foreground: 210 17% 95%;
  --card: 215 21% 11%;
  --card-foreground: 210 17% 95%;
  --card-border: 212 12% 21%;
  --primary: 0 0% 100%;
  --primary-foreground: 216 28% 7%;
  --secondary: 212 12% 21%;
  --secondary-foreground: 210 17% 95%;
  --muted: 215 21% 11%;
  --muted-foreground: 215 14% 65%;
  --accent: 212 12% 21%;
  --border: 212 12% 21%;
  --input: 212 12% 21%;
  --radius: 6px;
  --font-sans: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory; /* Mengaktifkan fitur snap vertikal (sumbu Y) */
  scroll-padding-top: 80px; /* Ngasih jarak aman biar pas nge-snap, konten ga ketutupan navbar lu yang fixed */
}

body {
  font-family: var(--font-sans);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.5;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: 24px;
  font-weight: 500;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-out;
  font-family: var(--font-sans);
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px hsl(var(--primary) / 0.2);
}

.btn-outline {
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background) / 0.5);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background-color: hsl(var(--muted));
  border-color: hsl(var(--foreground) / 0.2);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  transition: all 0.3s ease-out;
  padding: 20px 0;
}

.navbar.scrolled {
  background-color: hsl(var(--background) / 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid hsl(var(--border));
  padding: 12px 0;
  box-shadow: 0 1px 3px hsl(var(--foreground) / 0.05);
}

.navbar-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: 1;
}

.logo-box {
  width: 24px;
  height: 24px;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
}

.logo-text {
  display: none;
}

@media (min-width: 640px) {
  .logo-text {
    display: inline;
  }
}

.nav-desktop {
  display: none;
  gap: 32px;
  flex: 0 0 auto; /* <-- UBAH INI (asalnya flex: 1) biar ukurannya pas sebatas teks aja */
  justify-content: center; /* <-- TAMBAHIN INI buat mastiin teksnya di tengah */
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: color 0.2s;
}

.nav-link:hover {
  color: hsl(var(--foreground));
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1; /* <-- TAMBAHIN INI biar seimbang sama ukuran logo di kiri */
  justify-content: flex-end; /* <-- TAMBAHIN INI biar tombol Let's Talk mentok kanan */
}

.theme-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.theme-btn:hover {
  color: hsl(var(--foreground));
}

.cta-btn {
  display: none; /* Biarin tetep none (nanti dimunculin di media query bawahnya) */
  padding: 8px 12px; /* <-- Kecilin ini (asalnya 10px 20px) */
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: 24px;
  font-weight: 500;
  font-size: 13px; /* <-- Turunin dikit ukurannya (asalnya 14px) */
  transition: all 0.2s;
  gap: 6px; /* <-- Jarak antara icon dan teks dirapetin dikit (asalnya 8px) */
  align-items: center;
}

@media (min-width: 640px) {
  .cta-btn {
    display: inline-flex;
  }
}

.cta-btn:hover {
  background-color: hsl(var(--primary) / 0.9);
  transform: translateY(-2px);
}

.mobile-menu-btn {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  color: hsl(var(--foreground));
  padding: 8px;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
  padding: 16px 24px;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 6px hsl(var(--foreground) / 0.1);
}

.mobile-menu.active {
  display: flex;
}

.mobile-nav-link {
  font-size: 14px;
  font-weight: 500;
  padding: 12px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.mobile-nav-link:hover {
  background-color: hsl(var(--muted));
}

.mobile-cta {
  margin-top: 8px;
  width: 100%;
}

/* Hero Section */
/* Bikin semua section di dalam tag <main> nge-snap pas di-scroll */
main section {
  scroll-snap-align: start; /* Titik berhentinya pas di bagian atas tiap section */
  scroll-snap-stop: always; /* Memaksa berhenti di tiap section, biar user ga kebablasan skip section kalau scroll-nya kenceng */
}

/* (Opsional) Biar Footer juga ikutan nge-snap di bagian bawah */
.footer {
  scroll-snap-align: end;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: -1;
}


/* Konten Hero dinaikin z-index nya biar ga ketutupan grid */
.hero-content {
  position: relative;
  z-index: 10;
  pointer-events: none; /* Biar kursor tembus ke background */
}

.hero-content * {
  pointer-events: auto; /* Balikin pointer buat tombol-tombol di dalemnya */
}

.hero-content {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  z-index: 10;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background-color: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  font-size: 12px;
  font-weight: 500;
  font-family: monospace;
  color: hsl(var(--muted-foreground));
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

.text-muted {
  color: hsl(var(--muted-foreground));
}

.hero-subtitle {
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 40px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
}

/* Tools Section */
.tools {
  /* Biar sectionnya punya minimal tinggi sesuai yang lu mau */
  min-height: 100vh; /* <-- Bebas mau 50vh atau 100vh */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* <-- INI KUNCINYA. Biar konten tetep nempel di atas, dan sisa space numpuk di bawah */

  /* Kode bawaan lu tetep biarin aja */
  padding: 96px 24px;
  background-color: hsl(var(--card) / 0.3);
  border-top: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
}

.tools-header {
  width: 100%; /* <-- TAMBAHIN INI BIAR NGELEBAR */
  max-width: 1280px;
  margin: 0 auto 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Biarin media query bawahnya tetep gini (ga usah diubah) */
@media (min-width: 768px) {
  .tools-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between; /* Ini yang bikin panah kelempar ke kanan */
  }
}

.tools-header h2 {
  font-size: 1.875rem;
  margin-bottom: 16px;
}

.tools-header p {
  color: hsl(var(--muted-foreground));
  max-width: 640px;
}

.carousel-controls {
  display: flex;
  gap: 8px;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: hsl(var(--foreground));
}

.carousel-btn:hover {
  border-color: hsl(var(--foreground) / 0.2);
  background-color: hsl(var(--muted));
}

.carousel-container {
  max-width: 1280px; /* Batas Core Tools */
  margin: 0 auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  
  /* Efek Faded 10% di ujung kanan saja.
     Percentages (95%) dihitung agar fade mulai TEPAT setelah card ketiga berakhir.
     Area ini akan menampung potongan card keempat yang memudar. */
  -webkit-mask-image: linear-gradient(to right, black 95%, transparent 100%);
  mask-image: linear-gradient(to right, black 95%, transparent 100%);
  
  scrollbar-width: none;
}

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

.carousel-track {
  display: flex !important;
  gap: 24px !important; /* Jarak antar card */
  width: max-content !important;
  padding: 0 !important; 
}

.tool-card {
  flex: 0 0 auto !important;
  
  /* KALKULASI PEEKing:
     Kita bikin lebar card (386px) sedikit lebih kecil dari sebelumnya (410px).
     3 cards (386x3) + 2 gaps (24x2) = 1206px.
     Sisa space kosong di kanan (1280 - 1206 = 74px) akan menampilkan 'peeking' (potongan) card keempat.
     Potongan 74px inilah yang akan terkena efek faded/transparan di mask-image container. */
  width: 386px !important; 
  
  scroll-snap-align: start !important;
  
  /* Tetep bawa styling card yang udah bagus tadi */
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  padding: 32px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

/* Responsif: Tampil 2.2 card di layar sedeng (biar tetep ada peeking & fade) */
@media (max-width: 1024px) {
  .tool-card {
    width: calc((100vw - 72px) / 2.2) !important; 
  }
}

/* Tampil 1.2 card di HP (peeking & fade) */
@media (max-width: 640px) {
  .tool-card {
    width: 80vw !important; 
  }
}

.tool-card:hover {
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 4px 12px hsl(var(--primary) / 0.05);
  transform: translateY(-2px);
}

.tool-icon {
  width: 48px;
  height: 48px;
  background-color: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-bottom: 24px;
}

.tool-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.tool-card p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  flex-grow: 1;
  margin-bottom: 24px;
  line-height: 1.6;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tool-tags span {
  font-size: 0.75rem;
  font-family: monospace;
  padding: 4px 8px;
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  border-radius: 4px;
}

/* Services Section */
.services {
  padding: 128px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.services-header {
  text-align: center;
  margin-bottom: 64px;
}

.services-header h2 {
  font-size: 1.875rem;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .services-header h2 {
    font-size: 2.25rem;
  }
}

.services-header p {
  color: hsl(var(--muted-foreground));
  max-width: 672px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

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

.service-card {
  padding: 32px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease-out;
  pointer-events: none;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card svg {
  color: hsl(var(--primary));
  margin-bottom: 24px;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.service-card p {
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

/* Contact Section Split Layout */
.contact-split {
  padding: 0 24px;
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
}

@media (min-width: 1024px) {
  .contact-split {
    grid-template-columns: 1fr 450px;
    align-items: center;
  }
}

.contact-label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 16px;
  text-transform: uppercase;
}

.contact-left h2 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 48px;
}

.contact-info-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 640px) {
  .contact-info-grid {
    flex-direction: row;
    gap: 64px;
  }
}

.info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.info-icon {
  color: hsl(var(--primary));
  padding-top: 4px;
}

.info-item h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.info-item p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Floating Form Card */
.floating-form {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  padding: 40px 32px;
  border-radius: 16px;
  box-shadow: 0 20px 40px hsl(0 0% 0% / 0.1);
}

.floating-form h3 {
  font-size: 1.5rem;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.form-group input,
.form-group textarea {
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid hsl(var(--border));
  background-color: transparent;
  font-family: var(--font-sans);
  color: hsl(var(--foreground));
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-color: hsl(var(--primary));
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.btn-block {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  margin-top: 16px;
}

.form-success {
  margin-top: 24px;
  padding: 12px;
  background-color: hsl(120 39% 60% / 0.1);
  color: hsl(120 39% 50%);
  border-radius: 6px;
  text-align: center;
  font-size: 0.875rem;
}

/* Footer */
.footer {
  border-top: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  padding: 16px 24px; /* <--- UBAH INI: awalnya 48px, kecilin jadi 16px biar tipis */
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-text {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: hsl(var(--muted-foreground));
  transition: color 0.2s;
}

.footer-links a:hover {
  color: hsl(var(--foreground));
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
