/* ==========================================================================
   J&K Machine Shop — styles.css
   Dark theme: black background, red (#DC2626) accent, Inter typeface.
   ========================================================================== */

:root {
  --bg: #000000;
  --bg-card: #111827;
  --bg-card-hover: #161f30;
  --border: #1f2937;
  --text: #ffffff;
  --text-muted: #9ca3af;
  --text-muted-2: #6b7280;
  --red: #dc2626;
  --red-hover: #b91c1c;
  --red-light: rgba(220, 38, 38, 0.12);
  --radius: 10px;
  --max-width: 1180px;
  --header-h: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

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

section { padding: 80px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

.eyebrow {
  color: var(--red);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

h1, h2, h3, h4 { font-weight: 700; margin: 0; }

.section-title {
  font-size: 34px;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 640px;
  margin: 0 0 44px;
}

.section-head { margin-bottom: 44px; }
.section-head.center { text-align: center; }
.section-head.center .section-sub { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }

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

.btn-outline { background: transparent; color: #fff; border-color: #374151; }
.btn-outline:hover { border-color: #6b7280; background: rgba(255,255,255,0.03); }

.btn-block { width: 100%; }

/* ---------- Header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo .jk { color: var(--red); }
.logo .rest { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: #fff; }

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
  flex-wrap: wrap;
}
nav.main-nav a { color: #d1d5db; transition: color .15s ease; }
nav.main-nav a:hover { color: #fff; }

.header-cta {
  background: var(--red);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
}
.header-cta:hover { background: var(--red-hover); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff;
  padding: 8px 10px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  padding: 110px 0 90px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(220,38,38,0.14), transparent 60%);
}
.hero h1 {
  font-size: 56px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 820px;
  margin: 0 auto 22px;
}
.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero .hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Services ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: #374151; }
.card .icon { font-size: 28px; margin-bottom: 16px; }
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 14.5px; margin: 0; }

/* ---------- Brands ---------- */
.brand-featured {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 44px;
}
.brand-featured .card {
  text-align: left;
}
.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--red);
  background: var(--red-light);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.brand-featured img {
  height: 34px;
  width: auto;
  margin-bottom: 16px;
  object-fit: contain;
}
.brand-featured h4 { font-size: 16px; margin-bottom: 6px; }
.brand-featured p { color: var(--text-muted); font-size: 13.5px; margin: 0; }

.brands-all-title {
  text-align: center;
  margin-bottom: 6px;
  font-size: 22px;
}
.brands-all-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 32px;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.brand-grid .brand-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
}
.brand-grid .brand-item[hidden] { display: none; }
.brand-item h5 { font-size: 15px; margin: 0 0 4px; font-weight: 700; }
.brand-item p { margin: 0; font-size: 13px; color: var(--text-muted); }

.brands-more-wrap { text-align: center; margin-top: 28px; }

.brands-footer-note {
  text-align: center;
  color: var(--text-muted);
  margin: 40px 0 20px;
  font-size: 15px;
}
.brands-footer-cta { text-align: center; }

/* ---------- Pricing ---------- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.price-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}
.price-tile .icon { font-size: 26px; margin-bottom: 10px; }
.pricing-cta {
  margin-top: 44px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}
.pricing-cta h3 { font-size: 22px; margin-bottom: 10px; }
.pricing-cta p { color: var(--text-muted); margin: 0 0 22px; }
.pricing-link { text-align: center; margin-bottom: 36px; }
.pricing-link a { color: var(--red); font-weight: 600; font-size: 14.5px; }
.pricing-link a:hover { text-decoration: underline; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}
.about-grid h2 { font-size: 30px; margin-bottom: 22px; }
.about-grid p { color: var(--text-muted); font-size: 16px; margin: 0 0 16px; }
.about-grid strong { color: #fff; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.stat-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
}
.stat-tile .num { font-size: 36px; font-weight: 800; color: var(--red); margin-bottom: 6px; }
.stat-tile .label { color: var(--text-muted); font-size: 13.5px; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.gallery-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform .3s ease;
}
.gallery-grid figure:hover img { transform: scale(1.04); }
.gallery-grid figcaption {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Reviews ---------- */
.reviews-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 15px;
}
.reviews-stars { color: var(--red); font-size: 20px; letter-spacing: 2px; }
.reviews-score { font-weight: 800; font-size: 20px; }
.reviews-count { color: var(--text-muted); }

.review-card { display: flex; flex-direction: column; }
.review-stars { color: var(--red); font-size: 15px; letter-spacing: 2px; margin-bottom: 14px; }
.review-text { color: #d1d5db; font-size: 14.5px; line-height: 1.6; margin: 0 0 16px; flex: 1; }
.review-author { font-weight: 700; font-size: 14px; }
.review-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 999px;
}
.review-card-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  background: var(--red-light);
  border-color: rgba(220,38,38,0.3);
}

/* Netlify Forms honeypot — hidden from real visitors, visible to bots/crawlers */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Quote form ---------- */
.quote-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
}
.quote-info p { color: var(--text-muted); margin: 0 0 16px; }
.quote-info a { color: var(--red); font-weight: 600; }
.quote-examples {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-size: 14px;
  color: var(--text-muted);
}
.quote-examples strong { color: #fff; display: block; margin-bottom: 8px; }

form.quote-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 18px;
}
.field { display: grid; gap: 8px; }
.field label { font-size: 13.5px; font-weight: 600; color: #e5e7eb; }
.field label .req { color: var(--red); }
.field input,
.field select,
.field textarea {
  background: #0a0e17;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: 12.5px; color: var(--text-muted-2); margin-top: -6px; }
.form-status { font-size: 14px; margin-top: 4px; display: none; }
.form-status.ok { color: #34d399; display: block; }
.form-status.err { color: #f87171; display: block; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-items { display: grid; gap: 22px; margin-top: 28px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--red-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.contact-item h4 { font-size: 15px; margin-bottom: 4px; }
.contact-item p, .contact-item a { color: var(--text-muted); font-size: 14.5px; margin: 0; }
.contact-item a:hover { color: #fff; }

.quick-contact {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.quick-contact h3 { font-size: 19px; margin-bottom: 22px; }
.quick-contact .btn { margin-bottom: 12px; }
.serving-note {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
footer {
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; max-width: 320px; }
footer h5 { font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.05em; color: #9ca3af; margin-bottom: 16px; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
footer ul a { color: var(--text-muted); font-size: 14px; }
footer ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted-2);
  font-size: 13px;
}

/* ---------- Chat widget ---------- */
#jk-chat-launcher {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(220,38,38,0.4);
  font-size: 26px;
  transition: transform .15s ease, background-color .15s ease;
}
#jk-chat-launcher:hover { background: var(--red-hover); transform: scale(1.05); }

#jk-chat-panel {
  position: fixed;
  bottom: 96px;
  right: 22px;
  z-index: 999;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 500px;
  max-height: calc(100vh - 140px);
  background: #0a0e17;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
#jk-chat-panel.open { display: flex; }

.jk-chat-header {
  background: var(--red);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jk-chat-header .title { font-weight: 700; font-size: 15px; }
.jk-chat-header .sub { font-size: 12px; opacity: 0.9; margin-top: 2px; }
.jk-chat-header button {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.jk-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.jk-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.4; }
.jk-msg.bot { background: var(--bg-card); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.jk-msg.user { background: var(--red); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.jk-msg.typing { color: var(--text-muted); font-style: italic; }

.jk-chat-input {
  border-top: 1px solid var(--border);
  padding: 12px;
  display: flex;
  gap: 8px;
}
.jk-chat-input input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
}
.jk-chat-input input:focus { outline: none; border-color: var(--red); }
.jk-chat-input button {
  background: var(--red);
  border: none;
  color: #fff;
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
}
.jk-chat-input button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Print page ---------- */
.print-header { text-align: center; margin-bottom: 40px; }
.print-actions { text-align: center; margin-bottom: 30px; display: flex; gap: 12px; justify-content: center; }
.price-table { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
.price-table caption {
  text-align: left; font-size: 17px; font-weight: 700; margin-bottom: 10px; caption-side: top;
}
.price-table td { padding: 10px 14px; border: 1px solid var(--border); font-size: 14px; }
.price-table td:last-child { text-align: right; color: var(--red); font-weight: 700; white-space: nowrap; }

@media print {
  body { background: #fff; color: #000; }
  #jk-chat-launcher, #jk-chat-panel, header.site-header, .print-actions, footer { display: none !important; }
  .price-table td { border-color: #ccc; }
  .price-table td:last-child { color: #000; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .brand-featured, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .quote-wrap, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  nav.main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero h1 { font-size: 38px; }
  .hero p { font-size: 16px; }
  .grid-3, .brand-featured, .grid-4, .brand-grid, .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  #jk-chat-panel { right: 12px; left: 12px; width: auto; bottom: 88px; }
  #jk-chat-launcher { right: 16px; bottom: 16px; }
}

/* mobile nav dropdown */
nav.main-nav.mobile-open {
  display: flex;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: #000;
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 20px 24px;
  gap: 18px;
}
