/* =============================================================================
   ASI — asicavi.com
   Stylesheet: design system / token layer + structural scaffold
   -----------------------------------------------------------------------------
   This file is intentionally organised as:
     1. Design tokens      (CSS custom properties — the single source of truth)
     2. Reset / base
     3. Layout primitives  (container, section rhythm)
     4. Scaffold helpers    (visible placeholders for empty stub sections)
   Page-component styles are added later, on top of these tokens.
   ============================================================================ */

/* =============================================================================
   1. DESIGN TOKENS
   ============================================================================ */
:root {
  /* ---------------------------------------------------------------------------
     COLOUR
     Near-black ink, white/off-white paper, single red accent.
     --asi-red is deliberately isolated so the exact brand hex can be swapped
     in one place later.
     ------------------------------------------------------------------------- */
  --asi-red: #D4211E;          /* brand red — single accent, matches Store */
  --asi-red-ink: #A81A17;       /* darker red for text-on-paper / hover */

  --ink: #0E1116;              /* near-black — primary text + dark surfaces */
  --ink-80: #2B2F36;           /* softened ink for secondary text */
  --ink-60: #565B63;           /* muted / captions */

  --paper: #FFFFFF;            /* pure white — cards, inputs, surfaces */
  --paper-off: #F6F5F2;        /* off-white / sectional contrast */
  --page: #F5F4F0;             /* warm off-white — global page background */

  --line: #E3E1DC;             /* hairline border on paper */
  --line-ink: #2A2E35;         /* hairline border on dark surfaces */

  /* Semantic aliases — components reference these, not raw colours above */
  --bg: var(--paper);
  --bg-alt: var(--paper-off);
  --fg: var(--ink);
  --fg-muted: var(--ink-60);
  --accent: var(--asi-red);
  --border: var(--line);

  /* ---------------------------------------------------------------------------
     TYPOGRAPHY
     Archivo  — display + body
     IBM Plex Mono — technical labels, eyebrows, reference codes
     ------------------------------------------------------------------------- */
  --font-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Type scale — modular, ~1.25 ratio, fluid via clamp() where it earns it.
     Names describe role, not pixel size. */
  --fs-eyebrow: 0.75rem;                                  /* 12px mono labels   */
  --fs-xs:      0.8125rem;                                /* 13px fine print    */
  --fs-sm:      0.9375rem;                                /* 15px small body    */
  --fs-base:    1rem;                                     /* 16px body          */
  --fs-lg:      1.125rem;                                 /* 18px lead body     */
  --fs-xl:      clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);   /* sub-headings       */
  --fs-2xl:     clamp(1.6rem, 1.3rem + 1.4vw, 2.25rem);  /* section headings   */
  --fs-3xl:     clamp(2.2rem, 1.6rem + 3vw, 3.5rem);     /* hero / display     */
  --fs-4xl:     clamp(2.8rem, 1.8rem + 5vw, 5rem);       /* outsize display    */

  --lh-tight: 1.05;            /* display headings */
  --lh-snug:  1.2;             /* sub-headings     */
  --lh-body:  1.6;             /* running text     */

  --tracking-tight: -0.02em;   /* large display    */
  --tracking-label: 0.14em;    /* mono eyebrows — uppercase, letterspaced */

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold: 600;
  --fw-bold:    700;

  /* ---------------------------------------------------------------------------
     SPACING — 4px base unit, named by step for predictable rhythm
     ------------------------------------------------------------------------- */
  --sp-1:  0.25rem;   /*  4px */
  --sp-2:  0.5rem;    /*  8px */
  --sp-3:  0.75rem;   /* 12px */
  --sp-4:  1rem;      /* 16px */
  --sp-5:  1.5rem;    /* 24px */
  --sp-6:  2rem;      /* 32px */
  --sp-7:  3rem;      /* 48px */
  --sp-8:  4rem;      /* 64px */
  --sp-9:  6rem;      /* 96px */
  --sp-10: 8rem;      /* 128px */

  /* Section vertical padding — fluid so mobile isn't cavernous */
  --section-y: clamp(3.5rem, 2rem + 7vw, 7rem);

  /* ---------------------------------------------------------------------------
     LAYOUT
     ------------------------------------------------------------------------- */
  --container-max: 1440px;     /* content max-width — fits the 5-col grid */
  --container-pad: clamp(1rem, 0.5rem + 1.5vw, 1.5rem);   /* gutter: 16px mobile → 24px desktop */
  --radius: 2px;               /* minimal — industrial, near-square */
  --hairline: 1px;
  --header-h: 4.25rem;         /* compact header — keeps logo + mobile panel in sync */

  /* ---------------------------------------------------------------------------
     MOTION
     ------------------------------------------------------------------------- */
  --speed-fast: 120ms;
  --speed:      220ms;
  --speed-slow: 400ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --marquee-duration: 32s;     /* capabilities marquee loop length */

  /* Z-index ladder */
  --z-header: 100;
  --z-overlay: 200;
}

/* =============================================================================
   2. RESET / BASE
   ============================================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  color: var(--fg);
  /* Warm off-white page colour (matches Store) + an extremely faint engineering
     grid, fixed to the viewport so it reads identically on every page. */
  background-color: var(--page);
  background-image:
    linear-gradient(to right, rgba(20, 22, 27, 0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 22, 27, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3, h4 {
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
}

/* -----------------------------------------------------------------------------
   Accessibility: visible keyboard focus, skip link, reduced motion
   --------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100%;
  z-index: var(--z-overlay);
  padding: var(--sp-2) var(--sp-4);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.skip-link:focus { top: var(--sp-4); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =============================================================================
   3. LAYOUT PRIMITIVES
   ============================================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Full-bleed wrapper — edge-to-edge chrome (utility bar, header, footer). */
.bleed {
  width: 100%;
  padding-inline: clamp(var(--sp-4), 3.5vw, var(--sp-7));
}

/* Standard section rhythm. Sections alternate paper / off-white via modifier. */
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--ink { background: var(--ink); color: var(--paper); }

/* Mono eyebrow / technical label — e.g. [ 00 ] About */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.eyebrow .num { color: var(--accent); }

/* Engineering-style reference code — e.g. SRV / 01, PROJ / 001 */
.ref-code {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

/* =============================================================================
   4. CONTENT PLACEHOLDERS  (visible "[ ADD: … ]" markers for client-supplied facts)
   Deliberately conspicuous so missing real content can't ship unnoticed.
   ============================================================================ */
.placeholder {
  --ph-color: var(--fg-muted);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: var(--fw-medium);
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--ph-color);
  background: color-mix(in srgb, var(--ph-color) 8%, transparent);
  border: 1px dashed var(--ph-color);
  border-radius: var(--radius);
  padding: 0.2em 0.6em;
}
.placeholder--block { display: block; }
/* Larger drop-in for empty media areas */
.placeholder--media {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-4);
}
/* Lighter variant for dark surfaces (Work, Footer) */
.section--ink .placeholder,
.site-footer .placeholder { --ph-color: rgba(255, 255, 255, 0.55); }

/* =============================================================================
   5. BUTTONS  (shared component)
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: var(--hairline) solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--speed) var(--ease),
              color var(--speed) var(--ease),
              border-color var(--speed) var(--ease),
              transform var(--speed-fast) var(--ease);
}
.btn__arrow { transition: transform var(--speed) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.btn--primary {
  background: var(--accent);
  color: var(--paper);
}
.btn--primary:hover { background: var(--asi-red-ink); }

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn--sm { padding: var(--sp-2) var(--sp-4); }

/* =============================================================================
   6. SITE HEADER  /  NAV
   ============================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--page);
  border-bottom: var(--hairline) solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: var(--header-h);
}

/* Brand lock-up — logo image with a styled "ASI" wordmark fallback */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}
.brand__mark { height: 2.5rem; width: auto; }   /* compact header lock-up */
/* onerror adds --failed: hide the broken image, reveal the wordmark */
.brand__mark--failed { display: none; }
.brand__fallback {
  display: none;
  font-weight: var(--fw-bold);
  font-size: var(--fs-xl);
  letter-spacing: 0.06em;
  color: var(--fg);
}
.brand__mark--failed ~ .brand__fallback { display: inline-block; }

/* Primary nav */
.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}
.nav__aside {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  list-style: none;
  padding: 0;
}
.nav__link {
  position: relative;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-block: var(--sp-3);
  color: var(--fg-muted);
  transition: color var(--speed) var(--ease);
}
/* Red underline: grows on hover/focus, and stays put on the active page. */
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width var(--speed) var(--ease);
}
.nav__link:hover { color: var(--fg); }
.nav__link:hover::after,
.nav__link:focus-visible::after { width: 100%; }

/* Phone block */
.nav__phone {
  display: flex;
  flex-direction: column;
  padding-left: var(--sp-6);
  border-left: var(--hairline) solid var(--border);
  line-height: 1.25;
}
.nav__phone-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.nav__phone-num {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--fg);
  transition: color var(--speed) var(--ease);
}
.nav__phone:hover .nav__phone-num { color: var(--accent); }

/* Mobile menu toggle — hidden on desktop */
.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 1.125rem;
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--speed) var(--ease),
              opacity var(--speed) var(--ease);
}
/* Animate to an X when open */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Header responsive: collapse nav into a drop panel --------------------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-4) var(--container-pad) var(--sp-6);
    background: var(--paper);
    border-bottom: var(--hairline) solid var(--border);
    box-shadow: 0 16px 32px -24px rgba(14, 17, 22, 0.5);

    /* hidden by default; revealed via [data-open] */
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--speed) var(--ease),
                transform var(--speed) var(--ease),
                visibility var(--speed) var(--ease);
  }
  .nav[data-open] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav__link {
    display: block;
    padding: var(--sp-4) 0;
    font-size: var(--fs-lg);
    border-bottom: var(--hairline) solid var(--border);
  }
  .nav__aside {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-4);
    margin-top: var(--sp-5);
  }
  .nav__phone {
    flex-direction: row;
    align-items: baseline;
    gap: var(--sp-3);
    padding-left: 0;
    border-left: 0;
  }
  .nav__cta {
    justify-content: center;
    padding-block: var(--sp-3);
    font-size: var(--fs-sm);
  }
}

/* =============================================================================
   7. HERO
   ============================================================================ */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 2rem + 8vw, 8rem);
  overflow: hidden;
}
/* The engineering grid now lives on <body> so every page matches (see body). */
.hero__inner { position: relative; max-width: 60rem; }

.hero__eyebrow {
  margin-bottom: var(--sp-5);
  text-transform: none;            /* mixed-case reads better in this longer eyebrow */
}
.hero__eyebrow .dot { color: var(--accent); }
.hero__eyebrow-accent { color: var(--fg); }

.hero__title {
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: var(--fw-semibold);
  max-width: 18ch;
}
.hero__title-accent { color: var(--accent); }

.hero__lead {
  margin-top: var(--sp-5);
  max-width: 65ch;
  font-size: var(--fs-lg);
  color: var(--ink-80);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

/* =============================================================================
   8. CAPABILITIES MARQUEE  (signature scrolling strip)
   ============================================================================ */
.marquee {
  background: var(--ink);
  color: var(--paper);
  border-block: var(--hairline) solid var(--line-ink);
  overflow: hidden;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll var(--marquee-duration) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.marquee__item {
  display: flex;
  align-items: center;
  white-space: nowrap;
  padding-block: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* Red slash separator between every item */
.marquee__item::after {
  content: "/";
  color: var(--accent);
  margin-inline: clamp(1.5rem, 4vw, 3.25rem);
  font-weight: var(--fw-regular);
}

@keyframes marquee-scroll {
  to { transform: translateX(-50%); }   /* one full group width */
}

/* Reduced motion: stop the scroll, fall back to a static scrollable row */
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee__track { animation: none; width: auto; }
  .marquee__group[aria-hidden="true"] { display: none; }
}

/* =============================================================================
   9. SECTION TEXT PRIMITIVES  (shared headings / prose)
   ============================================================================ */
.section-title {
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
  max-width: 24ch;
}
.section-head { margin-bottom: var(--sp-7); }
.section-head .eyebrow { margin-bottom: var(--sp-4); }
.section-head__lead { margin-top: var(--sp-4); }

.lead {
  font-size: var(--fs-lg);
  color: var(--ink-80);
  max-width: 65ch;
}
.prose {
  margin-top: var(--sp-4);
  max-width: 65ch;
  color: var(--ink-80);
}
.section--ink .lead,
.section--ink .prose { color: rgba(255, 255, 255, 0.78); }

/* =============================================================================
   10. ABOUT  [ 00 ]
   ============================================================================ */
.about {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(var(--sp-6), 5vw, var(--sp-9));
  align-items: start;
}
.about .eyebrow { margin-bottom: var(--sp-4); }
.about .section-title { margin-bottom: var(--sp-5); }

/* Stat block — engineering datasheet feel */
.stats {
  display: flex;
  flex-direction: column;
  margin: 0;
  border-top: var(--hairline) solid var(--border);
}
.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  border-bottom: var(--hairline) solid var(--border);
}
.stat__num {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: right;
}

@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
}

/* =============================================================================
   11. SERVICES  [ 01 ]  — hairline-gridded cards
   ============================================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hairline);
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--border);
  border: var(--hairline) solid var(--border);
}
.card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: clamp(var(--sp-5), 3vw, var(--sp-7));
  background: var(--bg-alt);
  transition: background var(--speed) var(--ease);
}
.card:hover { background: var(--paper); }
.card__ref { color: var(--accent); }
.card__title {
  font-size: var(--fs-xl);
  margin-top: var(--sp-1);
}
.card__body {
  font-size: var(--fs-sm);
  color: var(--ink-80);
}

@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
}

/* =============================================================================
   12. WORK  [ 02 ]  — dark section, project cards
   ============================================================================ */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.project {
  display: flex;
  flex-direction: column;
  border: var(--hairline) solid var(--line-ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: color-mix(in srgb, var(--paper) 4%, transparent);
}
.project__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: var(--hairline) solid var(--line-ink);
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
  background:
    repeating-linear-gradient(-45deg,
      transparent 0 11px,
      rgba(255, 255, 255, 0.03) 11px 12px);
}
.project__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
}
.project__ref { color: var(--accent); }
.project__title { font-size: var(--fs-lg); }
.project__desc { font-size: var(--fs-sm); }

/* Discipline tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: var(--sp-1) 0 0;
  padding: 0;
  list-style: none;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  padding: 0.25em 0.6em;
  border: var(--hairline) solid var(--line-ink);
  border-radius: var(--radius);
}
.work__note {
  margin-top: var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 760px) {
  .projects { grid-template-columns: 1fr; max-width: 32rem; }
}

/* =============================================================================
   13. CONTACT  [ 03 ]  — intro + quote form
   ============================================================================ */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--sp-6), 5vw, var(--sp-9));
  align-items: start;
}
.contact__intro .eyebrow { margin-bottom: var(--sp-4); }
.contact__intro .section-title { margin-bottom: var(--sp-5); }

.contact__details {
  margin: var(--sp-7) 0 0;
  border-top: var(--hairline) solid var(--border);
}
.contact__item {
  display: flex;
  gap: var(--sp-5);
  padding-block: var(--sp-4);
  border-bottom: var(--hairline) solid var(--border);
}
.contact__label {
  flex: 0 0 6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-top: 0.15em;
}
.contact__value {
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
}
a.contact__value { transition: color var(--speed) var(--ease); }
a.contact__value:hover { color: var(--accent); }
.contact__address {
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: 1.55;
  color: var(--ink-80);
}

/* Quote form */
.quote-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  padding: clamp(var(--sp-5), 3vw, var(--sp-6));
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field--full { grid-column: 1 / -1; }
.field__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.field__opt { text-transform: none; opacity: 0.8; }
.field__input {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--fg);
  background: var(--paper);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-3);
  transition: border-color var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease);
}
.field__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
textarea.field__input { resize: vertical; min-height: 6rem; }

.quote-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-2);
}
.quote-form__note {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--fg-muted);
}

@media (max-width: 920px) {
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .quote-form { grid-template-columns: 1fr; }
}

/* =============================================================================
   14. SITE FOOTER
   ============================================================================ */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding-top: var(--sp-8);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.7fr 1.4fr 1fr 1fr;
  gap: var(--sp-6);
  padding-bottom: var(--sp-7);
}
.site-footer__address { line-height: 1.6; max-width: 26ch; }
.brand--footer .brand__mark { height: 2rem; }
.brand--footer .brand__fallback { color: var(--paper); }
.site-footer__tagline {
  margin-top: var(--sp-4);
  max-width: 36ch;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.7);
}
.site-footer__col { margin: 0; }
.site-footer__heading {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--sp-4);
}
.site-footer__col dd {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.85);
}
.site-footer__link {
  font-family: var(--font-mono);
  transition: color var(--speed) var(--ease);
}
.site-footer__link:hover { color: var(--accent); }

.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-5);
  border-top: var(--hairline) solid var(--line-ink);
}
.site-footer__copy {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.5);
}
.site-footer__top {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--speed) var(--ease);
}
.site-footer__top:hover { color: var(--accent); }

@media (max-width: 820px) {
  .site-footer__grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* =============================================================================
   15. PRODUCTS CATALOGUE  +  ADD-TO-QUOTE SYSTEM
   Technical-minimal sibling of the store page. Red (--accent) is the single
   accent; everything else is ink, paper and hairline borders.
   ============================================================================ */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* --- Utility bar --------------------------------------------------------- */
.utilbar {
  background: #14161B;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.03em;
}
.utilbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding-block: var(--sp-2);
}
.utilbar__pill {
  background: var(--accent);
  color: #fff;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: var(--radius);
}
.utilbar__contact a { transition: color var(--speed) var(--ease); }
.utilbar__contact a:hover { color: #fff; }
.utilbar__sep { color: rgba(255, 255, 255, 0.4); margin-inline: var(--sp-2); }

/* Active nav item (persistent red underline) */
.nav__link--active { color: var(--fg); }
.nav__link--active::after { width: 100%; }

/* --- Products hero ------------------------------------------------------- */
.prodhero { padding-top: var(--sp-8); padding-bottom: var(--sp-6); }
.prodhero__title {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  margin-top: var(--sp-4);
}
.prodhero__lead {
  margin-top: var(--sp-4);
  max-width: 65ch;
  font-size: var(--fs-lg);
  color: var(--fg-muted);
}

/* --- Filter bar ---------------------------------------------------------- */
.prodfilters {
  border-top: var(--hairline) solid var(--border);
  border-bottom: var(--hairline) solid var(--border);
  padding-block: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.prodfilters__body { display: flex; flex-direction: column; gap: var(--sp-4); }
.prodfilters__chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  padding: var(--sp-2) var(--sp-3);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--fg-muted);
  cursor: pointer;
  transition: border-color var(--speed) var(--ease),
              color var(--speed) var(--ease),
              background var(--speed) var(--ease);
}
.chip:hover { border-color: var(--ink-60); color: var(--fg); }
.chip--on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip__glyph { color: var(--accent); font-size: 0.9em; }
.chip--on .chip__glyph { color: #fff; }
.chip__count {
  font-size: 0.85em;
  opacity: 0.7;
  padding-left: var(--sp-1);
}

.prodfilters__selects {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--sp-5);
}
.prodfilters__field { display: flex; flex-direction: column; gap: 4px; }
.prodfilters__lbl {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.prodfilters__field select {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--fg);
  background: var(--paper);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-2) var(--sp-3);
  cursor: pointer;
}
.prodfilters__field select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.prodcount {
  margin-left: auto;
  align-self: flex-end;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--fg-muted);
}
.prodfilters__toggle {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--sp-2) var(--sp-3);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--fg);
  cursor: pointer;
}

/* --- Card grid ----------------------------------------------------------- */
.prodgrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-4);
}
.prodcard {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--speed) var(--ease),
              transform var(--speed-fast) var(--ease),
              box-shadow var(--speed) var(--ease);
}
.prodcard[hidden] { display: none; }
.prodcard:hover {
  border-color: var(--ink-60);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -18px rgba(14, 17, 22, 0.4);
}
.prodcard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: var(--hairline) solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--fg-muted);
}
.prodcard__id { display: inline-flex; align-items: center; gap: var(--sp-2); letter-spacing: 0.06em; white-space: nowrap; }
.prodcard__glyph { color: var(--accent); }
.prodcard__cat { text-align: right; letter-spacing: 0.02em; }
.prodcard__img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #ECEBE4;
  display: grid;
  place-items: center;
  border-bottom: var(--hairline) solid var(--border);
}
.prodcard__img img { width: 100%; height: 100%; object-fit: cover; }
.prodcard__img svg { width: 42%; height: 42%; color: var(--ink-60); opacity: 0.55; }
.prodcard__body { display: flex; flex-direction: column; flex: 1; padding: var(--sp-4); }
.prodcard__mfr {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: var(--sp-2);
}
.prodcard__name {
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-lg);
  line-height: 1.2;
  letter-spacing: -0.005em;
}
.prodcard__spec {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prodcard__foot {
  margin-top: auto;
  padding-top: var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

/* Add-to-quote button */
.addquote {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  padding: var(--sp-2) var(--sp-3);
  background: var(--ink);
  color: var(--paper);
  border: var(--hairline) solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--speed) var(--ease),
              color var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}
.addquote:hover { background: var(--accent); border-color: var(--accent); }
.addquote.is-in {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.addquote.is-in:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.datasheet {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  white-space: nowrap;
  transition: color var(--speed) var(--ease);
}
.datasheet:hover { color: var(--accent); }

.prodempty {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  padding: var(--sp-6) 0;
  text-align: center;
}

/* =============================================================================
   16. QUOTE / ENQUIRY PAGE
   ============================================================================ */
.quotewrap { padding-top: var(--sp-7); padding-bottom: var(--sp-8); }
.quotewrap__title {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-2xl);
  letter-spacing: var(--tracking-tight);
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.quote-empty {
  border: var(--hairline) dashed var(--border);
  border-radius: var(--radius);
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
}
.quote-empty__msg {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  margin-bottom: var(--sp-4);
}

.quotetable-wrap { overflow-x: auto; margin-bottom: var(--sp-6); }
.quotetable {
  width: 100%;
  border-collapse: collapse;
  border: var(--hairline) solid var(--border);
}
.quotetable th, .quotetable td {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: var(--hairline) solid var(--border);
  vertical-align: middle;
  font-size: var(--fs-sm);
}
.quotetable thead th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--bg-alt);
}
.quotetable tbody tr:last-child td { border-bottom: 0; }
.quotetable .qt-ref { font-family: var(--font-mono); letter-spacing: 0.06em; white-space: nowrap; }
.quotetable .qt-name { font-weight: var(--fw-semibold); }
.quotetable .qt-cat { color: var(--fg-muted); }
.qt-note {
  width: 100%;
  min-width: 9rem;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  color: var(--fg);
  background: var(--paper);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-2);
}
.qt-note:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.qt-remove { text-align: right; }
.qt-remove-btn {
  font-size: 1.25rem;
  line-height: 1;
  width: 1.9rem; height: 1.9rem;
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--fg-muted);
  cursor: pointer;
  transition: color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.qt-remove-btn:hover { color: var(--accent); border-color: var(--accent); }

.quote-form--enquiry { background: var(--bg-alt); }

.quote-success {
  border: var(--hairline) solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--sp-6);
}
.quote-success__title {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xl);
  margin: var(--sp-3) 0;
}
.quote-success__body { color: var(--fg-muted); margin-bottom: var(--sp-5); max-width: 65ch; }
.quote-success__body strong { color: var(--fg); font-family: var(--font-mono); }

/* =============================================================================
   17. FLOATING QUOTE WIDGET  (site-wide)
   ============================================================================ */
.quotewidget {
  position: fixed;
  right: clamp(var(--sp-4), 3vw, var(--sp-6));
  bottom: clamp(var(--sp-4), 3vw, var(--sp-6));
  z-index: var(--z-overlay);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  box-shadow: 0 14px 34px -14px rgba(14, 17, 22, 0.55);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.quotewidget.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.quotewidget__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}
.quotewidget__go {
  padding-left: var(--sp-3);
  border-left: var(--hairline) solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.8);
}
.quotewidget:hover { color: #fff; }
.quotewidget:hover .quotewidget__go { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .quotewidget { transition: none; transform: none; }
}

/* =============================================================================
   18. CATALOGUE RESPONSIVE
   ============================================================================ */
/* Grid steps down 5 → 4 → 3 → 2 → 1 as width drops (stays 5 at ≥1281px). */
@media (max-width: 1280px) {
  .prodgrid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1000px) {
  .prodgrid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .prodgrid { grid-template-columns: repeat(2, 1fr); }
  .prodfilters__toggle { display: inline-flex; }
  .prodfilters__body { display: none; padding-top: var(--sp-4); }
  .prodfilters__body.is-open { display: flex; }
  .prodcount { margin-left: 0; }
}
@media (max-width: 640px) {
  .prodgrid { grid-template-columns: 1fr; }

  /* Stack the quote table into labelled cards. */
  .quotetable, .quotetable thead, .quotetable tbody,
  .quotetable th, .quotetable td, .quotetable tr { display: block; }
  .quotetable thead { display: none; }
  .quotetable { border: 0; }
  .quotetable tr {
    border: var(--hairline) solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--sp-4);
    padding: var(--sp-2) var(--sp-3);
    position: relative;
  }
  .quotetable td { border-bottom: 0; padding: var(--sp-2) 0; }
  .quotetable td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-bottom: 2px;
  }
  .qt-remove { position: absolute; top: var(--sp-2); right: var(--sp-3); }
}
