/* =============================================================
   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-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;
}

.brand-mark__bar {
  width: 4px;
  height: 28px;
  background: var(--hy-red);
}

.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); }

@media (max-width: 860px) {
  .nav { display: none; }
  .nav--mobile-cta { display: flex; }
}

/* ----- 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;
  background: linear-gradient(135deg, var(--hy-navy) 0%, var(--hy-navy-deep) 100%);
  color: var(--hy-white);
  overflow: hidden;
  padding-block: var(--sp-24) var(--sp-16);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(194,14,26,0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.04) 0%, transparent 40%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--hy-white);
  max-width: 18ch;
  margin-bottom: var(--sp-6);
}

.hero h1 .accent { color: #FF4750; }

.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-16);
}

.hero__strip {
  position: absolute;
  bottom: var(--sp-6);
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.4em;
  z-index: 1;
}

/* ----- 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;
}

/* ----- Footer ----- */

.site-footer {
  background: var(--hy-navy-deep);
  color: rgba(255,255,255,0.75);
  padding-block: var(--sp-16) var(--sp-8);
}

.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);
}
.site-footer a:hover { color: var(--hy-white); }

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-8);
  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);
}

/* ----- 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);
}

.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;
}

/* ----- Reduced motion ----- */

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .btn--primary:hover, .card:hover { transform: none; }
}

/* ----- Print (basic) ----- */

@media print {
  .site-header, .site-footer, .nav { display: none; }
  body { color: #000; background: #fff; }
}
