/* =============================================
   Fabricio Lecuna Burgos - Paginas Web & Sistemas
   ============================================= */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #141a24;
  --bg-card: #1a2332;
  --bg-secondary: rgba(26, 35, 50, 0.4);
  --fg: #eef1f5;
  --fg-muted: #8a95a5;
  --primary: #3fbfa0;
  --primary-fg: #141a24;
  --border: #283446;
  --radius: 0.75rem;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', 'SF Mono', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* --- Typography --- */
.font-mono {
  font-family: var(--font-mono);
}

.text-primary {
  color: var(--primary);
}

.text-muted {
  color: var(--fg-muted);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

.section-desc {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--fg-muted);
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  text-wrap: pretty;
}

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center {
  text-align: center;
}

.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;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-fg);
}

.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-card);
}

/* =====================
   NAVBAR
   ===================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(20, 26, 36, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
}

.navbar-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color 0.2s;
}

.navbar-links a:hover {
  color: var(--primary);
}

.navbar-cta {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: opacity 0.2s;
}

.navbar-cta:hover {
  opacity: 0.9;
}

/* Mobile hamburger */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fg);
  transition: transform 0.3s, opacity 0.3s;
}

.navbar-mobile {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(20, 26, 36, 0.95);
  backdrop-filter: blur(12px);
}

.navbar-mobile a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

.navbar-mobile a:hover {
  background: var(--bg-card);
  color: var(--fg);
}

.navbar-mobile .navbar-cta {
  display: block;
  text-align: center;
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .navbar-links,
  .navbar > .navbar-inner > .navbar-cta {
    display: none;
  }
  .navbar-toggle {
    display: flex;
  }
}

/* =====================
   HERO
   ===================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  padding-top: 5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 26, 36, 0.88);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  text-align: center;
}

.hero-content .section-label {
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}

.hero h1 span {
  color: var(--primary);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.hero-badge svg {
  color: var(--primary);
  flex-shrink: 0;
}

.hero-divider {
  width: 1px;
  height: 1rem;
  background: var(--border);
}

/* =====================
   SERVICES
   ===================== */
.services {
  padding: 6rem 0;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3.5rem;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  border-color: rgba(63, 191, 160, 0.3);
  box-shadow: 0 8px 32px rgba(63, 191, 160, 0.06);
}

.service-card-img {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.service-card:hover .service-card-img img {
  transform: scale(1.05);
}

.service-card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, var(--bg-card), transparent);
}

.service-card-body {
  padding: 1.5rem;
}

.service-card-body h3 {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.service-card-body p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.service-tag {
  padding: 0.25rem 0.75rem;
  background: rgba(26, 35, 50, 0.8);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
}

.services-cta {
  text-align: center;
  margin-top: 3rem;
}

/* =====================
   PROJECTS
   ===================== */
.projects {
  padding: 6rem 0;
  background: var(--bg-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3.5rem;
}

@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  border-color: rgba(63, 191, 160, 0.3);
  box-shadow: 0 8px 32px rgba(63, 191, 160, 0.06);
}

.project-card-img {
  position: relative;
  height: 13rem;
  overflow: hidden;
}

.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.project-card:hover .project-card-img img {
  transform: scale(1.05);
}

.project-card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(26, 35, 50, 0.8), transparent);
}

.project-card-badge {
  position: absolute;
  bottom: 0.75rem;
  left: 1rem;
  z-index: 2;
  padding: 0.25rem 0.75rem;
  background: rgba(63, 191, 160, 0.9);
  color: var(--primary-fg);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.375rem;
}

.project-card-body {
  padding: 1.25rem;
}

.project-card-body h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.project-card-body p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--fg-muted);
}

.projects-cta {
  text-align: center;
  margin-top: 3.5rem;
}

.projects-cta p {
  font-size: 1.1rem;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}

/* =====================
   ABOUT
   ===================== */
.about {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
}

.about-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.about-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 26, 36, 0.92);
}

.about-inner {
  position: relative;
  z-index: 1;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 64rem;
  margin: 3.5rem auto 0;
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
  }
}

.about-photo-wrapper {
  display: flex;
  justify-content: center;
}

.about-photo-container {
  position: relative;
}

.about-photo-glow {
  position: absolute;
  inset: -4px;
  border-radius: 1rem;
  background: rgba(63, 191, 160, 0.15);
  filter: blur(24px);
}

.about-photo {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 1rem;
  border: 2px solid rgba(63, 191, 160, 0.2);
  object-fit: cover;
  object-position: top;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

@media (min-width: 640px) {
  .about-photo {
    width: 320px;
    height: 320px;
  }
}

.about-text p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}

.about-text strong {
  color: var(--fg);
}

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.about-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(26, 35, 50, 0.8);
  backdrop-filter: blur(8px);
}

.about-badge svg {
  color: var(--primary);
  flex-shrink: 0;
}

.about-badge span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
}

/* =====================
   CONTACT
   ===================== */
.contact {
  padding: 6rem 0;
}

.contact-inner {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.contact-whatsapp {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 28rem;
  margin: 2.5rem auto 3rem;
  padding: 1.5rem;
  border: 1px solid rgba(63, 191, 160, 0.3);
  border-radius: 1rem;
  background: var(--bg-card);
  transition: border-color 0.3s, box-shadow 0.3s;
  text-align: left;
}

.contact-whatsapp:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(63, 191, 160, 0.1);
}

.contact-whatsapp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  flex-shrink: 0;
}

.contact-whatsapp-text p:first-child {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
}

.contact-whatsapp-text p:last-child {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.contact-whatsapp-arrow {
  margin-left: auto;
  color: var(--fg-muted);
  transition: transform 0.3s, color 0.3s;
}

.contact-whatsapp:hover .contact-whatsapp-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

.contact-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .contact-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.3s;
  text-align: left;
}

.contact-info-card:hover {
  border-color: rgba(63, 191, 160, 0.3);
}

.contact-info-card svg {
  color: var(--primary);
  flex-shrink: 0;
}

.contact-info-card-text p:first-child {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
}

.contact-info-card-text p:last-child {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

/* =====================
   FOOTER
   ===================== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: 2.5rem 0;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-top: 0.25rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--fg-muted);
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.footer-bottom p + p {
  margin-top: 0.25rem;
}

/* =====================
   WHATSAPP FLOAT
   ===================== */
.whatsapp-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

/* =====================
   RESPONSIVE HELPERS
   ===================== */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero-badges {
    gap: 1rem;
  }
  .hero-divider {
    display: none;
  }
  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 20rem;
    margin: 0 auto;
  }
}
