/* =========================================================
   Kleerwite Chemical - site styles
   Colors are set once here; change them to restyle the site.
   ========================================================= */
:root {
  --purple: #9a1488;
  --purple-dark: #6b0d5f;
  --purple-tint: #f8eef6;
  --ink: #221a21;
  --ink-soft: #5c525a;
  --line: #e6dde4;
  --bg: #ffffff;
  --bg-soft: #faf7f9;
  --radius: 10px;
  --wrap: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

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

a { color: var(--purple); }
a:hover { color: var(--purple-dark); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--purple); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--purple-dark);
  color: #fff;
  font-size: .9rem;
}
.topbar .wrap {
  display: flex; justify-content: flex-end; gap: 22px; flex-wrap: wrap;
  padding-top: 6px; padding-bottom: 6px;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  background: var(--purple);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 76px;
}
.logo { color: #fff; text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.logo:hover { color: #fff; }
.logo-name {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700; font-variant: small-caps; letter-spacing: .02em;
  font-size: 1.85rem;
}
.logo-tag { font-style: italic; font-size: .85rem; opacity: .9; margin-top: 3px; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: #fff; text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: 8px 12px; border-radius: 6px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: rgba(255,255,255,.16); color: #fff; }
.site-nav .nav-cta { background: #fff; color: var(--purple); margin-left: 6px; }
.site-nav .nav-cta:hover { background: var(--purple-tint); color: var(--purple-dark); }

.nav-toggle {
  display: none;
  background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7);
  border-radius: 6px; padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--purple-dark); padding: 8px 12px 14px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .site-nav .nav-cta { margin: 10px 0 0; text-align: center; border-bottom: 0; }
  .logo-name { font-size: 1.45rem; }
  .logo-tag { font-size: .78rem; }
  .topbar .wrap { justify-content: center; gap: 14px; }
  .topbar .fax { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); color: #fff; }
.btn-light { background: #fff; color: var(--purple); }
.btn-light:hover { background: var(--purple-tint); color: var(--purple-dark); }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple) 70%);
  color: #fff;
  padding: 64px 0 72px;
}
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; font-weight: 700;
  opacity: .85; margin-bottom: 10px;
}
.hero p.lead { font-size: 1.2rem; max-width: 640px; opacity: .95; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

/* ---------- Problem cards (home) ---------- */
.problem-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.problem-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.problem-card:hover {
  border-color: var(--purple); color: var(--ink);
  box-shadow: 0 6px 18px rgba(107,13,95,.12); transform: translateY(-2px);
}
.problem-card img, .problem-card .badge {
  width: 64px; height: 64px; border-radius: 50%; flex: none; object-fit: cover;
}
.problem-card .badge {
  display: grid; place-items: center;
  background: var(--purple-tint); color: var(--purple); font-weight: 800; font-size: 1.5rem;
}
.problem-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.problem-card .more { color: var(--purple); font-weight: 700; font-size: .93rem; }

/* ---------- Category tiles (home) ---------- */
.cat-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.cat-tile {
  display: block; padding: 22px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--purple);
  text-decoration: none; color: var(--ink);
}
.cat-tile:hover { border-color: var(--purple); color: var(--ink); }
.cat-tile h3 { color: var(--purple); margin-bottom: 4px; }
.cat-tile p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* ---------- About strip ---------- */
.about-strip { display: grid; gap: 36px; grid-template-columns: 1.1fr .9fr; align-items: center; }
.about-strip img { border-radius: var(--radius); border: 1px solid var(--line); }
.stat { font-size: 3rem; font-weight: 800; color: var(--purple); line-height: 1; }
@media (max-width: 760px) { .about-strip { grid-template-columns: 1fr; } }

/* ---------- Page header (inner pages) ---------- */
.page-head {
  background: var(--purple-tint);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 34px;
}
.page-head p { color: var(--ink-soft); font-size: 1.1rem; max-width: 720px; margin: 0; }
.breadcrumb { font-size: .9rem; margin-bottom: 10px; color: var(--ink-soft); }
.breadcrumb a { color: var(--ink-soft); }

/* ---------- Product list page ---------- */
.jump-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.jump-links a {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: .92rem; text-decoration: none; font-weight: 600;
}
.jump-links a:hover { border-color: var(--purple); }

.category { padding: 40px 0 8px; scroll-margin-top: 100px; }
.category > h2 { border-bottom: 2px solid var(--purple); padding-bottom: 8px; }
.category > p.intro { color: var(--ink-soft); margin-bottom: 20px; }

.product-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.product-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; text-decoration: none; color: var(--ink);
}
.product-card:hover { border-color: var(--purple); box-shadow: 0 6px 18px rgba(107,13,95,.1); color: var(--ink); }
.product-card h3 { color: var(--purple); margin-bottom: 6px; }
.product-card p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 12px; flex: 1; }
.product-card .more { font-weight: 700; font-size: .93rem; color: var(--purple); }
.tag-new {
  display: inline-block; background: var(--purple); color: #fff; font-size: .7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 4px;
  vertical-align: middle; margin-left: 6px;
}

.callout {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  background: var(--purple); color: #fff; border-radius: var(--radius); padding: 26px 28px; margin: 48px 0 0;
}
.callout h2 { margin: 0 0 4px; font-size: 1.4rem; }
.callout p { margin: 0; opacity: .92; }

/* ---------- Product detail page ---------- */
.product-layout { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
@media (max-width: 900px) { .product-layout { grid-template-columns: 1fr; } }

.prose h2 { margin-top: 1.6em; padding-bottom: 6px; border-bottom: 2px solid var(--purple-tint); }
.prose h3 { margin-top: 1.4em; color: var(--purple-dark); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }

.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li {
  counter-increment: step; position: relative; padding: 2px 0 2px 44px; margin-bottom: 14px;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--purple); color: #fff; font-weight: 800; font-size: .9rem;
  display: grid; place-items: center;
}

.warn {
  background: #fff4f4; border-left: 4px solid #c0262d; padding: 12px 16px; border-radius: 6px; margin: 0 0 1em;
}
.note {
  background: var(--purple-tint); border-left: 4px solid var(--purple); padding: 12px 16px; border-radius: 6px; margin: 0 0 1em;
}

.tabs-2 { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .tabs-2 { grid-template-columns: 1fr; } }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: #fff; }
.panel h3 { margin-top: 0 !important; }

.sidebar-box {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--bg-soft);
  position: sticky; top: 110px;
}
.sidebar-box h3 { margin-top: 0; }
.sidebar-box .btn { width: 100%; text-align: center; margin-bottom: 10px; }
.sidebar-box ul { list-style: none; padding: 0; margin: 0; font-size: .95rem; }
.sidebar-box li { padding: 6px 0; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .sidebar-box { position: static; } }

.quote {
  font-style: italic; background: var(--bg-soft); border-left: 4px solid var(--line);
  padding: 12px 16px; border-radius: 6px;
}

/* ---------- Footer ---------- */
.site-footer { background: #1f171e; color: #e9e1e7; padding: 48px 0 24px; font-size: .95rem; scroll-margin-top: 90px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1.3fr 1fr 1fr; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 1.05rem; color: #fff; text-transform: uppercase; letter-spacing: .08em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.contact-line { display: block; margin-bottom: 8px; }
.contact-line strong { display: inline-block; min-width: 72px; color: #c9b9c6; font-weight: 600; }
.footer-bottom { border-top: 1px solid #3a2e38; margin-top: 32px; padding-top: 18px; color: #a7979f; font-size: .88rem; }

@media (max-width: 560px) {
  .hide-sm { display: none; }
  .topbar { font-size: .85rem; }
}

/* Product photo in the product page sidebar */
.product-photo { display: block; margin: 0 auto 16px; max-height: 220px; width: auto; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; margin: 0 0 1em; }
.pill-list li { background: var(--purple-tint); color: var(--purple-dark); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: .92rem; margin: 0; }

/* ---------- Search box, tables and lists (Spotting Guide, SDS) ---------- */
.filter-input {
  width: 100%; max-width: 420px; font: inherit; padding: 11px 14px;
  border: 2px solid var(--line); border-radius: 8px; margin: 0 0 20px; background: #fff;
}
.filter-input:focus { outline: none; border-color: var(--purple); }
.data-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { background: var(--purple-tint); color: var(--purple-dark); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td:first-child { font-weight: 600; width: 42%; }
.no-results { display: none; color: var(--ink-soft); padding: 12px 0; }

.sds-group { margin-bottom: 28px; }
.sds-group h2 { font-size: 1.2rem; border-bottom: 2px solid var(--purple); padding-bottom: 6px; }
.sds-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.sds-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; text-decoration: none; font-weight: 600; background: #fff;
}
.sds-list a:hover { border-color: var(--purple); }
.sds-list .pdf { font-size: .78rem; font-weight: 800; color: #fff; background: var(--purple); border-radius: 4px; padding: 2px 7px; }

.narrow { max-width: 820px; }
