/* ==========================================================================
   Custom CSS layer - complements Tailwind CDN utilities
   B2B Logistics Landing Page - Fourteen Cahaya Trans Nusa
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
:root {
  --brand-brown: #4E1A11;
  --brand-amber: #E27E14;
  --brand-gold:  #F1B812;
  --brand-cream: #FCF8F2;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  background: var(--brand-cream);
  color: var(--brand-brown);
}

/* --------------------------------------------------------------------------
   Hexagon icon container
   -------------------------------------------------------------------------- */
.hex-icon {
  width: 64px;
  height: 64px;
  background: var(--brand-gold);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-brown);
  transition: transform .4s ease, background .3s ease;
}

.hex-icon:hover {
  transform: rotate(15deg) scale(1.05);
  background: var(--brand-amber);
}

.hex-icon--lg {
  width: 96px;
  height: 96px;
}

.hex-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.hex-icon--lg svg {
  width: 44px;
  height: 44px;
}

/* --------------------------------------------------------------------------
   Navbar scroll state
   -------------------------------------------------------------------------- */
#navbar {
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
  background: transparent;
}

#navbar.nav-scrolled {
  background: rgba(252, 248, 242, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(78, 26, 17, 0.08);
}

/* --------------------------------------------------------------------------
   Hero hexagon background pattern
   -------------------------------------------------------------------------- */
#hero {
  background:
    linear-gradient(135deg, #FCF8F2 0%, #ffffff 60%, #FCF8F2 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='52' viewBox='0 0 60 52'><polygon points='30,2 56,17 56,37 30,52 4,37 4,17' fill='none' stroke='%234E1A11' stroke-opacity='0.06' stroke-width='1'/></svg>");
  background-blend-mode: multiply;
  background-size: auto, 60px 52px;
}

/* --------------------------------------------------------------------------
   Service card hover
   -------------------------------------------------------------------------- */
.service-card {
  transition: transform .35s ease, box-shadow .35s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -12px rgba(78, 26, 17, 0.25);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-primary {
  background: var(--brand-brown);
  color: #fff;
  transition: background .25s ease, transform .2s ease;
}

.btn-primary:hover {
  background: var(--brand-amber);
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--brand-amber);
  color: var(--brand-brown);
  transition: background .25s ease, color .25s ease;
}

.btn-outline:hover {
  background: var(--brand-cream);
  color: var(--brand-brown);
}

.btn-wa {
  background: #25D366;
  color: #fff;
  transition: background .25s ease, transform .2s ease;
}

.btn-wa:hover {
  background: #1da851;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */
.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s ease;
}

.faq-chevron {
  transition: transform .3s ease;
}

.faq-chevron.rotate-180 {
  transform: rotate(180deg);
}

.faq-toggle[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   Form inputs
   -------------------------------------------------------------------------- */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(78, 26, 17, 0.15);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--brand-brown);
  font-family: inherit;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-amber);
  box-shadow: 0 0 0 3px rgba(226, 126, 20, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* --------------------------------------------------------------------------
   Section heading underline accent
   -------------------------------------------------------------------------- */
.section-heading {
  position: relative;
  display: inline-block;
}

.section-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 60px;
  height: 4px;
  background: var(--brand-gold);
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Stats counter
   -------------------------------------------------------------------------- */
.stat-number {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--brand-gold);
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Footer link hover
   -------------------------------------------------------------------------- */
footer a {
  transition: color .2s ease;
}

footer a:hover {
  color: var(--brand-gold);
}

/* --------------------------------------------------------------------------
   KBLI badge
   -------------------------------------------------------------------------- */
.kbli-badge {
  display: inline-block;
  background: rgba(241, 184, 18, 0.15);
  color: var(--brand-amber);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Mobile nav panel default
   -------------------------------------------------------------------------- */
#mobile-menu {
  transition: opacity .3s ease, transform .3s ease;
}

/* --------------------------------------------------------------------------
   Refinements (UI/UX pro max audit)
   -------------------------------------------------------------------------- */

/* Cursor pointer on all interactive elements */
button, a, [role="button"], .faq-toggle, .service-card, summary, label[for], input[type="submit"], input[type="checkbox"], input[type="radio"], select { cursor: pointer; }
input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), textarea { cursor: text; }

/* Focus ring for keyboard nav (a11y) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .faq-toggle:focus-visible {
  outline: 3px solid var(--brand-amber);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Stable hover for service cards — use box-shadow + border, NOT layout-shifting transform */
.service-card { position: relative; transition: box-shadow .35s ease, border-color .35s ease; transform: none !important; }
.service-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(241, 184, 18, 0.06));
  border-radius: inherit; opacity: 0; transition: opacity .35s ease;
  pointer-events: none;
}
.service-card:hover { box-shadow: 0 18px 40px -12px rgba(78, 26, 17, 0.22); border-color: var(--brand-amber); }
.service-card:hover::before { opacity: 1; }

/* KBLI watermark inside service card */
.kbli-watermark {
  position: absolute; right: -10px; bottom: -28px;
  font-size: 7rem; font-weight: 900; line-height: 1;
  color: var(--brand-brown);
  opacity: 0.04;
  pointer-events: none;
  letter-spacing: -0.04em;
}

/* Arrow link */
.arrow-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--brand-amber); font-weight: 700; font-size: 0.875rem;
  transition: gap .25s ease, color .25s ease;
}
.arrow-link:hover { gap: 0.85rem; color: var(--brand-brown); }
.arrow-link svg { transition: transform .25s ease; }

/* Hero trust chips */
.trust-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #fff;
  border: 1.5px solid rgba(78, 26, 17, 0.08);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600;
  color: var(--brand-brown);
  box-shadow: 0 2px 8px -2px rgba(78, 26, 17, 0.08);
  transition: border-color .25s ease, transform .25s ease;
}
.trust-chip:hover { border-color: var(--brand-amber); }
.trust-chip svg { color: var(--brand-amber); }

/* Certificate seal (legalitas hero) */
.cert-seal {
  position: relative;
  width: 120px; height: 120px;
  display: inline-flex; align-items: center; justify-content: center;
}
.cert-seal::before {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--brand-gold), var(--brand-amber), var(--brand-brown), var(--brand-gold));
  animation: cert-spin 12s linear infinite;
}
.cert-seal::after {
  content: ''; position: absolute; inset: 8px;
  background: #fff;
  border-radius: 50%;
}
.cert-seal > * { position: relative; z-index: 1; }
@keyframes cert-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .cert-seal::before { animation: none; background: var(--brand-gold); }
}

/* Industry strip */
.industry-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.6rem;
  padding: 1.5rem 1rem;
  background: #fff;
  border: 1.5px solid rgba(78, 26, 17, 0.08);
  border-radius: 1rem;
  transition: border-color .3s ease, background .3s ease, transform .25s ease;
  text-align: center;
}
.industry-card:hover { border-color: var(--brand-amber); background: var(--brand-cream); transform: translateY(-4px); }
.industry-card svg { width: 36px; height: 36px; color: var(--brand-brown); transition: color .25s ease; }
.industry-card:hover svg { color: var(--brand-amber); }
.industry-card span { font-weight: 700; font-size: 0.875rem; color: var(--brand-brown); }

/* Stat card refinements: pulse + divider */
.stat-card { position: relative; padding: 0 1rem; }
.stat-card + .stat-card::before {
  content: ''; position: absolute; left: 0; top: 25%; bottom: 25%; width: 1px;
  background: rgba(252, 248, 242, 0.15);
}
@media (max-width: 768px) {
  .stat-card + .stat-card::before { display: none; }
}
.stat-card .stat-icon {
  width: 44px; height: 44px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: rgba(241, 184, 18, 0.12);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand-gold);
}
.stat-pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(241, 184, 18, 0.3);
  animation: stat-pulse 2.5s ease-out infinite;
  pointer-events: none;
}
@keyframes stat-pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* Why-us circular icon variant */
.circle-icon {
  width: 56px; height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-amber), var(--brand-gold));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(226, 126, 20, 0.5);
  transition: transform .3s ease, box-shadow .3s ease;
}
.circle-icon svg { width: 28px; height: 28px; stroke-width: 2; }
.why-card:hover .circle-icon { transform: rotate(-8deg) scale(1.05); box-shadow: 0 12px 28px -8px rgba(226, 126, 20, 0.6); }
.why-card { transition: background .3s ease, border-color .3s ease; }
.why-card:hover { background: #fff; border-color: var(--brand-amber); }
.why-stat { font-size: 1.5rem; font-weight: 800; color: var(--brand-amber); line-height: 1; }

/* Section divider hexagon decorative */
.section-divider {
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto; max-width: 200px;
  color: var(--brand-amber);
  opacity: 0.5;
}
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 1.5px;
  background: linear-gradient(to right, transparent, rgba(226, 126, 20, 0.3), transparent);
}
.section-divider svg { width: 18px; height: 18px; margin: 0 0.75rem; }

/* Form section value-prop card */
.value-prop {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px dashed rgba(78, 26, 17, 0.1);
}
.value-prop:last-child { border-bottom: 0; }
.value-prop .vp-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(241, 184, 18, 0.15);
  color: var(--brand-amber);
  display: inline-flex; align-items: center; justify-content: center;
}

/* Service card link bar — sits at bottom */
.card-cta { margin-top: auto; padding-top: 1rem; border-top: 1px dashed rgba(78, 26, 17, 0.08); }

/* Logo invert in footer */
.footer-logo { filter: brightness(0) invert(1); opacity: 0.95; }

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