/* custom CSS port from Tailwind */
:root {
  --background: 40 33% 98%;
  --foreground: 220 16% 10%;
  --muted: 220 14% 96%;
  --muted-foreground: 220 8% 47%;
  --hint: 220 10% 59%;
  --primary: 207 88% 10%;
  --primary-foreground: 0 0% 100%;
  --secondary: 17 100% 60%;
  --secondary-foreground: 0 0% 100%;
  --border: 220 14% 91%;
  --input: 220 14% 91%;
  --accent: 210 40% 96%;
  --accent-foreground: 220 16% 10%;
  --card: 0 0% 100%;
  --card-foreground: 220 16% 10%;
  --radius: 1rem;

  --gradient-accent: linear-gradient(135deg, #031C30 0%, #0A3A5C 100%);
  --gradient-urgent: linear-gradient(135deg, #A67C00 0%, #D4AF37 100%);
  --gradient-soft: linear-gradient(180deg, #FAFAF8 0%, #F1F5FB 100%);
  --shadow-soft: 0 10px 30px -12px rgba(3,28,48, 0.18);
  --shadow-card: 0 20px 50px -20px rgba(20, 23, 28, 0.12);
  --shadow-glow: 0 0 40px rgba(10,58,92, 0.35);

  --font-display: "Kanit", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

html {
  scroll-behavior: smooth;
}

body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

h1, h2 {
  color: #19405C;
}

/* Base custom utilities */
.text-foreground { color: hsl(var(--foreground)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.bg-background { background-color: hsl(var(--background)); }
.bg-white { background-color: #fff; }
.font-display { font-family: var(--font-display); }
.backdrop-blur { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

.accent-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.accent-bg {
  background: var(--gradient-accent);
}

.urgent-bg {
  background: var(--gradient-urgent);
}

.surface-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}

.surface-card:hover, .surface-card-hover {
  box-shadow: 0 30px 60px -20px rgba(3,28,48, 0.25);
  border-color: rgba(3,28,48, 0.35);
}

/* 3D tilt card – applied by JS */
.tilt-card {
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}

.tilt-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tilt-3d:hover, .tilt-3d-hover {
  transform: perspective(1000px) rotateX(4deg) rotateY(-4deg) translateY(-4px);
}

.glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.pulse-ring {
  position: relative;
}
.pulse-ring::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: var(--gradient-urgent);
  opacity: 0.6;
  z-index: -1;
  animation: pulse-ring 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.7; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-float { animation: float-y 6s ease-in-out infinite; }
.animate-fade-up { animation: fade-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.animate-marquee { animation: marquee 35s linear infinite; }

/* Premium list-item */
.premium-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.55rem 0.85rem 0.55rem 1rem;
  border-radius: 0.6rem;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.3s ease;
}
.premium-item::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: var(--gradient-accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.premium-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(3,28,48, 0.10), rgba(10,58,92, 0.04) 60%, transparent);
  transform: translateX(-101%);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.premium-item:hover { transform: translateX(6px); }
.premium-item:hover::before { transform: scaleY(1); }
.premium-item:hover::after { transform: translateX(0); }
.premium-item:hover .premium-dot { transform: scale(1.4) rotate(45deg); box-shadow: 0 0 0 4px rgba(3,28,48, 0.12); }
.premium-item:hover .premium-check { transform: scale(1.15); filter: drop-shadow(0 4px 8px rgba(3,28,48, 0.35)); }

.premium-dot {
  margin-top: 0.5rem;
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 999px;
  background: var(--gradient-accent);
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}
.premium-check {
  margin-top: 0.15rem;
  flex-shrink: 0;
  color: #031C30;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s ease;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(3,28,48, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(3,28,48, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
}

.bg-radial-glow {
  background: radial-gradient(ellipse at top, rgba(10,58,92, 0.18), transparent 60%);
}

.story-link {
  position: relative;
  display: inline-block;
}
.story-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s ease;
}
.story-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* fx-magnet */
.fx-magnet {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  padding: 1.5rem;
  transition: transform 0.5s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.5s ease, border-color 0.4s ease;
}
.fx-magnet::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(250,204,21,0.18), transparent 60%);
  opacity: 0; transition: opacity 0.4s ease;
  pointer-events: none;
}
.fx-magnet::after {
  content: "";
  position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 0 56px 56px;
  border-color: transparent transparent var(--gradient-fallback, #facc15) transparent;
  background: var(--gradient-accent);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  transform: translate(100%, -100%);
  transition: transform 0.45s cubic-bezier(0.2,0.8,0.2,1);
}
.fx-magnet:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -20px rgba(3,28,48,0.28);
  border-color: rgba(3,28,48,0.35);
}
.fx-magnet:hover::before { opacity: 1; }
.fx-magnet:hover::after { transform: translate(0,0); }

/* fx-prism */
.fx-prism {
  position: relative;
  border-radius: 1rem;
  background: hsl(var(--card));
  padding: 1.75rem;
  transition: transform 0.5s cubic-bezier(0.2,0.8,0.2,1);
  isolation: isolate;
}
.fx-prism::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from 0deg, transparent, rgba(250,204,21,0.9), rgba(3,28,48,0.5), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: fx-spin 6s linear infinite;
  z-index: -1;
}
.fx-prism::after {
  content: "";
  position: absolute; left: 1.75rem; right: 1.75rem; bottom: 0.75rem;
  height: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2,0.8,0.2,1);
  border-radius: 999px;
}
.fx-prism:hover { transform: translateY(-8px) scale(1.015); }
.fx-prism:hover::before { opacity: 1; }
.fx-prism:hover::after { transform: scaleX(1); }
.fx-prism .fx-icon {
  transition: transform 0.5s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.5s ease;
}
.fx-prism:hover .fx-icon {
  transform: rotate(-8deg) scale(1.1);
  box-shadow: 0 0 0 8px rgba(250,204,21,0.18), 0 18px 40px -10px rgba(3,28,48,0.4);
}

@keyframes fx-spin {
  to { transform: rotate(360deg); }
}

/* fx-stat */
.fx-stat {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  transition: transform 0.5s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.5s ease, border-color 0.4s ease;
  isolation: isolate;
}
.fx-stat::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(3,28,48,0.12) 60%, transparent);
  transform: translateY(101%);
  transition: transform 0.6s cubic-bezier(0.2,0.8,0.2,1);
  z-index: -1;
}
.fx-stat::after {
  content: "";
  position: absolute; left: 18%; right: 18%; bottom: 8px;
  height: 2px;
  background: var(--gradient-urgent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.55s cubic-bezier(0.2,0.8,0.2,1);
  border-radius: 999px;
}
.fx-stat .fx-stat-k {
  display: inline-block;
  transition: transform 0.5s cubic-bezier(0.2,0.8,0.2,1), letter-spacing 0.5s ease;
}
.fx-stat:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -20px rgba(3,28,48,0.32);
  border-color: rgba(212,175,55,0.6);
}
.fx-stat:hover::before { transform: translateY(0); }
.fx-stat:hover::after { transform: scaleX(1); }
.fx-stat:hover .fx-stat-k { transform: translateY(-2px) scale(1.06); letter-spacing: 0.01em; }

/* Navigation and specific utility mappings */
.nav-scrolled {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(0,0,0,0.05) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Add custom padding and margin utilities that bootstrap lacks */
.max-w-7xl { max-width: 80rem; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
.opacity-60 { opacity: 0.6; }
.opacity-25 { opacity: 0.25; }
.opacity-20 { opacity: 0.2; }
.opacity-10 { opacity: 0.1; }
.opacity-5 { opacity: 0.05; }
.blur-2xl { filter: blur(40px); }
.blur-3xl { filter: blur(64px); }

/* Brand logo clickable link */
.brand-logo-link {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.brand-logo-link:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(3,28,48,0.22);
  border-color: rgba(212,175,55,0.6) !important;
}
.brand-logo-link:hover::after {
  opacity: 1;
}

/* Service Area Box Hover Effect */
.service-area-box {
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.3s ease, background-color 0.3s ease;
}
.service-area-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--gradient-accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.service-area-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px -10px rgba(3,28,48, 0.15);
  border-color: rgba(3,28,48, 0.25) !important;
  background-color: #fafbfc !important;
}
.service-area-box:hover::before {
  transform: scaleY(1);
  transform-origin: top;
}
.service-area-box:hover i {
  transform: scale(1.15) rotate(-12deg);
  color: #D4AF37 !important;
}
.service-area-box i {
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.3s ease;
}
