:root {
  --md-red: #E31E24;
  --md-green: #4CAF50;
  --md-yellow: #FFC107;
  --md-bg-dominant: #F9FAFB;
  --md-bg-secondary: #FFFFFF;
  --md-accent: #E31E24;
  --md-text-dark: #1F2937;
  --md-text-medium: #6B7280;
  --md-text-light: #9CA3AF;
  --md-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --md-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --md-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --md-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --md-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --md-transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --md-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* FIX OVERFLOW SUPAYA STICKY JALAN */
html, body {
  overflow-x: clip;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--md-bg-dominant);
}

.services-section {
  background: var(--md-bg-dominant);
  position: relative;
}

.services-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.015) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.services-section > * {
  position: relative;
  z-index: 1;
}

.service-card {
  background: var(--md-bg-secondary);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  transition: all var(--md-transition-base);
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--md-shadow-xl);
  border-color: rgba(227, 30, 36, 0.1);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  transition: all var(--md-transition-base);
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

.service-card ul li {
  transition: transform var(--md-transition-fast);
}

.service-card ul li:hover {
  transform: translateX(4px);
}

.pricing-section {
  padding-top: 8px;
}

.pricing-section .line-through {
  position: relative;
  display: inline-block;
}

.pricing-section .line-through::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 2px;
  background: currentColor;
  transform: translateY(-50%);
}

.cta-section {
  background: linear-gradient(135deg, rgba(227, 30, 36, 0.05) 0%, rgba(255, 193, 7, 0.05) 50%, rgba(76, 175, 80, 0.05) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.stat {
  padding: 12px;
}

.stat-value {
  font-weight: 700;
  line-height: 1.2;
}

.stat-desc {
  opacity: 0.7;
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge {
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid currentColor;
  background: transparent;
}

.badge.badge-success {
  color: var(--md-green);
}

.badge.badge-warning {
  color: var(--md-yellow);
}

.badge.badge-info {
  color: #3B82F6;
}

.btn {
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all var(--md-transition-base);
  border-radius: 8px;
}

.btn-error {
  background: var(--md-accent);
  border: 2px solid var(--md-accent);
  color: white;
}

.btn-error:hover {
  background: #C71A1F;
  border-color: #C71A1F;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(227, 30, 36, 0.3);
}

.btn-outline {
  border: 2px solid var(--md-text-medium);
  color: var(--md-text-medium);
  background: transparent;
}

.btn-outline:hover {
  background: var(--md-text-dark);
  border-color: var(--md-text-dark);
  color: white;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: var(--animation-delay, 0ms);
}

.service-card:nth-child(1) { --animation-delay: 100ms; }
.service-card:nth-child(2) { --animation-delay: 200ms; }
.service-card:nth-child(3) { --animation-delay: 300ms; }
.service-card:nth-child(4) { --animation-delay: 400ms; }
.service-card:nth-child(5) { --animation-delay: 500ms; }
.service-card:nth-child(6) { --animation-delay: 600ms; }
.service-card:nth-child(7) { --animation-delay: 700ms; }
.service-card:nth-child(8) { --animation-delay: 800ms; }

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1) 50%, transparent);
  border: none;
}

h2 {
  letter-spacing: -0.02em;
}

h3 {
  letter-spacing: -0.01em;
}

.card-title {
  line-height: 1.3;
}

.material-icons-outlined {
  user-select: none;
  -webkit-user-select: none;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(227, 30, 36, 0.5);
  outline-offset: 2px;
}

@media (prefers-contrast: high) {
  .service-card {
    border-width: 2px;
    border-color: var(--md-text-dark);
  }
  .btn-error {
    border-width: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .service-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .btn, .badge {
    border: 2px solid black;
  }
}

img[alt*="logo"] {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  transform: translateZ(0);
}

a:hover img[alt*="logo"] {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

#achievements .achievement-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#achievements .achievement-filter-btn {
  transition: all 0.2s ease;
}

#achievements .achievement-filter-btn:hover {
  transform: translateY(-2px);
}

#achievementLightbox img {
  max-height: 85vh;
  object-fit: contain;
}

@media (max-width: 768px) {
  #achievementGallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

@media (min-width: 1024px) {
  #achievementGallery {
    gap: 1.5rem;
  }
}

#achievements .card figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.3) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#achievements .card:hover figure::after {
  opacity: 1;
}

.achievement-item {
  animation: fadeInScale 0.5s ease-out backwards;
}

.achievement-item:nth-child(1) { animation-delay: 0.05s; }
.achievement-item:nth-child(2) { animation-delay: 0.1s; }
.achievement-item:nth-child(3) { animation-delay: 0.15s; }
.achievement-item:nth-child(4) { animation-delay: 0.2s; }
.achievement-item:nth-child(5) { animation-delay: 0.25s; }
.achievement-item:nth-child(6) { animation-delay: 0.3s; }
.achievement-item:nth-child(7) { animation-delay: 0.35s; }
.achievement-item:nth-child(8) { animation-delay: 0.4s; }

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 640px) {
  .services-section .card-body {
    padding-inline: 1.25rem;
    padding-block: 1.25rem;
  }
  .cta-section {
    padding-inline: 1.25rem;
    padding-block: 2rem;
  }
  .cta-section h3 {
    font-size: 1.5rem;
  }
  .stat {
    padding: 8px;
  }
  .btn-circle.fixed {
    width: 56px !important;
    height: 56px !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
  }
  .service-card:hover {
    transform: none;
  }
  .service-card:active {
    transform: scale(0.98);
    transition: transform 0.1s;
  }
}

@media (max-width: 896px) and (orientation: landscape) {
  .services-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}
/* ============================================
   NAVBAR CONTAINED STYLE
   ============================================ */
header {
  background: transparent;
}

.navbar.rounded-full {
  transition: all 0.3s ease;
}

.navbar.rounded-full:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Dark mode navbar styling */
[data-theme="dark"] .navbar {
  background: rgba(31, 41, 55, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .navbar a:not(.btn) {
  color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .navbar a:hover:not(.btn) {
  color: #E31E24;
}

/* Menu items rounded on hover */
.menu li > a {
  transition: all 0.2s ease;
}

.menu li > a:hover {
  transform: translateY(-1px);
}

/* Smooth theme transition */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}
/* Dark Mode Toggle Enhancements */
.swap {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.swap:hover {
  transform: scale(1.05);
}

.swap:active {
  transform: scale(0.95);
}

/* Icon rotation on toggle */
.swap svg {
  transition: transform 0.4s ease;
}

.swap input:checked ~ .swap-on {
  animation: rotate-in 0.4s ease;
}

.swap input:not(:checked) ~ .swap-off {
  animation: rotate-in 0.4s ease;
}

@keyframes rotate-in {
  from {
    transform: rotate(-180deg) scale(0);
  }
  to {
    transform: rotate(0deg) scale(1);
  }
}

/* Dark mode specific styling */
[data-theme="dark"] .swap {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(100, 116, 139, 0.3);
}

[data-theme="dark"] .swap:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

[data-theme="light"] .swap:hover {
  border-color: rgba(234, 179, 8, 0.5);
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.2);
}

/* ===== INVOICE CARDS ===== */
.inv-card {
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    background: white;
    border: 1px solid rgba(0,0,0,0.07);
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
}
[data-theme="dark"] .inv-card { background: #1d232a; border-color: rgba(255,255,255,0.07); }
.inv-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 16px 40px rgba(0,0,0,0.15); }

.inv-thumb {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f0f0f0;
    display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .inv-thumb { background: #15191e; }

.inv-thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.4s ease;
}
.inv-card:hover .inv-thumb img { transform: scale(1.05); }

.inv-thumb-icon {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    color: rgba(0,0,0,0.25);
    transition: transform 0.3s ease;
}
[data-theme="dark"] .inv-thumb-icon { color: rgba(255,255,255,0.2); }
.inv-card:hover .inv-thumb-icon { transform: scale(1.1); }
.inv-thumb-icon .material-icons-outlined { font-size: 3rem; }
.inv-thumb-icon span.label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }

.inv-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.inv-card:hover .inv-overlay { opacity: 1; }

.inv-footer {
    padding: 0.65rem 0.85rem;
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.inv-filename {
    font-size: 0.72rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    flex: 1;
}
.inv-type-badge {
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; padding: 0.15rem 0.5rem; border-radius: 2rem;
    flex-shrink: 0;
}
.inv-type-image { background: #fde8e8; color: #c0392b; }
.inv-type-pdf   { background: #fde8e8; color: #c0392b; }
.inv-type-video { background: #e8f0fe; color: #1a73e8; }
[data-theme="dark"] .inv-type-image { background: #3a1c1c; color: #f48;  }
[data-theme="dark"] .inv-type-pdf   { background: #3a1c1c; color: #f87171; }
[data-theme="dark"] .inv-type-video { background: #1c2a3a; color: #60a5fa; }

/* ===== MODAL ===== */
#inv-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.8);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
#inv-overlay.open { opacity: 1; pointer-events: all; }

#inv-box {
    background: white;
    border-radius: 1.25rem;
    overflow: hidden;
    max-width: 860px; width: 100%;
    max-height: 90vh;
    display: flex; flex-direction: column;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
    position: relative;
}
[data-theme="dark"] #inv-box { background: #1d232a; }
#inv-overlay.open #inv-box { transform: translateY(0) scale(1); }

#inv-close-btn {
    position: absolute; top: 0.75rem; right: 0.75rem; z-index: 10;
    background: rgba(0,0,0,0.55); border: none; border-radius: 50%;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: white;
    transition: background 0.2s;
}
#inv-close-btn:hover { background: rgba(0,0,0,0.8); }

#inv-viewer {
    flex: 1; overflow: auto;
    background: #f5f5f5;
    display: flex; align-items: center; justify-content: center;
    min-height: 300px;
}
[data-theme="dark"] #inv-viewer { background: #15191e; }

#inv-viewer img {
    max-width: 100%; max-height: 75vh;
    object-fit: contain; display: block;
}
#inv-viewer iframe {
    width: 100%; height: 75vh;
    border: none;
}
#inv-viewer video {
    max-width: 100%; max-height: 75vh;
    display: block; outline: none;
}

#inv-meta {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex; align-items: center; gap: 0.75rem;
    flex-shrink: 0;
}
[data-theme="dark"] #inv-meta { border-top-color: rgba(255,255,255,0.08); }

#inv-badge {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: oklch(var(--bc) / 0.5);
}
.section-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: oklch(var(--bc) / 0.4);
    margin-bottom: 0.5rem;
    display: block;
}

#hero-bg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.45; /* naik dari 0.18 */
}
[data-theme="dark"] #hero-bg-canvas {
    opacity: 0.65; /* naik dari 0.28 */
}
.hero > .max-w-7xl,
.hero > div[class*="max-w"] {
    position: relative;
    z-index: 1;
}