/* =====================================================
   PT. IMA MONTAZ TEKNINDO — Custom Styles
   Pairs with Tailwind CDN. Keep this file minimal —
   only define what Tailwind cannot easily express.
   ===================================================== */

/* Smooth scrolling for the whole document; offset accounts for fixed nav */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- NAVIGATION (clean text links + CTA) ---------- */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.7rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: #1e293b;
  letter-spacing: -0.005em;
  white-space: nowrap;
  border-radius: 6px;
  transition: color 0.25s ease, background-color 0.25s ease;
}
@media (min-width: 1280px) {
  .nav-link { padding: 0.45rem 0.85rem; font-size: 0.9rem; }
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.15rem;
  height: 2.5px;
  background-color: #f5b81f;
  border-radius: 9999px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}
.nav-link:hover { color: #1c34b3; }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.is-active {
  color: #1c34b3;
  font-weight: 700;
}
.nav-link.is-active::after { transform: scaleX(1); }

/* Primary CTA button in nav (Contact Us) */
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.15rem;
  margin-left: 0.4rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  background-color: #1c34b3;
  border-radius: 9999px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  box-shadow: 0 6px 14px -6px rgba(28, 52, 179, 0.5);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-cta:hover {
  background-color: #f5b81f;
  color: #0b0f24;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -8px rgba(245, 184, 31, 0.55);
}
.nav-cta.is-active {
  background-color: #f5b81f;
  color: #0b0f24;
}
@media (min-width: 1280px) {
  .nav-cta { font-size: 0.9rem; padding: 0.6rem 1.4rem; }
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  color: #1c34b3;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.mobile-nav-link:hover {
  background-color: #eef2ff;
}
.mobile-nav-link.is-active {
  background-color: #1c34b3;
  color: #ffffff;
}

/* ---------- HERO BLUE PANEL (rounded with right curve) ---------- */
.hero-blue-panel {
  /* Default right edge is straight rounded; on lg we add the asymmetric curve */
  position: relative;
}
@media (min-width: 1024px) {
  .hero-blue-panel {
    /* Subtle inward curve on the right side using mask */
    border-top-right-radius: 36px;
    border-bottom-right-radius: 120px;
  }
}

/* ---------- OVAL PHOTO FRAME ---------- */
.oval-frame {
  border-radius: 50% / 45%;
}
@media (max-width: 640px) {
  .oval-frame {
    border-radius: 40% / 35%;
  }
}

/* ---------- SECTION TITLE CARD (blue rounded with curved bottom) ---------- */
.section-title-card {
  position: relative;
  background-color: #1c34b3;
  color: #ffffff;
  padding: 1.5rem 2.25rem 2.25rem 2.25rem;
  border-radius: 16px 16px 80px 16px;
  display: inline-block;
  min-width: 280px;
  max-width: 100%;
}
@media (min-width: 640px) {
  .section-title-card {
    padding: 1.75rem 2.5rem 2.75rem 2.5rem;
    border-radius: 18px 18px 110px 18px;
  }
}

.section-title-text {
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0;
}

.title-underline {
  margin-top: 0.4rem;
  width: 96px;
  height: 4px;
  background-color: #f5b81f;
  border-radius: 9999px;
}

/* ---------- MACHINE GRID CARDS ---------- */
.machine-card {
  background-color: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  cursor: pointer;
}
.machine-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.machine-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.45);
}
.machine-card:hover img {
  transform: scale(1.06);
}

/* ---------- PRODUK PANEL ---------- */
.produk-panel {
  position: relative;
  padding-top: 3rem;
}
.produk-panel-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 2;
}
.produk-label {
  background-color: #1c34b3;
  color: #ffffff;
  padding: 0.55rem 1.5rem 0.85rem 1.5rem;
  border-radius: 10px 10px 40px 10px;
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  pointer-events: auto;
  position: relative;
}
.produk-label::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  background-color: #f5b81f;
  margin-top: 4px;
  border-radius: 9999px;
}
@media (min-width: 640px) {
  .produk-label { font-size: 1.05rem; padding: 0.6rem 1.8rem 1rem 1.8rem; }
}

.produk-body {
  border-radius: 6px;
  padding: 1.25rem 1rem;
}
.produk-body--blue   { background-color: #1c34b3; }
.produk-body--yellow { background-color: #f5b81f; }

/* Uniform-height image for paired produk panels */
.produk-uniform-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
  display: block;
  background-color: transparent;
}

/* product card inside a produk panel */
.produk-card {
  background-color: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.produk-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.produk-card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(0,0,0,0.5); }


/* ---------- MEASURING — BLUE PANEL CARDS ---------- */
.measuring-bg-card {
  background-color: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.measuring-bg-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.measuring-bg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -8px rgba(0,0,0,0.4);
}

/* Floating product card (right side, transparent bg) */
.measuring-float-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: transform 0.35s ease;
}
.measuring-float-card:hover { transform: scale(1.08); }
.measuring-float-card img {
  max-height: 180px;
  width: auto;
  object-fit: contain;
}

/* ---------- CERTIFICATE CARD ---------- */
.certificate-card {
  background: linear-gradient(135deg, #e0f2f9 0%, #b7d8e8 100%);
  border: 1px solid #cdd9e1;
  border-radius: 14px;
  padding: 2rem 2.5rem;
  box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.35);
}

/* ---------- CLIENT LIST ---------- */
.client-list { columns: 1; }
@media (min-width: 640px) { .client-list { columns: 2; column-gap: 1.5rem; } }
.client-list li {
  break-inside: avoid;
  padding: 0.45rem 0;
  font-size: 0.95rem;
  color: #0f172a;
}
.client-list li::before {
  content: "•";
  color: #f5b81f;
  font-weight: bold;
  margin-right: 0.5rem;
}

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- HEADER SHADOW ON SCROLL ---------- */
#site-header.scrolled {
  box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.18);
}

/* ---------- BACK TO TOP VISIBLE ---------- */
#back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- FOCUS RING (a11y) ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #f5b81f;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- IMAGE PROTECTION FROM LAYOUT SHIFT ---------- */
img { max-width: 100%; height: auto; }
