/* HPS Solutions — hpstech.co.za */

:root {
  /* HPS Solutions brand: deep navy ground, steel + light blue accents */
  --bg: #0a1220;
  --bg-soft: #0f1a2e;
  --ink: #e8edf7;
  --ink-dim: #93a5bd;
  --teal: #a9c4e4;   /* brand light blue (accent) */
  --indigo: #5b84b1; /* brand steel blue (accent 2) */
  --line: rgba(148, 170, 199, 0.15);
  --grad: linear-gradient(100deg, var(--teal), var(--indigo));
  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-brand: "Baloo 2", "Space Grotesk", "Segoe UI", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }
html.lenis { height: auto; scroll-behavior: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(169, 196, 228, 0.25); }

/* film grain */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 60; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 2.5rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
  color: var(--ink); text-decoration: none; letter-spacing: 0.01em;
}
.brand-hps {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.brand-dashdot { width: 30px; height: 11px; margin-top: 0.45rem; }
.brand-sub {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0.5rem 0 0 0.5rem;
  padding-left: 0.9rem;
  border-left: 1px solid var(--line);
}
.nav-links { display: flex; gap: 1.8rem; margin-left: auto; }
.nav-links a {
  color: var(--ink-dim); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }

/* ============ buttons ============ */
.btn {
  display: inline-block;
  white-space: nowrap;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  background: var(--grad);
  color: #0e1c33;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
  will-change: transform;
}
.btn:hover { box-shadow: 0 8px 40px rgba(169, 196, 228, 0.25); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.btn-ghost:hover { box-shadow: none; border-color: var(--teal); }
.btn-small { padding: 0.55rem 1.3rem; font-size: 0.9rem; }
.btn-big { padding: 1.1rem 2.6rem; font-size: clamp(1.05rem, 2.2vw, 1.35rem); }

/* ============ shared ============ */
.eyebrow {
  font-family: var(--font-head);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(5rem, 12vh, 9rem) clamp(1.25rem, 4vw, 3rem);
}
.section-head { margin-bottom: clamp(2.5rem, 6vh, 4.5rem); max-width: 46rem; }
h2 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.12; font-weight: 700; letter-spacing: -0.02em;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ============ hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 7rem clamp(1.25rem, 4vw, 3rem) 4rem;
}
#field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 2; max-width: 60rem; }
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(3rem, 9.5vw, 7rem);
  line-height: 1.02; font-weight: 700; letter-spacing: -0.03em;
  margin: 0.6rem 0 1.6rem;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; }
.hero-sub {
  max-width: 36rem; margin: 0 auto 2.4rem;
  color: var(--ink-dim);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: 0.5;
  pointer-events: none; will-change: transform;
}
.orb-a { width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; top: -12%; left: -10%;
         background: radial-gradient(circle at 35% 35%, rgba(169,196,228,0.45), transparent 65%); }
.orb-b { width: 38vw; height: 38vw; max-width: 540px; max-height: 540px; bottom: -14%; right: -8%;
         background: radial-gradient(circle at 60% 40%, rgba(91,132,177,0.55), transparent 65%); }
.orb-c { width: 20vw; height: 20vw; max-width: 300px; max-height: 300px; top: 22%; right: 16%;
         background: radial-gradient(circle at 50% 50%, rgba(122,160,204,0.4), transparent 65%); }
.orb-d { width: 55vw; height: 55vw; max-width: 760px; max-height: 760px; bottom: -35%; left: 50%;
         transform: translateX(-50%);
         background: radial-gradient(circle at 50% 30%, rgba(91,132,177,0.35), transparent 60%); }

.scroll-hint {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid rgba(148,163,184,0.4);
  border-radius: 999px; z-index: 2;
}
.scroll-hint span {
  position: absolute; top: 8px; left: 50%; width: 4px; height: 8px;
  margin-left: -2px; border-radius: 4px; background: var(--teal);
  animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(12px); opacity: 0; }
}

/* ============ cards ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.25rem;
}
.card {
  position: relative;
  padding: 2rem 1.75rem 2.2rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(148,163,184,0.06), rgba(148,163,184,0.015));
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.45s ease;
}
.card:hover { transform: translateY(-8px); border-color: rgba(169, 196, 228, 0.4); }
.card-num {
  font-family: var(--font-head); font-size: 0.85rem; font-weight: 600;
  color: var(--teal); margin-bottom: 1.4rem; letter-spacing: 0.15em;
}
.card h3 {
  font-family: var(--font-head); font-size: 1.22rem; font-weight: 600;
  line-height: 1.3; margin-bottom: 0.7rem;
}
.card p { color: var(--ink-dim); font-size: 0.97rem; }

/* ============ products ============ */
.card-product { background: linear-gradient(160deg, rgba(91,132,177,0.12), rgba(91,132,177,0.03)); }

/* ============ statement ============ */
.statement {
  padding: clamp(6rem, 16vh, 11rem) clamp(1.25rem, 4vw, 3rem);
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.statement-text {
  max-width: 56rem; margin: 0 auto;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  line-height: 1.3; font-weight: 500; letter-spacing: -0.015em;
}
.statement-text .w { opacity: 0.15; transition: opacity 0.4s ease; }
.statement-text .w.on { opacity: 1; }

/* ============ stats ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.stat {
  padding: 2rem 1.75rem;
  border: 1px solid var(--line); border-radius: 20px;
}
.stat-num {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 4.5vw, 3.1rem);
  white-space: nowrap;
  font-weight: 700; letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat-label { color: var(--ink-dim); font-size: 0.95rem; margin-top: 0.4rem; }

/* ============ steps ============ */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 2rem 1.75rem;
  border-top: 1px solid var(--line);
}
.step-num {
  font-family: var(--font-head); font-weight: 700; font-size: 0.9rem;
  color: var(--indigo); letter-spacing: 0.15em;
}
.step h3 {
  font-family: var(--font-head); font-size: 1.35rem; font-weight: 600;
  margin: 0.9rem 0 0.6rem;
}
.step p { color: var(--ink-dim); font-size: 0.97rem; }

/* ============ chips ============ */
.section-serve { padding-bottom: clamp(3rem, 8vh, 6rem); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.8rem; }
.chips li {
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-head); font-weight: 500; font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.chips li:hover { border-color: var(--teal); transform: translateY(-3px); }

/* ============ contact ============ */
.contact {
  position: relative; overflow: hidden;
  text-align: center;
  padding: clamp(6rem, 18vh, 12rem) clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}
.contact .eyebrow, .contact-title, .contact-sub, .contact .btn { position: relative; z-index: 2; }
.contact-title {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  letter-spacing: -0.03em; margin-bottom: 1rem;
}
.contact-sub { color: var(--ink-dim); max-width: 32rem; margin: 0 auto 2.6rem; }

/* ============ footer ============ */
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  padding: 1.6rem clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  color: var(--ink-dim); font-size: 0.88rem;
}

.footer-brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.footer-mark { width: 34px; height: 18px; opacity: 0.9; }

/* ============ reveal states (JS adds .in) ============ */
.reveal { opacity: 0; transform: translateY(34px); }
.reveal.in, .no-motion .reveal { opacity: 1; transform: none; }

/* ============ responsive ============ */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav { gap: 1rem; }
  .brand-sub { display: none; }
  .nav .btn-small { margin-left: auto; }
  .hero { text-align: left; }
  .hero-sub, .hero-cta { margin-left: 0; justify-content: flex-start; }
  .scroll-hint { display: none; }
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .statement-text .w { opacity: 1; }
}
