/* ===========================
   STI TECNOLOGÍA — STYLESHEET
   =========================== */

/* Variables */
:root {
  --red:         #DA291C;
  --red-dark:    #B52215;
  --red-light:   #FDF2F1;
  --dark:        #0F0F0F;
  --dark-2:      #1C1C1C;
  --text:        #1A1A1A;
  --text-muted:  #4B5563;
  --border:      #E5E7EB;
  --bg-light:    #F9FAFB;
  --white:       #FFFFFF;

  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg:   0 8px 40px rgba(0, 0, 0, 0.12);
  --transition:  0.2s ease;
  --max-w:       1200px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; font-size: 16px; }
body  { font-family: var(--font); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img   { max-width: 100%; display: block; }
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; }
input, textarea, select, button { font-family: var(--font); }

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

.section      { padding: 96px 0; }
.section--light { background: var(--bg-light); }
.section--dark  { background: var(--dark); color: var(--white); }

.text-red { color: var(--red); }

/* Section Header */
.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 64px;
}
.section-header h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  margin: 12px 0 14px;
  line-height: 1.2;
}
.section-header p {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.7;
}

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.badge--red   { background: var(--red-light); color: var(--red); }
.badge--light {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn--primary {
  background: var(--red);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(218, 41, 28, 0.35);
}
.btn--outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.65);
}
.btn--white {
  background: var(--white);
  color: var(--red);
}
.btn--white:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.btn--full { width: 100%; justify-content: center; }

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.header__logo img { height: 36px; width: auto; }

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
}
.nav__link:hover             { color: var(--red); background: var(--red-light); }
.nav__cta                    { background: var(--red); color: var(--white) !important; padding: 10px 20px; }
.nav__cta:hover              { background: var(--red-dark) !important; color: var(--white) !important; transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s ease;
  transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  background: var(--dark);
  color: var(--white);
  padding: 104px 0 88px;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero__content h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
}
.hero__lead {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.65);
  max-width: 480px;
  line-height: 1.75;
}
.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__svg {
  width: 100%;
  max-width: 400px;
  animation: pulse-network 4s ease-in-out infinite;
}
@keyframes pulse-network {
  0%, 100% { opacity: 0.85; }
  50%       { opacity: 1; }
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
  border-color: rgba(218, 41, 28, 0.15);
}
.service-card__icon {
  width: 52px;
  height: 52px;
  background: var(--red-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  margin-bottom: 6px;
  flex-shrink: 0;
}
.service-card h3   { font-size: 17px; font-weight: 700; }
.service-card > p  { color: var(--text-muted); font-size: 14px; line-height: 1.65; }
.service-card__list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.service-card__list li {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.service-card__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--red);
  font-size: 11px;
  top: 1px;
}

/* ===== NOSOTROS ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}
.about__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.about__graphic {
  width: 100%;
  max-width: 300px;
  animation: spin-slow 30s linear infinite;
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.about__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about__content h2 {
  font-size: clamp(28px, 3.5vw, 38px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.about__lead {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.75;
}
.about__values {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.value-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.value-item__icon {
  width: 30px;
  height: 30px;
  background: var(--red);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  margin-top: 1px;
}
.value-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.value-item strong { font-size: 14px; font-weight: 600; color: var(--white); }
.value-item span   { font-size: 13px; color: rgba(255, 255, 255, 0.55); }

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
}
.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
  border-color: rgba(218, 41, 28, 0.12);
}
.testimonial-card__stars {
  color: #F59E0B;
  font-size: 16px;
  letter-spacing: 3px;
}
.testimonial-card > p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  font-style: italic;
  flex: 1;
}
.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.testimonial-card__avatar {
  width: 42px;
  height: 42px;
  background: var(--red);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
}
.testimonial-card__author strong { font-size: 14px; font-weight: 700; display: block; }
.testimonial-card__author span   { font-size: 12px; color: var(--text-muted); }

/* ===== CTA BANNER ===== */
.cta-section { background: var(--red); padding: 88px 0; }
.cta-section__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.cta-section__inner h2 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  color: white;
  max-width: 580px;
  line-height: 1.2;
}
.cta-section__inner > p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 72px;
  align-items: start;
}
.contact__info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact__info h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 700;
  line-height: 1.2;
}
.contact__info > p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}
.contact__items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.contact__item:hover {
  border-color: var(--red);
  box-shadow: 0 2px 12px rgba(218, 41, 28, 0.1);
  transform: translateX(3px);
}
.contact__item-icon {
  width: 42px;
  height: 42px;
  background: var(--red-light);
  color: var(--red);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact__item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact__item strong {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.contact__item span {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.contact__social {
  display: flex;
  gap: 8px;
}
.social-link {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.social-link:hover {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-light);
  transform: translateY(-2px);
}

/* Form */
.contact__form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group:last-of-type { margin-bottom: 20px; }
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.2px;
}
.form-group input,
.form-group textarea,
.form-group select {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: var(--bg-light);
  transition: all var(--transition);
  outline: none;
  resize: vertical;
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--red);
  background: white;
  box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #9CA3AF; }
.form-group select { cursor: pointer; }

/* Form success state */
.form-success {
  text-align: center;
  padding: 56px 32px;
}
.form-success__checkmark {
  width: 64px;
  height: 64px;
  background: #ECFDF5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #10B981;
}
.form-success h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.form-success p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 72px 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 56px;
}
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer__logo {
  height: 40px;
  width: auto;
  align-self: flex-start;
}
.footer__brand p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.75;
  max-width: 260px;
}
.footer__social {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.footer__social-link {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: all var(--transition);
}
.footer__social-link:hover {
  color: var(--red);
  border-color: var(--red);
  background: rgba(218, 41, 28, 0.1);
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer__links strong {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.footer__links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--red); }

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer__contact strong {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.footer__contact a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
  display: block;
}
.footer__contact a:hover { color: var(--red); }
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  text-align: center;
}
.footer__bottom p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
}

/* ===== FADE-IN ANIMATION ===== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  animation-play-state: paused;
}
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   RESPONSIVE
   =========================== */

/* ── Tablet grande (≤ 1024px) ── */
@media (max-width: 1024px) {
  .services-grid     { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid      { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* ── Tablet (≤ 900px): menú hamburguesa, hero simplificado ── */
@media (max-width: 900px) {
  /* Nav → hamburguesa */
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--white);
    padding: 8px 12px 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(calc(-100% - 80px));
    transition: transform 0.3s ease;
  }
  .nav.open       { transform: translateY(0); }
  .nav__list      { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__link      { display: block; padding: 13px 16px; font-size: 15px; border-radius: var(--radius-sm); }
  .nav__cta       { display: block; padding: 13px 16px !important; background: none !important; color: var(--text) !important; text-align: left; }
  .hamburger      { display: flex; }

  /* Hero: ocultar gráfico, centrar contenido */
  .hero               { padding: 72px 0 64px; }
  .hero__grid         { grid-template-columns: 1fr; }
  .hero__visual       { display: none; }
  .hero__content      { align-items: center; text-align: center; }
  .hero__lead         { max-width: 100%; }
  .hero__actions      { justify-content: center; }

  /* About: ocultar gráfico */
  .about-grid         { grid-template-columns: 1fr; gap: 40px; }
  .about__visual      { display: none; }
}

/* ── Tablet pequeña (≤ 700px): colapsar a 1 columna ── */
@media (max-width: 700px) {
  .services-grid     { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .contact-grid      { grid-template-columns: 1fr; gap: 40px; }
  .footer__grid      { grid-template-columns: 1fr; gap: 32px; }

  .section           { padding: 64px 0; }
  .section-header    { margin-bottom: 40px; }
  .cta-section       { padding: 64px 0; }

  .contact__form     { padding: 28px 20px; }
  .form-row          { grid-template-columns: 1fr; gap: 0; }
}

/* ── Móvil (≤ 480px) ── */
@media (max-width: 480px) {
  .container          { padding: 0 16px; }
  .hero               { padding: 56px 0 48px; }
  .hero__content h1   { font-size: 32px; letter-spacing: -0.5px; }
  .hero__actions      { flex-direction: column; width: 100%; }
  .hero__actions .btn { justify-content: center; }
  .contact__form      { padding: 24px 16px; }
  .section-header h2  { font-size: 26px; }
}
