/* ============================================================================
   Nikhil Engineers — public site styles.
   Brand colours retained from the existing catalogue; applied in a restrained,
   engineering-datasheet style. Swap the hex values below if the client supplies
   exact brand values.
   ========================================================================== */
:root {
  --color-primary:      #1E9BD7; /* brand sky blue — headers, primary surfaces */
  --color-primary-dark: #1A3F7A; /* navy blue — deep accents */
  --color-accent:       #E11B22; /* brand red — CTAs, highlights */
  --color-accent-dark:  #B5151B;
  --color-highlight:    #F4C20D; /* gold/yellow — sparing accents */

  --color-ink:     #15202B;
  --color-muted:   #5A6B7B;
  --color-line:    #D7DEE5;
  --color-surface: #FFFFFF;
  --color-bg:      #F4F7FA;

  --maxw: 1160px;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(21, 32, 43, .08), 0 1px 2px rgba(21, 32, 43, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--color-ink); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--color-muted); }

/* ── Buttons ──────────────────────────────────────────────────────────────*/
.btn {
  display: inline-block; padding: 10px 18px; border-radius: var(--radius);
  font-weight: 600; border: 1px solid transparent; cursor: pointer;
  background: var(--color-primary-dark); color: #fff; font-size: 15px;
}
.btn:hover { background: #143057; text-decoration: none; }
.btn--accent { background: var(--color-accent); }
.btn--accent:hover { background: var(--color-accent-dark); }
.btn--ghost { background: #fff; color: var(--color-primary-dark); border-color: var(--color-line); }
.btn--ghost:hover { background: var(--color-bg); }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── Header / nav ─────────────────────────────────────────────────────────*/
.site-header {
  background: #fff; border-bottom: 3px solid var(--color-primary);
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--color-ink); }
.brand:hover { text-decoration: none; }
.brand__logo { max-height: 62px; width: auto; }
.brand__mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  background: var(--color-primary-dark); color: #fff; font-weight: 800;
  border-radius: 4px; letter-spacing: .5px;
}
.brand__name { font-weight: 800; font-size: 20px; color: var(--color-accent); letter-spacing: .3px; }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { color: var(--color-ink); font-weight: 600; font-size: 15px; }
.main-nav a:hover { color: var(--color-primary-dark); text-decoration: none; }
.main-nav .nav-cta {
  background: var(--color-accent); color: #fff; padding: 8px 16px; border-radius: var(--radius);
}
.main-nav .nav-cta:hover { background: var(--color-accent-dark); }
.main-nav .nav-brochure {
  border: 2px solid var(--color-accent); color: var(--color-accent); padding: 6px 14px; border-radius: var(--radius);
}
.main-nav .nav-brochure:hover { background: var(--color-accent); color: #fff; text-decoration: none; }

/* ── Hamburger toggle ─────────────────────────────────────────────────────*/
.nav-toggle {
  display: none; flex-direction: column; justify-content: space-between;
  width: 30px; height: 22px; background: none; border: none; cursor: pointer;
  padding: 0; flex-shrink: 0;
}
.nav-toggle span {
  display: block; height: 3px; border-radius: 2px;
  background: var(--color-ink); transition: transform .2s, opacity .2s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

/* ── Flash ────────────────────────────────────────────────────────────────*/
.flash { padding: 12px 16px; border-radius: var(--radius); margin: 16px 0; font-weight: 500; }
.flash--success { background: #e6f6ec; color: #1d6b3a; border: 1px solid #b7e3c6; }
.flash--error { background: #fdeaea; color: #a32128; border: 1px solid #f3c2c4; }

/* ── Hero ─────────────────────────────────────────────────────────────────*/
.hero {
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff; padding: 56px 0;
}
.hero h1 { font-size: 38px; margin: 0 0 10px; }
.hero .tagline { font-size: 20px; font-weight: 600; color: var(--color-highlight); margin: 0 0 14px; }
.hero p { font-size: 17px; max-width: 640px; color: #eaf4fb; }
.hero .btn { margin-top: 22px; }

/* ── Sections ─────────────────────────────────────────────────────────────*/
.section { padding: 48px 0; }
.section--alt { background: #fff; }
.section__head { margin-bottom: 26px; }
.section__head h2 { font-size: 26px; margin: 0 0 6px; }
.section__head .rule { width: 56px; height: 4px; background: var(--color-accent); border-radius: 2px; }

/* ── Card grids ───────────────────────────────────────────────────────────*/
.grid { display: grid; gap: 20px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--color-line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card__media { padding-top: 75%; background: #eef2f6; position: relative; overflow: hidden; }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.card__media .placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--color-muted); font-size: 13px; }
.card__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title { font-size: 17px; margin: 0; }
.card__desc { color: var(--color-muted); font-size: 14px; margin: 0; }
.card__meta { font-size: 12px; color: var(--color-muted); text-transform: uppercase; letter-spacing: .4px; }
.card__foot { margin-top: auto; padding-top: 10px; }

/* ── Why-us ───────────────────────────────────────────────────────────────*/
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px 44px; }
@media (min-width: 760px) { .check-list { grid-template-columns: 1fr 1fr; } }
.check-list li { position: relative; padding-left: 28px; font-size: 15px; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--color-primary); font-weight: 700;
}

/* ── Testimonials ─────────────────────────────────────────────────────────*/
.quote { background: #fff; border: 1px solid var(--color-line); border-radius: var(--radius); padding: 18px 20px; }
.quote__text { margin: 0 0 12px; font-size: 15px; }
.quote__who { font-weight: 700; }
.quote__co { color: var(--color-muted); font-size: 14px; }
.quote__stars { color: var(--color-highlight); letter-spacing: 2px; margin-bottom: 8px; }

/* ── Breadcrumb ───────────────────────────────────────────────────────────*/
.breadcrumb { font-size: 13px; color: var(--color-muted); padding: 16px 0 0; }
.breadcrumb a { color: var(--color-muted); }

/* ── Spec table ───────────────────────────────────────────────────────────*/
.spec-wrap { overflow-x: auto; border: 1px solid var(--color-line); border-radius: var(--radius); background: #fff; }
.spec-table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 560px; }
.spec-table th, .spec-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--color-line); white-space: nowrap; }
.spec-table thead th {
  background: var(--color-primary-dark); color: #fff; position: sticky; top: 0;
  font-weight: 600; cursor: pointer; user-select: none;
}
.spec-table thead th .unit { font-weight: 400; opacity: .8; font-size: 12px; }
.spec-table thead th[aria-sort="ascending"]::after { content: " ▲"; font-size: 10px; }
.spec-table thead th[aria-sort="descending"]::after { content: " ▼"; font-size: 10px; }
.spec-table tbody tr:nth-child(even) { background: #f7fafc; }
.spec-table tbody tr:hover { background: #eef6fc; }
.spec-table td.model { font-weight: 700; }
.spec-table .select-col { width: 38px; text-align: center; }

/* ── Product card photo link ───────────────────────────────────────────────*/
a.card__media { display: block; cursor: zoom-in; }

/* ── Diagram ──────────────────────────────────────────────────────────────*/
.diagram { background: #fff; border: 1px solid var(--color-line); border-radius: var(--radius); padding: 14px; }
.diagram img { margin: 0 auto; max-height: 320px; width: auto; }
.diagram figcaption { text-align: center; color: var(--color-muted); font-size: 13px; margin-top: 8px; }
.diagram--inline { margin: 0 0 18px; }
.diagram--inline img { max-height: 380px; width: auto; margin: 0 auto; cursor: zoom-in; }
.diagram--inline .enlarge-hint { display: block; text-align: center; color: var(--color-primary-dark); font-size: 12px; margin-top: 6px; text-decoration: underline; }

/* ── Compare bar ──────────────────────────────────────────────────────────*/
.compare-bar {
  position: sticky; bottom: 0; background: var(--color-ink); color: #fff;
  padding: 12px 16px; border-radius: var(--radius); display: flex; align-items: center;
  justify-content: space-between; margin-top: 16px; gap: 12px;
}
.compare-bar.is-hidden { display: none; }

/* ── Layout helpers ───────────────────────────────────────────────────────*/
.split { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 880px) { .split--diagram { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.stack > * + * { margin-top: 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0; }

/* ── Forms ────────────────────────────────────────────────────────────────*/
.form-card { background: #fff; border: 1px solid var(--color-line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--color-line);
  border-radius: var(--radius); font: inherit; font-size: 15px; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(30,155,215,.15);
}
.field .err { color: var(--color-accent); font-size: 13px; margin-top: 4px; }
.field--hp { position: absolute; left: -5000px; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }

/* ── WhatsApp button ──────────────────────────────────────────────────────*/
.whatsapp-btn { background: #25D366; color: #fff; }
.whatsapp-btn:hover { background: #1da851; }

/* ── 404 ──────────────────────────────────────────────────────────────────*/
.notfound { text-align: center; padding: 80px 0; }

/* ── Footer ───────────────────────────────────────────────────────────────*/
.site-footer { background: var(--color-primary-dark); color: #dbe7f2; margin-top: 48px; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; gap: 28px; padding: 40px 0; grid-template-columns: 1fr; }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 15px; }
.brand--footer .brand__name { color: #fff; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { margin-bottom: 6px; font-size: 14px; }
.site-footer__bar { border-top: 1px solid rgba(255,255,255,.15); padding: 16px 0; font-size: 13px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.nearwit-credit { color: rgba(255,255,255,.35); font-size: 12px; transition: color .2s; }
.nearwit-credit:hover { color: rgba(255,255,255,.65); text-decoration: none; }

/* ── Mobile ───────────────────────────────────────────────────────────────*/
@media (max-width: 700px) {
  .container { padding: 0 16px; }

  /* Nav */
  .nav-toggle { display: flex; }
  .main-nav {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 87px; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--color-line);
    border-bottom: 3px solid var(--color-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,.1); z-index: 49;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a {
    padding: 14px 20px; font-size: 16px;
    border-bottom: 1px solid var(--color-line);
  }
  .main-nav .nav-cta, .main-nav .nav-brochure {
    margin: 12px 20px; border-radius: var(--radius); text-align: center;
  }
  .main-nav .nav-cta { border-bottom: none; }
  .main-nav .nav-brochure { border-bottom: none; }

  /* Hero */
  .hero { padding: 36px 0; }
  .hero h1 { font-size: 26px; }
  .hero .tagline { font-size: 16px; }
  .hero p { font-size: 15px; }

  /* Sections */
  .section { padding: 32px 0; }
  .section__head h2 { font-size: 21px; }

  /* Cards — single column */
  .grid--cards { grid-template-columns: 1fr; }

  /* Footer */
  .site-footer .container { padding: 0 24px; }
  .site-footer__grid { padding: 28px 0; gap: 20px; }
  .site-footer__bar { text-align: center; }

  /* Compare bar */
  .compare-bar { flex-direction: column; align-items: flex-start; }

  /* Toolbar */
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .btn { text-align: center; }
}
