/* ============================================================
   Kitts IT Solutions — scroll-driven 3D site
   ============================================================ */

:root {
  --bg: #010204;
  --bg-soft: #05070d;
  --accent: #00b4ff;
  --accent-dim: rgba(0, 180, 255, 0.35);
  --text: #f0f4ff;
  --text-dim: rgba(240, 244, 255, 0.62);
  --text-faint: rgba(240, 244, 255, 0.28);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  background: var(--bg);
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

::selection { background: var(--accent); color: #03101c; }

a { color: inherit; text-decoration: none; }

/* ---------- WebGL canvas ---------- */

#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* ---------- Loader ---------- */

#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.7s ease, visibility 0.7s;
}

#loader.done { opacity: 0; visibility: hidden; }

.loader-mark {
  width: clamp(160px, 24vw, 240px);
  height: auto;
  filter: drop-shadow(0 0 30px rgba(0, 180, 255, 0.3));
  animation: loaderPulse 2s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .loader-mark { animation: none; }
}

.loader-track {
  width: min(260px, 60vw);
  height: 1px;
  background: rgba(240, 244, 255, 0.12);
  overflow: hidden;
}

.loader-bar {
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 56px);
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

body.scrolled .nav {
  background: rgba(1, 2, 4, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-mark { display: block; }

.nav-mark img {
  display: block;
  height: 52px;
  width: auto;
  filter: drop-shadow(0 0 14px rgba(0, 180, 255, 0.25));
  transition: filter 0.3s;
}

.nav-mark:hover img {
  filter: drop-shadow(0 0 20px rgba(0, 180, 255, 0.5));
}

.nav-right { display: flex; align-items: center; gap: 26px; }

.nav-phone {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  transition: color 0.3s;
}

.nav-phone:hover { color: var(--text); }

.nav-cta {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 22px;
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  color: var(--accent);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.nav-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #03101c;
}

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- HUD ---------- */

.hud {
  position: fixed;
  left: clamp(16px, 3vw, 44px);
  bottom: 44px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity 0.5s;
}

body.scrolled .hud { opacity: 1; }

.hud-num { color: var(--accent); }

.hud-track {
  position: relative;
  width: 72px;
  height: 1px;
  background: rgba(240, 244, 255, 0.14);
}

.hud-fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- Sections ---------- */

main { position: relative; z-index: 10; }

.section {
  position: relative;
  min-height: 140vh;
  display: flex;
  align-items: center;
  padding: 0 clamp(24px, 6vw, 96px);
}

.section-content {
  position: relative;
  max-width: 560px;
  width: 100%;
}

.hero {
  min-height: 100vh;
  justify-content: center;
  text-align: center;
}

.hero .section-content { max-width: 880px; }

/* Soft scrim so the hero copy stays readable over the 3D glow */
.hero .section-content::before {
  content: "";
  position: absolute;
  inset: -14% -16%;
  background: radial-gradient(ellipse 60% 55% at center, rgba(1, 2, 4, 0.78), rgba(1, 2, 4, 0) 72%);
  z-index: -1;
  pointer-events: none;
}

.hero .lead { color: rgba(240, 244, 255, 0.88); }

.hero .scroll-hint { color: rgba(240, 244, 255, 0.55); }

.align-left  { justify-content: flex-start; }
.align-right { justify-content: flex-end; }

.finale {
  min-height: 170vh;
  justify-content: center;
  text-align: center;
  align-items: flex-end;
  padding-bottom: 7vh;
}

.finale .section-content { max-width: 720px; }

/* ---------- Typography ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.8rem, 7.5vw, 6.2rem);
  margin-bottom: 28px;
  text-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}

h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin-bottom: 22px;
}

.lead {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 300;
  color: var(--text-dim);
  max-width: 60ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.95);
}

.hero .lead { margin: 0 auto; }

.ghost-num {
  position: absolute;
  top: -1.1em;
  left: -0.18em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(7rem, 16vw, 13rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 180, 255, 0.14);
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

/* ---------- Bullets ---------- */

.bullets {
  list-style: none;
  margin-top: 34px;
  display: grid;
  gap: 14px;
}

.bullets li {
  position: relative;
  padding-left: 30px;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-dim);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.95);
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 16px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-dim);
}

/* ---------- CEO card ---------- */

.ceo-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 32px;
}

.ceo-card img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--accent-dim);
  box-shadow: 0 0 26px rgba(0, 180, 255, 0.22);
}

.ceo-meta strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.ceo-meta span {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ---------- Partner logos ---------- */

.partner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.partner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 22px;
  background: rgba(240, 244, 255, 0.045);
  border: 1px solid rgba(0, 180, 255, 0.16);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.partner:last-child { grid-column: 1 / -1; }

.partner:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 180, 255, 0.45);
  box-shadow: 0 8px 30px rgba(0, 180, 255, 0.15);
}

.partner img {
  max-width: 100%;
  max-height: 44px;
  object-fit: contain;
}

/* ---------- Scroll hint ---------- */

.scroll-hint {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.scroll-line {
  position: relative;
  width: 1px;
  height: 64px;
  background: rgba(240, 244, 255, 0.12);
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--accent);
  animation: scrollPulse 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollPulse {
  0%   { top: -50%; }
  60%, 100% { top: 110%; }
}

/* ---------- CTAs ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin-top: 40px;
}

.btn {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 34px;
  border-radius: 999px;
  transition: transform 0.3s, background 0.3s, color 0.3s, box-shadow 0.3s;
}

.btn:hover { transform: translateY(-2px); }

.btn-solid {
  background: var(--accent);
  color: #03101c;
  box-shadow: 0 0 32px rgba(0, 180, 255, 0.35);
}

.btn-solid:hover { box-shadow: 0 0 48px rgba(0, 180, 255, 0.55); }

.btn-ghost {
  border: 1px solid rgba(240, 244, 255, 0.22);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(1, 2, 4, 0), var(--bg-soft) 38%);
  padding: 90px clamp(24px, 6vw, 96px) 48px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 34px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-links a { transition: color 0.3s; }
.footer-links a:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* ---------- Reveal defaults (GSAP animates these in) ---------- */

.reveal { opacity: 0; }

body.no-js .reveal,
body.webgl-failed .reveal { opacity: 1; }

/* ---------- WebGL fallback ---------- */

body.webgl-failed #webgl { display: none; }
body.webgl-failed .section { min-height: 100vh; }
body.webgl-failed {
  background:
    radial-gradient(1200px 700px at 75% 10%, rgba(0, 180, 255, 0.08), transparent 60%),
    var(--bg);
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .nav { padding: 10px 14px; }

  .nav-mark img { height: 38px; }

  .nav-right { gap: 10px; }

  .nav-phone {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .nav-cta {
    padding: 8px 13px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  h1 { font-size: clamp(2.1rem, 9.5vw, 3.4rem); }

  h2 { font-size: clamp(1.8rem, 8.5vw, 2.8rem); }

  .lead { font-size: 0.98rem; }

  .cta-row .btn { padding: 14px 22px; font-size: 0.78rem; }

  .section {
    min-height: 120vh;
    justify-content: center !important;
  }

  .section-content {
    max-width: 100%;
    padding: 28px 22px;
    background: linear-gradient(to bottom, rgba(1, 2, 4, 0.0), rgba(1, 2, 4, 0.55) 18%, rgba(1, 2, 4, 0.55) 82%, rgba(1, 2, 4, 0));
    border-radius: 18px;
  }

  .hero .section-content,
  .finale .section-content { background: none; }

  .ghost-num { font-size: 6.4rem; }

  .hud { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-line::after { animation: none; }
}
