/* GRP Enclosure — hand-rolled stylesheet, BEM naming.
   Palette: charcoal #14171c · amber #F0A52E · mid grey #5F5E5A · light #ededed */

:root {
  --ink: #14171c;
  --amber: #f0a52e;
  --amber-deep: #a96c08;   /* link colour — AA contrast on white */
  --grey: #5f5e5a;
  --grey-on-ink: #9b9b96; /* subdued text on the charcoal footer — AA contrast */
  --paper: #ffffff;
  --mist: #ededed;
  --line: #d9d8d4;
  --measure: 70ch;
}

/* --- base ---------------------------------------------------------- */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0.8em 0 0.5em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 1.4em 0 0.5em; }
h3 { font-size: 1.15rem; margin: 1.2em 0 0.4em; }

a { color: var(--amber-deep); }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; }
figure { margin: 0; }
figcaption { font-size: 0.875rem; color: var(--grey); margin-top: 0.4rem; }

table { border-collapse: collapse; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute;
  left: -200vw;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

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

.site-head { background: var(--ink); border-bottom: 3px solid var(--amber); }

.site-head__bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.site-head__brand { flex-shrink: 0; display: inline-flex; }
.site-head__logo { display: block; height: 44px; width: auto; }

.site-head__phone {
  margin-left: auto;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.site-head__phone:hover { color: var(--amber); }

.site-nav { position: relative; }
/* Hidden on desktop (menu always visible, nothing to toggle — keeps it
 * out of the tab order); on mobile it is visually hidden but focusable,
 * named by its label, with :focus-visible styling the button. */
.site-nav__toggle { display: none; }
@media (max-width: 800px) {
  .site-nav__toggle { display: inline-block; position: absolute; opacity: 0; }
}
.site-nav__button { display: none; color: #fff; cursor: pointer; }

.site-nav__list {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__list > li > a {
  display: block;
  padding: 0.5rem 0.9rem;
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
}
.site-nav__list > li > a:hover,
.site-nav__list > li > a[aria-current] { background: rgba(240, 165, 46, 0.18); color: var(--amber); }

.site-nav__group { position: relative; }
.site-nav__sub {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  min-width: 17rem;
  background: var(--ink);
  border: 1px solid #2a2f37;
  border-top: 2px solid var(--amber);
  position: absolute;
  left: 0;
  top: 100%;
  display: none;
  z-index: 5;
}
.site-nav__group:hover .site-nav__sub,
.site-nav__group:focus-within .site-nav__sub { display: block; }
.site-nav__sub a {
  display: block;
  padding: 0.45rem 1rem;
  color: #fff;
  text-decoration: none;
}
.site-nav__sub a:hover { background: rgba(240, 165, 46, 0.18); color: var(--amber); }

@media (max-width: 800px) {
  .site-nav { order: 3; width: 100%; }
  .site-nav__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
  }
  .site-nav__button span,
  .site-nav__button span::before,
  .site-nav__button span::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--amber);
    position: relative;
    content: "";
  }
  .site-nav__button span::before { position: absolute; top: -7px; }
  .site-nav__button span::after { position: absolute; top: 7px; }
  .site-nav__list { display: none; flex-direction: column; padding-bottom: 0.8rem; }
  .site-nav__toggle:checked ~ .site-nav__list { display: flex; }
  .site-nav__toggle:focus-visible ~ .site-nav__button { outline: 3px solid var(--amber); }
  .site-nav__sub { position: static; display: block; border: 0; padding-left: 1rem; }
  .site-head__phone { margin-left: 0; }
}

/* --- breadcrumbs ----------------------------------------------------- */

.crumbs { font-size: 0.875rem; margin: 1.2rem 0 0; color: var(--grey); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "»"; margin-right: 0.4rem; color: var(--line); }

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

.btn {
  display: inline-block;
  background: var(--amber);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  border: 2px solid var(--amber);
  border-radius: 3px;
  padding: 0.55rem 1.3rem;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--ink); color: var(--amber); border-color: var(--ink); }

.btn--ghost { background: transparent; color: inherit; }

.cta-band { background: var(--ink); color: #fff; margin-top: 3rem; }
.cta-band__inner { padding: 2.2rem 1.25rem; }
.cta-band__head { margin: 0 0 1rem; color: #fff; }
.cta-band__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 0; }
.cta-band .btn--ghost { color: #fff; border-color: var(--amber); }
.cta-band .btn--ghost:hover { color: var(--amber); background: transparent; }

/* --- hero (home) ------------------------------------------------------ */

.hero { background: var(--ink) linear-gradient(160deg, #14171c 55%, #232a35); color: #fff; }
.hero__inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}
.hero h1 { margin: 0 0 0.6em; color: #fff; }
.hero__lead { font-size: 1.15rem; color: var(--mist); }
.hero__media img { border-radius: 4px; border: 3px solid rgba(240, 165, 46, 0.5); }
@media (max-width: 800px) { .hero__inner { grid-template-columns: 1fr; } }

/* --- hero carousel (home) ---------------------------------------------- */
/* Plain CSS scroll-snap strip — fully usable without JS (swipe/scroll,
   slide 1 visible). carousel.js adds the dots and a gentle auto-advance.
   The amber frame moves from the img to the container so it doesn't
   travel with the slides. */
.carousel {
  position: relative;
  border: 3px solid rgba(240, 165, 46, 0.5);
  border-radius: 4px;
  overflow: hidden;
}
.carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  list-style: none;
  margin: 0;
  padding: 0;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 100%; scroll-snap-align: start; }
.carousel__link { position: relative; display: block; color: #fff; text-decoration: none; }
.carousel img { display: block; width: 100%; height: auto; border: 0; border-radius: 0; }
.carousel__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.45rem 0.9rem;
  background: rgba(20, 23, 28, 0.78);
  font-size: 0.95rem;
  font-weight: 600;
}
.carousel__label::after { content: " \2192"; color: var(--amber); }
.carousel__link:hover .carousel__label { text-decoration: underline; }

/* Dots — injected by carousel.js after the .carousel, so no-JS visitors
   never see dead controls. */
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.7rem;
}
.carousel__dot {
  width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  border: 2px solid var(--amber);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.carousel__dot[aria-current] { background: var(--amber); }

/* --- USP strip -------------------------------------------------------- */

.usp-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  list-style: none;
  margin: 2.5rem 0;
  padding: 0;
}
.usp {
  border-top: 3px solid var(--amber);
  background: var(--mist);
  padding: 1rem 1.2rem 1.2rem;
  border-radius: 0 0 4px 4px;
}
.usp h2 { margin-top: 0.2em; }
.usp p { margin-bottom: 0; }

/* --- category / product grids ----------------------------------------- */

.cat-grid, .prod-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  list-style: none;
  margin: 2rem 0;
  padding: 0;
}

.cat-card, .prod-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}
.cat-card:hover, .prod-card:hover { border-color: var(--amber); }

.prod-card__media, .cat-card__media { display: block; background: var(--mist); aspect-ratio: 1; }
.prod-card__media img, .cat-card__media img { width: 100%; height: 100%; object-fit: cover; }

.prod-card__name, .cat-card__name { font-size: 1.05rem; margin: 0.8rem 1rem 0.2rem; }
.prod-card__name a, .cat-card__name a { text-decoration: none; color: var(--ink); }
.prod-card__name a:hover, .cat-card__name a:hover { color: var(--amber-deep); text-decoration: underline; }
.prod-card__dims, .cat-card__blurb { margin: 0 1rem 1rem; font-size: 0.9rem; color: var(--grey); }

/* One-row showcase (home page sections). Only the cards that fit on a
   single row are shown: the first grid row keeps its natural height while
   every implicit row collapses to zero and is clipped, so the grid never
   wraps to a second line — 4 columns show 4 cards, 3 show 3, down to 1.
   No media queries needed; the auto-fill column count does the deciding.
   Card order is shuffled server-side, so the visible subset is random on
   each load. site.js additionally marks clipped cards inert/aria-hidden
   (enhancement only — without JS they are merely invisible). */
.cat-grid--row, .prod-grid--row {
  grid-template-rows: auto;
  grid-auto-rows: 0;
  row-gap: 0;
  overflow: hidden;
}

/* Centred call-to-action row under the home showcases. */
.btn-row { text-align: center; margin: 1.5rem 0 2.5rem; }

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

.product__title { margin-top: 0.6em; }

.product__cols {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(280px, 1fr) 1.2fr;
  align-items: start;
  margin: 1.5rem 0;
}
@media (max-width: 800px) { .product__cols { grid-template-columns: 1fr; } }

/* product body: prose + enquiry card side by side */
.product__lower {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 22rem);
  align-items: start;
  margin: 1.5rem 0;
}
@media (max-width: 800px) { .product__lower { grid-template-columns: 1fr; } }

.enquire {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--mist);
  padding: 1.25rem 1.25rem 0.4rem;
  max-width: 32rem;
}
.enquire__title { font-size: 1.15rem; margin: 0 0 0.9rem; }
.enquire__product {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 1.1rem;
}
.enquire__thumb { border-radius: 4px; flex-shrink: 0; object-fit: cover; }
.enquire__id strong { display: block; font-size: 0.95rem; line-height: 1.25; }
.enquire__sku {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--grey);
}
.enquire .form { max-width: none; }
.enquire .form__field { margin-bottom: 0.85rem; }
/* product-context chip on the main contact form (arrived via ?product=) */
.enquire__product--inline { background: var(--mist); max-width: 44rem; margin-bottom: 1.3rem; }

.product__media img { border: 1px solid var(--line); border-radius: 4px; background: var(--mist); }

.spec-table { width: 100%; margin: 1rem 0; }
.spec-table th, .spec-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
.spec-table th { width: 9.5rem; color: var(--grey); font-weight: 600; }

.spec-dl { margin: 1.4rem 0; }

.product__related { margin: 2.5rem 0 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.product__related h2 { font-size: 1.1rem; }

.link-row { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.link-row a {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.25rem 0.7rem;
  text-decoration: none;
}
.link-row a:hover { border-color: var(--amber); }

/* --- prose (hand-written page copy) ------------------------------------ */

.prose { max-width: var(--measure); }
.prose img { border-radius: 4px; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: 0.3rem 0; }

.notice {
  background: var(--mist);
  border-left: 4px solid var(--amber);
  padding: 0.8rem 1rem;
  border-radius: 0 3px 3px 0;
}

/* --- FAQ cards ------------------------------------------------------------ */
/* Question cards on /faqs/. The "Q" plate deliberately echoes the monogram
 * logo. Whole card is clickable via the stretched read-more link — pure CSS,
 * keyboard and screen-reader behaviour stays a normal text link. */

.faq-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  list-style: none;
  margin: 2.5rem 0;
  padding: 0;
}

.faq-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--amber);
  border-radius: 0 0 6px 6px;
  padding: 1.5rem 1.5rem 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.faq-card:hover,
.faq-card:focus-within {
  border-color: var(--amber);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(20, 23, 28, 0.12);
}

.faq-card__q {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 0.9rem;
  background: var(--ink);
  color: var(--amber);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 4px;
}

.faq-card__question { margin: 0 0 0.45rem; font-size: 1.2rem; line-height: 1.3; }
.faq-card__question a { text-decoration: none; color: var(--ink); }
.faq-card__question a::after { content: ""; position: absolute; inset: 0; } /* stretched link */
.faq-card__question a:focus { outline: none; } /* :focus-within ring on the card instead */
.faq-card:focus-within { outline: 3px solid var(--amber); outline-offset: 2px; }

.faq-card__excerpt { margin: 0 0 1.1rem; font-size: 0.95rem; color: var(--grey); flex-grow: 1; }

.faq-card__more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--amber-deep);
  margin: 0;
}
.faq-card__more::after { content: " \2192"; }
.faq-card:hover .faq-card__more { text-decoration: underline; }

/* --- guide pages ----------------------------------------------------------- */
/* Title band + section rules for the FAQ guide articles. Same gradient as
 * the home hero so the two share a family resemblance. */

.guide-head {
  background: var(--ink) linear-gradient(160deg, #14171c 55%, #232a35);
  border-bottom: 3px solid var(--amber);
  color: #fff;
}
.guide-head__inner { padding: 2.4rem 1.25rem 2rem; }
.guide-head h1 { margin: 0.25em 0 0; color: #fff; max-width: var(--measure); }

.guide-head__kicker {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.guide-head__kicker a { color: var(--amber); text-decoration: none; }
.guide-head__kicker a:hover { text-decoration: underline; }
.guide-head__kicker a::before { content: "\2190 "; }

.guide { margin-top: 1.6rem; }
.guide h2 {
  border-left: 4px solid var(--amber);
  padding-left: 0.65rem;
  margin-top: 2em;
}

/* 50/50 benefit cards (why-use-grp): two-across grid of house-style cards
   (amber top rule, line border), stacking to one column below 640px. */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 0 0 2rem;
}
.why-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--amber);
  border-radius: 0 0 6px 6px;
  padding: 1.5rem 1.5rem 1.25rem;
}
.guide .why-card h2 {
  border-left: 0;
  padding-left: 0;
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  line-height: 1.3;
}
.why-card p { margin: 0; font-size: 0.95rem; color: var(--grey); }
@media (max-width: 640px) {
  .why-grid { grid-template-columns: 1fr; }
}

.post__meta { color: var(--grey); font-size: 0.9rem; margin-top: -0.6rem; }
.post__related { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1rem; }

/* Lede card + side image (very-large page): intro copy in a card on the
   left, photo resized alongside instead of full-width. Echoes the house
   card style (amber top rule, line border, paper). Stacks below 640px. */
.post-lede {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.5rem;
  align-items: center;
  max-width: 56rem;
  margin: 1.5rem auto 2rem;
}
.post-lede__card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--amber);
  border-radius: 4px;
  background: var(--paper);
  padding: 0.4rem 1.25rem;
}
.post-lede__media { margin: 0; }
.post-lede__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
@media (max-width: 640px) { .post-lede { grid-template-columns: 1fr; } }

/* Two-card feature row: "did you know?" aside (1/3) beside a standard
   card (2/3); stacks below 800px. overflow hidden lets the scroll-reveal
   slide-in clip at the row's edge instead of widening the page. */
.card-duo {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  align-items: stretch;
  margin: 2rem 0;
  overflow: hidden;
}
.card-duo__main {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  padding: 0.4rem 1.5rem 1rem;
}
.card-duo__main h2 { margin-top: 0.8em; }
@media (max-width: 800px) { .card-duo { grid-template-columns: 1fr; } }

/* "Did you know?" card — hero charcoal + amber kicker, punchier than the
   standard paper cards but the same plate language as the logo/Q-plates. */
.know-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ink) linear-gradient(160deg, #14171c 55%, #232a35);
  border-top: 3px solid var(--amber);
  border-radius: 4px;
  color: #fff;
  padding: 1.4rem 1.25rem;
}
.know-card__kicker {
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.know-card p { margin: 0; }
.know-card p + p { margin-top: 0.8em; }
.know-card a { color: #fff; text-decoration-color: var(--amber); }
.know-card a:hover { color: var(--amber); }

/* Scroll reveal (generic, reusable): give any element
   data-reveal="left|right" and site.js arms it with .reveal, adding
   .reveal--in when it first enters the viewport — the back-out easing
   provides the bounce. Degrades fully: without JS the .reveal class never
   exists so nothing is hidden; reduced-motion users get no movement. */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transition: opacity 0.45s ease-out, transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .reveal[data-reveal="left"] { transform: translateX(-3rem); }
  .reveal[data-reveal="right"] { transform: translateX(3rem); }
  .reveal.reveal--in { opacity: 1; transform: none; }
}

/* --- forms ----------------------------------------------------------------- */

.form { max-width: 44rem; }
.form__row { display: grid; gap: 0 1.5rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }

.form__field { display: block; margin: 0 0 1.1rem; }
.form__field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.form__field input, .form__field textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--grey);
  border-radius: 3px;
  background: var(--paper);
}
.form__req { color: var(--amber-deep); }
.form__error { color: #9d2007; margin: 0.3rem 0 0; font-size: 0.9rem; }
.form__trap { position: absolute; left: -200vw; }

.form-done {
  background: var(--mist);
  border-left: 4px solid var(--amber);
  padding: 1rem 1.2rem;
  border-radius: 0 3px 3px 0;
  max-width: 44rem;
}

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

.site-foot { background: var(--ink); color: var(--mist); margin-top: 4rem; }
.cta-band + .site-foot { margin-top: 0; }

.site-foot__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}
.site-foot__head { font-size: 1rem; color: var(--amber); margin: 0 0 0.6rem; }
.site-foot__col ul { list-style: none; margin: 0; padding: 0; }
.site-foot__col li { margin: 0.35rem 0; }
.site-foot__col a { color: var(--mist); text-decoration: none; }
.site-foot__col a:hover { color: var(--amber); text-decoration: underline; }
.site-foot__phone a { color: #fff; font-weight: 600; text-decoration: none; }

.site-foot__legal {
  border-top: 1px solid #2a2f37;
  padding-top: 1rem;
  padding-bottom: 1.2rem;
  font-size: 0.875rem;
  color: var(--grey-on-ink);
}

/* --- print -------------------------------------------------------------------- */

@media print {
  .site-head, .site-foot, .cta-band, .skip-link { display: none; }
  body { font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
