/* JAC Manufacturing — site styles. No framework, no build step. */

@font-face {
  font-family: "Good Times";
  src: url("../fonts/good-times.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0e1012;
  --ink-2: #1a1d21;
  --steel: #5b6168;
  --line: #e3e4e2;
  --paper: #ffffff;
  --mist: #f4f4f2;
  --accent: #18d26e;
  --accent-ink: #0a7a3d;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(14 16 18 / .06), 0 8px 24px -12px rgb(14 16 18 / .18);
  --wrap: min(1160px, 100% - 2.5rem);
  --display: "Good Times", "Arial Black", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font: 400 1.0625rem/1.65 var(--body);
  color: var(--ink-2);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0; color: var(--ink); letter-spacing: .01em; }
p { margin: 0; }
address { font-style: normal; }

.wrap { width: var(--wrap); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--accent); color: var(--ink); padding: .6rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  color: #fff;
  background: rgb(14 16 18 / .92);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgb(255 255 255 / .06);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand img { height: 44px; width: auto; }

/* Transparent over the hero, turning solid as you scroll (no JS) */
.site-header.over-hero {
  background: linear-gradient(rgb(14 16 18 / .55), rgb(14 16 18 / 0));
  border-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
@supports (animation-timeline: scroll()) {
  .site-header.over-hero {
    animation: header-solid linear both;
    animation-timeline: scroll(root);
    animation-range: 0 160px;
  }
  @keyframes header-solid {
    to {
      background: rgb(14 16 18 / .92);
      border-color: rgb(255 255 255 / .06);
      -webkit-backdrop-filter: saturate(140%) blur(12px);
      backdrop-filter: saturate(140%) blur(12px);
    }
  }
}

.nav { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: .5rem .9rem; border-radius: 999px;
  font-size: .95rem; font-weight: 500; text-decoration: none; color: rgb(255 255 255 / .82);
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: #fff; background: rgb(255 255 255 / .08); }
.nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 2px; border-radius: 2px; background: var(--accent);
}

.menu-btn {
  display: none; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid rgb(255 255 255 / .2); border-radius: 10px;
  background: transparent; color: #fff; cursor: pointer;
}
.mobile-nav {
  inset: calc(var(--header-h) + 8px) 1rem auto auto; margin: 0;
  width: min(280px, calc(100vw - 2rem));
  padding: .5rem; border: 1px solid rgb(255 255 255 / .08); border-radius: var(--radius);
  background: var(--ink-2); color: #fff; box-shadow: 0 20px 50px -10px rgb(0 0 0 / .5);
}
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav a { display: block; padding: .85rem 1rem; border-radius: 10px; text-decoration: none; font-weight: 500; }
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { background: rgb(255 255 255 / .07); }
.mobile-nav::backdrop { background: rgb(0 0 0 / .35); }

@media (max-width: 760px) {
  .site-header .nav { display: none; }
  .menu-btn { display: grid; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.35rem; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: #2ee281; }
.btn-ghost { color: #fff; border-color: rgb(255 255 255 / .35); }
.btn-ghost:hover { background: rgb(255 255 255 / .1); border-color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #24282d; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid; align-items: center;
  color: #fff; background: var(--ink);
  overflow: hidden;
}
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(14 16 18 / .45) 0%, rgb(14 16 18 / .25) 40%, rgb(14 16 18 / .7) 100%),
    linear-gradient(90deg, rgb(14 16 18 / .7), rgb(14 16 18 / .1) 75%);
}
.hero .wrap { padding-block: calc(var(--header-h) + 2rem) 4rem; }
.hero h1 { color: #fff; font-size: clamp(1.7rem, 7.4vw, 4.75rem); max-width: 14ch; }
.hero p { margin-top: 1.25rem; max-width: 42rem; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgb(255 255 255 / .86); }
.hero .actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }

.reveal { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.reveal-2 { animation-delay: .12s; }
.reveal-3 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-alt { background: var(--mist); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .9rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.section-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
.section-head p { margin-top: 1rem; color: var(--steel); font-size: 1.1rem; }

.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

/* Services */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1.4rem;
  border-radius: 12px; background: rgb(24 210 110 / .12); color: var(--accent-ink);
}
.card h3 { font-size: 1.15rem; margin-bottom: .7rem; }
.card p { color: var(--steel); }

/* Contact */
.contact-card { display: flex; flex-direction: column; gap: .35rem; }
.contact-card h3 { margin-bottom: .4rem; }
.contact-card a { text-decoration: none; font-weight: 600; color: var(--ink); width: fit-content; }
.contact-card a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.contact-card .or { color: var(--steel); font-size: .9rem; }
.contact-cta { margin-top: 2.5rem; text-align: center; }

/* Partners */
.partners {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}
.partners a {
  display: grid; place-items: center; height: clamp(88px, 20vw, 120px); padding: 1rem 1.25rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .25s ease, box-shadow .25s ease;
}
.partners a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.partners img { max-height: 64px; width: auto; object-fit: contain; }

/* ---------- Products page ---------- */
.page-head {
  color: #fff; background: radial-gradient(120% 140% at 100% 0%, #23282d 0%, var(--ink) 60%);
  padding-block: calc(var(--header-h) + clamp(3rem, 7vw, 5rem)) clamp(3rem, 7vw, 5rem);
}
.page-head h1 { color: #fff; font-size: clamp(1.8rem, 7vw, 3.75rem); }
.page-head p { margin-top: 1.1rem; max-width: 44rem; color: rgb(255 255 255 / .82); font-size: 1.1rem; }
.page-head .eyebrow { color: var(--accent); }

.range + .range { margin-top: clamp(3.5rem, 7vw, 5rem); }
.range-title {
  display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.5rem;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
}
.range-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.products { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.products:has(> :nth-child(3):last-child) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.products:has(> :nth-child(2):last-child) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
@media (min-width: 1100px) { .products:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, 1fr); } }
.product {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .25s ease, box-shadow .25s ease;
}
.product:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product figure { margin: 0; aspect-ratio: 3 / 2; background: #e8e8e6; border-bottom: 1px solid var(--line); overflow: hidden; }
.product figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product figure img.fit { object-fit: contain; }
.product:hover figure img { transform: scale(1.04); }
.product .body { display: flex; flex-direction: column; gap: .75rem; flex: 1; padding: 1.4rem 1.5rem 1.5rem; }
.product h3 { font-size: 1.05rem; }
.product p { color: var(--steel); font-size: .98rem; }
.product .enquire {
  margin-top: auto; padding-top: .5rem; width: fit-content;
  font-weight: 600; font-size: .92rem; color: var(--accent-ink); text-decoration: none;
}
.product .enquire:hover { text-decoration: underline; text-underline-offset: 3px; }

.cta-band { background: var(--ink); color: #fff; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 3rem; }
.cta-band h2 { color: #fff; font-size: clamp(1.3rem, 2.6vw, 1.8rem); }

/* ---------- Footer ---------- */
.site-footer { background: #08090a; color: rgb(255 255 255 / .7); font-size: .95rem; }
.site-footer .top { display: grid; gap: 2.5rem; grid-template-columns: 1.4fr 1fr 1.2fr; padding-block: 4rem 3rem; }
.site-footer h2 { font-size: .95rem; color: #fff; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .brand img { height: 52px; }
.site-footer .bottom { border-top: 1px solid rgb(255 255 255 / .08); padding-block: 1.5rem; font-size: .88rem; }
.site-footer strong { color: #fff; font-weight: 600; }
@media (max-width: 760px) {
  .site-footer .top { grid-template-columns: 1fr; }
}
