/* ─────────────────────────────────────────────────────────
   Niranjan Enterprises — Design System
   Industrial precision × modern editorial
   ───────────────────────────────────────────────────────── */

:root {
  /* Palette — deep navy steel + copper (the winding wire) */
  --ink:        #0B1220;   /* near-black navy */
  --ink-2:      #11192B;
  --ink-3:      #1B2440;
  --paper:      #F6F3EC;   /* warm off-white, like technical drawings */
  --paper-2:    #EFEADF;
  --rule:       #E4DFD2;   /* paper hairlines */
  --rule-dark:  rgba(255,255,255,0.10);
  --copper:     #B5581E;   /* enameled copper wire */
  --copper-2:   #D97142;
  --copper-soft:#F4E5D8;
  --steel:      #6E7787;
  --steel-2:    #9AA2B1;
  --live:       #1D8F5B;   /* phase indicator */
  --warn:       #C88314;

  /* Type */
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-sm: 0 1px 2px rgba(11,18,32,.06), 0 2px 8px rgba(11,18,32,.04);
  --shadow-md: 0 4px 16px rgba(11,18,32,.08), 0 24px 48px -16px rgba(11,18,32,.10);
  --shadow-lg: 0 40px 80px -24px rgba(11,18,32,.25);

  --maxw: 1280px;
}

/* Fraunces + Inter + JetBrains via unpkg-ish — use Google */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* Type utilities */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.02; }
.display-lg { font-size: clamp(48px, 7vw, 112px); }
.display-md { font-size: clamp(36px, 5vw, 72px); }
.display-sm { font-size: clamp(28px, 3.4vw, 48px); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  font-weight: 500;
}
.eyebrow.on-dark { color: var(--copper-2); }
.lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.mono { font-family: var(--font-mono); }
.num  { font-family: var(--font-display); font-feature-settings: "lnum"; }

/* Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

.section { padding: clamp(72px, 10vw, 144px) 0; }
.section--tight { padding: clamp(48px, 7vw, 88px) 0; }

.hr { height: 1px; background: var(--rule); border: 0; }
.hr.on-dark { background: var(--rule-dark); }

/* ─── NAV ─── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,243,236,0.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--ink);
  display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.brand__mark svg { width: 22px; height: 22px; }
.brand__text {
  display: flex; flex-direction: column; line-height: 1;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 500; letter-spacing: -0.01em;
}
.brand__tag {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--steel); margin-top: 3px;
}
.nav__links { display: flex; gap: 4px; align-items: center; }
.nav__links a {
  padding: 10px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: background .15s ease, color .15s ease;
}
.nav__links a:hover { background: rgba(11,18,32,0.06); color: var(--ink); }
.nav__links a.active { color: var(--ink); }
.nav__cta {
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .15s ease, background .15s ease;
}
.nav__cta:hover { background: var(--copper); }
.nav__cta svg { width: 14px; height: 14px; }

.nav__burger { display: none; }
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger {
    display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 999px;
    background: rgba(11,18,32,0.06);
  }
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-weight: 500; font-size: 15px;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { width: 16px; height: 16px; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--copper); }
.btn--ghost   { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--ghost-light { background: transparent; color: var(--paper); border: 1px solid rgba(255,255,255,0.35); }
.btn--ghost-light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--copper  { background: var(--copper); color: #fff; }
.btn--copper:hover { background: #8f4513; }

/* ─── CARDS ─── */
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(11,18,32,0.10); }

/* ─── GRID MOTIF ─── (nod to laminated core) */
.grid-motif {
  background-image:
    linear-gradient(to right, rgba(11,18,32,0.05) 1px, transparent 1px);
  background-size: 6px 100%;
}
.grid-motif--dark {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 6px 100%;
}

/* ─── FOOTER ─── */
.footer {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 8px 100%;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 40%);
}
.footer__top {
  padding: 96px 0 72px;
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 64px;
}
@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: 48px; padding: 64px 0 48px; }
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--copper-2); margin: 0 0 20px; font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li + li { margin-top: 12px; }
.footer li a { color: rgba(246,243,236,0.75); font-size: 15px; transition: color .15s ease; }
.footer li a:hover { color: var(--paper); }
.footer__headline {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.footer__desc { color: rgba(246,243,236,0.65); font-size: 15px; max-width: 40ch; }
.footer__bottom {
  border-top: 1px solid var(--rule-dark);
  padding: 24px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: rgba(246,243,236,0.55);
  position: relative; z-index: 1;
}
.footer__bottom .mono { font-size: 11px; letter-spacing: 0.12em; }
@media (max-width: 720px) {
  .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* ─── TAGS ─── */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--copper-soft); color: var(--copper);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag--dark { background: rgba(217,113,66,0.15); color: var(--copper-2); }
.tag--steel { background: rgba(11,18,32,0.06); color: var(--ink-2); }

/* ─── FORMS ─── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--steel);
}
.field input, .field textarea, .field select {
  font-family: var(--font-sans); font-size: 16px;
  padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--rule); background: #fff;
  color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0; border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(11,18,32,0.08);
}

/* ─── CHATBOT ─── */
.chat-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 60px; height: 60px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  box-shadow: 0 12px 32px rgba(11,18,32,0.25);
  transition: transform .2s ease, background .2s ease;
}
.chat-fab:hover { transform: scale(1.05); background: var(--copper); }
.chat-fab svg { width: 24px; height: 24px; }
.chat-fab__pulse {
  position: absolute; inset: 0; border-radius: 999px;
  border: 2px solid var(--copper);
  animation: pulse 2s ease-out infinite;
  pointer-events: none;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.chat-panel {
  position: fixed; right: 24px; bottom: 96px; z-index: 60;
  width: 380px; max-width: calc(100vw - 32px); max-height: 560px;
  background: #fff; border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(11,18,32,0.25);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: popin .24s cubic-bezier(.2,.8,.2,1);
}
@keyframes popin {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.chat-panel__head {
  background: var(--ink); color: var(--paper);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 12px;
}
.chat-panel__avatar {
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--copper); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 16px;
}
.chat-panel__title { font-size: 15px; font-weight: 500; }
.chat-panel__status {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  color: rgba(246,243,236,0.7); text-transform: uppercase;
  display: flex; align-items: center; gap: 6px; margin-top: 2px;
}
.chat-panel__status::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--live);
  box-shadow: 0 0 0 3px rgba(29,143,91,0.25);
}
.chat-panel__close {
  margin-left: auto; width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.1); transition: background .15s;
}
.chat-panel__close:hover { background: rgba(255,255,255,0.2); }
.chat-panel__body {
  flex: 1; overflow-y: auto;
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
  background: var(--paper);
}
.chat-msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.chat-msg--bot { background: #fff; border: 1px solid var(--rule); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg--user { background: var(--ink); color: var(--paper); align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-chip {
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--rule); background: #fff;
  font-size: 13px; color: var(--ink-2);
  transition: border-color .15s, background .15s, color .15s;
}
.chat-chip:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.chat-panel__foot {
  padding: 12px; border-top: 1px solid var(--rule); background: #fff;
  display: flex; gap: 8px;
}
.chat-panel__foot input {
  flex: 1; border: 1px solid var(--rule); border-radius: 999px;
  padding: 10px 16px; font-size: 14px; font-family: var(--font-sans);
  background: var(--paper);
}
.chat-panel__foot input:focus { outline: 0; border-color: var(--ink); }
.chat-panel__send {
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
}
.chat-panel__send:hover { background: var(--copper); }
.chat-typing {
  display: inline-flex; gap: 4px; padding: 12px 14px;
  background: #fff; border: 1px solid var(--rule); border-radius: 14px;
  align-self: flex-start;
}
.chat-typing span {
  width: 6px; height: 6px; border-radius: 999px; background: var(--steel);
  animation: typing 1.4s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing {
  0%,60%,100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ─── REVEAL ─── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* utility */
.text-ink { color: var(--ink); }
.text-steel { color: var(--steel); }
.text-copper { color: var(--copper); }
.bg-ink { background: var(--ink); color: var(--paper); }
.bg-paper2 { background: var(--paper-2); }
.rounded { border-radius: 20px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-12 { gap: 12px; } .gap-20 { gap: 20px; }
.grid { display: grid; }
