/* ==========================================================================
   EISENSUL — Estações de Tratamento de Água
   Blueprint / industrial aesthetic — white, ink black, engineering blue.
   ========================================================================== */

:root{
  --white:      #ffffff;
  --paper:      #f4f5f2;
  --ink:        #0a0d12;
  --ink-soft:   #454b52;
  --line:       rgba(10,13,18,0.14);
  --line-soft:  rgba(10,13,18,0.08);

  --blue-900:   #051d3d;
  --blue-800:   #0a2c5c;
  --blue-700:   #0d3f86;
  --blue-600:   #1152ab;
  --blue-500:   #1c66c9;
  --blue-300:   #8fb9ee;
  --blue-100:   #e4edfb;

  --font-display: "Big Shoulders Display", sans-serif;
  --font-body:    "IBM Plex Sans", sans-serif;
  --font-mono:    "IBM Plex Mono", monospace;

  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 2px;

  --ease: cubic-bezier(.16,.84,.24,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul, ol{ margin: 0; padding: 0; list-style: none; }
h1, h2, h3{ margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
p{ margin: 0; }
button{ font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
input, textarea{ font: inherit; color: inherit; }

/* film-grain overlay for texture */
.grain{
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.reveal{ opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in-view{ opacity: 1; transform: translateY(0); }

/* ---------------------------------- header ---------------------------------- */
.site-header{
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  border-bottom: 1px solid var(--line-soft);
}
/* blur lives on a pseudo-element, not on .site-header itself, so that
   backdrop-filter doesn't create a containing block for the fixed-position
   mobile nav panel nested inside the header */
.site-header::before{
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.header-inner{
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  height: 76px; display: flex; align-items: center; gap: 2.5rem;
}
.brand{ display: flex; align-items: center; margin-right: auto; }
.brand-logo{ height: 34px; width: auto; display: block; }

/* the wordmark's navy ink has poor contrast on the dark footer, so it
   rides on a small white plate there instead of being recolored */
.footer-brand{
  background: var(--white); padding: .55rem .9rem; border-radius: var(--radius);
}
.footer-brand .brand-logo{ height: 26px; }

.main-nav{ display: flex; align-items: center; gap: 2rem; }
.main-nav a{
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-soft);
  display: flex; align-items: center; gap: .4rem;
  transition: color .25s var(--ease);
}
.main-nav a:hover{ color: var(--blue-700); }
.main-nav .idx{ color: var(--blue-300); font-size: .7rem; }

.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem; font-family: var(--font-mono); font-size: .78rem;
  letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--ink);
  border-radius: var(--radius); transition: all .28s var(--ease); white-space: nowrap;
}
.btn-primary{ background: var(--blue-700); border-color: var(--blue-700); color: var(--white); }
.btn-primary:hover{ background: var(--blue-900); border-color: var(--blue-900); }
.btn-ghost{ border-color: var(--line); color: var(--ink); }
.btn-ghost:hover{ border-color: var(--ink); }
.btn-ghost .arrow{ transition: transform .3s var(--ease); }
.btn-ghost:hover .arrow{ transform: translateY(3px); }
.btn-block{ width: 100%; }

.header-cta{ flex-shrink: 0; }
.nav-toggle{ display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span{ width: 22px; height: 2px; background: var(--ink); }

/* ---------------------------------- hero ---------------------------------- */
.hero{
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  justify-content: flex-end; overflow: hidden; padding-top: 76px;
}
.hero-media{ position: absolute; inset: 0; z-index: -1; background: var(--ink); }
.hero-media video,
.hero-media img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media .hero-media-fallback{ z-index: -1; }
.hero-media video{ z-index: 0; }
@media (prefers-reduced-motion: reduce){
  .hero-media video{ display: none; }
}
.hero-scrim{
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,15,30,.55) 0%, rgba(5,15,30,.35) 35%, rgba(5,15,30,.88) 100%),
    linear-gradient(100deg, rgba(5,29,61,.75) 0%, rgba(5,29,61,.15) 55%);
}
.hero-grid{ position: absolute; inset: 0; width: 100%; height: 100%; opacity: .6; }

.hero-content{
  max-width: var(--container); width: 100%; margin: 0 auto; padding: 0 var(--gutter);
  padding-bottom: 3.5rem; color: var(--white);
}
.eyebrow{
  display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-mono);
  font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-100);
  margin-bottom: 1.5rem; padding: .45rem .9rem .45rem .7rem;
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px;
}
.eyebrow .dot{ width: 7px; height: 7px; border-radius: 50%; background: var(--blue-300); box-shadow: 0 0 0 3px rgba(143,185,238,.25); flex-shrink: 0; }

.hero h1{
  font-size: clamp(2.6rem, 6.4vw, 5.6rem); line-height: .96; text-transform: uppercase;
  max-width: 20ch; margin-bottom: 1.75rem;
}
.hero h1 .accent{ color: var(--blue-300); }

.hero-lede{
  font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 46ch; color: rgba(255,255,255,.82);
  margin-bottom: 2.5rem; font-weight: 400;
}
.hero-actions{ display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.hero .btn-ghost{ color: var(--white); border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover{ border-color: var(--white); background: rgba(255,255,255,.08); }

.hero-specs{
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,.2);
}
.hero-specs li{
  padding: 1.1rem var(--gutter) 1.1rem 0; border-right: 1px solid rgba(255,255,255,.2);
  display: flex; flex-direction: column; gap: .3rem;
}
.hero-specs li:first-child{ padding-left: var(--gutter); }
.hero-specs li:last-child{ border-right: none; }
.spec-label{ font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-300); }
.spec-value{ font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; color: var(--white); }

/* ---------------------------------- marquee ---------------------------------- */
.marquee{
  background: var(--ink); color: var(--white); overflow: hidden; white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.marquee-track{
  display: inline-flex; gap: .8rem; padding: .85rem 0;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em;
  animation: scroll-left 38s linear infinite;
}
.marquee-track span:nth-child(odd){ color: var(--blue-300); }
@keyframes scroll-left{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }

/* ---------------------------------- sections (shared) ---------------------------------- */
.section{ padding: clamp(4rem, 9vw, 7.5rem) var(--gutter); max-width: var(--container); margin: 0 auto; }
.section-head{ max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.kicker{
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--blue-700); margin-bottom: 1rem;
}
.kicker.light{ color: var(--blue-300); }
.section-head h2{
  font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.02; text-transform: uppercase;
}
.section-lede{ font-size: 1.05rem; color: var(--ink-soft); margin-top: 1.25rem; max-width: 42ch; }
.section-lede.light{ color: rgba(255,255,255,.68); }

/* ---------------------------------- video ---------------------------------- */
.video-section{
  background: var(--ink); color: var(--white); max-width: none;
  padding-left: var(--gutter); padding-right: var(--gutter); position: relative; overflow: hidden;
}
.video-section::before{
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
}
.video-inner{
  position: relative; z-index: 1; max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 1fr minmax(280px, 360px); gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.video-copy h2{ color: var(--white); font-size: clamp(2.1rem, 4vw, 3.2rem); text-transform: uppercase; margin: 1rem 0 1.25rem; }
.video-copy .section-lede{ color: rgba(255,255,255,.65); max-width: 40ch; }
.video-badges{ display: flex; flex-direction: column; gap: .75rem; margin-top: 2rem; }
.video-badges li{
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .03em; color: rgba(255,255,255,.85);
  padding-left: 1.4rem; position: relative;
}
.video-badges li::before{
  content: ""; position: absolute; left: 0; top: .45em; width: 8px; height: 8px;
  border: 1px solid var(--blue-300); transform: rotate(45deg);
}

.video-frame{ justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.video-bezel{
  position: relative; width: min(78vw, 320px); aspect-ratio: 9/16; border-radius: 22px;
  background: #000; padding: 10px; border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04) inset;
}
.video-bezel video{
  width: 100%; height: 100%; object-fit: cover; border-radius: 14px; display: block; background: #000;
}
.video-sound-toggle{
  position: absolute; right: 22px; bottom: 22px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(5,10,18,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.35); color: var(--white);
  display: flex; align-items: center; justify-content: center; transition: background .25s var(--ease), transform .25s var(--ease);
}
.video-sound-toggle:hover{ background: rgba(5,10,18,.8); transform: scale(1.06); }
.video-sound-toggle .icon-unmuted{ display: none; }
.video-sound-toggle[aria-pressed="true"] .icon-muted{ display: none; }
.video-sound-toggle[aria-pressed="true"] .icon-unmuted{ display: block; }
.video-frame-tag{
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; color: rgba(255,255,255,.4);
  display: inline-flex; align-items: center; gap: .4rem;
}
.video-frame-tag::before{
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #e0463c;
  box-shadow: 0 0 0 3px rgba(224,70,60,.25); animation: rec-pulse 1.8s ease-in-out infinite;
}
@keyframes rec-pulse{ 0%,100%{ opacity: 1; } 50%{ opacity: .35; } }

/* ---------------------------------- process ---------------------------------- */
.process-showcase{
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--paper);
}
.process-showcase img{ width: 100%; height: clamp(260px, 42vw, 460px); object-fit: cover; display: block; }
.process-steps{
  display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line);
}
.process-steps li{
  padding: 1.5rem 1.25rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem;
}
.process-steps li:last-child{ border-right: none; }
.step-n{ font-family: var(--font-mono); font-size: .75rem; color: var(--blue-300); }
.step-t{ font-family: var(--font-display); font-size: 1.15rem; text-transform: uppercase; line-height: 1.1; }
.step-d{ font-size: .85rem; color: var(--ink-soft); line-height: 1.35; }

/* ---------------------------------- tech grid ---------------------------------- */
.tech-grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.tech-card{ background: var(--white); display: flex; flex-direction: column; }
.tech-card.span-2{ grid-column: span 2; flex-direction: row; }
.tech-card.span-2 .tech-img{ width: 55%; }
.tech-card.span-2 .tech-body{ width: 45%; }
.tech-img{ aspect-ratio: 4/3; overflow: hidden; }
.tech-img img{ width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tech-card:hover .tech-img img{ transform: scale(1.06); }
.tech-body{ padding: 1.75rem; display: flex; flex-direction: column; gap: .6rem; position: relative; flex: 1; }
.tech-n{
  position: absolute; top: 1.5rem; right: 1.75rem; font-family: var(--font-mono);
  font-size: .75rem; color: var(--blue-300); border: 1px solid var(--line); border-radius: 50%;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
}
.tech-body h3{ font-size: 1.3rem; text-transform: uppercase; max-width: 85%; }
.tech-body p{ font-size: .92rem; color: var(--ink-soft); line-height: 1.5; }

/* ---------------------------------- diferenciais (dark) ---------------------------------- */
.diff{ background: var(--blue-900); color: var(--white); max-width: none;
  padding-left: var(--gutter); padding-right: var(--gutter); position: relative; overflow: hidden; }
.diff::before{
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
}
.diff > *{ position: relative; z-index: 1; max-width: var(--container); margin: 0 auto; }
.diff .section-head{ margin-left: 0; }
.diff h2{ color: var(--white); }
.diff-grid{
  max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14);
}
.diff-card{ background: var(--blue-900); padding: 2.25rem; display: flex; flex-direction: column; gap: 1rem; }
.diff-icon{ width: 40px; height: 40px; color: var(--blue-300); }
.diff-card h3{ font-family: var(--font-display); font-size: 1.25rem; text-transform: uppercase; }
.diff-card p{ font-size: .9rem; color: rgba(255,255,255,.62); line-height: 1.5; }

/* ---------------------------------- gallery ---------------------------------- */
.gallery-grid{
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: .75rem;
}
.g-item{
  position: relative; overflow: hidden; border-radius: var(--radius); display: block; width: 100%; height: 100%;
}
.g-item.span-tall{ grid-row: span 2; }
.g-item.span-wide{ grid-column: span 2; }
.g-item img{ width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.g-item:hover img{ transform: scale(1.08); }
.g-item::after{
  content: "＋"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.4rem; background: rgba(5,15,30,0); transition: background .3s var(--ease), opacity .3s var(--ease);
  opacity: 0;
}
.g-item:hover::after{ background: rgba(5,15,30,.35); opacity: 1; }

/* ---------------------------------- contact (dark) ---------------------------------- */
.contact{ background: var(--ink); color: var(--white); max-width: none; padding-left: var(--gutter); padding-right: var(--gutter); }
.contact-inner{
  max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 4rem;
}
.contact h2{ color: var(--white); font-size: clamp(2.1rem, 4vw, 3.2rem); text-transform: uppercase; margin-bottom: 1.25rem; }
.contact-list{ margin-top: 2.75rem; display: flex; flex-direction: column; gap: 1.25rem; }
.contact-list li{ display: flex; flex-direction: column; gap: .3rem; border-top: 1px solid rgba(255,255,255,.14); padding-top: 1rem; }
.contact-label{ font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--blue-300); }
.contact-list a, .contact-list span{ font-size: 1.05rem; }
.contact-list a:hover{ color: var(--blue-300); }

.contact-form{ background: var(--white); color: var(--ink); padding: 2.25rem; border-radius: var(--radius); display: flex; flex-direction: column; gap: 1.25rem; }
.field{ display: flex; flex-direction: column; gap: .45rem; }
.field-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label{ font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field textarea{
  border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; background: var(--paper);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field input:focus, .field textarea:focus{ outline: none; border-color: var(--blue-700); background: var(--white); }
.field textarea{ resize: vertical; }
.form-note{ font-size: .85rem; color: var(--blue-700); min-height: 1.2em; }

/* ---------------------------------- footer ---------------------------------- */
.site-footer{ background: var(--ink); color: rgba(255,255,255,.7); border-top: 1px solid rgba(255,255,255,.12); }
.footer-inner{
  max-width: var(--container); margin: 0 auto; padding: 2.5rem var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.footer-brand{ color: var(--white); }
.footer-brand .brand-mark{ color: var(--blue-300); }
.footer-nav{ display: flex; gap: 1.75rem; flex-wrap: wrap; }
.footer-nav a{ font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.footer-nav a:hover{ color: var(--white); }
.footer-legal{ font-size: .78rem; color: rgba(255,255,255,.4); width: 100%; text-align: center; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.08); }

/* ---------------------------------- lightbox ---------------------------------- */
.lightbox{
  position: fixed; inset: 0; z-index: 500; background: rgba(5,10,18,.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  padding: 2rem; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.lightbox.is-open{ opacity: 1; pointer-events: auto; }
.lightbox img{ max-width: min(90vw, 1100px); max-height: 78vh; object-fit: contain; border: 1px solid rgba(255,255,255,.15); }
.lightbox-cap{ color: rgba(255,255,255,.7); font-family: var(--font-mono); font-size: .85rem; text-align: center; }
.lightbox-close{
  position: absolute; top: 1.75rem; right: 1.75rem; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3); color: var(--white); font-size: 1rem;
  display: flex; align-items: center; justify-content: center; transition: background .25s var(--ease);
}
.lightbox-close:hover{ background: rgba(255,255,255,.1); }

/* ---------------------------------- responsive ---------------------------------- */
@media (max-width: 980px){
  .main-nav{
    display: none; position: fixed; top: 76px; left: 0; right: 0; bottom: 0;
    background: var(--white); flex-direction: column; align-items: flex-start;
    padding: 2rem var(--gutter); gap: 1.75rem; border-top: 1px solid var(--line);
    overflow-y: auto;
  }
  .main-nav.is-open{ display: flex; }
  .main-nav a{ font-size: 1.1rem; }
  .nav-toggle{ display: flex; }
  .header-cta{ display: none; }
  .hero-specs{ grid-template-columns: repeat(2, 1fr); }
  .hero-specs li:nth-child(2){ border-right: none; }
  .process-showcase img{ height: 280px; }
  .process-steps{ grid-template-columns: repeat(2, 1fr); }
  .process-steps li:nth-child(2n){ border-right: none; }
  .process-steps li{ border-bottom: 1px solid var(--line); }
  .tech-grid{ grid-template-columns: repeat(2, 1fr); }
  .tech-card.span-2{ grid-column: span 2; flex-direction: column; }
  .tech-card.span-2 .tech-img, .tech-card.span-2 .tech-body{ width: 100%; }
  .diff-grid{ grid-template-columns: repeat(2, 1fr); }
  .gallery-grid{ grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .g-item.span-wide{ grid-column: span 2; }
  .g-item.span-tall{ grid-row: span 1; }
  .contact-inner{ grid-template-columns: 1fr; gap: 2.5rem; }
  .video-inner{ grid-template-columns: 1fr; }
  .video-frame{ order: -1; }
}

@media (max-width: 600px){
  .header-inner{ height: 64px; }
  .main-nav{ top: 64px; }
  .hero{ padding-top: 64px; }
  .hero h1{ font-size: 2.6rem; }
  .hero-actions{ flex-direction: column; align-items: stretch; }
  .hero-specs{ grid-template-columns: 1fr 1fr; }
  .tech-grid{ grid-template-columns: 1fr; }
  .tech-card.span-2{ grid-column: span 1; }
  .diff-grid{ grid-template-columns: 1fr; }
  .gallery-grid{ grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .field-row{ grid-template-columns: 1fr; }
}
