/* ============================================================
   Kenrat & Kicli Solutions LLC - component styles
   Tailwind (CDN) handles utilities; this file holds the
   repeated component classes, animations and theme glue.
   ============================================================ */

:root {
  --brand-300: #e9c266;
  --brand-400: #e0ae3d;
  --brand-500: #cf9422;
  --brand-600: #ad7519;
  --ink-950: #070a14;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

/* Offset anchor targets so the fixed header never covers a heading */
section[id] { scroll-margin-top: 5rem; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brand-400);
  color: var(--ink-950);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.75rem 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
#nav.is-scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(13, 17, 32, 0.08), 0 10px 30px -20px rgba(13, 17, 32, 0.45);
}
.dark #nav.is-scrolled {
  background: rgba(7, 10, 20, 0.78);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px -20px rgba(0, 0, 0, 0.8);
}

/* Nav text is white over the hero, and flips once the bar gets a background */
.nav-title { color: #fff; }
.nav-sub { color: rgba(233, 194, 102, 0.85); }
#nav.is-scrolled .nav-title { color: #0d1120; }
.dark #nav.is-scrolled .nav-title { color: #fff; }

.nav-link {
  position: relative;
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  border-radius: 9999px;
  transition: color 0.2s ease;
}
.nav-link:hover { color: #fff; }
#nav.is-scrolled .nav-link { color: #43496d; }
#nav.is-scrolled .nav-link:hover { color: #0d1120; }
.dark #nav.is-scrolled .nav-link { color: #b2bad4; }
.dark #nav.is-scrolled .nav-link:hover { color: #fff; }

.nav-link::after {
  content: '';
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: #fff; }
#nav.is-scrolled .nav-link.is-active { color: #0d1120; }
.dark #nav.is-scrolled .nav-link.is-active { color: #fff; }

.icon-btn {
  display: grid;
  place-items: center;
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 9999px;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
#nav.is-scrolled .icon-btn { color: #43496d; border-color: rgba(13, 17, 32, 0.12); }
#nav.is-scrolled .icon-btn:hover { background: rgba(13, 17, 32, 0.06); color: #0d1120; }
.dark #nav.is-scrolled .icon-btn { color: #b2bad4; border-color: rgba(255, 255, 255, 0.12); }
.dark #nav.is-scrolled .icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.mobile-link {
  padding: 0.85rem 0.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: #d6dae9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: color 0.2s ease;
}
.mobile-link:hover { color: var(--brand-300); }

/* ---------- Hero ---------- */
.hero-bg {
  background:
    radial-gradient(1200px 600px at 15% 0%, rgba(79, 70, 229, 0.28), transparent 60%),
    linear-gradient(135deg, #070a14 0%, #10152b 55%, #1a1330 100%);
}

#bg-canvas { opacity: 0.55; touch-action: none; }

.grid-overlay {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
}
:not(.dark) #process .grid-overlay {
  background-image:
    linear-gradient(to right, rgba(13, 17, 32, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(13, 17, 32, 0.06) 1px, transparent 1px);
}

.text-gradient {
  background: linear-gradient(100deg, #f2d99f 0%, #e0ae3d 45%, #cf9422 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Marquee ---------- */
.marquee {
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #515a87;
}
.dark .marquee__item { color: #8792ba; }
.marquee__dot { font-size: 0.5rem; color: var(--brand-400); }

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

/* ---------- Section heading ---------- */
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-600);
}
.dark .section-eyebrow { color: var(--brand-400); }
.contact-eyebrow { color: var(--brand-400); }

/* ---------- Service cards ---------- */
.card {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid #eceef6;
  background: #fff;
  padding: 1.75rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.dark .card {
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(224, 174, 61, 0.13), transparent 42%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(224, 174, 61, 0.5);
  box-shadow: 0 24px 45px -30px rgba(13, 17, 32, 0.55);
}
.card:hover::before { opacity: 1; }

.card-icon {
  display: grid;
  place-items: center;
  height: 3rem;
  width: 3rem;
  border-radius: 0.9rem;
  background: #fdf8ec;
  color: var(--brand-600);
  font-size: 1.05rem;
}
.dark .card-icon { background: rgba(224, 174, 61, 0.12); color: var(--brand-300); }

.card-title {
  margin-top: 1.25rem;
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
}
.card-text {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #515a87;
}
.dark .card-text { color: #b2bad4; }

/* ---------- Process steps ---------- */
.step {
  position: relative;
  border-radius: 1.25rem;
  border: 1px solid #eceef6;
  background: #fff;
  padding: 2rem 1.75rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.dark .step { border-color: rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.025); }
.step:hover { transform: translateY(-4px); box-shadow: 0 24px 45px -30px rgba(13, 17, 32, 0.5); }

.step-num {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(160deg, var(--brand-300), var(--brand-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step-title {
  margin-top: 1rem;
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
}
.step-text {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #515a87;
}
.dark .step-text { color: #b2bad4; }

/* ---------- About checklist ---------- */
.check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.975rem;
  color: #43496d;
}
.dark .check { color: #d6dae9; }
.check i { color: var(--brand-500); }
.dark .check i { color: var(--brand-400); }

/* ---------- Company details card ---------- */
.detail-card {
  border-radius: 1.5rem;
  border: 1px solid #eceef6;
  background: #fff;
  padding: 2rem;
  box-shadow: 0 40px 70px -50px rgba(13, 17, 32, 0.5);
}
.dark .detail-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  box-shadow: 0 40px 70px -50px rgba(0, 0, 0, 0.9);
}

.detail-row { display: flex; align-items: flex-start; gap: 1rem; }
.detail-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  height: 2.75rem;
  width: 2.75rem;
  border-radius: 0.8rem;
  background: #fdf8ec;
  color: var(--brand-600);
}
.dark .detail-icon { background: rgba(224, 174, 61, 0.12); color: var(--brand-300); }

.detail-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8792ba;
}
.detail-value { margin-top: 0.15rem; font-weight: 500; }

/* ---------- Form ---------- */
.field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #b2bad4;
}
.field {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.85rem 1rem;
  color: #fff;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.field::placeholder { color: rgba(135, 146, 186, 0.7); }
.field:focus {
  outline: none;
  border-color: var(--brand-400);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(224, 174, 61, 0.14);
}
.field.is-invalid { border-color: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12); }

/* ---------- Footer ---------- */
.footer-head {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
}
.footer-link { transition: color 0.2s ease; }
.footer-link:hover { color: var(--brand-300); }

/* ---------- Toast ---------- */
#toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .marquee__track { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
