:root {
  /* Colors */
  --primary-600: #2f6fed;
  --primary-700: #2157c9;
  --primary-100: #e8f0ff;
  --accent-100: #eaf7ff; /* soft pastel blue */
  --neutral-900: #0f172a; /* near-black */
  --neutral-700: #334155; /* slate */
  --neutral-600: #475569;
  --neutral-500: #64748b;
  --neutral-300: #cbd5e1;
  --neutral-200: #e2e8f0;
  --neutral-100: #f1f5f9;
  --white: #ffffff;

  /* Shadows & Radii */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);

  /* Gradients */
  --grad-surface: linear-gradient(180deg, var(--neutral-100), #fff);
  --grad-primary-soft: radial-gradient(
      1000px 400px at 10% -10%,
      var(--accent-100),
      transparent
    ),
    linear-gradient(180deg, #fff, var(--neutral-100));
}

/* Base Typography */
html {
  scroll-behavior: smooth;
}
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--neutral-900);
  background-color: var(--white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--neutral-900);
  letter-spacing: -0.01em;
}
.lead {
  color: var(--neutral-600);
}
.text-secondary {
  color: var(--neutral-600) !important;
}

/* Links */
a {
  color: var(--primary-600);
  text-decoration: none;
}
a:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

/* Global sections */
.section-padding {
  padding: 3rem 0;
}
.section-title {
  font-weight: 700;
  margin-bottom: 1rem;
}
.bg-surface {
  background: var(--grad-surface);
}

/* Diagonal sections using clip-path */
.section-diagonal-top {
  position: relative;
  isolation: isolate;
}
.section-diagonal-top::before {
  content: "";
  position: absolute;
  inset: -40px 0 auto 0;
  height: 80px;
  z-index: -1;
  background: inherit;
  filter: brightness(0.99);
  clip-path: polygon(0 80%, 100% 0%, 100% 100%, 0% 100%);
}
.section-diagonal-bottom {
  position: relative;
  isolation: isolate;
}
.section-diagonal-bottom::after {
  content: "";
  position: absolute;
  inset: auto 0 -40px 0;
  height: 80px;
  z-index: -1;
  background: inherit;
  filter: brightness(0.99);
  clip-path: polygon(0 0, 100% 0, 100% 20%, 0% 100%);
}

/* Hero */
.hero {
  background: var(--grad-primary-soft);
}
.hero .hero-logo {
  max-width: 280px;
  filter: drop-shadow(0 8px 16px rgba(47, 111, 237, 0.15));
}
.hero-illustration {
  max-width: 100%;
  height: auto;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
}

/* Glassmorphism card style */
.glass {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: saturate(160%) blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
}

/* Cards */
.card {
  border-radius: var(--radius-md) !important;
}
.card-featured {
  border: 1px solid var(--neutral-200);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card-featured:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Buttons */
.btn-primary {
  --bs-btn-bg: var(--primary-600);
  --bs-btn-border-color: var(--primary-600);
  --bs-btn-hover-bg: var(--primary-700);
  --bs-btn-hover-border-color: var(--primary-700);
  --bs-btn-focus-shadow-rgb: 47, 111, 237;
}
.btn-outline-primary {
  border-color: var(--primary-600);
  color: var(--primary-600);
}
.btn-outline-primary:hover {
  background: var(--primary-600);
  color: #fff;
}
.btn-icon {
  padding: 0.4rem 0.6rem;
  color: var(--neutral-600);
}
.btn-icon:hover {
  color: var(--primary-600);
}

/* Inputs */
.form-control,
.input-group-text {
  border-radius: var(--radius-sm);
}
.input-group-text {
  background-color: var(--neutral-100);
  border-color: var(--neutral-200);
}
.form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(47, 111, 237, 0.15);
  border-color: var(--primary-600);
}

/* Features grid using CSS Grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 576px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}
.feature-card {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  display: grid;
  place-items: center;
  background: var(--primary-100);
  color: var(--primary-600);
}
.feature-icon i {
  font-size: 1.5rem;
}
.feature-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* Steps grid (How it works) */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1200px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.step-card {
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  height: 100%;
}
.step-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.step-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-600);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(47, 111, 237, 0.25);
}
.step-title {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0.25rem 0 0.25rem;
  font-weight: 700;
}
.step-desc {
  color: var(--neutral-600);
  margin: 0;
}

/* Pricing cards using Flexbox */
.pricing-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pricing-card {
  position: relative;
  flex: 1 1 0;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.pricing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.pricing-card.is-featured {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.1), var(--shadow-md);
}
.pricing-card .badge-featured {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--primary-600);
  color: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  box-shadow: var(--shadow-sm);
}
.pricing-header {
  margin-bottom: 0.5rem;
}
.price {
  font-size: 1.5rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .pricing-grid {
    flex-direction: row;
  }
}

/* Testimonials grid */
.testimonials-section {
  background: linear-gradient(180deg, #fff, var(--accent-100));
}
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 576px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.testimonial-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.avatar {
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

/* FAQ accordion (CSS-only with checkbox hack) */
.faq-accordion {
  display: grid;
  gap: 0.75rem;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  font-weight: 600;
}
.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.faq-content > * {
  overflow: hidden;
  padding: 0 1rem;
}
.faq-item .faq-toggle:checked ~ .faq-content {
  grid-template-rows: 1fr;
}
.faq-item .faq-toggle:checked + .faq-question i {
  transform: rotate(180deg);
}
.faq-question i {
  transition: transform 0.2s ease;
}

/* Navbar tweaks */
.navbar .nav-link {
  color: var(--neutral-700);
}
.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--primary-600);
}
.navbar-brand {
  color: var(--neutral-900);
}

/* Footer */
footer .nav-link {
  color: var(--neutral-600);
}
footer .nav-link:hover {
  color: var(--primary-600);
}

/* Contact section */
.contact-section {
  background: linear-gradient(180deg, var(--neutral-100), #fff);
}
.contact-info-list {
  display: grid;
  gap: 0.75rem;
}
.info-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  box-shadow: var(--shadow-sm);
}
.info-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-100);
  color: var(--primary-600);
  font-size: 1.25rem;
}

/* Utilities */
.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}
.shadow-md {
  box-shadow: var(--shadow-md) !important;
}
.rounded-3 {
  border-radius: var(--radius-lg) !important;
}

/* Responsive adjustments */
@media (max-width: 575.98px) {
  .section-title {
    font-size: 1.5rem;
  }
  .hero .display-5 {
    font-size: 2rem;
  }
  /* Hero form: full width fields and button below */
  .hero form .row > div {
    width: 100%;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .section-padding {
    padding: 3.5rem 0;
  }
}

@media (min-width: 992px) {
  .section-padding {
    padding: 4rem 0;
  }
}

/* Accessibility helpers */
:focus-visible {
  outline: 3px solid rgba(47, 111, 237, 0.45);
  outline-offset: 2px;
}

/* Minor tweaks */
.card .form-label {
  font-weight: 600;
}
blockquote.blockquote {
  border-color: var(--primary-600) !important;
}

/* Animate on Scroll (AOS) */
.aos {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}
.aos.aos-show {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .aos {
    transition: none !important;
    transform: none !important;
  }
}

/* Dark mode */
body.dark {
  background-color: #0f172a; /* slate-900 */
  color: #f1f5f9; /* slate-100 */
}
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6 {
  color: #f1f5f9;
}
body.dark .text-secondary {
  color: #cbd5e1 !important; /* slate-300 */
}

/* Surfaces & sections */
body.dark .bg-surface {
  background: linear-gradient(180deg, #0f172a, #0b1220);
}
body.dark .hero {
  background: radial-gradient(
      1000px 400px at 10% -10%,
      rgba(47, 111, 237, 0.15),
      transparent
    ),
    linear-gradient(180deg, #0b1220, #0f172a);
}
body.dark .section-diagonal-top::before,
body.dark .section-diagonal-bottom::after {
  filter: none;
}

/* Navbar */
body.dark .navbar {
  background-color: #0b1220 !important;
}
body.dark .navbar .nav-link {
  color: #cbd5e1;
}
body.dark .navbar .nav-link:hover,
body.dark .navbar .nav-link:focus {
  color: var(--primary-600);
}
body.dark .navbar-brand {
  color: #f1f5f9;
}

/* Cards & panels */
body.dark .card,
body.dark .feature-card,
body.dark .step-card,
body.dark .pricing-card,
body.dark .testimonial-card,
body.dark .faq-item,
body.dark .info-card {
  background: #0b1220; /* deep surface */
  border-color: #1f2a44; /* subtle border */
  color: #e2e8f0;
}
body.dark .feature-icon,
body.dark .info-icon {
  background: rgba(47, 111, 237, 0.15);
  color: var(--primary-600);
}

/* Inputs */
body.dark .input-group-text {
  background-color: #0f172a;
  border-color: #1f2a44;
  color: #cbd5e1;
}
body.dark .form-control {
  background-color: #0b1220;
  border-color: #1f2a44;
  color: #e2e8f0;
}

body.dark .form-control::placeholder {
  color: #8fa0b9;
}

/* Footer */
body.dark footer {
  background-color: #0b1220;
}
body.dark footer .nav-link {
  color: #cbd5e1;
}
body.dark footer .nav-link:hover {
  color: var(--primary-600);
}

/* Contact & testimonials backgrounds */
body.dark .contact-section {
  background: linear-gradient(180deg, #0b1220, #0f172a);
}
body.dark .testimonials-section {
  background: linear-gradient(180deg, #0f172a, #0b1220);
}

/* Buttons & icons */
body.dark .btn-icon {
  color: #cbd5e1;
}
body.dark .btn-icon:hover {
  color: var(--primary-600);
}

body.dark .glass {
  background: #0b1220 !important;
  border: 1px solid #1f2a44 !important;
  backdrop-filter: saturate(160%) blur(6px);
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease; /* transisi halus */
}

/* Spinner */
.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#content {
  display: none;
  padding: 20px;
  text-align: center;
}

body.dark #preloader {
  background: var(--neutral-900, #0f172a);
}

body.dark .loader {
  border: 8px solid var(--neutral-700, #334155);
  border-top: 8px solid var(--primary-600, #2f6fed);
}
