/* ============================================
   ERGOSPAZZIO — Design System
   ============================================ */

:root {
  --sage:        #A6B3A1;
  --sage-dark:   #4A686A;
  --sage-light:  #C8D4C3;
  --sage-bg:     #EEF2EC;
  --off-white:   #F7F6F2;
  --white:       #FFFFFF;
  --near-black:  #1C1C1C;
  --gray:        #6B6B6B;
  --gray-light:  #E4E7E3;

  --font-head: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-img: 24px;
  --radius-card: 20px;
  --radius-btn: 100px;

  --max-w: 1200px;
  --section-py: 96px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ---- Container ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { font-size: 1rem; color: var(--gray); line-height: 1.7; }

.label {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--sage-dark);
  margin-bottom: 16px;
  display: block;
}
.label--light { color: rgba(255,255,255,0.7); }

.section-title { color: var(--near-black); margin-bottom: 48px; }
.section-title--light { color: var(--white); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn:hover { transform: translateY(-2px); }

.btn--dark {
  background: var(--near-black);
  color: var(--white);
  border-color: var(--near-black);
}
.btn--dark:hover { background: #333; box-shadow: 0 8px 24px rgba(28,28,28,0.25); }

.btn--teal {
  background: var(--sage-dark);
  color: var(--white);
  border-color: var(--sage-dark);
}
.btn--teal:hover { background: #3d5a5c; box-shadow: 0 8px 24px rgba(74,104,106,0.35); }

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn--ghost:hover { background: rgba(255,255,255,0.12); border-color: white; }

.btn--full { width: 100%; justify-content: center; }

/* ---- Image placeholder ---- */
.img-placeholder {
  background: var(--sage-light);
  border-radius: var(--radius-img);
  overflow: hidden;
  position: relative;
}

/* ---- Real images ---- */
.about__img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
  border-radius: var(--radius-img);
}

/* ---- Sage section divider ---- */
.sage-section {
  background: var(--sage);
  padding: 80px 0;
  text-align: center;
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 0;
}
.nav.scrolled {
  background: rgba(255,255,255,0.96);
  box-shadow: 0 1px 0 var(--gray-light);
  backdrop-filter: blur(12px);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__logo .logo-color { display: none; }
.nav__logo .logo-white { display: block; }
.nav.scrolled .nav__logo .logo-white { display: none; }
.nav.scrolled .nav__logo .logo-color { display: block; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav__links a {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.04em;
  transition: color var(--transition);
}
.nav.scrolled .nav__links a { color: var(--near-black); }
.nav__links a:hover { color: var(--sage-dark) !important; }

.nav__cta {
  background: var(--sage-dark);
  color: white !important;
  padding: 10px 22px;
  border-radius: var(--radius-btn);
  transition: background var(--transition), transform var(--transition) !important;
}
.nav__cta:hover { background: #3d5a5c !important; transform: translateY(-1px); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: background var(--transition);
}
.nav.scrolled .nav__burger span { background: var(--near-black); }

.nav__mobile {
  display: none;
  flex-direction: column;
  background: white;
  padding: 16px 24px 24px;
  gap: 4px;
  border-top: 1px solid var(--gray-light);
}
.nav__mobile.open { display: flex; }
.nav__mobile a {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--near-black);
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-light);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  background: var(--sage) center/cover no-repeat;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(74,104,106,0.88) 0%,
    rgba(74,104,106,0.70) 40%,
    rgba(28,28,28,0.55) 100%
  );
  pointer-events: none;
}
.hero__inner {
  padding-top: 120px;
  padding-bottom: 80px;
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.hero__label {
  color: rgba(255,255,255,0.75);
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero__title {
  color: var(--white);
  margin-bottom: 24px;
  text-shadow: 0 2px 24px rgba(74,104,106,0.2);
}
.hero__sub {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 40px;
}
.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}
.hero__scroll span {
  display: block;
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 12px;
  position: relative;
}
.hero__scroll span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: white;
  border-radius: 2px;
  animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { opacity: 1; top: 6px; }
  50% { opacity: 0; top: 18px; }
}

/* ============================================
   ABOUT
   ============================================ */
.about { padding: var(--section-py) 0; background: var(--white); }
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about__text h2 {
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 300;
  color: #6B7C7D;
  margin-bottom: 24px;
  line-height: 1.55;
  font-style: normal;
  letter-spacing: -0.01em;
}
.about__text p { font-size: 1.05rem; margin-top: 16px; }
.about__image { min-height: 440px; }
.about__image .img-placeholder { height: 100%; min-height: 440px; }

/* ============================================
   DIFFERENTIATORS
   ============================================ */
.diff-content { padding: var(--section-py) 0; background: var(--off-white); }
.diff-content__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.diff-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.diff-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(74,104,106,0.12);
}
.diff-card__number {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--sage-light);
  margin-bottom: 16px;
  line-height: 1;
}
.diff-card h3 { color: var(--near-black); margin-bottom: 10px; }
.diff-card p { font-size: 0.92rem; }

/* ============================================
   PRODUCTS
   ============================================ */
.products { padding: var(--section-py) 0; background: var(--white); }
.products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}
.product-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--off-white);
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(74,104,106,0.15);
}
.product-card__img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.product-card__body { padding: 24px; }
.product-card__body h3 { margin-bottom: 8px; font-size: 1.05rem; }
.product-card__body p { font-size: 0.9rem; }
.products__more { text-align: center; }

/* ============================================
   SERVICES
   ============================================ */
.services { padding: var(--section-py) 0; background: var(--off-white); }
.services__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.services__text h2 { color: var(--near-black); margin-bottom: 32px; }
.services__list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.services__list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.services__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: var(--sage-dark);
  border-radius: 50%;
  margin-top: 8px;
}
.services__list strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--near-black);
  margin-bottom: 4px;
}
.services__list p { font-size: 0.92rem; }
.services__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  height: 360px;
}
.services__img-tall {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-img);
}
.services__img-short {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-img);
}

/* ============================================
   VENTAJAS
   ============================================ */
.ventajas__inner { text-align: center; }
.ventajas__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 0;
}
.ventaja {
  padding: 40px 28px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-card);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.25);
}
.ventaja__icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
}
.ventaja h3 {
  color: white;
  margin-bottom: 12px;
  font-size: 1.1rem;
}
.ventaja p { color: rgba(255,255,255,0.8); font-size: 0.92rem; }

/* ============================================
   PROJECTS
   ============================================ */
.projects-section { padding: var(--section-py) 0; background: var(--near-black); }
.projects-section .label { color: rgba(255,255,255,0.5); }
.projects-section .section-title { color: white; }

.projects-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: 280px 280px;
  gap: 16px;
}
.project-item {
  position: relative;
  border-radius: var(--radius-img);
  overflow: hidden;
  cursor: pointer;
}
.project-item--large { grid-row: span 2; }
.project-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-item:hover img { transform: scale(1.04); }
.project-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28,28,28,0.85) 0%, rgba(28,28,28,0.1) 60%, transparent 100%);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.project-item:hover .project-item__overlay { opacity: 1; }
.project-item__tag {
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sage-light);
  margin-bottom: 8px;
}
.project-item__overlay h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.project-item__overlay p {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .project-item--large { grid-row: span 1; }
  .project-item { height: 260px; }
}

/* ============================================
   CLIENTS
   ============================================ */
.clients { padding: var(--section-py) 0 80px; background: var(--white); }
.clients .container { margin-bottom: 48px; }
.clients .section-title { margin-bottom: 0; }

.clients__carousel-wrap { overflow: hidden; }
.clients__carousel {
  display: flex;
  gap: 16px;
  padding: 0 24px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.client-card {
  flex: 0 0 calc((100vw - 48px - 80px) / 5);
  min-width: 160px;
  max-width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  transition: transform var(--transition);
}
.client-card img {
  max-width: 110px;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity var(--transition);
}
.client-card:hover img {
  opacity: 1;
}
.client-card span {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray);
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.3;
}
.client-card:hover {
  transform: translateY(-3px);
}
.client-card:hover span { color: var(--sage-dark); }

.clients__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  padding: 0 24px;
}
.clients__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gray-light);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), width var(--transition);
}
.clients__dot.active {
  width: 24px;
  border-radius: 3px;
  background: var(--sage-dark);
}

/* ============================================
   CONTACT
   ============================================ */
.contact { padding: var(--section-py) 0; background: var(--off-white); }
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.contact__text h2 { color: var(--near-black); margin-bottom: 16px; }
.contact__text p { margin-bottom: 40px; }
.contact__info { display: flex; flex-direction: column; gap: 20px; }
.contact__info-item { display: flex; flex-direction: column; gap: 4px; }
.contact__info-item strong {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-dark);
}
.contact__info-item span { font-size: 0.95rem; color: var(--gray); line-height: 1.6; }

.contact__form {
  background: var(--white);
  border-radius: 28px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group--full { grid-column: span 2; }
.form-group label {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--near-black);
}
.form-group input,
.form-group textarea {
  padding: 14px 18px;
  border: 1.5px solid var(--gray-light);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--near-black);
  background: var(--off-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--sage-dark);
  box-shadow: 0 0 0 3px rgba(74,104,106,0.12);
  background: var(--white);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #aaa; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--near-black);
  padding: 64px 0 0;
  color: rgba(255,255,255,0.7);
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer__brand img { margin-bottom: 20px; filter: brightness(0) invert(1); }
.footer__brand p { font-size: 0.9rem; line-height: 1.6; }
.footer__nav,
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer__nav strong,
.footer__contact strong {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 4px;
}
.footer__nav a {
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer__nav a:hover { color: var(--sage-light); }
.footer__contact span { font-size: 0.9rem; line-height: 1.6; }

/* Footer social */
.footer__social strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
}
.footer__social-links {
  display: flex;
  gap: 16px;
  align-items: center;
}
.footer__social-links a {
  color: rgba(255,255,255,0.55);
  transition: color var(--transition), transform var(--transition);
  display: flex;
}
.footer__social-links a:hover {
  color: white;
  transform: translateY(-2px);
}

/* WhatsApp floating button */
.whatsapp-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  z-index: 999;
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.6);
}

.footer__bottom {
  padding: 20px 0;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  :root { --section-py: 64px; }

  .about__inner,
  .services__inner,
  .contact__inner { grid-template-columns: 1fr; gap: 40px; }

  .about__image { order: -1; min-height: 300px; }
  .about__image .img-placeholder { min-height: 300px; }

  .ventajas__grid { grid-template-columns: 1fr; gap: 16px; }

  .footer__inner { grid-template-columns: 1fr; gap: 40px; }

  .services__images { height: 300px; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .hero__actions { flex-direction: column; align-items: flex-start; }

  .diff-content__grid { grid-template-columns: 1fr; }

  .products__grid { grid-template-columns: 1fr 1fr; }

  .contact__form {
    grid-template-columns: 1fr;
    padding: 28px;
  }
  .form-group--full { grid-column: span 1; }

  .clients__grid { gap: 10px; }
  .client-logo { padding: 14px 20px; font-size: 0.85rem; }
}

@media (max-width: 480px) {
  .products__grid { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
}
