/* css/style.css */

/* =====================
   VARIABLES
   ===================== */
:root {
  --red:     #cc3333;
  --dark:    #1a0a0a;
  --maroon:  #8b1a1a;
  --cream:   #f9f5f5;
  --gray-light: #fafafa;
  --gray-text:  #555555;
  --gray-border: #e5e7eb;
  --nav-height: 70px;
  --section-pad: 80px 0;
  --max-width: 1100px;
}

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

html {
  font-size: 16px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--dark);
  background: #fff;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

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

/* =====================
   TIPOGRAFÍA
   ===================== */
h1, h2, h3 {
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.2;
}

.section-label {
  display: block;
  color: var(--red);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-label::before {
  content: '— ';
}

/* =====================
   UTILIDADES
   ===================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.btn-primary {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 0.75rem 1.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  border-radius: 0;
  -webkit-appearance: none;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--maroon);
}

.btn-outline {
  display: inline-block;
  border: 1px solid var(--gray-border);
  color: var(--gray-text);
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  transition: border-color 0.2s, color 0.2s;
}

.btn-outline:hover {
  border-color: var(--dark);
  color: var(--dark);
}

/* =====================
   NAVBAR
   ===================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  border-bottom: 2px solid var(--red);
  height: var(--nav-height);
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar__logo img {
  height: 40px;
  width: auto;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar__link {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-text);
  font-weight: 500;
  transition: color 0.2s;
}

.navbar__link:hover,
.navbar__link.active {
  color: var(--red);
}

.navbar__cta {
  font-size: 0.7rem;
  padding: 0.5rem 1.2rem;
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: all 0.3s;
}

.navbar__hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.navbar__hamburger.open span:nth-child(2) {
  opacity: 0;
}
.navbar__hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =====================
   SECTION HEADER (shared)
   ===================== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--dark);
  margin-top: 0.5rem;
}

/* =====================
   HERO
   ===================== */
.hero {
  padding: calc(var(--nav-height) + 5rem) 0 5rem;
  background: linear-gradient(to right, #fff 60%, var(--cream) 100%);
  border-bottom: 1px solid #f0e8e8;
}

.hero__inner {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero__text {
  flex: 1;
}

.hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--dark);
  margin: 0.75rem 0 1rem;
}

.hero__sub {
  color: var(--gray-text);
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__image {
  flex: 0 0 400px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(26,10,10,0.15);
}

.hero__image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

/* =====================
   MÉTRICAS
   ===================== */
.metricas {
  background: var(--dark);
  padding: 2.5rem 0;
}

.metricas__inner {
  display: flex;
  gap: 0;
}

.metrica {
  flex: 1;
  text-align: center;
  padding: 0 1rem;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.metrica:last-child {
  border-right: none;
}

.metrica__num {
  display: block;
  color: var(--red);
  font-size: 2rem;
  font-weight: 900;
  font-family: Georgia, serif;
}

.metrica__label {
  display: block;
  color: #888;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* =====================
   SERVICIOS
   ===================== */
.servicios {
  padding: var(--section-pad);
  background: var(--gray-light);
}

.servicios__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.servicio-card {
  background: #fff;
  padding: 2rem 1.5rem;
  border-top: 3px solid var(--red);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.servicio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.servicio-card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.servicio-card h3 {
  font-family: Georgia, serif;
  font-size: 0.95rem;
  color: var(--dark);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.servicio-card p {
  color: var(--gray-text);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* =====================
   NOSOTROS
   ===================== */
.nosotros {
  padding: var(--section-pad);
  background: #fff;
}

.nosotros__inner {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.nosotros__image {
  flex: 0 0 380px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(26,10,10,0.12);
}

.nosotros__image img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.nosotros__text h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  margin: 0.5rem 0 1.25rem;
}

.nosotros__text p {
  color: var(--gray-text);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.nosotros__cta {
  margin-top: 1.5rem;
  display: inline-block;
}

/* =====================
   CLIENTES
   ===================== */
.clientes {
  padding: var(--section-pad);
  background: var(--cream);
}

.clientes__logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
}

.cliente-logo {
  background: #fff;
  border: 1px solid var(--gray-border);
  padding: 1.25rem 2rem;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s;
}

.cliente-logo:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.cliente-logo img {
  height: 72px;
  width: auto;
  object-fit: contain;
  filter: grayscale(40%);
  transition: filter 0.2s;
}

.cliente-logo:hover img {
  filter: grayscale(0%);
}

/* =====================
   EQUIPO
   ===================== */
.equipo {
  padding: var(--section-pad);
  background: #fff;
}

.equipo__grid {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.equipo-card {
  text-align: center;
  width: 180px;
}

.equipo-card__avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: var(--cream);
  font-size: 2.5rem;
}

.equipo-card h3 {
  font-family: Georgia, serif;
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.equipo-card p {
  color: #888;
  font-size: 0.8rem;
}

/* =====================
   RSC
   ===================== */
.rsc {
  padding: var(--section-pad);
  background: var(--dark);
}

.rsc__inner {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.rsc__text {
  flex: 1;
}

.rsc__text h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: #fff;
  margin: 0.5rem 0 1.25rem;
}

.rsc__text p {
  color: #999;
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.rsc__image {
  flex: 0 0 380px;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.85;
}

.rsc__image img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.rsc__label {
  color: #e0a0a0;
}
.rsc__label::before {
  color: #e0a0a0;
}

/* =====================
   CONTACTO
   ===================== */
.contacto {
  padding: var(--section-pad);
  background: var(--gray-light);
}

.contacto__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--gray-border);
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--dark);
  background: #fff;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red);
}

.form-group textarea {
  resize: vertical;
}

.form-result {
  margin-top: 1rem;
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  display: none;
}

.form-result.success {
  display: block;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.form-result.error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.contacto__info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contacto__dato {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contacto__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.contacto__dato strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dark);
  margin-bottom: 0.2rem;
}

.contacto__dato p,
.contacto__dato a {
  color: var(--gray-text);
  font-size: 0.9rem;
}

.contacto__dato a:hover {
  color: var(--red);
}

.contacto__map {
  margin-top: auto;
}

/* =====================
   FOOTER
   ===================== */
.footer {
  background: #0d0505;
  padding: 1.5rem 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer__left p {
  color: #666;
  font-size: 0.75rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  color: #555;
  font-size: 0.75rem;
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--red);
}

/* =====================
   RESPONSIVE — TABLET
   ===================== */
@media (max-width: 1024px) {
  .servicios__grid { grid-template-columns: repeat(2, 1fr); }
  .hero__image { flex: 0 0 300px; }
  .nosotros__image { flex: 0 0 280px; }
  .rsc__image { flex: 0 0 280px; }
}

/* =====================
   RESPONSIVE — MÓVIL
   ===================== */
@media (max-width: 768px) {
  :root { --section-pad: 48px 0; }

  .navbar__nav {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 2rem 2rem;
    border-bottom: 2px solid var(--red);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    gap: 0;
  }

  .navbar__nav.open { display: flex; }
  .navbar__link { padding: 0.85rem 0; border-bottom: 1px solid var(--gray-border); font-size: 0.85rem; }
  .navbar__cta { margin-top: 1rem; text-align: center; padding: 0.75rem; }
  .navbar__hamburger { display: flex; }

  .hero__inner { flex-direction: column; gap: 2rem; }
  .hero__image { flex: none; width: 100%; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn-primary,
  .hero__actions .btn-outline { text-align: center; width: 100%; }

  .metricas__inner { flex-wrap: wrap; }
  .metrica { flex: 0 0 50%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 1rem; }
  .metrica:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.1); }

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

  .nosotros__inner { flex-direction: column; gap: 2rem; }
  .nosotros__image { flex: none; width: 100%; }

  .rsc__inner { flex-direction: column; gap: 2rem; }
  .rsc__image { flex: none; width: 100%; }

  .contacto__inner { grid-template-columns: 1fr; gap: 2.5rem; }

  .footer__inner { flex-direction: column; text-align: center; }
  .footer__left { flex-direction: column; gap: 0.5rem; }
}
