/* ===========================================================
   NSoft Distro — landing page styles
   Token system: color / type / layout
   =========================================================== */

:root {
  --navy: #0E1E2B;
  --navy-2: #142B3C;
  --navy-3: #1B3A50;
  --orange: #E8863C;
  --orange-dim: #C96F2C;
  --teal: #3FA6A0;
  --green: #2E9B4F;
  --white: #FFFFFF;
  --light: #C9D6DE;
  --grey: #8FA3AF;
  --bg: #F5F7F8;
  --bg-card: #FFFFFF;
  --ink: #10222F;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Utility type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-dim);
  margin: 0 0 0.9rem;
}
.eyebrow--light { color: var(--orange); }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 2.6rem;
  max-width: 720px;
  color: var(--navy);
}
.section-title--light { color: var(--white); }

.text-accent { color: var(--orange); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.btn--primary {
  background: var(--orange);
  color: var(--navy);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(232,134,60,0.55); }
.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.btn--ghost:hover { border-color: var(--white); transform: translateY(-2px); }
.btn--sm { padding: 0.55rem 1.05rem; font-size: 0.85rem; }
.btn--lg { padding: 1.05rem 2rem; font-size: 1.05rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14,30,43,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.nav-brand-logo {
  height: 26px;
  width: auto;
  background: var(--white);
  border-radius: 5px;
  padding: 3px 5px;
}
.brand-mark--accent { color: var(--orange); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  padding: 4.5rem 1.5rem 2rem;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}
.hero-copy { max-width: 620px; }
.kelani-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--white);
  border-radius: 999px;
  padding: 0.5rem 1.1rem 0.5rem 0.5rem;
  box-shadow: 0 12px 28px -12px rgba(0,0,0,0.45);
  margin: 0 0 1.4rem;
}
.kelani-badge img {
  height: 26px;
  width: auto;
  display: block;
}
.kelani-badge span {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--navy);
  white-space: nowrap;
}
@media (max-width: 480px) {
  .kelani-badge { padding-right: 0.8rem; }
  .kelani-badge span { white-space: normal; }
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.06;
  color: var(--white);
  margin: 0 0 1.3rem;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--light);
  max-width: 540px;
  margin: 0 0 1.9rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.1rem; }
.hero-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--grey);
  margin: 0;
}
.hero-logo-badge {
  background: var(--white);
  border-radius: 14px;
  padding: 1.1rem;
  width: 132px;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px -16px rgba(0,0,0,0.5);
  justify-self: end;
}
@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-logo-badge { justify-self: start; width: 96px; height: 96px; padding: 0.85rem; }
}

/* ---------- Signature wire flow ---------- */
.wire-flow {
  max-width: var(--max);
  margin: 3rem auto 0;
  position: relative;
  padding: 0 1.5rem 3.5rem;
}
.wire-svg {
  width: 100%;
  height: 90px;
  display: block;
}
.wire-svg path {
  fill: none;
  stroke: var(--orange);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  transition: stroke-dashoffset 1.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.wire-flow.in-view .wire-svg path { stroke-dashoffset: 0; }

.wire-node {
  position: absolute;
  top: 34px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: translate(-50%, 10px);
}
.wire-flow.in-view .wire-node { opacity: 1; transform: translate(-50%, 0); }
.wire-flow.in-view .wire-node:nth-child(3) { transition-delay: 0.25s; }
.wire-flow.in-view .wire-node:nth-child(4) { transition-delay: 0.5s; }
.wire-flow.in-view .wire-node:nth-child(5) { transition-delay: 0.75s; }
.wire-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--orange);
  border: 3px solid var(--navy);
  box-shadow: 0 0 0 3px var(--orange);
  margin-bottom: 0.6rem;
}
.wire-label {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--white);
  white-space: nowrap;
}
.wire-label small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--grey);
  margin-top: 0.15rem;
}
@media (max-width: 720px) {
  .wire-flow { display: none; } /* replaced by a stacked list on small screens */
}
.wire-flow-mobile { display: none; }
@media (max-width: 720px) {
  .wire-flow-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-width: var(--max);
    margin: 2.2rem auto 0;
    padding: 0 1.5rem 2.5rem;
  }
  .wire-flow-mobile .wf-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
  }
  .wire-flow-mobile .wf-item span.dot {
    width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex: none;
  }
  .wire-flow-mobile small { color: var(--grey); font-family: var(--font-body); font-weight: 400; display:block; }
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}
.section--navy {
  max-width: none;
  background: var(--navy);
  padding: 5rem 1.5rem;
}
.section--navy > .eyebrow,
.section--navy > .section-title,
.section--navy > .grid { max-width: var(--max); margin-left: auto; margin-right: auto; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); gap: 2rem 3rem; }
@media (max-width: 960px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card);
  border: 1px solid #E4E9EC;
  border-radius: 12px;
  padding: 1.6rem 1.5rem;
}
.card-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--orange-dim);
  display: block;
  margin-bottom: 0.7rem;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin: 0 0 0.5rem;
  color: var(--navy);
}
.card p { margin: 0; color: #45565f; font-size: 0.94rem; }

.modules-grid { gap: 0.9rem; }
.module {
  background: var(--navy-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  color: var(--light);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.module-check {
  color: var(--teal);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ---------- Product tour (screenshots) ---------- */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
@media (max-width: 960px) { .shot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .shot-grid { grid-template-columns: 1fr; } }
.shot {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: none;
  border: none;
  padding: 0;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  text-align: left;
}
.shot-frame {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: var(--navy-2);
  border: 1px solid #E4E9EC;
  box-shadow: 0 10px 24px -14px rgba(14,30,43,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.shot:hover .shot-frame,
.shot:focus-visible .shot-frame {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -14px rgba(14,30,43,0.45);
}
.shot-dots {
  display: flex;
  gap: 5px;
  padding: 8px 10px;
  background: var(--navy);
}
.shot-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: block;
}
.shot-frame img {
  width: 100%;
  display: block;
}
.shot-caption {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10,18,25,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.lightbox.open { display: flex; }
.lightbox-figure {
  max-width: min(1100px, 100%);
  max-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 10px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
.lightbox-figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--light);
}
.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.why-row { display: flex; gap: 1rem; align-items: flex-start; }
.why-mark {
  flex: none;
  width: 10px; height: 10px;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: var(--orange);
}
.why-row h3 { font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 0.4rem; color: var(--navy); }
.why-row p { margin: 0; color: #45565f; font-size: 0.95rem; }

/* ---------- Proof ---------- */
.proof {
  background: var(--bg);
  padding: 1rem 1.5rem 6rem;
}
.proof-card {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  border-left: 3px solid var(--orange);
  padding-left: 1.75rem;
  text-align: left;
}
.proof-quote {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--navy);
  margin: 0 0 0.9rem;
}
.proof-attr {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--grey);
  margin: 0;
}

/* ---------- CTA / footer ---------- */
.cta {
  background: var(--navy);
  text-align: center;
  padding: 5rem 1.5rem 4rem;
}
.cta-logo {
  width: 150px;
  margin: 0 auto 1.6rem;
  background: var(--white);
  border-radius: 12px;
  padding: 10px 14px;
}
.cta-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--white);
  margin: 0 0 0.8rem;
}
.cta-sub { color: var(--light); max-width: 480px; margin: 0 auto 2rem; }
.cta-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--orange);
  margin-top: 1.1rem;
}
/* ---------- Developer ---------- */
.dev-card {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  max-width: 780px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid #E4E9EC;
  border-radius: 16px;
  padding: 2rem;
}
.dev-photo {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 3px solid var(--orange);
}
.dev-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
  margin: 0 0 0.6rem;
}
.dev-bio p { margin: 0; color: #45565f; font-size: 0.95rem; }
@media (max-width: 640px) {
  .dev-card { flex-direction: column; text-align: center; padding: 1.75rem 1.4rem; }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
