/* ============================================
   URBANIZADORA GLOBAL - Luxury Minimalist Theme
   Inspired by High-End Real Estate (Urbania3d)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500&family=Inter:wght@300;400;500&display=swap');

:root {
  --white: #FFFFFF;
  --off-white: #F9F9FA;
  --border-light: #EEEEEE;
  
  --black: #0A0A0A;
  --text-main: #111111;
  --text-muted: #777777;
  --text-light: #A3A3A3;
  
  --accent: #CBA153; /* Elegant subdued gold */
  
  --transition: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text-main);
  background: var(--white);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Preloader --- */
#preloader {
  position: fixed; inset: 0; z-index: 999999;
  background-color: #000;
  display: flex; justify-content: center; align-items: center;
  transition: opacity 0.5s ease;
}
.spinner {
  width: 40px; height: 40px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* --- Splash Screen --- */
body.splash-active .navbar,
body.splash-active .hero-content,
body.splash-active .hero-overlay,
body.splash-active .stats-bar,
body.splash-active .watermark {
  visibility: hidden;
}
#splash-screen {
  position: fixed; inset: 0; z-index: 99999;
  background-color: #000;
  display: flex; justify-content: center; align-items: center;
  mix-blend-mode: multiply;
  pointer-events: none;
  will-change: opacity;
  transform: translateZ(0);
}
#splash-screen img {
  width: 30vw; min-width: 250px;
  filter: brightness(0) invert(1);
  transform-origin: center center;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* --- Watermarks --- */
.watermark {
  position: fixed; z-index: -1; pointer-events: none;
  font-family: 'Outfit', sans-serif; font-weight: 200;
  color: rgba(0, 0, 0, 0.02); white-space: nowrap;
  letter-spacing: -0.05em; line-height: 1;
}
.watermark-1 { top: 10vh; left: -5vw; font-size: 30vw; }
.watermark-2 { bottom: 0; right: -5vw; font-size: 25vw; }

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul, ol { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  line-height: 1.1;
  font-weight: 300; /* Ultra elegant light weight */
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(3rem, 7vw, 6rem); font-weight: 200; }
h2 { font-size: clamp(2.5rem, 5vw, 4rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); }

p { font-size: 1.05rem; color: var(--text-muted); font-weight: 300; }

/* --- Layout --- */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 40px; }
.section { padding: 160px 0; background: var(--white); }
.section-light { background: var(--off-white); }

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-light);
  margin-bottom: 30px;
  display: block;
}

/* --- Navbar (Apple Glass Style) --- */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  padding: 0; transition: var(--transition);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.navbar .container {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 95px;
  padding: 10px 0;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-light);
}
.navbar.scrolled .container {
  min-height: 56px;
  padding: 0;
}
.navbar.scrolled .nav-links a { color: var(--text-main); }
.navbar.scrolled .navbar-logo img { height: 44px; filter: none; opacity: 1; }

.navbar-logo img { height: 95px; filter: brightness(10); opacity: 0.9; transition: var(--transition); }
.navbar-logo:hover img { opacity: 1; }

.nav-links {
  display: flex; gap: 8px; position: relative;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px; padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.navbar.scrolled .nav-links {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.06);
}
.nav-highlight {
  position: absolute; top: 4px; left: 0; height: calc(100% - 8px);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  transition: left 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              width 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.25s ease;
  opacity: 0; pointer-events: none;
  z-index: 0;
}
.navbar.scrolled .nav-highlight {
  background: rgba(0, 0, 0, 0.06);
}
.nav-links a {
  font-size: 0.78rem; font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.85);
  position: relative; z-index: 1;
  padding: 8px 18px; border-radius: 8px;
  transition: color 0.3s ease;
}
.nav-links a::after { display: none; } /* Remove the old underline */
.nav-links a:hover { color: #fff; }
.navbar.scrolled .nav-links a:hover { color: var(--text-main); }

.nav-toggle { display: none; cursor: pointer; flex-direction: column; gap: 6px; }
.nav-toggle span { width: 30px; height: 1px; background: #fff; transition: var(--transition); }
.navbar.scrolled .nav-toggle span { background: var(--text-main); }

/* --- Hero --- */
.hero {
  height: 100vh; position: relative;
  display: flex; align-items: flex-end; padding-bottom: 80px;
}
.hero-image {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
}
.hero-image img, .hero-image video {
  width: 100%; height: 100%; object-fit: cover;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: 
    linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 30%),
    linear-gradient(to top, var(--white) 0%, rgba(255,255,255,0.5) 10%, transparent 40%);
  background-color: rgba(0,0,0,0.25); /* Darken video for better contrast */
}
.hero-content { position: relative; z-index: 1; max-width: 900px; text-align: left; width: 100%; }
.hero-content h1 {
  margin-bottom: 20px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.9), 0 2px 10px rgba(0,0,0,0.8), 0 0 40px rgba(0,0,0,0.6);
}
.hero-content .section-label {
  text-shadow: 0 2px 15px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.8);
}

/* --- Section Divider (Engineering accent line) --- */
.section-divider {
  width: 60px; height: 3px; background: var(--accent);
  margin: 30px 0 40px;
}

/* --- Stats Bar (Full-width dark band) --- */
.stats-bar {
  background: var(--black); padding: 80px 0;
}
.stats-bar .stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px;
  margin: 0; padding: 0; border: none;
}
.stats-bar .stat-block { text-align: center; position: relative; }
.stats-bar .stat-block::after {
  content: ''; position: absolute; right: 0; top: 10%; height: 80%;
  width: 1px; background: rgba(255,255,255,0.1);
}
.stats-bar .stat-block:last-child::after { display: none; }
.stat-number {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(3rem, 5vw, 5rem);
  color: var(--accent);
  line-height: 1; margin-bottom: 16px;
}
.stat-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem; font-weight: 400;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* --- About --- */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: center;
}
.about-text h2 { margin-bottom: 0; }
.about-text p { margin-bottom: 30px; font-size: 1.1rem; line-height: 1.9; }
.about-image { position: relative; padding-left: 40px; padding-bottom: 40px; }
.about-image img { width: 100%; max-height: 550px; object-fit: cover; }
.about-image::before {
  content: ''; position: absolute; bottom: 0; left: 0; width: 60%; height: 60%;
  border-left: 1px solid var(--accent); border-bottom: 1px solid var(--accent); z-index: -1;
}

/* --- Expertise Banner (Full-width image + overlay) --- */
.expertise-banner, .safety-banner {
  position: relative; overflow: hidden;
  padding: 160px 0; min-height: 70vh;
  display: flex; align-items: center;
}
.expertise-bg {
  position: absolute; top: -25%; left: 0; width: 100%; height: 150%;
  object-fit: cover; z-index: 0;
}
.expertise-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(10, 10, 10, 0.75);
}
.expertise-content { position: relative; z-index: 2; }
.expertise-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; margin-top: 40px;
}
.expertise-item {
  padding: 25px 20px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition);
}
.expertise-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--accent);
}
.expertise-num {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: 1.1rem; color: var(--accent);
  display: block; margin-bottom: 8px;
}
.expertise-item h3 {
  color: #fff; font-size: 1.05rem; font-weight: 300;
}
.safety-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}

/* --- Companies Grid (Cards) --- */
.companies-header { margin-bottom: 60px; max-width: 600px; }
.companies-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
  gap: 30px; 
}
.company-card {
  background: var(--off-white);
  padding: 40px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
  overflow: hidden;
}
.company-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
  border-color: var(--accent);
}
.company-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease;
}
.company-card:hover::before { transform: scaleX(1); }
.company-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 25px;
}
.company-num {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: 2.2rem; color: rgba(203, 161, 83, 0.4);
  line-height: 1;
}
.company-loc {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-light);
  background: var(--white);
  padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--border-light);
}
.company-name {
  font-size: 1.4rem; font-family: 'Outfit', sans-serif; color: var(--text-main);
  margin-bottom: 15px; font-weight: 500;
}
.company-desc {
  font-size: 0.95rem; line-height: 1.6; color: var(--text-muted);
}

/* --- Mission & Vision (Dark section) --- */
.section-dark {
  background: var(--black); color: var(--white);
}
.section-dark h2 { color: var(--white); margin-bottom: 0; }
.section-dark p { color: rgba(255,255,255,0.65); }
.mission-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  margin-bottom: 100px;
}
.mission-card {
  padding: 60px; border: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}
.mission-card:hover { border-color: var(--accent); }

.strengths-row {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
}
.strength-item {
  padding: 30px 20px; text-align: center;
  border: 1px solid rgba(255,255,255,0.06);
  transition: var(--transition);
}
.strength-item:hover {
  background: rgba(255,255,255,0.03);
  border-color: var(--accent);
}
.strength-item span {
  font-family: 'Outfit', sans-serif; font-size: 0.85rem;
  font-weight: 400; color: rgba(255,255,255,0.6);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* --- Projects --- */
.projects-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 60px; }
.projects-header p { max-width: 400px; }
.projects-grid { display: flex; flex-direction: column; gap: 80px; }

.project-item { display: grid; grid-template-columns: 7fr 3fr; gap: 80px; align-items: center; }
.project-item:nth-child(even) { grid-template-columns: 3fr 7fr; }
.project-item:nth-child(even) .project-image { order: 2; }
.project-item:nth-child(even) .project-info { order: 1; text-align: right; }

.project-image { width: 100%; height: 45vh; min-height: 300px; overflow: hidden; position: relative; }
.project-image img { width: 100%; height: 120%; object-fit: cover; margin-top: -10%; }
.project-image::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0.1); transition: var(--transition);
}
.project-image:hover::after { background: transparent; }

.project-info h3 { font-size: 2.2rem; margin-bottom: 20px; }
.project-info p { margin-bottom: 30px; }
.project-meta {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-light); display: flex; gap: 20px; margin-bottom: 20px;
}
.project-item:nth-child(even) .project-meta { justify-content: flex-end; }
.project-meta span { border-bottom: 1px solid var(--border-light); padding-bottom: 5px; }

/* --- Contact & Footer --- */
.footer { background: var(--black); color: var(--white); padding: 60px 0 20px; }
.footer .section-label { color: rgba(255,255,255,0.3); }
.footer h2 { color: var(--white); margin-bottom: 60px; }

.footer-grid { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 80px; margin-bottom: 30px; }
.footer-col h4 { font-size: 0.8rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 20px; font-family: 'Inter', sans-serif; }
.footer-col p, .footer-col a { color: var(--white); font-size: 1.1rem; font-weight: 300; display: block; margin-bottom: 10px; }
.footer-col a:hover { color: var(--accent); }

.footer-logo-inline {
  height: 200px; opacity: 0.15;
  filter: brightness(10) grayscale(100%);
  margin-top: 40px;
}

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px;
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px;
  font-size: 0.8rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.1em;
}
.footer-legal {
  display: flex; gap: 20px;
}
.footer-legal a, .footer-credits a {
  color: rgba(255,255,255,0.4); text-decoration: none; transition: var(--transition);
}
.footer-legal a:hover, .footer-credits a:hover {
  color: var(--white); text-decoration: underline;
}
.footer-credits {
  text-align: right;
}

/* --- WhatsApp Float --- */
.whatsapp-float {
  position: fixed; bottom: 30px; right: 30px;
  width: 60px; height: 60px;
  background-color: #25d366; color: #fff;
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  box-shadow: 0px 4px 15px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.whatsapp-float:hover {
  transform: scale(1.1); box-shadow: 0px 6px 20px rgba(37, 211, 102, 0.4);
  color: #fff;
}
.whatsapp-float svg {
  width: 35px; height: 35px;
}

/* --- Animations --- */
/* Elements start VISIBLE. JS adds body.js-ready to enable animations. */
.fade-up { transition: opacity 1s ease, transform 1s ease; }
body.js-ready .fade-up { opacity: 0; transform: translateY(40px); }
body.js-ready .fade-up.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1024px) {
  .hero h1 { font-size: 3.5rem; }
  .about-grid, .project-item, .project-item:nth-child(even), .footer-grid,
  .mission-grid, .safety-grid { grid-template-columns: 1fr; gap: 60px; }
  .project-item:nth-child(even) .project-image { order: 1; }
  .project-item:nth-child(even) .project-info { order: 2; text-align: left; }
  .project-item:nth-child(even) .project-meta { justify-content: flex-start; }
  .company-row { grid-template-columns: 50px 1fr; gap: 10px; padding: 30px 0; }
  .company-desc, .company-loc { grid-column: 2; }
  .company-loc { text-align: left; }
  .stats-bar .stats-row { grid-template-columns: repeat(2, 1fr); }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .strengths-row { grid-template-columns: repeat(3, 1fr); }
  .project-image { height: 50vh; }
  .mission-card { padding: 40px; }
}
@media (max-width: 768px) {
  .navbar .container { min-height: 60px; padding: 10px 0; }
  .navbar-logo img { height: 50px; }
  .navbar.scrolled .container { min-height: 56px; }
  .navbar.scrolled .navbar-logo img { height: 44px; }
  
  .projects-header { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-logo-inline { height: 100px; margin-top: 20px; }

  .navbar .nav-links, .navbar.scrolled .nav-links { 
    display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; 
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(20px); padding: 20px 0; 
    border-radius: 0 0 15px 15px; border-bottom: 1px solid rgba(0,0,0,0.1); border-top: 1px solid rgba(0,0,0,0.05); 
  }
  .navbar .nav-links.active, .navbar.scrolled .nav-links.active { display: flex; }
  .navbar .nav-links a, .navbar.scrolled .nav-links a { 
    font-size: 1.1rem; padding: 15px 30px; border-bottom: 1px solid rgba(0,0,0,0.05); color: var(--text-main); 
  }
  .navbar .nav-links a:last-child, .navbar.scrolled .nav-links a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; position: relative; z-index: 1000; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .section { padding: 100px 0; }
  .stats-bar .stats-row { grid-template-columns: 1fr 1fr; gap: 30px; }
  .expertise-grid { grid-template-columns: 1fr; }
  .strengths-row { grid-template-columns: repeat(2, 1fr); }
  .custom-cursor, .custom-cursor-text { display: none !important; }
  .footer-bottom { flex-direction: column; text-align: center; justify-content: center; gap: 20px; }
  .footer-legal { flex-direction: column; gap: 10px; }
  .footer-credits { text-align: center; }
}
@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .stats-bar .stats-row { grid-template-columns: 1fr; }
  .strengths-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* --- Minimalist Gallery Modal --- */
.gallery-modal {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 999999; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.gallery-modal.active {
  opacity: 1; pointer-events: auto;
}
.gallery-overlay {
  position: absolute; inset: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}
.gallery-content {
  position: relative; z-index: 1; width: 90%; max-width: 1200px; height: 85vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gallery-image-container {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
}
.gallery-image-container img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5); border-radius: 4px;
}
.gallery-close {
  position: absolute; top: -30px; right: 0;
  background: none; border: none; color: #fff; font-size: 3rem;
  font-weight: 200; cursor: pointer; line-height: 1;
  transition: color 0.3s ease; z-index: 10;
}
.gallery-close:hover { color: var(--accent); }
.gallery-prev, .gallery-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,0.5); font-size: 5rem;
  font-weight: 200; cursor: pointer; transition: color 0.3s ease; z-index: 10;
  padding: 20px;
}
.gallery-prev:hover, .gallery-next:hover { color: #fff; }
.gallery-prev { left: -60px; }
.gallery-next { right: -60px; }
.gallery-caption {
  position: absolute; bottom: -40px; left: 0; width: 100%; text-align: center;
  color: rgba(255,255,255,0.7); font-family: 'Outfit', sans-serif;
  letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .gallery-prev { left: -20px; }
  .gallery-next { right: -20px; }
}
@media (max-width: 768px) {
  .gallery-content { height: 75vh; }
  .gallery-close { right: 10px; top: -50px; }
  .gallery-prev, .gallery-next { display: none; } /* Hide arrows on mobile, swipe ideally */
}
