/*
  CLC Construfácil — Landing Page
  Tech: HTML + CSS + JS
  Notes: Uses local images in ./img
*/

:root {
  --navy-900: #0b1a2a;
  --navy-800: #10233a;
  --navy-700: #152d47;
  --navy-600: #1b3654;
  --navy-500: #274569;
  --text: #0f2236;
  --muted: #66768a;
  --bg: #f7f8fb;
  --white: #ffffff;
  --card: #0f1f33;
  --orange: #f24f3a; /* primary accent */
  --orange-700: #e54334;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --shadow-sm: 0 2px 8px rgba(16, 35, 58, 0.08);
  --shadow-md: 0 10px 30px rgba(16, 35, 58, 0.18);
}

/* Reset-ish */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400&display=swap');

body {
  margin: 0;
  font-family: 'Montserrat', ui-sans-serif, -apple-system, Segoe UI, Roboto, Inter, Avenir, Helvetica, Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  opacity: 1;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
h1, h2, h3, h4, h5, h6, strong, b { font-weight: 400; }

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

.animate-fade.visible {
  opacity: 1;
}

.animate-slide-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.7s ease-out;
}

.animate-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-slide-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.7s ease-out;
}

.animate-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.stagger-animation {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.stagger-animation.visible {
  opacity: 1;
  transform: translateY(0);
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Topbar */
.topbar {
  background: var(--navy-900);
  color: #cbd6e2;
  font-size: 14px;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; gap: 16px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar .contact { display: inline-flex; align-items: center; gap: 10px; opacity: .95; }
.topbar img { width: 16px; height: 16px; }
.topbar .social img { width: 18px; height: 18px; filter: brightness(1.1); opacity: .9; }

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}
.navbar.hidden {
  transform: translateY(-100%);
}
.nav-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 14px 0; }
.brand img { height: 36px; }
.nav-links { display: flex; gap: 22px; justify-content: center; }
.nav-links a {
  color: var(--navy-700);
  font-weight: 400;
  font-size: 15px;
  opacity: .9;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 0;
}
.nav-links a:hover {
  color: var(--orange);
  opacity: 1;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width 0.3s ease;
}
.nav-links a:hover::after {
  width: 100%;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 400;
  font-size: 15px;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(242, 79, 58, .35);
}
.btn-primary:hover {
  background: var(--orange-700);
  box-shadow: 0 8px 24px rgba(242, 79, 58, .45);
}
.btn-ghost {
  border: 2px solid var(--orange);
  color: var(--orange);
  background: transparent;
}
.btn-ghost:hover {
  background: rgba(242,79,58,.08);
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy-800);
  transition: all 0.3s ease;
}

/* Hero */
.hero { background: #eef1f5; padding-top: 60px; }
.hero-inner { display: grid; grid-template-columns: 1fr; justify-items: center; padding: 38px 0 0; }
.hero-copy.centered { text-align: center; max-width: 900px; }
.hero-copy.centered { margin-left: auto; margin-right: auto; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.1; margin: 16px 0 10px; color: var(--navy-900); }
.hero .subtitle { font-size: 16px; color: #536782; margin: 0 auto 18px; max-width: 72ch; }
.hero-cta { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 16px auto 0; }
.btn-white { background: #fff; color: var(--navy-800); border: 1px solid #e3eaf3; box-shadow: 0 8px 24px rgba(16,35,58,.10); }
.btn-white:hover { background: #f7f9fc; }
.btn:focus { outline: 2px solid var(--orange); outline-offset: 2px; }
.hero-art--center { margin-top: 10px; position: relative; width: 100%; }
.hero-art--center img { width: min(1080px, 96%); margin: 0 auto; filter: drop-shadow(0 22px 22px rgba(16,35,58,.25)); }
.hero-art--center::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -8px; width: min(760px, 70%); height: 18px; background: radial-gradient(60% 120% at 50% 50%, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 70%); opacity: .25; border-radius: 50%; filter: blur(6px); }

/* Services big card */
.services { padding: 56px 0 40px; background: var(--orange); color: #fff; }
.services-head { text-align: center; max-width: 1000px; margin: 0 auto 24px; }
.services-head h2 { color: #fff; font-size: clamp(30px, 4.8vw, 56px); margin: 0 0 12px; line-height: 1.12; }
.services-head p { color: #ffe4df; margin: 0; font-size: 17px; }

.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; }
.service-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
  color: var(--navy-900);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
}
.service-img {
  height: 190px;
  width: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border: none;
  outline: none;
  background: var(--orange);
  border-radius: 16px 16px 0 0;
  transform: scale(1.02);
}
.service-body { padding: 14px 16px 18px; }
.service-body h3 { margin: 0 0 8px; color: var(--orange-700); font-size: 20px; line-height: 1.1; }
.service-body p { margin: 0; color: #5b6c82; font-size: 14px; line-height: 1.4; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 32px; align-items: start; }
.metrics--inline .metric { text-align: left; color: #fff; }
.metric-number { font-weight: 400; font-size: clamp(42px, 6vw, 88px); line-height: .9; }
.metric-title { margin-top: 4px; font-weight: 400; text-transform: uppercase; letter-spacing: .6px; }
.metric-desc { margin-top: 10px; color: #ffe4df; max-width: 32ch; }

/* About */
.about {
  background:
    radial-gradient(1100px 600px at 80% -6%, rgba(21,45,71,.85) 0%, rgba(11,26,42,1) 60%),
    url('../img/backgrounds/bg-about.png') center/cover no-repeat,
    var(--navy-900);
  color: #e6eef7;
  padding: 70px 0;
}
.about-inner { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 36px; align-items: center; }
.about .over-title { color: #cdd9e8; font-weight: 400; letter-spacing: .4px; text-transform: uppercase; font-size: 13px; }
.about h2 { color: var(--orange); font-size: clamp(28px, 4vw, 44px); margin: 10px 0 14px; line-height: 1.1; }
.about p { color: #c6d3e2; max-width: 58ch; }
.about-bullets { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.about-bullets li { display: flex; align-items: center; gap: 12px; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); padding: 12px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.07); color: #dbe6f2; font-weight: 400; }
.about-bullets img { width: 18px; height: 18px; filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
.about-art { position: relative; }
.about-img { width: min(440px, 100%); display: block; margin-left: auto; border-radius: 22px; box-shadow: 0 18px 40px rgba(0,0,0,.18); }

/* Benefits */
.benefits {
  position: relative;
  padding: 80px 0; /* Increased padding */
  color: #e6eef7;
  background:
    url('../img/backgrounds/bg-benefits.png') center/cover no-repeat,
    var(--navy-900);
}
.benefits-head {
  text-align: center;
  margin: 0 auto 40px; /* Increased bottom margin */
  max-width: 920px; /* Match grid width for balance */
}
.benefits-icon {
  width: 52px; /* Slightly larger */
  height: 52px; /* Slightly larger */
  margin: 0 auto 16px;
}
.benefits h2 {
  color: #fff;
  font-size: clamp(42px, 6vw, 72px);
  margin: 10px 0 14px;
  line-height: 1.3;
}
.benefits h2 .highlight {
  color: var(--orange);
}
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px; /* Increased gap */
  max-width: 880px; /* Further reduced width */
  margin: 0 auto; /* Center the grid */
}
.benefit {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(11, 26, 42, 0.35); /* Adjusted background transparency */
  padding: 28px; /* Increased padding */
  border-radius: 24px; /* Increased border-radius */
  border: 1px solid var(--orange);
}
.benefit img {
  width: 24px;
  height: 24px;
  flex: none;
  margin-top: 3px;
}
.benefit h3 {
  margin: 0 0 10px; /* Increased margin */
  color: #fff;
  font-size: 19px; /* Slightly larger font */
}
.benefit p {
  margin: 0;
  color: #c7d3e2;
  font-size: 15px;
  line-height: 1.6;
}

/* Projects */
.projects { padding: 80px 0; background: #fff; }
.projects-head { text-align: center; margin: 0 auto 48px; }
.projects h2 { margin: 0 0 48px; color: var(--orange); font-size: clamp(48px, 6vw, 72px); font-weight: 400; line-height: 1.1; }
.projects-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 40px; }
.project-item {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(16, 35, 58, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(16, 35, 58, 0.18);
}
.project-item img { height: 280px; width: 100%; object-fit: cover; display: block; }
.projects-description {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  color: #536782;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
}

/* Testimonials */
.testimonials { padding: 80px 0; background: url('../img/backgrounds/bg-testimonials.png') center/cover repeat, #f1f4f8; }
.testimonials-head { text-align: center; margin: 0 auto 48px; }
.testimonials-head h2 { margin: 0; color: var(--navy-900); font-size: clamp(42px, 5.5vw, 68px); font-weight: 400; line-height: 1.1; }
.testimonials-head h2 .highlight { color: var(--orange); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; justify-items: center; max-width: 960px; margin: 0 auto; }
.testimonial {
  background: #fff;
  border: 1px solid #e7edf5;
  border-radius: 18px;
  padding: 32px 24px 28px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  width: 100%;
  max-width: 300px;
  height: auto;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.testimonial:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(16, 35, 58, 0.15);
  border-color: rgba(242, 79, 58, 0.2);
}
.testimonial .avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; }
.testimonial h3 { margin: 6px 0 0; color: var(--navy-800); }
.testimonial .role { margin: 2px 0 10px; color: #6a7a8f; font-size: 14px; }
.testimonial p { font-size: 15px; line-height: 1.5; color: #4a5568; }
.testimonial .stars { width: 110px; margin: 6px auto 12px; }

/* CTA */
.cta {
  position: relative;
  padding: 100px 0;
  color: #fff;
  background: linear-gradient(rgba(11,26,42,.85), rgba(11,26,42,.85)), url('../img/backgrounds/bg-final.png') center/cover no-repeat;
}
.cta-inner { text-align: center; max-width: 900px; }
.cta h2 { margin: 0 0 24px; font-size: clamp(36px, 5vw, 58px); font-weight: 400; line-height: 1.1; }
.cta h2 .highlight { color: var(--orange); }
.cta p { margin: 0 0 40px; color: #dbe6f2; font-size: 18px; line-height: 1.5; }
.cta-actions { display: flex; justify-content: center; margin-bottom: 60px; }
.btn-cta {
  background: var(--orange);
  color: #fff;
  padding: 18px 40px;
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(242, 79, 58, .4);
}
.btn-cta:hover { background: var(--orange-700); }
.cta-contact {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 400;
  justify-content: flex-start;
}
.contact-item img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Footer */
.footer { background: var(--orange); color: #fff; padding: 40px 0; }
.footer-inner { display: flex; justify-content: center; align-items: center; }
.footer-logo { height: 40px; }

/* Responsive */
@media (max-width: 1024px) {
  .topbar-inner { flex-wrap: wrap; gap: 12px; }
  .topbar-left, .topbar-right { gap: 12px; }
  .nav-inner { grid-template-columns: auto 1fr auto; }
  .nav-links { display: none; }
  .hamburger { display: flex; justify-self: end; }
  .hero { padding-top: 80px; }
  .hero-inner, .about-inner { grid-template-columns: 1fr; text-align: center; }
  .about-inner { gap: 28px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: 1fr; text-align: center; }
  .benefit-grid { grid-template-columns: 1fr; gap: 20px; max-width: 600px; }
  .testimonials-grid { grid-template-columns: 1fr; gap: 20px; max-width: 400px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 768px) {
  .topbar { display: none; }
  .hero { padding-top: 60px; }
  .hero-cta { flex-direction: column; gap: 12px; }
  .btn { padding: 14px 24px; font-size: 16px; }
  .services { padding: 40px 0; }
  .service-grid { grid-template-columns: 1fr; gap: 16px; }
  .metrics { gap: 20px; }
  .about, .benefits, .projects, .testimonials { padding: 60px 0; }
  .benefit-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; gap: 16px; }
  .cta { padding: 60px 0; }
  .cta-contact { flex-direction: column; gap: 16px; align-items: flex-start; max-width: 300px; margin: 0 auto; }
  .contact-item {
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    align-items: center;
    position: relative;
  }
}

@media (max-width: 480px) {
  .container { width: 94%; }
  .hero-inner { padding: 20px 0 0; }
  .hero h1 { font-size: clamp(28px, 8vw, 40px); }
  .services-head h2, .projects h2, .testimonials-head h2, .cta h2 {
    font-size: clamp(24px, 7vw, 36px);
  }
  .service-card, .testimonial, .project-item {
    border-radius: 12px;
  }
  .testimonial {
    padding: 20px 16px;
    min-height: 280px;
  }
  .about-bullets li {
    padding: 10px 12px;
    font-size: 14px;
  }
  .benefit {
    padding: 20px;
    border-radius: 16px;
  }
  .cta-actions {
    margin-bottom: 40px;
  }
  .btn-cta {
    padding: 14px 28px;
    font-size: 14px;
  }
  .contact-item {
    justify-content: flex-start;
    min-width: 280px;
    text-align: left;
  }
  .contact-item img {
    width: 18px;
    height: 18px;
    margin-right: 2px;
    vertical-align: middle;
    display: block;
    flex-shrink: 0;
  }
}

/* Mobile menu revealed */
@media (max-width: 1024px) {
  .nav-open .nav-inner { position: relative; }
  .nav-open .nav-links {
    display: flex; flex-direction: column; gap: 14px;
    position: absolute; left: 0; right: 0; top: 60px;
    background: #fff; padding: 14px; border-bottom-left-radius: 16px; border-bottom-right-radius: 16px;
    box-shadow: var(--shadow-md);
  }
}
