/**
 * TVIP — Tirta Varia Intipratama | style.css
 * Custom styles yang melengkapi Tailwind Play CDN.
 * ─────────────────────────────────────────────────────────
 */

/* ── Base ─────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

/* ── Keyframes ──────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0);    }
}

@keyframes float {
  0%, 100% { transform: translateY(0px);   }
  50%       { transform: translateY(-10px); }
}

@keyframes shimmer {
  0%   { left: -100%; }
  100% { left:  100%; }
}

/* ── Scroll Reveal ─────────────────────────────────────── */
.scroll-reveal,
.scroll-reveal-right {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal       { transform: translateY(30px); }
.scroll-reveal-right { transform: translateX(30px); }

.scroll-reveal.revealed,
.scroll-reveal-right.revealed {
  opacity: 1;
  transform: none;
}

/* ── Float Animation ───────────────────────────────────── */
.animate-float { animation: float 3s ease-in-out infinite; }

/* ── Navbar ────────────────────────────────────────────── */
#tvip-navbar {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
#tvip-navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Desktop nav active state */
.nav-link {
  position: relative;
  color: #374151; /* gray-700 */
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
}
.nav-link:hover,
.nav-link.nav-active { color: #0F4C81; }

.nav-link .nav-underline {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 9999px;
  background-color: #0F4C81;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-link.nav-active .nav-underline,
.nav-link:hover .nav-underline { transform: scaleX(1); }

/* Mobile nav active state */
.mobile-nav-link {
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
}
.mobile-nav-link.nav-active {
  background-color: #E6EEF5;
  color: #0F4C81;
  border-left-color: #0F4C81;
}

/* ── Hero ──────────────────────────────────────────────── */
/* Hero image positioning override at desktop */
@media (min-width: 1024px) {
  .hero-logo {
    width:  480px !important;
    height: 161px !important;
    top:    calc(50% + 0.5px) !important;
    left:   50% !important;
    transform: translate(-50%, -50%) !important;
  }
}

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to right, #0A3254, #0F4C81);
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover {
  background: linear-gradient(to right, #092843, #0D3F6C);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-outline:hover {
  border-color: #0F4C81 !important;
  color: #0F4C81;
}

/* ── Contact Links ─────────────────────────────────────── */
.contact-link:hover { color: #0D3F6C !important; }

/* ── Footer Links ──────────────────────────────────────── */
.footer-link:hover { color: #0F4C81 !important; }

/* Social icon buttons */
.social-btn:hover {
  background-color: #0F4C81 !important;
  color: #fff !important;
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar       { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* ── Focus States ──────────────────────────────────────── */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #0F4C81;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Responsive Typography ─────────────────────────────── */
@media (max-width: 640px) {
  h1 { font-size: 2rem    !important; line-height: 1.2 !important; }
  h2 { font-size: 1.75rem !important; line-height: 1.3 !important; }
}

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