/* ============================================================
   INDUSTRIAL WATER ADVISORY — Base Design System
   Clean white + dark navy | Authoritative / Corporate
   Fonts: Playfair Display (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── Design Tokens ── */
:root {
  /* Colors */
  --navy:       #0d1f3c;
  --navy-deep:  #081429;
  --navy-mid:   #162d52;
  --teal:       #0e7c7b;
  --teal-light: #16a8a7;
  --teal-pale:  #e6f4f4;
  --white:      #ffffff;
  --off-white:  #f8f9fb;
  --gray-100:   #f1f3f6;
  --gray-200:   #e2e6ed;
  --gray-400:   #9aa5b4;
  --gray-600:   #5a6778;
  --gray-800:   #2d3748;
  --text-primary:   #0d1f3c;
  --text-secondary: #5a6778;
  --text-light:     #9aa5b4;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container: 1160px;
  --container-narrow: 780px;
  --radius: 6px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(13,31,60,0.08), 0 1px 2px rgba(13,31,60,0.04);
  --shadow-md: 0 4px 16px rgba(13,31,60,0.10), 0 2px 6px rgba(13,31,60,0.06);
  --shadow-lg: 0 12px 40px rgba(13,31,60,0.14), 0 4px 12px rgba(13,31,60,0.08);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(var(--space-6), 5vw, var(--space-16));
}
.container--narrow {
  max-width: var(--container-narrow);
}
.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}
.section--sm {
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.text-display   { font-size: var(--text-3xl); }
.text-headline  { font-size: var(--text-2xl); }
.text-title     { font-size: var(--text-xl); }
.text-subtitle  { font-size: var(--text-lg); }
.text-body      { font-size: var(--text-base); }
.text-small     { font-size: var(--text-sm); }
.text-xs        { font-size: var(--text-xs); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}
.lead {
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius);
  transition: all var(--dur-base) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
}
.btn-primary:hover {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary,
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-secondary:hover,
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-1px);
}
.btn-teal {
  background: var(--teal);
  color: var(--white);
  border: 2px solid var(--teal);
}
.btn-teal:hover {
  background: var(--teal-light);
  border-color: var(--teal-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-white {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--white);
}
.btn-white:hover {
  background: var(--off-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.nav__logo-text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--navy);
  line-height: 1.2;
}
.nav__logo-sub {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text-secondary);
  display: block;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav__links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--dur-fast);
  position: relative;
}
.nav__links a:hover,
.nav__links a.active { color: var(--navy); }
.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}
.nav__cta { margin-left: var(--space-4); }
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--dur-base);
}
.nav__mobile {
  display: none;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}
.nav__mobile a {
  padding: var(--space-3) 0;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--gray-100);
  transition: color var(--dur-fast);
}
.nav__mobile a:last-child { border-bottom: none; }
.nav__mobile a:hover { color: var(--navy); }
.nav__mobile.open { display: flex; }

/* ── Footer ── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding-block: var(--space-16) var(--space-10);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}
.footer__brand-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--white);
  margin-bottom: var(--space-3);
}
.footer__brand-desc {
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: 300px;
}
.footer__col-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-4);
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer__links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  transition: color var(--dur-fast);
}
.footer__links a:hover { color: var(--white); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer__copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: box-shadow var(--dur-base), transform var(--dur-base);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ── Dividers / Accents ── */
.teal-line {
  width: 48px;
  height: 3px;
  background: var(--teal);
  border-radius: 3px;
  margin-bottom: var(--space-6);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: 500;
}
.badge-navy {
  background: rgba(13,31,60,0.08);
  color: var(--navy);
}
.badge-teal {
  background: var(--teal-pale);
  color: var(--teal);
}

/* ── Stat / KPI blocks ── */
.stat-block { text-align: center; }
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--navy);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 400;
}

/* ── Form Elements ── */
.form-group { margin-bottom: var(--space-5); }
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14,124,123,0.12);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ── Page Header ── */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding-block: clamp(var(--space-20), 10vw, var(--space-24));
  padding-top: calc(clamp(var(--space-20), 10vw, var(--space-24)) + 68px);
}
.page-header .eyebrow { color: var(--teal-light); }
.page-header h1 { color: var(--white); }
.page-header .lead { color: rgba(255,255,255,0.7); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}
@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeInUp 0.6s var(--ease-out) both;
}
.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }
.animate-in-delay-4 { animation-delay: 0.4s; }

/* Intersection Observer reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── Nav Dropdown ─────────────────────────────── */
.nav__item--dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav__drop-trigger {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--dur-fast);
  background: none;
  border: none;
  padding: 4px 0;   /* vertical padding extends hover target downward */
  gap: 2px;
  text-decoration: none;
}
.nav__drop-trigger:hover { color: var(--navy); }
.nav__dropdown {
  display: none;
  position: absolute;
  top: 100%;          /* flush to bottom of trigger — no gap */
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #dce8f0;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(10,22,40,0.16);
  min-width: 260px;
  padding: 0.75rem 0 0.5rem;
  z-index: 300;
  list-style: none;
  margin: 0;
}
/* Controlled by JS only — open class toggled with mouseenter/mouseleave + delay */
.nav__item--dropdown.open .nav__dropdown { display: block; }
.nav__dropdown-link {
  display: block;
  padding: 0.5rem 1.25rem;
  font-size: 0.88rem;
  color: #374151;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav__dropdown-link:hover { background: #f0f4f8; color: #0e7c7b; }
.nav__dropdown-group {
  padding: 0.6rem 1.25rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ca3af;
  list-style: none;
}

/* ── Logo image ─────────────────────────────────── */
.nav__logo img { display: block; width: 180px; height: auto; max-width: 100%; }
.nav__logo svg { display: none; }
