/* 78 Solutindo – style.css (lean additions on top of Tailwind)
   ------------------------------------------------------------ */

/* Anti horizontal scroll meluber di device kecil */
html, body { overflow-x: clip; }  /* lebih aman daripada hidden di browser modern */
img, svg, video { max-width: 100%; height: auto; display: block; }

/* CSS Variables (tiny design tokens) */
:root {
  --teal-700: #0f766e;
  --teal-400: #2dd4bf;
  --radius: 0.75rem; /* ~ rounded-xl */
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Global focus style (accessible + consistent across browsers) */
:focus-visible {
  outline: 3px solid var(--teal-400);
  outline-offset: 2px;
}

/* Layout helpers */
/* Keep hero readable on very small screens */
@media (max-width: 360px) {
  header h1 { font-size: 1.85rem; line-height: 1.2; }
  header p { font-size: 1rem; }
}

/* Prevent layout shift on images by reserving space */
/* If you can, also add width/height in HTML (already suggested) */
#portfolio img { aspect-ratio: 3 / 2; height: auto !important; }
#brands img { max-height: 48px; width: auto; }

/* Nice soft shadow utility for cards (opt-in) */
.shadow-soft { box-shadow: 0 10px 24px rgba(2, 44, 34, 0.08), 0 4px 12px rgba(2, 44, 34, 0.06); }

/* FAQ toggle: add subtle caret animation on the "+" icon */
.faq-toggle span { transition: transform .25s ease; }
.faq-toggle[aria-expanded="true"] span { transform: rotate(45deg); }

/* Map iframe container – keep rounded corners visible */
#kontak iframe { display: block; border-radius: var(--radius); }

/* Dark mode tweaks beyond Tailwind */
.dark .shadow-soft { box-shadow: 0 10px 24px rgba(6, 95, 70, 0.18), 0 4px 12px rgba(6, 95, 70, 0.12); }
.dark a.underline { text-underline-offset: 2px; }

/* Print styles (hide heavy sections, show contact clearly) */
@media print {
  header, #brands, #portfolio, .fixed { display: none !important; }
  body { color: #000; background: #fff; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 90%; }
}

/* Utility: smoother image rendering on scaled logos */
img { image-rendering: -webkit-optimize-contrast; }

/* Optional helper class if you want a constrained container without Tailwind */
.container-narrow { max-width: 64rem; margin-inline: auto; padding-inline: 1rem; }

/* SATU scroller saja: <html> */
html { overflow-y: auto; height: auto; }
body {
  overflow-y: visible !important;   /* jangan jadi scroller */
  height: auto; 
  min-height: 100%;
}

/* opsional, biar layout nggak loncat saat scrollbar muncul */
html { scrollbar-gutter: stable; }

/* tetap cegah gulir horizontal */
html, body { overflow-x: clip; }   /* atau pakai salah satu: clip / hidden */

/* ============ 78 SOLUTINDO - GLOBAL BASE CSS ============ */
/* Tailwind sudah dipakai via CDN. File ini hanya untuk polish kecil agar tetap ringan. */

:root{
  --brand-teal-700: #0f766e;
  --brand-teal-400: #2dd4bf;
  --text-muted: #6b7280;   /* gray-500/600 */
}

/* Typography smoothing & base */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { text-rendering: optimizeLegibility; }

/* Headings spacing fix for anchor jump (avoid hidden under sticky navbar) */
:target { scroll-margin-top: 5rem; }

/* Links focus-visible ring */
a:focus-visible, button:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.6);
  border-radius: 0.5rem;
}

/* Images quality hint */
img { image-rendering: -webkit-optimize-contrast; }

/* SR-only utility enhancement (keeps from Tailwind but harden for browsers) */
.sr-only:not(:focus):not(:active) {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}

/* Card hover polish (soft shadow + slight lift) */
.card-hover {
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-hover:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(0,0,0,.10); }

/* CTA button micro-interaction */
.btn-breath {
  transition: transform .12s ease, box-shadow .2s ease;
}
.btn-breath:hover { transform: translateY(-2px); box-shadow: 0 10px 18px rgba(16,185,129,.22); }

/* FAQ caret "+" rotate when expanded (using aria-expanded) */
.faq-toggle[aria-expanded="true"] span[aria-hidden="true"] {
  display: inline-block; transform: rotate(45deg); transition: transform .2s ease;
}
.faq-toggle span[aria-hidden="true"] { transition: transform .2s ease; }

/* AOS fallback spacing if AOS not loaded (keep layout pleasant) */
[data-aos] { will-change: transform, opacity; }

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Dark mode subtle tweaks beyond Tailwind defaults */
.dark .text-muted { color: #9ca3af; }
.dark .shadow { box-shadow: 0 10px 18px rgba(0,0,0,.35); }

/* Portfolio hover overlay smoothness */
.group:hover .group-hover\\:opacity-100 { transition: opacity .25s ease; }

/* Navbar sticky shadow when scrolled — optional, lightweight JS-less trick */
@supports (backdrop-filter: blur(6px)) {
  nav[role="navigation"] {
    backdrop-filter: saturate(180%) blur(6px);
    background-color: rgba(255,255,255,.75);
  }
  .dark nav[role="navigation"] {
    background-color: rgba(31,41,55,.65);
  }
}

/* Map iframe responsive rounding bleed fix */
#kontak iframe { display: block; border-radius: 0.5rem; }

/* Footer small link underline offset */
footer a { text-underline-offset: 2px; }

/* Print styles (rapikan cetak penawaran) */
@media print {
  /* Hide non-essential */
  nav, header, #brands, #portfolio, #testimoni, #faq, .fixed, footer { display: none !important; }
  body { color: #000; background: #fff; }
  #package, #about, #kontak { page-break-inside: avoid; }
  a[href]:after { content: " (" attr(href) ")"; font-size: 11px; }
}

/* Utility helpers (optional use in HTML via class) */
.shadow-soft { box-shadow: 0 8px 20px rgba(0,0,0,.10); }
.border-muted { border-color: rgba(107,114,128,.35); }
.text-muted { color: var(--text-muted); }

/* Floating WA button pulse (very subtle) */
@keyframes pulseSoft {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,.35); }
  70% { box-shadow: 0 0 0 18px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
a[aria-label="Buka WhatsApp 78 Solutindo"] { animation: pulseSoft 2.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  a[aria-label="Buka WhatsApp 78 Solutindo"] { animation: none; }
}

/* Small fix to ensure background image hero covers on mobile tall */
header[style*="background-image"] { min-height: 56vh; }
@media (min-width: 640px){ header[style*="background-image"] { min-height: 64vh; } }
@media (min-width: 1024px){ header[style*="background-image"] { min-height: 72vh; } }

/* Make brand logos not shrink blurry on some browsers */
#brands img { filter: saturate(1.05); }

/* Focus ring visible on keyboard nav only (for most modern browsers) */
:focus:not(:focus-visible) { outline: none; box-shadow: none; }
