:root {
  --dark: #0F0101;
  --orange: #EFA329;
  --carmine: #B40D32;
  --porcelain: #F3F4F0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--porcelain);
  color: var(--dark);
  font-family: 'Poppins', sans-serif;
  padding: clamp(24px, 8vw, 96px);
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 640px;
  width: 100%;
}

.logo {
  display: block;
  width: clamp(96px, 16vw, 180px);
  height: auto;
  margin-bottom: clamp(24px, 4vw, 40px);
  background: transparent;
}

.headline {
  font-weight: 800;
  font-size: clamp(1.75rem, 1.1rem + 3vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin-bottom: clamp(14px, 2vw, 20px);
}

.subline {
  font-weight: 300;
  font-size: clamp(1rem, 0.85rem + 0.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--dark);
  opacity: 0.72;
  max-width: 42ch;
  margin-bottom: clamp(28px, 5vw, 48px);
}

.cta {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--dark);
  background: var(--orange);
  text-decoration: none;
  padding: 0.9em 2.2em;
  border-radius: 999px;
  transition: background-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.cta:hover,
.cta:focus-visible {
  background-color: #f5b04a;
  transform: scale(1.02);
}

.cta:focus-visible {
  outline: 2px solid var(--carmine);
  outline-offset: 3px;
}

.nav-link {
  font-weight: 300;
  font-size: 0.85rem;
  color: var(--dark);
  opacity: 0.55;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  margin-top: clamp(28px, 5vw, 40px);
  transition: opacity 200ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  opacity: 0.9;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 16px;
  width: 100%;
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--dark);
  opacity: 0.5;
  margin-top: clamp(40px, 6vw, 64px);
}

@media (max-width: 480px) {
  .footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 700ms ease forwards;
}

.logo { animation-delay: 0ms; }
.headline { animation-delay: 100ms; }
.subline { animation-delay: 200ms; }
.cta { animation-delay: 300ms; }
.nav-link { animation-delay: 400ms; }
.footer { animation-delay: 500ms; }

.site-header { animation-delay: 0ms; }
.services-title { animation-delay: 100ms; }
.services-intro { animation-delay: 200ms; }
.service-card:nth-of-type(1) { animation-delay: 300ms; }
.service-card:nth-of-type(2) { animation-delay: 400ms; }
.service-card:nth-of-type(3) { animation-delay: 500ms; }
.services-page .cta { animation-delay: 600ms; }
.back-link { animation-delay: 700ms; }
.services-page + .footer { animation-delay: 800ms; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Servicios page */

body:has(.services-page) {
  justify-content: flex-start;
  padding: 0;
}

.site-header {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: clamp(24px, 6vw, 56px) clamp(24px, 8vw, 96px) 0;
}

.mini-logo {
  display: block;
  width: clamp(56px, 8vw, 84px);
  height: auto;
  background: transparent;
}

.services-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(24px, 6vw, 56px) clamp(24px, 8vw, 96px) clamp(40px, 8vw, 80px);
}

.services-title {
  font-weight: 800;
  font-size: clamp(1.75rem, 1.1rem + 3vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin-bottom: clamp(14px, 2vw, 20px);
}

.services-intro {
  font-weight: 300;
  font-size: clamp(1rem, 0.85rem + 0.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--dark);
  opacity: 0.72;
  max-width: 56ch;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 32px);
  width: 100%;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.service-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: clamp(24px, 3vw, 32px) clamp(20px, 2.5vw, 28px);
  text-align: left;
  border-top: 3px solid var(--orange);
  box-shadow: 0 1px 3px rgba(15, 1, 1, 0.06);
}

.service-card h2 {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark);
  margin-bottom: 10px;
}

.service-card p {
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--dark);
  opacity: 0.75;
}

.back-link {
  font-weight: 300;
  font-size: 0.85rem;
  color: var(--dark);
  opacity: 0.55;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  margin-top: clamp(24px, 4vw, 32px);
  transition: opacity 200ms ease;
}

.back-link:hover,
.back-link:focus-visible {
  opacity: 0.9;
}

@media (max-width: 720px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .cta {
    transition: none;
  }
}
