/* Flowmetric Water Technologies — shared site styles */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #153a4f;
  font-family: 'Manrope', sans-serif;
  color: #fff;
}

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

img { max-width: 100%; }

/* ---------- animated water background ---------- */
body::before, body::after { content: ""; position: fixed; inset: -12%; z-index: 0; pointer-events: none; }
body::before {
  background:
    radial-gradient(ellipse 46% 34% at 18% 24%, rgba(94,164,217,0.20), transparent 60%),
    radial-gradient(ellipse 55% 42% at 84% 66%, rgba(84,192,222,0.18), transparent 62%),
    radial-gradient(ellipse 72% 48% at 50% 114%, rgba(38,120,152,0.24), transparent 58%),
    radial-gradient(ellipse 40% 30% at 66% 8%, rgba(94,164,217,0.12), transparent 60%);
  background-size: 200% 200%, 190% 190%, 230% 230%, 170% 170%;
  background-repeat: no-repeat;
  animation: fmWaterBloom 26s ease-in-out infinite alternate;
  filter: blur(10px) saturate(1.15);
}
body::after {
  background:
    repeating-linear-gradient(112deg, rgba(120,220,235,0.05) 0 22px, rgba(120,220,235,0) 22px 66px),
    repeating-linear-gradient(68deg, rgba(90,200,230,0.045) 0 30px, rgba(90,200,230,0) 30px 84px);
  background-size: 200% 200%, 200% 200%;
  animation: fmWaterRipple 20s linear infinite;
  opacity: 0.65;
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } }
@keyframes fmWaterBloom {
  0%   { background-position: 0% 0%, 100% 100%, 50% 0%, 0% 100%; }
  50%  { background-position: 60% 40%, 40% 60%, 52% 64%, 46% 42%; }
  100% { background-position: 100% 100%, 0% 0%, 50% 100%, 100% 0%; }
}
@keyframes fmWaterRipple {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 220px 130px, -220px 100px; }
}

.fm-page { background: transparent; position: relative; z-index: 1; }
.fm-page > section:nth-of-type(even) { background-color: #112b3c; }

/* ---------- hero slideshow / floating stat cards (home) ---------- */
@keyframes fmSlide {
  0% { opacity: 0; } 3% { opacity: 1; } 18% { opacity: 1; } 21% { opacity: 0; } 100% { opacity: 0; }
}
.fm-slide { animation: fmSlide 25s infinite; }
@keyframes fmPop {
  0% { opacity: 0; transform: translateX(28px); }
  4% { opacity: 1; transform: translateX(0); }
  28% { opacity: 1; transform: translateX(0); }
  33% { opacity: 0; transform: translateX(28px); }
  100% { opacity: 0; transform: translateX(28px); }
}
.fm-pop { animation: fmPop 24s infinite; }
@media (prefers-reduced-motion: reduce) {
  .fm-slide { animation: none; opacity: 0; }
  .fm-slide:first-child { opacity: 1; }
  .fm-pop { animation: none; opacity: 0; }
  .fm-pop:first-child { opacity: 1; }
}

/* ---------- gallery / vendor photo gloss ---------- */
.fm-glossy { position: relative; overflow: hidden; border-radius: 10px; border: 1px solid #255a6f; background: #14374a; }
.fm-glossy img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.08) contrast(1.04) brightness(1.02); transition: transform .5s ease; }
.fm-glossy:hover img { transform: scale(1.05); }
.fm-glossy::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(155deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.05) 24%, rgba(255,255,255,0) 46%, rgba(8,19,25,0.16) 100%); }
@media (prefers-reduced-motion: reduce) { .fm-glossy:hover img { transform: none; } }

.fm-arch img { transition: transform .45s ease; }
.fm-arch:hover img { transform: scale(1.03); }
@keyframes fmArrow { 0% { transform: translateX(-4px); opacity: .35; } 50% { transform: translateX(4px); opacity: 1; } 100% { transform: translateX(-4px); opacity: .35; } }
.fm-flowarrow { animation: fmArrow 1.5s ease-in-out infinite; display: inline-block; }
@media (prefers-reduced-motion: reduce) { .fm-flowarrow { animation: none; } .fm-arch:hover img { transform: none; } }

/* ---------- form controls ---------- */
input::placeholder, textarea::placeholder { color: #5f7d8b; }
input:focus, textarea:focus, select:focus { border-color: #5ea4d9 !important; }
select, input { color-scheme: dark; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 5px; border-radius: 3px; background: #255a6f; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #5ea4d9; cursor: pointer; border: 3px solid #112b3c; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #5ea4d9; cursor: pointer; border: 3px solid #112b3c; }

/* ---------- hover utility classes (replace DC "style-hover") ---------- */
.fm-cta { background: #5ea4d9; transition: background .15s; }
.fm-cta:hover { background: #78b5e3; }
.fm-cta-outline { border: 1px solid #336a7f; transition: border-color .15s; }
.fm-cta-outline:hover { border-color: #5ea4d9; }
.fm-teal-link { color: #5ea4d9; transition: color .15s; }
.fm-teal-link:hover { color: #78b5e3; }
.fm-muted-link { transition: color .15s; }
.fm-muted-link:hover { color: #5ea4d9 !important; }

/* ---------- nav ---------- */
/* backdrop-filter lives on ::before (not .fm-nav itself) because a filter/backdrop-filter
   on an ancestor creates a new containing block for position:fixed descendants — which
   would break the mobile .fm-navlinks dropdown's full-viewport sizing. */
.fm-nav { position: relative; padding: 16px 40px; gap: 20px; display: flex; align-items: center; justify-content: space-between; background: rgba(17,43,60,0.88); border-bottom: 1px solid #1d4457; }
.fm-nav::before { content: ""; position: absolute; inset: 0; z-index: -1; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.fm-nav-logo { display: flex; align-items: center; flex: 0 0 auto; background: #ffffff; border-radius: 8px; padding: 7px 12px; }
.fm-nav-logo img { height: 24px; width: auto; display: block; }
.fm-navlinks { display: flex; align-items: center; gap: 24px; }
.fm-nav-link { font-size: 14px; font-weight: 500; color: #a7c0cc; white-space: nowrap; transition: color .15s; }
.fm-nav-link:hover, .fm-nav-link.active { color: #5ea4d9; }
.fm-nav-right { display: flex; gap: 10px; align-items: center; flex: 0 0 auto; }
.fm-langtoggle { display: flex; align-items: center; border: 1px solid #336a7f; border-radius: 4px; overflow: hidden; }
.fm-langtoggle button { background: transparent; color: #a7c0cc; border: none; font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; padding: 7px 10px; cursor: pointer; }
.fm-langtoggle button.active { background: #5ea4d9; color: #05161d; }
.fm-navcalc { font-size: 14px; font-weight: 600; color: #5ea4d9; border: 1px solid #336a7f; padding: 10px 16px; border-radius: 4px; white-space: nowrap; transition: border-color .15s; }
.fm-navcalc:hover { border-color: #5ea4d9; }
.fm-navdemo { background: #5ea4d9; color: #05161d; font-size: 14px; font-weight: 700; padding: 11px 18px; border-radius: 4px; white-space: nowrap; transition: background .15s; }
.fm-navdemo:hover { background: #78b5e3; }
.fm-navburger { display: none; background: transparent; border: 1px solid #336a7f; border-radius: 4px; width: 38px; height: 38px; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.fm-navburger span, .fm-navburger span::before, .fm-navburger span::after { content: ""; display: block; width: 16px; height: 2px; background: #cfe0e8; position: relative; transition: transform .2s, opacity .2s; }
.fm-navburger span::before { position: absolute; top: -5px; }
.fm-navburger span::after { position: absolute; top: 5px; }

@media (max-width: 1120px) {
  .fm-nav { padding: 15px 28px; gap: 14px; }
  .fm-navlinks { gap: 18px; }
  .fm-nav-link { font-size: 13.5px; }
  .fm-navcalc { display: none !important; }
}
@media (max-width: 860px) {
  .fm-navburger { display: flex; }
  .fm-navlinks { position: fixed; top: 61px; left: 0; right: 0; bottom: 0; z-index: 60; background: #112b3c; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px 24px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; overflow-y: auto; }
  .fm-navlinks.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .fm-nav-link { padding: 14px 0; border-bottom: 1px solid #1d4457; font-size: 16px; }
  .fm-nav-right { gap: 8px; }
  .fm-navdemo { padding: 9px 13px; font-size: 13px; }
  .fm-langtoggle button { padding: 6px 8px; }
}

/* ---------- footer ---------- */
.fm-footer { background: #0e222d; border-top: 1px solid #1d4457; }
.fm-foot-cta { padding: 72px 56px; border-bottom: 1px solid #1d4457; display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.fm-foot-cols { padding: 60px 56px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.fm-foot-bottom { padding: 22px 56px; border-top: 1px solid #1d4457; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.fm-foot-logo { display: inline-flex; align-items: center; background: #ffffff; border-radius: 8px; padding: 8px 13px; margin-bottom: 20px; }
.fm-foot-logo img { height: 26px; width: auto; display: block; }
.fm-foot-heading { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 16px; }
.fm-foot-links { display: flex; flex-direction: column; gap: 11px; font-size: 14px; color: #7f9dab; }

/* ---------- responsive grid helpers ----------
   .fm-grid       any 2-column / asymmetric grid (e.g. "1.2fr 1fr", "64px 1fr 1.1fr") — stacks to 1 col on tablet & mobile.
   .fm-grid-3/4   equal 3- or 4-column grids — step down to 2 cols on tablet, 1 col on phones, instead of jumping straight to 1.
   .fm-grid-2     small nested grids (checklists etc.) — only stack on narrow phones, stay 2-up on tablets. */
@media (max-width: 900px) {
  .fm-grid { grid-template-columns: 1fr !important; }
  .fm-grid-3, .fm-grid-4 { grid-template-columns: 1fr 1fr !important; }
  .fm-row { flex-direction: column !important; align-items: flex-start !important; }
  section, .fm-foot-cta, .fm-foot-cols, .fm-foot-bottom { padding-left: 22px !important; padding-right: 22px !important; }
  h1 { font-size: 36px !important; line-height: 1.08 !important; }
  h2 { font-size: 27px !important; }
  .fm-foot-cols { grid-template-columns: 1fr !important; gap: 32px !important; }
  .fm-flowarrow { display: none !important; }
}
@media (max-width: 640px) {
  .fm-grid-3, .fm-grid-4 { grid-template-columns: 1fr !important; }
}
@media (max-width: 560px) {
  h1 { font-size: 30px !important; }
  .fm-nav-logo, .fm-foot-logo { padding: 6px 10px; }
  section, .fm-foot-cta, .fm-foot-cols, .fm-foot-bottom { padding-left: 16px !important; padding-right: 16px !important; }
}
@media (max-width: 480px) {
  .fm-grid-2 { grid-template-columns: 1fr !important; }
}

/* ---------- misc responsive fixes ---------- */
@media (max-width: 900px) {
  .fm-hero-pop { display: none !important; }
}
@media (max-width: 480px) {
  /* stop side-by-side button pairs and pill labels from clipping on very narrow phones */
  .fm-cta, .fm-cta-outline { text-align: center; }
}
