/* ============================================================
   NZM Group — Hub (nzmgroup.ca)
   Architectural Precision: High-End Minimalism, Flat 2.0.
   Static HTML/CSS only. Zero JavaScript. No external assets.
   ============================================================ */

/* ---- Tokens ---- */
:root {
  /* Brand */
  --navy: #0c447c;          /* primary button / tech */
  --navy-deep: #002e59;     /* display headline */
  --soft-blue: #e6f1fb;     /* tech wash */
  --charcoal: #2c2c2a;      /* media accent / body text */
  --tertiary: #2b2c38;      /* media button */
  --soft-purple: #eeedfe;   /* media wash */
  --warm-white: #faf9f7;
  --white: #ffffff;

  /* Surfaces / neutrals (from design system) */
  --background: #f9f9fe;
  --on-surface: #1a1c20;
  --secondary: #5f5e5c;
  --outline-variant: #c2c6d1;

  /* Spacing scale (4px baseline) */
  --stack-sm: 8px;
  --stack-md: 24px;
  --stack-lg: 64px;
  --gutter: 24px;
  --margin-mobile: 20px;
  --margin-desktop: 80px;
  --max-width: 1440px;

  /* Radius */
  --radius: 4px;

  --font: Georgia, "Times New Roman", Times, serif;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--on-surface);
  background-color: var(--background);
  overflow-x: hidden;
}
a { color: inherit; }
h1 { margin: 0; }
p { margin: 0; }

/* ---- Decorative accents (flat, static) ---- */
.accent {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}
.accent--circle {
  top: 12%;
  right: 4%;
  width: 240px;
  height: 240px;
  background-color: var(--soft-blue);
  border-radius: 50%;
  opacity: 0.5;
  animation: drift-circle 28s ease-in-out infinite;
}
.accent--triangle {
  bottom: 16%;
  left: 4%;
  width: 180px;
  height: 180px;
  background-color: var(--soft-purple);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  opacity: 0.4;
  animation: drift-triangle 34s ease-in-out infinite;
}

@keyframes drift-circle {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-18px, 24px) scale(1.04); }
}
@keyframes drift-triangle {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(22px, -18px) rotate(8deg); }
}

/* ---- Wavy animated band (bottom) ---- */
.waves {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 18vh;
  min-height: 120px;
  max-height: 220px;
  z-index: 0;
  pointer-events: none;
}
.waves--top {
  top: 0;
  bottom: auto;
  transform: scaleY(-1);
}
.waves svg {
  width: 100%;
  height: 100%;
}
.waves__layer use {
  animation: wave-move 12s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}
.waves__layer--1 use { fill: var(--soft-blue);   opacity: 0.45; animation-duration: 18s; }
.waves__layer--2 use { fill: var(--soft-purple); opacity: 0.32; animation-duration: 24s; animation-delay: -4s; }
.waves__layer--3 use { fill: var(--soft-blue);   opacity: 0.22; animation-duration: 32s; animation-delay: -7s; }

@keyframes wave-move {
  0%   { transform: translateX(-90px); }
  100% { transform: translateX(85px); }
}

@media (prefers-reduced-motion: reduce) {
  .accent--circle,
  .accent--triangle,
  .waves__layer use,
  .btn--tech:hover .btn__icon,
  .btn--media:hover .btn__icon { animation: none; }
}

/* ---- Page shell: full viewport, header / hero / footer ---- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--margin-mobile);
  display: flex;
  flex-direction: column;
}

/* ---- Masthead ---- */
.masthead {
  padding: var(--stack-md) 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Logo lockup (5C): [NZM] / GROUP stretched to width */
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.9;
  color: var(--navy);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.logo__row {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 50px;
  letter-spacing: 0.02em;
}
.logo__brk {
  font-weight: 700;
  font-size: 43px;
  margin: 0 3px;
}
.logo__grp {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-weight: 800;
  font-size: 23px;
  margin-top: 7px;
}
/* ---- Hero (centered statement) ---- */
.hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  max-width: 56rem;
  width: 100%;
  margin: 0 auto;
  padding: var(--stack-lg) 0;
}
.hero__title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--navy-deep);
  margin-bottom: var(--stack-md);
}
.hero__lead {
  font-size: 18px;
  line-height: 28px;
  color: var(--secondary);
  max-width: 42rem;
  margin-bottom: var(--stack-lg);
}

/* ---- Division entry points ---- */
.divisions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
  width: 100%;
}
.division {
  display: flex;
  flex-direction: column;
  gap: var(--stack-sm);
}
.division__label {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.1em;
  color: var(--secondary);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--stack-sm);
  padding: 16px var(--stack-lg);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.btn:hover { opacity: 0.95; transform: scale(1.06); }
.btn:active { transform: scale(0.98); }

/* Spin gear icon on NZM Tech hover */
.btn--tech .btn__icon {
  transform-box: fill-box;
  transform-origin: center;
}
.btn--tech:hover .btn__icon {
  animation: gear-spin 2s linear infinite;
}
@keyframes gear-spin {
  to { transform: rotate(360deg); }
}

/* Camera shutter-snap on NZM Media hover */
.btn--media .btn__icon {
  transform-box: fill-box;
  transform-origin: center;
}
.btn--media:hover .btn__icon {
  animation: shutter-snap 0.9s ease-in-out infinite;
}
@keyframes shutter-snap {
  0%, 100% { transform: scale(1) rotate(0deg); }
  20%      { transform: scale(0.78) rotate(-6deg); }
  40%      { transform: scale(1.12) rotate(4deg); }
  60%      { transform: scale(1) rotate(0deg); }
}
.btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.btn__icon { flex: 0 0 auto; }
.btn--tech {
  background-color: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.btn--media {
  background-color: var(--tertiary);
  border-color: var(--tertiary);
  color: var(--white);
}

/* ---- Footer ---- */
.footer {
  padding: var(--stack-md) 0;
  border-top: 1px solid var(--outline-variant);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stack-sm);
}
.footer__email {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer__email:hover { color: var(--navy); }
.footer__copy { color: var(--secondary); }

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet and up */
@media (min-width: 768px) {
  .page { padding: 0 var(--margin-desktop); }

  .hero {
    align-items: center;
    text-align: center;
  }
  .hero__title {
    font-size: 52px;
    letter-spacing: -0.02em;
  }

  .divisions {
    grid-template-columns: 1fr 1fr;
    justify-items: center;
  }
  .division { align-items: center; }
  .btn { width: auto; }

  .footer {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Mobile: full-width buttons */
@media (max-width: 767px) {
  .btn { width: 100%; }
}
