/* =========================================================================
   J&D UNIFORMS & TEXTILES — THEME TOKENS
   -------------------------------------------------------------------------
   Everything about the colour scheme lives right here. If you send over a
   banner / logo snippet, just swap the hex values below to match it —
   nothing else in this file (or the three HTML pages) needs to change.

   --c-canvas       page background (currently a khaki/canvas fabric tone)
   --c-canvas-light lighter strip background, alternates with --c-canvas
   --c-paper        card & panel background
   --c-ink          darkest colour — header, footer, headings
   --c-ink-soft     secondary dark tone, used for body copy on paper
   --c-thread       main accent (buttons, links, badge numbers)
   --c-thread-deep  accent hover / pressed state
   --c-stitch       small, sparing accent for tags & highlights
   --c-line         hairline border colour
   ========================================================================= */
:root {
  --c-canvas: #f4f6fa;
  --c-canvas-light: #eef1f7;
  --c-paper: #ffffff;
  --c-ink: #152452;
  --c-ink-soft: #253670;
  --c-thread: #f5b400;
  --c-thread-deep: #cf9600;
  --c-stitch: #7a2331;
  --c-line: #dde2ec;
  --c-text: #1d2233;
  --c-text-muted: #5b6478;

  --font-display: "Zilla Slab", Georgia, serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-script: "Sacramento", cursive;

  --radius-sm: 3px;
  --radius-md: 5px;
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--c-canvas);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--c-ink);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: var(--measure); color: var(--c-text); }
p.lede { font-size: 1.15rem; color: var(--c-text-muted); max-width: 56ch; }

a { color: var(--c-thread-deep); }
a:hover { color: var(--c-thread); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--c-thread-deep);
  outline-offset: 2px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- stitched rule, used as a section divider ---------- */
.stitch-rule {
  border: 0;
  height: 1px;
  margin: 0;
  background-image: repeating-linear-gradient(
    to right, var(--c-line) 0 8px, transparent 8px 14px
  );
}

/* ---------- header ---------- */
.site-header {
  background: var(--c-ink);
  color: var(--c-paper);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 3px solid var(--c-thread);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--c-paper);
  text-decoration: none;
}
.brand:hover { color: var(--c-paper); }
.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  border: 2px solid var(--c-thread);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: #c9cfd6;
}

.main-nav { display: flex; align-items: center; gap: 1.75rem; }
.main-nav a {
  color: #dfe3e8;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--c-thread);
}
.nav-cta {
  background: var(--c-thread);
  color: var(--c-ink) !important;
  padding: 0.55rem 1.1rem !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border-bottom: none !important;
}
.nav-cta:hover { background: #cf9a41; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #4a5a6b;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--c-ink);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1.25rem 1.25rem;
    gap: 0.4rem;
    border-bottom: 3px solid var(--c-thread);
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { border-bottom: none; padding: 0.55rem 0; border-top: 1px solid #33465a; }
  .main-nav a:first-child { border-top: none; }
  .nav-cta { text-align: center; margin-top: 0.5rem; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom, var(--c-line) 0 1px, transparent 1px 34px
  );
  opacity: 0.5;
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--c-ink-soft);
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  padding: 0.3rem 0.7rem 0.3rem 0.4rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.eyebrow-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-thread); }

.tagline-script {
  font-family: var(--font-script);
  font-size: 1.7rem;
  color: var(--c-ink-soft);
  margin: 0.2rem 0 1.2rem;
  line-height: 1.1;
}
.section-ink .tagline-script,
.site-footer .tagline-script { color: var(--c-thread); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.7rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--c-ink); color: #fff; }
.btn-primary:hover { background: var(--c-ink-soft); color: #fff; }
.btn-outline { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn-outline:hover { background: var(--c-ink); color: #fff; }
.btn-thread { background: var(--c-thread); color: var(--c-ink); }
.btn-thread:hover { background: #cf9a41; }

/* swatch tape graphic in hero */
.tape-card {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.tape-card h3 { margin-bottom: 1rem; font-size: 1.05rem; }
.tape-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.tape-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.92rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px dashed var(--c-line);
  color: var(--c-text-muted);
}
.tape-list li:last-child { border-bottom: none; padding-bottom: 0; }
.tape-list li span:first-child { color: var(--c-text); }

/* ---------- icon system (custom line icons, no stock photos) ---------- */
.cat-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.icon-tile {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: var(--radius-md);
  background: var(--c-canvas-light);
  border: 1px solid var(--c-line);
  display: grid;
  place-items: center;
  color: var(--c-ink);
}
.icon-tile .cat-icon { width: 28px; height: 28px; }
.cat-card-head { display: flex; align-items: center; justify-content: space-between; }

.badge-icon {
  position: relative;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--c-ink);
  color: #fff;
  display: grid;
  place-items: center;
}
.badge-icon .cat-icon { width: 23px; height: 23px; }
.badge-icon .num-chip {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-thread);
  color: var(--c-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.65rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--c-paper);
}

.step-icon { display: block; color: var(--c-thread); margin-bottom: 0.6rem; }
.step-icon .cat-icon { width: 28px; height: 28px; }

/* ---------- hero illustration (custom-drawn, no stock photography) ---------- */
.hero-illustration {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem 1rem;
}
.hero-illustration svg { width: 100%; height: auto; display: block; }
.hero-illustration figcaption {
  text-align: center;
  font-size: 0.82rem;
  color: var(--c-text-muted);
  margin-top: 0.6rem;
}


.section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--c-canvas-light); }
.section-ink { background: var(--c-ink); color: var(--c-paper); }
.section-ink h2, .section-ink h3 { color: #fff; }
.section-ink p { color: #cdd3d9; }
.section-head { max-width: 62ch; margin-bottom: 2.25rem; }

/* ---------- category grid (index page) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
}
.cat-card {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.4rem 1.2rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
}
.cat-card:hover { border-color: var(--c-thread); }
.cat-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--c-thread);
  color: var(--c-thread-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
}
.cat-card h3 { margin-bottom: 0; font-size: 1.08rem; }
.cat-card p { font-size: 0.9rem; color: var(--c-text-muted); margin: 0; }
.cat-card .examples { font-size: 0.82rem; color: var(--c-text-muted); }

/* ---------- process steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}
.step { position: relative; }
.step h4 { margin-bottom: 0.3rem; font-size: 1.02rem; color: inherit; }
.step p { font-size: 0.9rem; }

/* ---------- starting-products panel ---------- */
.start-panel {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.start-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.start-list li { display: flex; gap: 1rem; align-items: flex-start; }
.start-list .badge {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--c-ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  display: grid; place-items: center;
}
.start-list h4 { margin: 0 0 0.15rem; font-size: 1rem; }
.start-list p { margin: 0; font-size: 0.9rem; color: var(--c-text-muted); }

/* ---------- footer ---------- */
.site-footer { background: var(--c-ink); color: #cdd3d9; padding: 2.8rem 0 1.4rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer a { color: #cdd3d9; text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #33465a;
  padding-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: #93a0ac;
}

/* ---------- catalogue page ---------- */
.cat-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) { .cat-layout { grid-template-columns: 1fr; } }

.cat-index {
  position: sticky;
  top: 90px;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 1.1rem;
}
.cat-index p.label { font-size: 0.78rem; color: var(--c-text-muted); margin: 0 0 0.6rem; }
.cat-index ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; counter-reset: idx; max-height: 62vh; overflow-y: auto; }
.cat-index li { counter-increment: idx; }
.cat-index a {
  display: flex;
  gap: 0.55rem;
  padding: 0.4rem 0.4rem;
  border-radius: var(--radius-sm);
  color: var(--c-text);
  text-decoration: none;
  font-size: 0.88rem;
}
.cat-index a::before {
  content: counter(idx);
  color: var(--c-thread-deep);
  font-family: var(--font-display);
  font-weight: 700;
  width: 1.3em;
}
.cat-index a:hover, .cat-index a.is-active { background: var(--c-canvas-light); color: var(--c-ink); }

@media (max-width: 900px) {
  .cat-index { position: static; }
  .cat-index ol { display: flex; gap: 0.5rem; overflow-x: auto; max-height: none; padding-bottom: 0.3rem; }
  .cat-index a { white-space: nowrap; }
}

.catalogue-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--c-line);
  scroll-margin-top: 95px;
}
.catalogue-section:last-child { border-bottom: none; }
.section-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
}
.section-title .cat-num { flex: none; }
.section-note { font-size: 0.88rem; color: var(--c-text-muted); font-style: italic; margin: 0.6rem 0 0; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.9rem;
  margin-top: 1.2rem;
}
.product-item {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}
.product-item h5 { margin: 0 0 0.2rem; font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; color: var(--c-ink); }
.product-item p { margin: 0; font-size: 0.85rem; color: var(--c-text-muted); }

.chip-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.chip {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

.services-row { margin-top: 1.3rem; }
.services-row .label { font-size: 0.82rem; text-transform: none; color: var(--c-text-muted); margin-bottom: 0.5rem; }

/* ---------- contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}
.contact-card h3 { margin-bottom: 0.4rem; }
.contact-card .big-link { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--c-ink); display: block; margin: 0.4rem 0; text-decoration: none; }

.form-panel {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 4vw, 2.3rem);
  margin-top: 2rem;
}
.form-row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; margin-bottom: 1.1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0.35rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--c-ink-soft); }
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-text);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.82rem; color: var(--c-text-muted); margin-top: 0.9rem; }

/* ---------- misc utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.text-muted { color: var(--c-text-muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
