/* =============================================================
   Hydramatics website rebuild – design system
   Brand colours from Hatch deck (deck-html/style.css)
   ============================================================= */

:root {
  /* Brand */
  --hy-navy: #04046E;
  --hy-navy-deep: #02023D;
  --hy-navy-soft: #1A1A85;
  --hy-red: #C20E1A;
  --hy-red-deep: #9D0B15;

  /* Neutrals */
  --hy-ink: #1A1A1A;
  --hy-ink-soft: #444450;
  --hy-grey-1: #888899;
  --hy-grey-2: #B0B0C0;
  --hy-grey-3: #DEDEE5;
  --hy-grey-4: #F4F4F8;
  --hy-grey-5: #FAFAFC;
  --hy-white: #FFFFFF;

  /* Surface accents */
  --hy-success: #1B7A3E;
  --hy-warning: #B8860B;

  /* Typography */
  --font-display: "Archivo Black", "Arial Black", "Inter", sans-serif;
  --font-body: "Inter", "Calibri", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;

  /* Type scale (1.25 ratio) */
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-32: 2rem;
  --fs-40: 2.5rem;
  --fs-48: 3rem;
  --fs-64: 4rem;
  --fs-72: 4.5rem;
  --fs-80: 5rem;

  /* Spacing scale (8px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* Layout */
  --container-max: 1280px;
  --content-max: 720px;

  /* Radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;

  /* Motion */
  --t-fast: 120ms ease;
  --t-base: 200ms ease;
  --t-slow: 320ms ease;
}

/* ----- Reset / base ----- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: 1.55;
  color: var(--hy-ink);
  background: var(--hy-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

a {
  color: var(--hy-navy);
  text-decoration: none;
  transition: color var(--t-base);
}
a:hover { color: var(--hy-red); }

button { font-family: inherit; cursor: pointer; }

p { margin: 0 0 var(--sp-4); }

/* ----- Typography ----- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--hy-navy);
  margin: 0 0 var(--sp-4);
  line-height: 1.1;
}

h1 { font-size: clamp(var(--fs-40), 6vw, var(--fs-80)); }
h2 { font-size: clamp(var(--fs-32), 4.5vw, var(--fs-48)); }
h3 { font-size: clamp(var(--fs-24), 3vw, var(--fs-32)); }
h4 { font-size: var(--fs-20); letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-12);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hy-red);
  margin-bottom: var(--sp-3);
}

.lead {
  font-size: var(--fs-20);
  line-height: 1.5;
  color: var(--hy-ink-soft);
  max-width: 56ch;
}

.hero-strip {
  font-family: var(--font-display);
  font-size: var(--fs-12);
  letter-spacing: 0.22em;
  color: var(--hy-grey-2);
  text-transform: uppercase;
}

.mono { font-family: var(--font-mono); }

/* ----- Layout ----- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--sp-8); }
}

.section {
  padding-block: var(--sp-16);
}
@media (min-width: 768px) {
  .section { padding-block: var(--sp-24); }
}

.section--tight { padding-block: var(--sp-12); }

.section--dark {
  background: var(--hy-navy);
  color: var(--hy-white);
}
.section--dark h1, .section--dark h2, .section--dark h3 {
  color: var(--hy-white);
}
.section--dark .eyebrow { color: #FFB3B8; }
.section--dark .lead { color: rgba(255,255,255,0.85); }

.section--grey {
  background: var(--hy-grey-4);
}

.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 980px) {
  .grid-3, .grid-4, .grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
}

/* ----- Header / nav ----- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--hy-grey-3);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  height: 72px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--fs-20);
  color: var(--hy-navy);
  letter-spacing: -0.01em;
  position: relative; /* anchor for ::before/::after red accent */
}

/* Icon wrap – holds the navy base PNG + the red curve overlay PNG.
   Both layers are sized identically (38px tall, width: auto). Red overlay
   sits absolute on top, revealed from bottom-to-top via clip-path on hover.
   The wrap is the element that scales on hover, so both layers stay aligned. */
.brand-mark__icon-wrap {
  position: relative;
  display: inline-block;
  height: 38px;
  line-height: 0; /* avoid baseline-induced gap below img */
  transition: transform 0.25s ease;
  transform-origin: center;
}

.brand-mark__icon {
  height: 38px;
  width: auto;
  display: block;
}

.brand-mark__icon--red {
  /* REST state: red J-curve fully visible, no glow. No clip-path applied –
     drop-shadow at steady-state hover then extends freely outside the
     element's box rather than being clipped to it (which produces visible
     box-edges on the shadow). The @keyframes animation reintroduces clip-path
     only during the disappear-and-redraw run. */
  position: absolute;
  top: 0;
  left: 0;
  /* Transition lets the glow fade out smoothly when hover ends */
  transition: filter 0.3s ease;
}

.brand-mark__wordmark {
  height: 22px;
  width: auto;
  display: block;
  transition: transform 0.25s ease;
  transform-origin: left center;
}

.brand-mark:hover .brand-mark__icon-wrap {
  transform: scale(1.06);
}

.brand-mark:hover .brand-mark__icon--red {
  /* On hover: run the disappear-and-redraw animation once. NO `forwards` –
     after the animation completes, the element reverts to its base CSS
     (no clip-path), letting the drop-shadow extend freely. The hover-state
     filter below persists after the animation so the glow stays. */
  animation: brand-mark-redraw 0.5s ease;
  filter: drop-shadow(0 0 4px rgba(194, 14, 26, 0.7));
}

.brand-mark:hover .brand-mark__wordmark {
  transform: scale(1.03);
}

.brand-mark:active .brand-mark__icon-wrap {
  transform: scale(0.98);
  transition-duration: 100ms;
}

/* Disappear-and-redraw sequence:
   0%:   visible, no glow (matches rest)
   15%:  curve fully clipped from top – disappeared (0.075s, quick)
   100%: visible again with a uniform red glow (the rest of the 0.5s redraws
         the curve bottom-to-top while the glow fades in)
   The glow uses zero offset (0 0 4px), so it follows the J-curve's alpha as
   a halo around the actual shape – no offset means no bounding-box extension
   that could read as L-shaped. */
@keyframes brand-mark-redraw {
  0%   { clip-path: inset(0); filter: none; }
  15%  { clip-path: inset(100% 0 0 0); filter: none; }
  100% { clip-path: inset(0); filter: drop-shadow(0 0 4px rgba(194, 14, 26, 0.7)); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark__icon-wrap,
  .brand-mark__icon--red,
  .brand-mark__wordmark {
    transition: none;
    animation: none;
  }
  .brand-mark:hover .brand-mark__icon-wrap,
  .brand-mark:hover .brand-mark__wordmark,
  .brand-mark:active .brand-mark__icon-wrap {
    transform: none;
  }
  .brand-mark:hover .brand-mark__icon--red {
    animation: none;
    filter: none;
  }
  .brand-mark__icon--red {
    clip-path: inset(0);
    filter: none;
  }
}

/* Footer variant – keep visible on dark navy */
.site-footer .brand-mark__icon {
  height: 32px;
  /* PNG has transparent BG and the H mark is navy – invisible on navy footer.
     For now: small white pill behind it. Swap for negative-variant icon when
     we generate one. */
  background: var(--hy-white);
  padding: 4px;
  border-radius: var(--r-sm);
}

/* Legacy bar (deprecated – kept for any pages that haven't migrated yet) */
.brand-mark__bar {
  width: 4px;
  height: 28px;
  background: var(--hy-red);
}

/* Two-tone wordmark (HYDRA navy + MATICS red) – auto-applied by
   /js/hy-wordmark.js to any plain-text occurrence of "Hydramatics" in body
   content. Highlights the spelling (common misspelling is "Hydromatics" with
   an O). On dark backgrounds (.site-footer, .hy-wm--on-dark) HYDRA inherits
   the parent text colour so it stays legible; MATICS stays red as the cue. */
.hy-wm { font-weight: inherit; letter-spacing: inherit; white-space: nowrap; }
.hy-wm__hydra { color: var(--hy-navy); }
.hy-wm__matics { color: var(--hy-red); }
/* Dark surfaces – keep MATICS red as the spelling cue but let HYDRA inherit the
   parent text colour (white on navy footer, hero, dark sections, etc.) so it
   stays legible. The [style*="hy-navy"] selector catches inline-styled section
   heroes on sub-pages that use a navy gradient without the .section--dark class. */
.site-footer .hy-wm__hydra,
.hero .hy-wm__hydra,
.section--dark .hy-wm__hydra,
[style*="hy-navy"] .hy-wm__hydra,
.hy-wm--on-dark .hy-wm__hydra { color: inherit; }

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.nav a {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--hy-ink);
  letter-spacing: 0.01em;
  position: relative;
  padding-block: var(--sp-2);
}
.nav a:hover { color: var(--hy-red); }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--hy-red);
}

.nav__cta {
  background: var(--hy-navy);
  color: var(--hy-white) !important;
  padding: var(--sp-3) var(--sp-5, 20px);
  border-radius: var(--r-sm);
  transition: background var(--t-base);
}
.nav__cta:hover { background: var(--hy-red); }

/* ----- Mobile nav – hamburger checkbox hack (no JS dependency) ----- */

/* Checkbox: visually hidden but keyboard-focusable. Toggling it (via the
   label, or space-bar when focused) drives the :checked selectors below.
   Pinned at top:0/left:0 + clip-path so the native checkbox glyph cannot
   leak out as a grey sliver on mobile browsers. */
.nav-toggle {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Hamburger button – hidden on desktop, shown below 860px */
.nav-toggle-btn { display: none; }

@media (max-width: 860px) {
  .nav-toggle-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 11px 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle-bar {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--hy-navy);
    border-radius: 2px;
    transition: transform var(--t-base), opacity var(--t-base);
  }

  /* Nav becomes a full-width dropdown panel anchored under the sticky header */
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--hy-white);
    border-bottom: 1px solid var(--hy-grey-3);
    box-shadow: 0 16px 32px -12px rgba(4, 4, 110, 0.18);
    padding: var(--sp-2) var(--sp-6) var(--sp-4);
  }
  .nav-toggle:checked ~ .nav { display: flex; }

  .nav a {
    padding-block: var(--sp-4);
    font-size: var(--fs-16);
    border-bottom: 1px solid var(--hy-grey-4);
  }
  .nav a:last-of-type { border-bottom: none; }
  /* Stacked menu: the desktop underline cue is replaced by a colour change */
  .nav a.is-active::after { display: none; }
  .nav a.is-active { color: var(--hy-red); }

  .nav__cta {
    margin-top: var(--sp-3);
    text-align: center;
    padding-block: var(--sp-3);
  }

  /* Hamburger animates into an X when the menu is open */
  .nav-toggle:checked ~ .nav-toggle-btn .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle:checked ~ .nav-toggle-btn .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle:checked ~ .nav-toggle-btn .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  @media (prefers-reduced-motion: reduce) {
    .nav-toggle-bar { transition: none; }
  }
}

/* ----- Buttons ----- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--font-display);
  font-size: var(--fs-14);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  text-decoration: none !important;
  transition: all var(--t-base);
  cursor: pointer;
}

.btn--primary {
  background: var(--hy-red);
  color: var(--hy-white) !important;
}
.btn--primary:hover {
  background: var(--hy-red-deep);
  transform: translateY(-1px);
}

.btn--secondary {
  background: transparent;
  color: var(--hy-white) !important;
  border-color: rgba(255,255,255,0.4);
}
.btn--secondary:hover {
  border-color: var(--hy-white);
  background: rgba(255,255,255,0.08);
}

.btn--outline {
  background: transparent;
  color: var(--hy-navy) !important;
  border-color: var(--hy-navy);
}
.btn--outline:hover {
  background: var(--hy-navy);
  color: var(--hy-white) !important;
}

.btn--ghost {
  background: transparent;
  color: var(--hy-navy) !important;
  padding-inline: 0;
}
.btn--ghost:hover { color: var(--hy-red) !important; }
.btn--ghost::after {
  content: "→";
  transition: transform var(--t-base);
}
.btn--ghost:hover::after { transform: translateX(4px); }

/* ----- Hero ----- */

.hero {
  position: relative;
  /* Clean streak field as hero background (1600x1600, navy with red+cyan light streaks).
     Text sits on the left, product carousel on the right (.hero__carousel). The overlay
     darkens the left side for text contrast while letting the streak field show through. */
  background:
    linear-gradient(95deg, rgba(4, 4, 110, 0.55) 0%, rgba(4, 4, 110, 0.30) 45%, rgba(4, 4, 110, 0.10) 80%, rgba(4, 4, 110, 0.30) 100%),
    url('/img/hero/upscaled-background.jpg') center 60% / cover no-repeat;
  background-color: var(--hy-navy-deep);
  color: var(--hy-white);
  overflow: hidden;
  /* Hero vertical compression: from original sp-24/sp-16 (96/64 = 160px) down
     to sp-8/sp-8 (32/32 = 64px). Combined with the smaller carousel max-width
     (now clamped at 340px instead of 460px), the hero is materially shorter so
     the partner band + solutions grid land well above the fold. */
  padding-block: var(--sp-8) var(--sp-8);
}

/* Subtle grid overlay retained for the engineered/technical texture on top of the image. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

/* 2-column grid above 860px: text on the left, product carousel on the right.
   The text content is wrapped in .hero__copy so it stays as one grid item.
   On mobile, .hero__inner stays in default block flow and .hero__copy is a
   transparent block wrapper (no visual change). */
@media (min-width: 861px) {
  .hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(220px, 26vw, 340px);
    gap: clamp(var(--sp-6), 4vw, var(--sp-12));
    align-items: center;
  }
}

.hero h1 {
  color: var(--hy-white);
  max-width: 32ch;
  margin-bottom: var(--sp-6);
}

/* .accent on hero h1 deliberately not coloured – see BRAND_GUIDELINES §3 "Red is punctuation".
   "Camozzi" and "Hy-Lok" already carry weight as the H1 subject; the partner-band logos
   immediately below the hero carry the brand identity. Colouring the names red is overuse. */

.hero .lead {
  color: rgba(255,255,255,0.88);
  margin-bottom: var(--sp-8);
  max-width: 56ch;
  font-size: clamp(var(--fs-18), 2vw, var(--fs-24));
}

.hero__ctas {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
}

.hero__strip {
  position: absolute;
  bottom: var(--sp-4);
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.4em;
  z-index: 1;
}

/* ----- Hero product carousel -----
   Single-product cross-fade carousel on the right side of the hero. Pure-CSS:
   each img runs the same @keyframes with a different negative animation-delay so
   exactly one image is opacity:1 at any moment. Cross-fades smoothly between products.
   Hidden on mobile to keep the hero text-focused on narrow viewports.
*/

.hero__carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  z-index: 1;
  pointer-events: none;
}

.hero__carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation: heroProductFade 20s infinite;
  /* Stacked drop-shadows: soft white halo for definition against the streak
     field, plus a darker grounding shadow below for visual weight. */
  filter:
    drop-shadow(0 0 28px rgba(255, 255, 255, 0.22))
    drop-shadow(0 0 12px rgba(180, 200, 255, 0.18))
    drop-shadow(0 16px 28px rgba(0, 0, 0, 0.45));
}

.hero__carousel img:nth-child(1) { animation-delay: 0s; }
.hero__carousel img:nth-child(2) { animation-delay: -15s; }
.hero__carousel img:nth-child(3) { animation-delay: -10s; }
.hero__carousel img:nth-child(4) { animation-delay: -5s; }

@keyframes heroProductFade {
  /* 20s total cycle, 4 images, 5s slot each. Hold visible from 0% to 20% (= 0-4s),
     fade out 20% to 22.5% (= 4-4.5s, 0.5s fade), hidden until 97.5% (= 19.5s),
     fade in 97.5% to 100% (= 19.5-20s) so the next-cycle 0% lands at opacity 1. */
  0%, 20% { opacity: 1; }
  22.5% { opacity: 0; }
  97.5% { opacity: 0; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__carousel img { animation: none; opacity: 0; }
  .hero__carousel img:first-child { opacity: 1; }
}

@media (max-width: 860px) {
  .hero__carousel { display: none; }
}

/* ----- Cards ----- */

.card {
  background: var(--hy-white);
  border: 1px solid var(--hy-grey-3);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  transition: all var(--t-base);
}
.card:hover {
  border-color: var(--hy-navy);
  box-shadow: 0 8px 32px -8px rgba(4,4,110,0.15);
  transform: translateY(-2px);
}

.card--bordered {
  border-left: 4px solid var(--hy-red);
}

.card__icon {
  width: 48px;
  height: 48px;
  background: var(--hy-navy);
  color: var(--hy-white);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
}
.card__icon svg { width: 24px; height: 24px; }

.card h3, .card h4 { margin-bottom: var(--sp-2); }

.card p {
  color: var(--hy-ink-soft);
  font-size: var(--fs-14);
  margin-bottom: var(--sp-4);
}

.card__link {
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--hy-navy);
  display: inline-flex;
  gap: var(--sp-1);
  align-items: center;
}
.card__link::after {
  content: "→";
  transition: transform var(--t-base);
}
.card:hover .card__link::after { transform: translateX(4px); }

/* ----- Solution / industry tile (variants) ----- */

.tile {
  position: relative;
  background: var(--hy-grey-4);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  overflow: hidden;
  transition: all var(--t-base);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tile:hover {
  background: var(--hy-navy);
  color: var(--hy-white);
}
.tile:hover h3 { color: var(--hy-white); }
.tile:hover .tile__meta { color: rgba(255,255,255,0.7); }

.tile__meta {
  font-family: var(--font-display);
  font-size: var(--fs-12);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hy-grey-1);
  transition: color var(--t-base);
}

.tile__cta {
  margin-top: var(--sp-4);
  font-size: var(--fs-14);
  font-weight: 700;
  display: inline-flex;
  gap: var(--sp-1);
  align-items: center;
}
.tile__cta::after { content: "→"; transition: transform var(--t-base); }
.tile:hover .tile__cta::after { transform: translateX(4px); }

/* ----- Stat / metric blocks ----- */

.stat {
  border-top: 2px solid var(--hy-red);
  padding-top: var(--sp-4);
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(var(--fs-40), 5vw, var(--fs-64));
  color: var(--hy-navy);
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.stat__label {
  font-size: var(--fs-14);
  color: var(--hy-ink-soft);
  max-width: 24ch;
}

.section--dark .stat__num { color: var(--hy-white); }
.section--dark .stat__label { color: rgba(255,255,255,0.75); }

/* ----- Partner logos band ----- */

.partner-band {
  border-block: 1px solid var(--hy-grey-3);
  padding-block: var(--sp-8);
  background: var(--hy-grey-5);
}

.partner-band__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--sp-12);
  align-items: center;
}
@media (max-width: 768px) {
  .partner-band__inner { grid-template-columns: 1fr; gap: var(--sp-6); }
}

.partner-band__label {
  font-family: var(--font-display);
  font-size: var(--fs-12);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hy-grey-1);
}

.partner-band__logos {
  display: flex;
  gap: var(--sp-12);
  align-items: center;
  flex-wrap: wrap;
}

.partner-logo {
  font-family: var(--font-display);
  font-size: var(--fs-24);
  color: var(--hy-navy);
  letter-spacing: -0.02em;
}
.partner-logo small {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-12);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--hy-grey-1);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ----- Image-based partner logos ----- */
/* Aspect-ratio-aware sizing so wordmark letter heights look balanced
   between Camozzi (square, wordmark ~25% of total height) and Hy-Lok
   (wide horizontal, wordmark ~85% of total height).
   Camozzi clear-space spec (½ X all sides) handled via container padding. */

.partner-band__logos {
  align-items: center;
}

.partner-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--sp-2);
}

.partner-logo-img {
  width: auto;
  max-width: 100%;
  display: block;
}

/* Camozzi PNG is pre-cropped to its bounding box (no internal padding).
   Sized for visual wordmark parity with Hy-Lok (whose wordmark fills the
   full file height). No CSS distortion, fully Camozzi-compliant. */

.partner-logo-img--camozzi {
  height: 160px;
}

.partner-logo-img--hylok {
  height: 56px;
}

.partner-logo-wrap small {
  font-family: var(--font-body);
  font-size: var(--fs-12);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--hy-grey-1);
  text-transform: uppercase;
  margin-top: var(--sp-3);
}

@media (max-width: 600px) {
  .partner-logo-img--camozzi { height: 110px; }
  .partner-logo-img--hylok { height: 40px; }
}

/* CoilVision sub-brand mark (used inline on smart pneumatics page) */
.coilvision-mark {
  height: 32px;
  width: auto;
  vertical-align: middle;
  display: inline-block;
}

/* Camozzi negative logo on dark surfaces */
.camozzi-neg {
  height: 64px;
  width: auto;
  display: block;
}

/* ----- Footer ----- */

.site-footer {
  background: var(--hy-navy-deep);
  border-top: 3px solid var(--hy-red);
  color: rgba(255,255,255,0.78);
  padding-block: var(--sp-16) var(--sp-8);
}

/* Footer brand-mark – actual logo wordmark, two-tone (HYDRA white / MATICS red),
   replaces the old Archivo-Black text approximation. `max-width: 100%` is the
   critical bit on mobile – at ~28px height the image is naturally ~154px wide,
   which would overflow a ~144px grid column on narrow phones and push the
   whole body past viewport width. The `min(...)` pattern caps it at 240px on
   wide screens AND at 100% of the parent on narrow ones. */
.footer-wordmark {
  height: 28px;
  width: auto;
  max-width: min(240px, 100%);
  display: block;
  margin-bottom: var(--sp-4);
}

.site-footer h4 {
  color: var(--hy-white);
  font-size: var(--fs-14);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}

.site-footer a {
  color: rgba(255,255,255,0.75);
  display: block;
  padding-block: var(--sp-1);
  font-size: var(--fs-14);
  /* Allow long unbreakable strings (sales@hydramatics.co.za, +27 11 608 1340)
     to wrap inside narrow grid columns instead of forcing horizontal page
     overflow. */
  overflow-wrap: anywhere;
  word-break: break-word;
}
.site-footer a:hover { color: var(--hy-white); }

/* Same break-anywhere rule for the address/contact text blocks under the
   "Get in touch" column – they contain phone numbers and addresses that are
   unbreakable strings on narrow phones. */
.site-footer .contact-line,
.site-footer p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}
@media (max-width: 860px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
}

.site-footer__legal {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: var(--fs-12);
}

.contact-line {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

/* Footer hero strip: tighter tracking + smaller so the long all-caps line fits
   its column without forcing the grid wider (the column-spacing fix). */
.site-footer .hero-strip {
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.7;
  color: var(--hy-grey-2);
  margin-top: var(--sp-4);
}

/* WhatsApp brand glyph used in contact lines (replaces the speech-balloon emoji). */
.wa-ico { width: 16px; height: 16px; flex: none; display: inline-block; }

/* ----- Utility ----- */

.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.muted { color: var(--hy-ink-soft); }
.divider { height: 1px; background: var(--hy-grey-3); margin-block: var(--sp-12); }

.placeholder-image {
  background: linear-gradient(135deg, var(--hy-grey-3), var(--hy-grey-4));
  border: 1px dashed var(--hy-grey-2);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--hy-grey-1);
  min-height: 200px;
  text-align: center;
  padding: var(--sp-4);
}

/* Real product / application photography */
.product-image {
  width: 100%;
  min-height: 380px;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--r-md);
  display: block;
}

/* Slightly darker for product images on light surfaces – adds subtle pop */
.product-image--shadow {
  box-shadow: 0 8px 32px -12px rgba(4, 4, 110, 0.25);
}

.note-strip {
  background: #FFF8E1;
  border-left: 4px solid var(--hy-warning);
  padding: var(--sp-4) var(--sp-6);
  font-size: var(--fs-14);
  color: var(--hy-ink-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* ============================================================
   DECK-INSPIRED PRIMITIVES  (added 2026-05-30)
   Ported from the Future-of-Pneumatics deck (hatch_lunch_learn/
   deck-web) to carry its more premium, editorial design language
   onto the marketing site. See website-rebuild/DECK_DESIGN_LESSONS.md.
   All additive, namespaced, and reduced-motion-safe.
   ============================================================ */

/* ---------- Diagonal accent strip ----------
   The deck's signature brand motif: a faint diagonal band of brand
   colour in a section corner. Drop <span class="accent-diagonal ..."></span>
   as the FIRST child of a `position: relative; overflow: hidden` container
   (.hero already qualifies; use .section--accent helper on sections).
   Purely decorative - aria-hidden, pointer-events: none. */
.section--accent { position: relative; overflow: hidden; }

.accent-diagonal {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 38%;
  pointer-events: none;
  z-index: 0;
}
.accent-diagonal--right { right: 0; }
.accent-diagonal--left  { left: 0; }
/* Red on dark surfaces; navy on light surfaces. Opacity kept low so it
   reads as texture, never decoration competing with content (red discipline). */
.accent-diagonal--red {
  opacity: 0.10;
  background: linear-gradient(135deg, transparent 0%, transparent 60%, var(--hy-red) 60%, var(--hy-red) 65%, transparent 65%);
}
.accent-diagonal--navy {
  opacity: 0.05;
  background: linear-gradient(135deg, transparent 0%, transparent 60%, var(--hy-navy) 60%, var(--hy-navy) 65%, transparent 65%);
}
/* Keep section content above the strip */
.section--accent > .container { position: relative; z-index: 1; }

/* ---------- Accent rule (red underline under a heading) ----------
   The deck puts a short red bar under H1/H2s (h-1 w-32 bg-accent). */
.accent-rule {
  height: 4px;
  width: 128px;
  max-width: 60%;
  background: var(--hy-red);
  border: 0;
  margin: var(--sp-4) 0 var(--sp-6);
}

/* ---------- Mega stat (display-mega) ----------
   Bigger, tighter sibling of .stat__num for headline numbers - the deck's
   "~5 kW / ~R 80k / ~6 mo" treatment. Use .stat--mega on a .stat block. */
.stat--mega { border-top: 0; padding-top: 0; }
.stat--mega .stat__num,
.display-mega {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-size: clamp(var(--fs-40), 7vw, var(--fs-72, 4.5rem));
  color: var(--hy-navy);
}
.section--dark .stat--mega .stat__num,
.section--dark .display-mega { color: var(--hy-white); }
.display-mega--accent,
.stat--mega.is-accent .stat__num { color: var(--hy-red); }
.section--dark .display-mega--accent { color: #FF6E78; } /* lifted red for navy-bg contrast */

/* ---------- "Worth asking" callout (over-to-you) ----------
   White card, red left border - the deck's rhetorical-prompt pattern.
   Repurposed here for honest-framing / next-step asides. */
.callout {
  background: var(--hy-white);
  border-left: 4px solid var(--hy-red);
  padding: var(--sp-6) var(--sp-8);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  box-shadow: 0 8px 28px -16px rgba(2, 2, 61, 0.18);
}
.section--dark .callout { background: rgba(255,255,255,0.04); }
.callout__label {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: var(--fs-12);
  color: var(--hy-red);
  margin-bottom: var(--sp-2);
}
.callout__body {
  font-size: var(--fs-18);
  line-height: 1.5;
  color: var(--hy-ink);
}
.section--dark .callout__body { color: var(--hy-white); }
.callout__note {
  font-size: var(--fs-14);
  color: var(--hy-ink-soft);
  margin-top: var(--sp-2);
}
.section--dark .callout__note { color: rgba(255,255,255,0.7); }

/* ---------- Hover affordances ----------
   .card already lifts; these are for non-card elements.
   .hover-row  - left-border list items: grey wash + small slide right.
   .hover-lift - generic tiles: gentle lift + soft shadow. */
.hover-row {
  transition: background-color 0.18s ease-out, transform 0.18s ease-out;
}
.hover-row:hover {
  background-color: var(--hy-grey-4);
  transform: translateX(4px);
}
.section--dark .hover-row:hover { background-color: rgba(255,255,255,0.05); }

.hover-lift {
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
  will-change: transform;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(2, 2, 61, 0.13);
}

/* ---------- Reveal-on-scroll ----------
   SAFE BY DESIGN: rules are gated on `html.has-reveal`, which the reveal.js
   script only adds when JS is present AND motion is allowed. No JS, an old
   browser, or reduced-motion → .has-reveal never set → content fully visible.
   Content can never get stuck invisible. */
html.has-reveal .reveal {
  opacity: 0;
  transform: translate3d(0, 1.25rem, 0);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  will-change: opacity, transform;
}
html.has-reveal .reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

/* ----- Reduced motion ----- */

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .btn--primary:hover, .card:hover, .hover-lift:hover, .hover-row:hover { transform: none; }
  /* Belt-and-braces: force any reveal element visible (reveal.js already
     skips arming under reduced-motion, this covers manual .has-reveal too). */
  html.has-reveal .reveal { opacity: 1 !important; transform: none !important; }
}

/* ----- Print (basic) ----- */

@media print {
  .site-header, .site-footer, .nav { display: none; }
  body { color: #000; background: #fff; }
}
