/* =========================================================
   Jothi Industrial Instrument — Site Stylesheet
   Design: deep navy + steel blue, "spec plate" panels,
   Barlow Condensed (headings) + Inter (body)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy: #0B1F3A;
  --navy-deep: #071527;
  --steel: #1E5A96;
  --steel-light: #4A90C2;
  --bg: #F4F6F9;
  --panel: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #4B5563;
  --line: #D7DEE6;
  --amber: #E8A33D;
  --amber-dark: #C9821F;

  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;

  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  opacity: 0;
  transition: opacity 0.4s ease;
}
body.page-loaded { opacity: 1; }

/* ---------- Scroll-reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  body { opacity: 1; transition: none; }
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em 0;
  color: var(--navy);
  letter-spacing: 0.2px;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em 0; max-width: 68ch; color: var(--ink-soft); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--amber);
  color: var(--navy-deep);
}
.btn-primary:hover { background: var(--amber-dark); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-outline-navy {
  background: transparent;
  border-color: var(--steel);
  color: var(--steel);
}
.btn-outline-navy:hover { background: var(--steel); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--steel);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 52px; width: auto; }
.brand-text {
  font-family: var(--font-head);
  color: #fff;
  line-height: 1.1;
}
.brand-text .name { font-size: 1.3rem; font-weight: 700; letter-spacing: 0.5px; }
.brand-text .tagline { font-size: 0.72rem; color: #9FC1E0; font-family: var(--font-body); font-weight: 500; }

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}
nav.main-nav a {
  color: #D9E6F2;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}
nav.main-nav a:hover,
nav.main-nav a.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
nav.main-nav a.nav-cta {
  background: var(--amber);
  color: var(--navy-deep);
  font-weight: 700;
}
nav.main-nav a.nav-cta:hover {
  background: var(--amber-dark);
  color: var(--navy-deep);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  nav.main-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; gap: 2px; padding: 10px 0; }
  .nav-toggle { display: block; }
  .site-header .container { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(100deg, var(--navy-deep) 0%, var(--navy) 55%, var(--steel) 140%);
  color: #fff;
  padding: 72px 0 0 0;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: end;
}
.hero-copy .eyebrow {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 10px;
}
.hero h1 { color: #fff; }
.hero-copy p { color: #C9D8E8; font-size: 1.08rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.hero-figure {
  position: relative;
  align-self: end;
}
.hero-figure img {
  border-radius: 6px 6px 0 0;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.hero-figure .corner-tag {
  position: absolute;
  top: -14px;
  left: -14px;
  background: var(--amber);
  color: var(--navy-deep);
  font-family: var(--font-head);
  font-weight: 700;
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 3px;
  z-index: 5;
}

/* ---------- Hero image slider ---------- */
.hero-slider { overflow: visible; }
.hero-slider .slider-track {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}
.hero-slider .slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
.hero-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  box-shadow: none;
  border-radius: 0;
}
.hero-slider .slide .corner-tag {
  top: 14px;
  left: 14px;
}
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(11,31,58,0.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 6;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.slider-arrow:hover { background: var(--steel); }
.slider-arrow.prev { left: 12px; }
.slider-arrow.next { right: 12px; }
.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 6;
}
.slider-dots .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.slider-dots .dot.active {
  background: var(--amber);
  transform: scale(1.2);
}
.hero-stats {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 48px;
  padding: 22px 0;
}
.hero-stats .container {
  display: flex;
  gap: 0;
  align-items: stretch;
}
.stat {
  flex: 1;
  padding: 0 24px;
  border-left: 1px solid rgba(255,255,255,0.15);
}
.stat:first-child { border-left: none; padding-left: 0; }
.stat .num { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--amber); }
.stat .label { font-size: 0.85rem; color: #B9CBDD; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-stats .container { flex-direction: column; gap: 16px; }
  .stat { border-left: none; padding-left: 0; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 16px; }
  .stat:first-child { border-top: none; padding-top: 0; }
}

/* ---------- Section shells ---------- */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .kicker {
  font-family: var(--font-head);
  color: var(--steel);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 6px;
}
.bg-white { background: var(--panel); }
.bg-navy { background: var(--navy); color: #fff; }
.bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy p { color: #C9D8E8; }

/* ---------- Spec panel (product / feature card) ---------- */
.spec-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  position: relative;
  padding: 24px;
}
.spec-panel::before,
.spec-panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--steel-light);
  opacity: 0.55;
}
.spec-panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.spec-panel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.feature-icon {
  width: 44px; height: 44px;
  border: 2px solid var(--steel);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--steel);
  margin-bottom: 14px;
}

/* ---------- Clients strip ---------- */
.clients-strip {
  background: var(--navy-deep);
  padding: 34px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.clients-strip .label {
  color: #8FAAC4;
  font-family: var(--font-head);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.clients-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.client-chip {
  border: 1px solid rgba(255,255,255,0.25);
  color: #E4ECF4;
  padding: 10px 18px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.95rem;
}
.client-chip.featured {
  border-color: var(--amber);
  color: var(--amber);
}

/* ---------- Product category cards (products.html landing) ---------- */
.cat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cat-card img { height: 190px; width: 100%; object-fit: cover; border-bottom: 3px solid var(--steel); }
.cat-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.cat-card-body h3 { margin-bottom: 8px; }
.cat-card-body p { font-size: 0.92rem; flex: 1; }
.cat-card-body .count {
  font-family: var(--font-head);
  color: var(--steel);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 6px;
}

/* ---------- Product list table (inside category) ---------- */
.product-list {
  list-style: none;
  margin: 0; padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.product-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.98rem;
}
.product-list li:last-child { border-bottom: none; }
.product-list li:nth-child(even) { background: #FAFBFD; }
.product-list li.is-hidden { display: none; }
.product-list .pname { flex: 1; }
.product-list .variants { color: var(--ink-soft); font-size: 0.88rem; text-align: right; }
.product-list .wa-enquire {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #EAF3EC;
  color: #25D366;
  font-size: 1rem;
  transition: background 0.15s ease;
}
.product-list .wa-enquire:hover { background: #25D366; color: #fff; }

/* ---------- Product search / filter toolbar ---------- */
.product-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.product-search-bar input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
.product-search-bar input:focus {
  outline: 2px solid var(--steel-light);
  outline-offset: 1px;
}
.search-count {
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.no-results {
  background: #FFF7ED;
  border: 1px solid #F0C987;
  border-radius: 4px;
  padding: 14px 18px;
  color: var(--ink);
  font-size: 0.95rem;
}
.cat-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}
.category-block.is-hidden { display: none; }

.catalog-figure {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--panel);
}
.catalog-figure img { width: 100%; }
.catalog-figure figcaption {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

/* ---------- Category jump nav (products.html) ---------- */
.cat-jumpnav {
  position: sticky;
  top: 78px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
  align-self: start;
}
.cat-jumpnav .title {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--navy);
  font-size: 1rem;
  margin-bottom: 10px;
}
.cat-jumpnav ul { list-style: none; margin: 0; padding: 0; }
.cat-jumpnav a {
  display: block;
  padding: 8px 10px;
  border-radius: 3px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.cat-jumpnav a:hover { background: var(--bg); color: var(--steel); }

.products-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 860px) {
  .products-layout { grid-template-columns: 1fr; }
  .cat-jumpnav { position: static; }
}

.category-block { margin-bottom: 56px; scroll-margin-top: 90px; }
.category-block h2 { display: flex; align-items: baseline; gap: 12px; border-bottom: 2px solid var(--steel); padding-bottom: 10px; }
.category-block h2 .cat-count { font-family: var(--font-body); font-size: 0.9rem; color: var(--ink-soft); font-weight: 500; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.info-row {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.info-row:last-child { border-bottom: none; }
.info-row .k {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--steel);
  min-width: 120px;
  font-size: 0.95rem;
}
.info-row .v { color: var(--ink); font-size: 0.98rem; }

form.contact-form { display: flex; flex-direction: column; gap: 14px; }
form.contact-form label { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
form.contact-form input,
form.contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
form.contact-form input:focus,
form.contact-form textarea:focus {
  outline: 2px solid var(--steel-light);
  outline-offset: 1px;
}

/* ---------- Map ---------- */
.map-wrap { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.map-wrap iframe { width: 100%; height: 320px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #B9CBDD;
  padding: 48px 0 20px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand img { height: 44px; margin-bottom: 12px; }
.footer-brand p { color: #8FAAC4; font-size: 0.9rem; }
.footer-bottom {
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: #7590AA;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- About page specifics ---------- */
.timeline {
  border-left: 3px solid var(--steel);
  padding-left: 24px;
  margin-left: 6px;
}
.timeline .t-item { margin-bottom: 28px; position: relative; }
.timeline .t-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 4px;
  width: 12px; height: 12px;
  background: var(--amber);
  border-radius: 50%;
  border: 2px solid var(--navy-deep);
}
.timeline .t-year { font-family: var(--font-head); color: var(--steel); font-weight: 700; font-size: 1.1rem; }

/* ---------- Page header banner (about/products/contact) ---------- */
.page-banner {
  background: var(--navy);
  color: #fff;
  padding: 46px 0;
}
.page-banner .crumb { color: #8FAAC4; font-size: 0.9rem; margin-bottom: 8px; }
.page-banner h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 4px; }
.page-banner p { color: #C9D8E8; }

/* ---------- WhatsApp float button ---------- */
.wa-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #25D366;
  color: #fff;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 200;
  font-size: 1.6rem;
}
.wa-float:hover { background: #1EBE57; }
