/* ============================================================
   Nerivon Ltd — Variant B: Dark, modern cloud-native
   ============================================================ */

:root {
  --cyan: #22d3ee;
  --cyan-light: #7ee8fa;
  --blue: #2563eb;
  --navy: #0a1426;
  --black: #070d1a;
  --text: #dbe6f4;
  --muted: #8da3c0;

  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(126, 232, 250, 0.14);
  --border-soft: rgba(255, 255, 255, 0.08);

  --grad: linear-gradient(100deg, var(--cyan) 0%, var(--blue) 100%);
  --grad-text: linear-gradient(100deg, var(--cyan-light) 0%, var(--cyan) 45%, var(--blue) 100%);

  --header-h: 72px;
  --maxw: 1140px;
  --radius: 18px;

  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--black);
  background-image:
    radial-gradient(1100px 620px at 78% -8%, rgba(37, 99, 235, 0.20), transparent 60%),
    radial-gradient(900px 560px at 8% 6%, rgba(34, 211, 238, 0.13), transparent 60%),
    radial-gradient(1200px 900px at 50% 120%, rgba(37, 99, 235, 0.10), transparent 60%);
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

section { scroll-margin-top: calc(var(--header-h) + 14px); }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan);
  color: var(--black);
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  font-weight: 600;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Gradient text ---------- */
.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--cyan);
}

/* ---------- Brand / logo badge ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; }

.brand-badge {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 22%;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 6px 22px rgba(34, 211, 238, 0.18);
}
.brand-badge img { width: 100%; height: 100%; object-fit: cover; }

.brand-name {
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 1.02rem;
  color: var(--text);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(7, 13, 26, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
}
.nav-menu > li > a:not(.btn) {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-menu > li > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--grad);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.nav-menu > li > a:not(.btn):hover { color: var(--text); }
.nav-menu > li > a:not(.btn):hover::after { width: 100%; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle-bar {
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn-sm { padding: 10px 18px; font-size: 0.92rem; }
.btn-lg { padding: 17px 30px; font-size: 1.08rem; }
.btn-icon { width: 20px; height: 20px; }

.btn-primary {
  background: var(--grad);
  color: #04121f;
  box-shadow: 0 8px 26px rgba(34, 211, 238, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: var(--surface-2);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(80px, 13vw, 150px) 0 clamp(64px, 9vw, 110px);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -160px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 620px;
  max-width: 120vw;
  background: radial-gradient(closest-side, rgba(34, 211, 238, 0.20), rgba(37, 99, 235, 0.10), transparent 75%);
  filter: blur(20px);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 880px; }

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--cyan-light);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: rgba(34, 211, 238, 0.06);
}
.hero-title {
  font-size: clamp(2.25rem, 6.2vw, 4rem);
  font-weight: 700;
  margin-bottom: 22px;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--muted);
  max-width: 660px;
  margin: 0 0 34px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 38px;
}

.trust-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin: 0;
  padding: 0;
}
.trust-row li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--muted);
}
.trust-row .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.7);
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-alt { position: relative; }
.section-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0));
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  pointer-events: none;
}
.section-alt > .container { position: relative; }

.section-head { margin-bottom: 48px; max-width: 640px; }
.kicker {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }

/* ---------- Service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease, background 0.25s ease;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px 200px at 50% -30%, rgba(34, 211, 238, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--border);
  background: var(--surface-2);
  box-shadow: 0 18px 40px rgba(3, 8, 20, 0.5), inset 0 1px 0 rgba(126, 232, 250, 0.12);
}
.card:hover::after { opacity: 1; }

.card-icon, .why-icon {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  border-radius: 13px;
  margin-bottom: 20px;
  color: var(--cyan-light);
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.14), rgba(37, 99, 235, 0.10));
  border: 1px solid var(--border);
}
.card-icon svg, .why-icon svg { width: 26px; height: 26px; }

.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* ---------- Why grid ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.why-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.why-item:hover { transform: translateY(-3px); border-color: var(--border); background: var(--surface-2); }
.why-item h3 { font-size: 1.12rem; margin-bottom: 7px; }
.why-item p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* ---------- Approach steps ---------- */
.steps {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 30px 24px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.step:hover { transform: translateY(-4px); border-color: var(--border); }
.step-num {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 14px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.step h3 { font-size: 1.14rem; margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); font-size: 0.96rem; }

.approach-notes {
  display: grid;
  gap: 10px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: rgba(34, 211, 238, 0.05);
  border: 1px solid var(--border);
}
.approach-notes p { margin: 0; color: var(--muted); }
.approach-notes strong { color: var(--text); }

/* ---------- Contact ---------- */
.section-contact {
  position: relative;
  text-align: center;
  overflow: hidden;
  border-top: 1px solid var(--border-soft);
}
.contact-glow {
  position: absolute;
  bottom: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 500px;
  max-width: 120vw;
  background: radial-gradient(closest-side, rgba(37, 99, 235, 0.22), rgba(34, 211, 238, 0.10), transparent 75%);
  filter: blur(20px);
  pointer-events: none;
}
.contact-inner { position: relative; max-width: 720px; margin: 0 auto; }
.section-contact h2 { font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 16px; }
.contact-sub { font-size: 1.12rem; color: var(--muted); margin: 0 0 32px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: rgba(7, 13, 26, 0.6);
  padding: 44px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand .brand-name { display: block; }
.footer-tag { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; letter-spacing: 0; font-weight: 400; }
.footer-copy { margin: 0; color: var(--muted); font-size: 0.88rem; width: 100%; padding-top: 14px; border-top: 1px solid var(--border-soft); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 22px 26px;
    background: rgba(7, 13, 26, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .nav-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  .nav-menu > li > a:not(.btn) {
    display: block;
    padding: 13px 4px;
    font-size: 1.05rem;
    color: var(--text);
    border-bottom: 1px solid var(--border-soft);
  }
  .nav-menu > li > a:not(.btn)::after { display: none; }
  .nav-cta { margin-top: 12px; }
  .nav-cta .btn { width: 100%; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards, .why-grid, .steps { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
