/* ============================================================
   NearCom Design System
   Curated Commons — teal, glass, warmth, trust
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Teal spine (PRD spec + extended) */
  --teal-950: #001f1f;
  --teal-900: #003838;
  --teal-800: #005050;
  --teal-700: #006565;
  --teal-600: #007575;
  --teal-500: #008080;
  --teal-400: #26a3a3;
  --teal-300: #4dcaca;
  --teal-200: #8fdede;
  --teal-100: #c8ecec;
  --teal-50:  #e8f6f6;

  /* Neutrals */
  --ink:      #0b1414;
  --ink-2:    #0f1e1e;
  --ink-3:    #17302f;
  --charcoal: #1f3535;
  --graphite: #435656;
  --slate:    #6a8080;
  --mist:     #a9bcbc;

  /* Surfaces (PRD) */
  --surface:      #f6fafa;
  --surface-2:    #f0f4f4;
  --surface-3:    #e6efef;
  --white:        #ffffff;

  /* Warm accents used sparingly */
  --amber:  #f5a524;
  --coral:  #f26a53;

  /* Glass */
  --glass-light: rgba(255, 255, 255, 0.58);
  --glass-light-strong: rgba(255, 255, 255, 0.78);
  --glass-dark:  rgba(11, 20, 20, 0.42);
  --glass-teal:  rgba(0, 101, 101, 0.18);
  --hairline-light: rgba(255, 255, 255, 0.65);
  --hairline-dark:  rgba(255, 255, 255, 0.08);

  /* Radii (PRD) */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-soft:   0 10px 30px -12px rgba(0, 60, 60, 0.18);
  --shadow-lift:   0 30px 60px -30px rgba(0, 80, 80, 0.35);
  --shadow-float:  0 40px 80px -20px rgba(0, 60, 60, 0.45);
  --shadow-inner-glass: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(0,0,0,.05);

  /* Type scale */
  --font: 'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-display: clamp(2.6rem, 6vw, 5.5rem);
  --fs-h1: clamp(2.2rem, 4.4vw, 3.6rem);
  --fs-h2: clamp(1.7rem, 3.2vw, 2.5rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.55rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;

  /* Layout */
  --container: 1240px;
  --page-x: clamp(20px, 5vw, 56px);
}

/* Reset --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
h1,h2,h3,h4 { font-weight: 700; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { margin: 0; text-wrap: pretty; }

/* Utility --------------------------------------------------- */
.container { max-width: var(--container); margin: 0 auto; padding-left: var(--page-x); padding-right: var(--page-x); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-700);
  padding: 6px 12px; border-radius: var(--r-full);
  background: rgba(0, 128, 128, 0.08);
  backdrop-filter: blur(8px);
}
.eyebrow--onDark { color: var(--teal-200); background: rgba(255,255,255,0.06); }
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(0, 128, 128, 0.18);
}

/* Buttons --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; font-weight: 600; font-size: 0.95rem;
  border-radius: var(--r-full);
  transition: transform .35s cubic-bezier(.2,.9,.2,1), box-shadow .35s, background .35s, color .35s;
  will-change: transform;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  color: white;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-800));
  box-shadow: 0 12px 24px -12px rgba(0, 101, 101, 0.6), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn--primary:hover { box-shadow: 0 20px 36px -14px rgba(0, 101, 101, 0.8), inset 0 1px 0 rgba(255,255,255,0.35); }

.btn--ghost {
  color: var(--ink);
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-inner-glass);
}
.btn--ghost:hover { background: rgba(255,255,255,0.9); }

.btn--onDark {
  color: white; background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}
.btn--onDark:hover { background: rgba(255,255,255,0.16); }

.btn__arrow { transition: transform .3s ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Nav --------------------------------------------------- */
.nav {
  position: fixed; inset: 16px var(--page-x) auto; z-index: 100;
  max-width: calc(var(--container) - 40px); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 10px 20px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border-radius: var(--r-full);
  box-shadow: 0 20px 40px -20px rgba(0, 60, 60, 0.2), inset 0 1px 0 rgba(255,255,255,0.6);
  transition: background .3s, box-shadow .3s;
}
.nav--scrolled { background: rgba(255,255,255,0.85); }
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; font-size: 1.1rem; }
.nav__brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  padding: 8px 14px; border-radius: var(--r-full);
  font-size: 0.925rem; font-weight: 500; color: var(--ink);
  transition: background .25s, color .25s;
}
.nav__links a:hover { background: rgba(0, 101, 101, 0.08); color: var(--teal-700); }
.nav__links a.is-active { color: var(--teal-700); background: rgba(0, 101, 101, 0.1); }
.nav__cta { padding: 10px 18px; font-size: 0.9rem; }

.nav__toggle { display: none; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(0,0,0,0.04); }
.nav__toggle span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.nav__toggle span::before, .nav__toggle span::after { content:""; position:absolute; left:0; width:18px; height:2px; background: var(--ink); }
.nav__toggle span::before { top:-6px; }
.nav__toggle span::after  { top: 6px; }

/* Mobile nav */
@media (max-width: 880px) {
  .nav { padding: 10px 12px 10px 16px; }
  .nav__links { position: absolute; top: 100%; right: 0; margin-top: 12px;
    background: rgba(255,255,255,0.92); backdrop-filter: blur(24px);
    padding: 12px; border-radius: var(--r-lg); box-shadow: var(--shadow-lift);
    flex-direction: column; align-items: stretch; min-width: 220px;
    transform: translateY(-8px) scale(.98); opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s;
  }
  .nav__links.is-open { opacity:1; transform: translateY(0) scale(1); pointer-events:auto; }
  .nav__links a { padding: 12px 14px; }
  .nav__toggle { display: inline-flex; }
  .nav__cta { display: none; }
}

/* Section base --------------------------------------------------- */
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section--dark { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: white; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: white; }
.section--surface2 { background: var(--surface-2); }
.section-head { max-width: 780px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head p.lead { font-size: 1.15rem; color: var(--graphite); margin-top: 18px; }
.section--dark .section-head p.lead { color: var(--mist); }

/* Curved divider */
.divider-wave { position: absolute; left: 0; right: 0; height: 80px; pointer-events: none; }
.divider-wave--top { top: -1px; }
.divider-wave--bottom { bottom: -1px; transform: scaleY(-1); }

/* Glass cards --------------------------------------------------- */
.glass {
  background: var(--glass-light);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-soft), var(--shadow-inner-glass);
  transition: transform .5s cubic-bezier(.2,.9,.2,1), box-shadow .5s;
}
.glass--dark {
  background: rgba(255,255,255,0.05);
  border-radius: var(--r-xl);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  color: white;
}
.card-lift:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }

/* Chips / tags */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(0, 128, 128, 0.1); color: var(--teal-700);
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s cubic-bezier(.2,.9,.2,1), transform .8s cubic-bezier(.2,.9,.2,1); }
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }
.reveal-delay-5 { transition-delay: .40s; }

/* ============================================================
   Radar + Mesh background
   ============================================================ */
.bg-layer {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.bg-layer canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.radar-rings {
  position: absolute; left: 50%; top: 50%;
  width: 140vmin; height: 140vmin; transform: translate(-50%, -50%);
  pointer-events: none;
}
.radar-rings circle {
  fill: none; stroke: rgba(77, 202, 202, 0.14); stroke-width: 1.2;
  transform-origin: center;
}
.radar-rings .ring--pulse {
  animation: radarPulse 4.5s ease-out infinite;
  stroke: rgba(77, 202, 202, 0.5);
}
.radar-rings .ring--pulse.d2 { animation-delay: 1.5s; }
.radar-rings .ring--pulse.d3 { animation-delay: 3s; }
@keyframes radarPulse {
  0%   { r: 60;  opacity: 0.7; stroke-width: 1.6; }
  100% { r: 480; opacity: 0;   stroke-width: 0.3; }
}

/* Radar sweep */
.radar-sweep {
  position: absolute; left: 50%; top: 50%;
  width: 140vmin; height: 140vmin;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, transparent 0deg, rgba(77,202,202,0.14) 30deg, transparent 60deg, transparent 360deg);
  border-radius: 50%; mix-blend-mode: screen;
  animation: sweep 8s linear infinite;
}
@keyframes sweep { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* Neighbour dots (floating avatars around radar) */
.neighbour-dot {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--teal-200), var(--teal-500));
  box-shadow: 0 0 20px rgba(77,202,202,0.7), 0 0 40px rgba(77,202,202,0.35);
  animation: floaty 6s ease-in-out infinite;
}
.neighbour-dot::after {
  content:""; position:absolute; inset:-8px; border-radius:50%;
  border: 1px solid rgba(77,202,202,0.35); animation: dotHalo 3s ease-out infinite;
}
@keyframes dotHalo { 0% { transform:scale(.6); opacity:.9; } 100% { transform:scale(2); opacity: 0; } }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 96px 0 40px;
  position: relative;
  overflow: hidden;
}
.footer .bg-layer { opacity: .3; }
.footer__cta {
  position: relative; z-index: 2;
  padding: clamp(40px, 6vw, 72px);
  border-radius: var(--r-2xl);
  background: linear-gradient(135deg, rgba(0,101,101,0.5), rgba(0,50,80,0.3));
  backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
  margin-bottom: 80px;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px;
}
.footer__cta h2 { color: white; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.footer__cta p { color: rgba(255,255,255,0.7); margin-top: 12px; max-width: 480px; }
@media (max-width: 720px) { .footer__cta { grid-template-columns: 1fr; text-align: left; } }

.footer__grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px;
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer__brand img { width: 40px; height: 40px; border-radius: 10px; }
.footer__brand span { font-size: 1.3rem; font-weight: 700; color: white; letter-spacing: -0.02em; }
.footer h4 { color: white; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 20px; font-weight: 600; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer a { color: rgba(255,255,255,0.65); font-size: 0.9375rem; transition: color .25s; }
.footer a:hover { color: white; }
.footer__badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.footer__badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-radius: 12px; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85);
  font-size: 0.8rem; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.footer__badge svg { width: 22px; height: 22px; }
.footer__badge small { display: block; font-size: 0.65rem; opacity: 0.6; font-weight: 500; margin-top: -2px; }

.footer__bottom {
  position: relative; z-index: 2;
  padding-top: 24px; margin-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px;
  font-size: 0.85rem; color: rgba(255,255,255,0.5);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer__social { display: flex; gap: 10px; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); transition: background .25s, transform .25s;
}
.footer__social a:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.footer__social svg { width: 18px; height: 18px; }

.made-in-india {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-full); background: rgba(255,255,255,0.05);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em;
}
.made-in-india svg { width: 14px; height: 10px; }

/* ============================================================
   Page-hero (shared for internal pages)
   ============================================================ */
.page-hero {
  padding: 180px 0 clamp(64px, 8vw, 100px);
  background: linear-gradient(180deg, var(--ink) 0%, var(--teal-950) 100%);
  color: white; position: relative; overflow: hidden;
}
.page-hero .bg-layer { opacity: .55; }
.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem); position: relative; z-index: 2;
}
.page-hero p.lead { font-size: 1.2rem; color: rgba(255,255,255,0.7); margin-top: 20px; max-width: 640px; position: relative; z-index: 2; }
.page-hero .eyebrow { position: relative; z-index: 2; margin-bottom: 20px; }

/* Typography helpers */
.grad-text {
  background: linear-gradient(135deg, var(--teal-300) 0%, var(--teal-100) 60%, #ffffff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-text--light {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.big-quote { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; }

/* Grain overlay for premium feel */
.grain::before {
  content:""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.35'/></svg>");
  opacity: 0.05; mix-blend-mode: overlay; z-index: 1;
}
