/* ------------------------------------------------------------------
   KPTD.ph — landing page styles
   Only what Tailwind utilities cannot express cleanly lives here.
------------------------------------------------------------------ */

:root {
  --kptd-ink: #0b1220;
  --kptd-brand: #4f46e5;
  --kptd-brand-soft: #eef2ff;
}

html {
  scroll-behavior: smooth;
  /* sticky header offset for anchor jumps */
  scroll-padding-top: 90px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Decorative backgrounds ------------------------------------- */

/* Faint dot grid used behind the hero */
.bg-dot-grid {
  background-image: radial-gradient(rgba(15, 23, 42, .10) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* Soft colour blooms */
.bloom {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* Fades the decoration out towards the bottom of the hero */
.mask-fade-b {
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
}

/* --- Cards ------------------------------------------------------- */

.card-hover {
  transition: transform .3s cubic-bezier(.22, 1, .36, 1),
              box-shadow .3s cubic-bezier(.22, 1, .36, 1),
              border-color .3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(15, 23, 42, .28);
}

/* Gradient hairline border used on the featured service card */
.ring-gradient {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #6366f1, #a855f7 45%, #22d3ee) border-box;
  border: 1px solid transparent;
}

/* --- Reveal on scroll -------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Hero art ---------------------------------------------------- */

.float-slow {
  animation: kptd-float 7s ease-in-out infinite;
}

.float-slower {
  animation: kptd-float 9s ease-in-out infinite;
  animation-delay: -3s;
}

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

/* Pulsing "online" dot */
.pulse-dot::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: currentColor;
  opacity: .35;
  animation: kptd-pulse 2s ease-out infinite;
}

@keyframes kptd-pulse {
  0%   { transform: scale(.6); opacity: .45; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { opacity: 0; }
}

/* --- Nav --------------------------------------------------------- */

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--kptd-brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

/* --- Forms ------------------------------------------------------- */

.field {
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.field:focus {
  outline: none;
  border-color: var(--kptd-brand);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}

/* --- Map --------------------------------------------------------- */

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(.35) contrast(1.02);
  transition: filter .3s ease;
}

.map-frame:hover iframe {
  filter: none;
}

/* --- Motion preferences ------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .float-slow,
  .float-slower,
  .pulse-dot::before {
    animation: none;
  }

  .card-hover:hover { transform: none; }
}

/* --- Mobile nav overlay ------------------------------------------
   nav.css gives the shared overlay z-index:1 and 36px grey links.
   The hero's positioned children sit above z-index 1, so the overlay
   showed through; and the link styling is more specific than the
   utility classes on the markup. Both are corrected here (this file
   is only loaded by the landing page).
------------------------------------------------------------------ */

.nav-overlay {
  z-index: 90;               /* above the page, below the sticky nav (100) */
  background-color: #fff;
}

.nav-overlay-content {
  top: 18%;
}

.nav-overlay a {
  display: block;
  padding: 10px 24px;
  font-size: 17px;
  font-weight: 600;
  color: #334155;
}

.nav-overlay a:hover,
.nav-overlay a:focus {
  color: var(--kptd-brand);
}
