/* Herg Lubrication India site stylesheet.
   Engineering blue on white. Hand-written; no framework, no theme. */

/* ---------------------------------------------------------------- tokens */

:root {
  --navy:       #0f2942;
  --navy-deep:  #0a1c2e;
  --navy-soft:  #1b3d5c;
  --blue:       #1a6fb8;
  --blue-dark:  #145a95;
  --blue-tint:  #eef5fb;

  --ink:        #12202e;
  --muted:      #5b6b7c;
  --faint:      #8798a8;
  --line:       #dde4ea;
  --line-soft:  #eceff3;
  --surface:    #ffffff;
  --bg:         #f7f9fb;

  --wrap:       1200px;
  --radius:     6px;
  --radius-lg:  10px;

  --shadow-sm:  0 1px 2px rgba(15, 41, 66, .06);
  --shadow:     0 2px 8px rgba(15, 41, 66, .07);
  --shadow-lg:  0 12px 32px rgba(15, 41, 66, .12);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ------------------------------------------------------------- baseline */

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--navy);
}

h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--surface);
  color: var(--navy);
  padding: 12px 18px;
  font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

.eyebrow {
  margin: 0 0 .6rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 62ch;
}

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }

.btn-ghost {
  border-color: rgba(255, 255, 255, .35);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.btn-outline {
  border-color: var(--line);
  background: var(--surface);
  color: var(--navy);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

/* --------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-header.is-stuck { box-shadow: 0 2px 16px rgba(10, 28, 46, .28); }

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 200px; height: auto; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: var(--radius);
  background: none;
  color: #fff;
  cursor: pointer;
}
.nav-toggle svg { margin: auto; }

.nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, .82);
  font-size: .95rem;
  font-weight: 500;
}
.nav a:hover,
.nav a:focus-visible { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--blue); }

.nav .nav-cta {
  margin-left: 8px;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
}
.nav .nav-cta:hover { background: var(--blue-dark); }

/* Products dropdown: hover on pointer devices, click-toggled on touch. */
.has-menu { position: relative; }

.has-menu > button {
  display: flex;
  align-items: center;
  gap: .4em;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: rgba(255, 255, 255, .82);
  font: 500 .95rem var(--sans);
  cursor: pointer;
}
.has-menu > button:hover,
.has-menu.is-open > button { background: rgba(255, 255, 255, .1); color: #fff; }
.has-menu > button svg { transition: transform .15s; }
.has-menu.is-open > button svg { transform: rotate(180deg); }

.submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: none;
  min-width: 270px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.has-menu.is-open .submenu { display: block; }

.submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--navy);
  font-weight: 500;
}
.submenu a:hover { background: var(--blue-tint); color: var(--blue-dark); }
.submenu a span {
  display: block;
  font-size: .8rem;
  font-weight: 400;
  color: var(--muted);
}
.submenu a:hover span { color: var(--muted); }
.submenu hr { margin: 6px 8px; border-color: var(--line-soft); }

/* ----------------------------------------------------------------- hero */

/* The homepage opens on a spec plate, not a pitch: what the range actually
   covers, in the same register as the datasheets it sells. */

.hero {
  background: var(--navy);
  color: #fff;
  padding: clamp(40px, 5vw, 64px) 0 clamp(44px, 5vw, 68px);
  border-bottom: 3px solid var(--blue);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(32px, 5vw, 60px);
  align-items: stretch;
}

.hero-org {
  margin: 0 0 .9em;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6fb3ea;
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.7rem, 1.2rem + 1.7vw, 2.35rem);
  line-height: 1.18;
  max-width: 20ch;
  margin-bottom: .5em;
}
.hero-sub {
  max-width: 52ch;
  margin-bottom: 30px;
  font-size: .92rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .62);
}

.spec-plate {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
}
.spec-plate > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.spec-plate > div:last-child { border-bottom: 0; }
.spec-plate dt {
  flex: 0 0 auto;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}
.spec-plate dd {
  margin: 0;
  text-align: right;
  font: 500 .86rem/1.45 var(--mono);
  letter-spacing: .01em;
  color: #fff;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* The plate fills the row height and the photo sits in it uncropped, so the
   two columns square off without cutting the product line-up. */
.hero-figure {
  display: flex;
  flex-direction: column;
  margin: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-figure img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
}
.hero-figure figcaption {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  line-height: 1.5;
  color: var(--muted);
}

/* -------------------------------------------------------------- section */

.section { padding: clamp(48px, 6vw, 76px) 0; }
.section-white { background: var(--surface); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.section-head h2 { margin-bottom: .15em; }
.section-head p { margin: 0; color: var(--muted); }
.section-head a { flex: 0 0 auto; font-weight: 600; font-size: .95rem; }

/* ------------------------------------------------------- category tiles */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.tile {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tile:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}
.tile h3 { margin-bottom: .4em; }
.tile p { color: var(--muted); font-size: .94rem; margin-bottom: 1.4em; }
.tile .btn { margin-top: auto; }
.tile .tile-more {
  margin-top: auto;
  color: var(--blue);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .02em;
}

/* ------------------------------------------------------- product cards  */

.product-grid {
  display: grid;
  /* auto-fit, not auto-fill: a related-products row of three should fill the
     width rather than leave a phantom fourth column. */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}
/* Fixed height, not aspect-ratio: photos in the catalogue range from square to
   4:3 to portrait, and a fixed box is what keeps every card in a row aligned. */
.card-media {
  flex: 0 0 210px;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
}
.card-media img {
  max-width: 100%;
  max-height: 174px;
  width: auto;
  object-fit: contain;
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 {
  font-size: 1rem;
  line-height: 1.35;
  margin-bottom: .35em;
  color: var(--navy);
}
.card:hover .card-body h3 { color: var(--blue-dark); }
/* Summaries are lifted verbatim from each product's own copy, so they vary from
   one line to a paragraph. Clamp them so a row of cards stays a row of cards. */
.card-body p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
  margin: 0 0 1em;
  font-size: .87rem;
  line-height: 1.55;
  color: var(--muted);
}
.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--blue-tint);
  color: var(--blue-dark);
  font: 600 .7rem/1.4 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.chip-muted { background: var(--line-soft); color: var(--muted); }

/* -------------------------------------------------------- page headings */

.page-head {
  padding: 44px 0 36px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: .25em; }
.page-head .lede { margin-bottom: 0; }

.breadcrumb {
  margin-bottom: 18px;
  font-size: .84rem;
  color: var(--faint);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5em;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumb li::after {
  content: "/";
  margin-left: .5em;
  color: var(--line);
}
.breadcrumb li:last-child::after { content: none; }
.breadcrumb a { color: var(--muted); }
.breadcrumb [aria-current="page"] { color: var(--navy); font-weight: 500; }

/* Category filter row on /shop/ and category pages. */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.filters a {
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
}
.filters a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.filters-sub { margin-top: -20px; }
.filters-sub a { border-style: dashed; font-size: .84rem; padding: 6px 13px; }
.filters a[aria-current="page"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* --------------------------------------------------------- product page */

.product-top { padding: 28px 0 8px; }

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding-top: 12px;
}

.gallery-main {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.gallery-main img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}
.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.gallery-thumbs button {
  width: 74px;
  height: 74px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.gallery-thumbs button:hover { border-color: var(--blue); }
.gallery-thumbs button[aria-current="true"] {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-tint);
}
.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-summary { padding-top: 4px; }
.product-summary h1 { margin-bottom: .35em; }
.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.product-summary .lede { font-size: 1.02rem; }

.enquiry {
  margin-top: 28px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.enquiry h2 { font-size: 1.05rem; margin-bottom: .4em; }
.enquiry p { font-size: .92rem; color: var(--muted); margin-bottom: 1.2em; }
.enquiry .btn { width: 100%; justify-content: center; }
.enquiry .enquiry-alt {
  display: block;
  margin-top: 14px;
  font-size: .86rem;
  text-align: center;
  color: var(--muted);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.spec-table th,
.spec-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  font-size: .95rem;
}
.spec-table tr:last-child th,
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table th {
  width: 34%;
  color: var(--navy);
  font-weight: 600;
  background: #fbfcfd;
}
.spec-table td { color: var(--muted); }
.spec-table td p { margin: 0; }

/* ---------------------------------------------------------------- prose */

.prose { max-width: 78ch; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin-top: 1.8em; font-size: 1.3rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: #2b3b4b; }
.prose strong { color: var(--navy); }
.prose a { text-decoration: underline; }

/* Dimension drawings and spec tables that ship as wide images. */
.prose img {
  margin: 1.6em auto;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Product descriptions: the block runs the full column width so dimension
   drawings and spec-table images get the room they need, while the prose
   itself stays at a readable measure. */
.prose-wide { max-width: none; }
.prose-wide > p,
.prose-wide > h2,
.prose-wide > h3,
.prose-wide > ul,
.prose-wide > ol { max-width: 74ch; }
.prose-wide > p:has(img) { max-width: none; text-align: center; }

/* --------------------------------------------------------------- CTA band */

.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
  padding: clamp(44px, 5vw, 64px) 0;
}
.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .78); max-width: 52ch; }
.cta-band .btn-primary { background: #fff; color: var(--navy); }
.cta-band .btn-primary:hover { background: var(--blue-tint); color: var(--navy); }

/* --------------------------------------------------------------- footer */

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, .68);
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(140px, 1fr));
  gap: 40px;
  padding: 56px 0 44px;
}
.footer-brand img { width: 190px; margin-bottom: 18px; }
.footer-brand p { max-width: 34ch; margin: 0; color: rgba(255, 255, 255, .6); }

.site-footer h2 {
  margin-bottom: 1.1em;
  color: #fff;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: .65em; }
.site-footer a { color: rgba(255, 255, 255, .68); }
.site-footer a:hover { color: #fff; }

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .85rem;
  color: rgba(255, 255, 255, .48);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .product-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .hero-grid { gap: 32px; }
  .hero h1 { max-width: none; }
}

@media (max-width: 460px) {
  /* Narrow enough that label and value can't share a line. */
  .spec-plate > div { flex-direction: column; gap: 4px; }
  .spec-plate dd { text-align: left; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 12px 24px 20px;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 16px 24px rgba(10, 28, 46, .25);
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a, .has-menu > button { width: 100%; padding: 12px 14px; }

  .has-menu > button { justify-content: space-between; }
  .submenu {
    position: static;
    display: block;
    min-width: 0;
    margin: 2px 0 8px 12px;
    padding: 0;
    background: none;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .15);
    border-radius: 0;
    box-shadow: none;
  }
  .submenu a { color: rgba(255, 255, 255, .72); }
  .submenu a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .submenu a span { color: rgba(255, 255, 255, .45); }
  .submenu a:hover span { color: rgba(255, 255, 255, .55); }
  .submenu hr { display: none; }
  .nav .nav-cta { margin: 10px 0 0; text-align: center; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 700px) {
  /* Dimension drawings and spec tables are wide by nature. Shrinking them to
     phone width makes the numbers unreadable, so let them scroll instead. */
  .prose-wide > p:has(img) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .prose-wide > p:has(img) img {
    max-width: none;
    width: auto;
    min-width: 100%;
  }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 18px; }
  .brand img { width: 168px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .card-media { flex-basis: 160px; padding: 14px; }
  .card-media img { max-height: 132px; }
  .card-body { padding: 14px 16px 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .cta-band, .enquiry, .filters, .nav-toggle { display: none; }
  body { background: #fff; }
}
