/* Fuente y colores base */
:root {
  --bg: #0a0b0f;
  --surface: #151823;
  --surface-2: #1b1f2e;
  --text: #ffffff;
  --muted: #a0a8c0;
  --primary: #6aa6ff;
  --primary-600: #3e86ff;
  --accent: #7cf3c6;
  --shadow: 0 20px 40px rgba(0,0,0,.5);
  --radius: 16px;
  --gradient-primary: linear-gradient(135deg, #6aa6ff 0%, #3e86ff 100%);
  --gradient-accent: linear-gradient(135deg, #7cf3c6 0%, #5dd9b3 100%);
}

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(110,160,255,.12), transparent 60%),
              radial-gradient(1000px 500px at 100% 10%, rgba(124,243,198,.08), transparent 60%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Utilidades */
.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1rem 1.8rem;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 50px;
  border: none;
  box-shadow: 0 15px 30px rgba(62,134,255,.4);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(62,134,255,.5);
}

.btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid rgba(255,255,255,.2);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255,255,255,.1);
}

.btn--sm {
  padding: .6rem .9rem;
  font-size: .95rem;
}

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 .6rem 0;
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem 0; color: var(--muted); }

.section-subtitle {
  font-size: 1.2rem;
  color: var(--primary);
  text-align: center;
  margin: -0.5rem auto 2rem;
  max-width: 600px;
  font-weight: 500;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(120%) blur(8px);
  background: rgba(15,17,21,.5);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 0;
}

.brand {
  font-weight: 700;
  letter-spacing: .2px;
}

.menu a {
  color: var(--text);
  text-decoration: none;
  margin-left: 1.1rem;
  font-weight: 500;
  opacity: .9;
  transition: opacity .2s ease;
  position: relative;
}

.menu a:hover { 
  opacity: 1; 
}

.menu a:not(.btn):after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width .3s ease;
}

.menu a:not(.btn):hover:after {
  width: 100%;
}

/* Hero */
.hero {
  padding: 6rem 0 4rem;
  background: radial-gradient(ellipse at top, rgba(110,166,255,.15), transparent 70%),
              radial-gradient(ellipse at bottom right, rgba(124,243,198,.1), transparent 60%),
              var(--bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 49%, rgba(110,166,255,.03) 50%, transparent 51%),
              linear-gradient(-45deg, transparent 49%, rgba(124,243,198,.03) 50%, transparent 51%);
  background-size: 60px 60px;
  opacity: 0.3;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 2rem;
  align-items: center;
}

.hero__text .cta-group { display: flex; gap: .8rem; margin: 1.2rem 0 1rem; flex-wrap: wrap; }

.badges { display: flex; gap: .8rem; padding: 0; margin: 1.5rem 0 0; list-style: none; flex-wrap: wrap; }
.badges li {
  font-size: .95rem;
  color: var(--primary);
  border: 2px solid rgba(110,166,255,.3);
  padding: .6rem 1rem;
  border-radius: 999px;
  background: rgba(110,166,255,.1);
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.hero__card { display: grid; place-items: center; }

.mockup {
  width: 100%;
  max-width: 460px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  padding: 14px;
}

.mockup__nav { height: 28px; background: rgba(0,0,0,.35); border-radius: 10px; margin-bottom: 10px; }
.mockup__hero { height: 140px; background: linear-gradient(135deg, rgba(62,134,255,.35), rgba(124,243,198,.28)); border-radius: 12px; margin-bottom: 10px; }
.mockup__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mockup__grid span { aspect-ratio: 1/1; background: rgba(255,255,255,.06); border-radius: 10px; }

/* Secciones */
.section { padding: 3.2rem 0; }
.section--alt { background: linear-gradient(180deg, rgba(255,255,255,.03), transparent); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.4rem;
}

.card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  transition: left .6s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(110,166,255,.3);
}

.card:hover::before {
  left: 100%;
  box-shadow: var(--shadow);
}



.card .price { margin-top: .6rem; color: var(--accent); font-weight: 600; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  border-color: rgba(106,166,255,.3);
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(106,166,255,.15), rgba(124,243,198,.12));
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.image-count {
  position: absolute;
  top: .5rem;
  right: .5rem;
  background: rgba(0,0,0,.75);
  color: #fff;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.1);
}

.project-info {
  padding: 1rem;
}

.project-info h3 {
  margin: 0 0 .4rem 0;
  font-size: 1.1rem;
  color: var(--text);
}

.project-info p {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.4;
}

.contact {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 2rem;
}

.contact-list { list-style: none; padding: 0; margin: 1rem 0; }
.contact-list li { display: flex; align-items: center; gap: .6rem; margin: .4rem 0; }
.contact-list a {
  color: var(--text);
  text-decoration: none;
  transition: color .2s ease;
}
.contact-list a:hover {
  color: var(--primary);
}
.contact-list a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.contact .icon { font-size: 1.2rem; }

/* Formulario de contacto */
.contact-form {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0 1.5rem;
  background: rgba(255,255,255,.02);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.05);
  backdrop-filter: blur(10px);
}

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

.form-group label {
  display: block;
  margin-bottom: .5rem;
  color: var(--primary);
  font-weight: 500;
  font-size: .95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  background: rgba(255,255,255,.05);
  border: 2px solid rgba(255,255,255,.1);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: all .3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(110,166,255,.05);
  box-shadow: 0 0 20px rgba(110,166,255,.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted);
  opacity: .6;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn {
  width: 100%;
  margin-top: .5rem;
}

.contact-divider {
  margin: 2rem 0 1.5rem;
  text-align: center;
  position: relative;
}

.contact-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,.1);
}

.contact-divider span {
  position: relative;
  background: var(--bg);
  padding: 0 1rem;
  color: var(--muted);
  font-size: .9rem;
}

.note {
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1.5rem;
}

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

.note-icon {
  flex-shrink: 0;
  opacity: 0.95;
  animation: float 4s ease-in-out infinite;
  transform-origin: center;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(-2deg);
  }
  50% {
    transform: translateY(-12px) rotate(0deg);
  }
  75% {
    transform: translateY(-10px) rotate(2deg);
  }
}

.note-content p {
  margin: 0;
  flex: 1;
  line-height: 1.6;
}

.note-icon svg {
  filter: drop-shadow(0 6px 12px rgba(106,166,255,.25));
  transition: transform 0.3s ease;
}

.note-icon:hover svg {
  transform: scale(1.05);
  filter: drop-shadow(0 8px 16px rgba(106,166,255,.35));
}

/* Footer */
.site-footer { padding: 1.6rem 0; border-top: 1px solid rgba(255,255,255,.06); background: rgba(0,0,0,.2); }
.footer__grid { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.footer__links a { color: var(--muted); text-decoration: none; margin-left: 1rem; transition: color .2s ease; }
.footer__links a:hover { color: var(--text); }

/* Botón volver arriba */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 45px;
  height: 45px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(106,166,255,.4);
  transition: all .3s ease;
  z-index: 100;
  opacity: 0;
  transform: translateY(20px);
}

.scroll-top.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--primary-600);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(106,166,255,.5);
}

.scroll-top:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Modal para ver imágenes */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,.9);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-content-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90%;
  max-height: 90vh;
}

.modal-content {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: modalFadeIn .3s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 5rem;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 1001;
  transition: opacity .2s ease;
  line-height: 1;
  background: rgba(0,0,0,.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.2);
}

.modal-close:hover {
  opacity: .8;
  background: rgba(0,0,0,.7);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1001;
  transition: all .2s ease;
  font-weight: 300;
  line-height: 1;
}

.modal-nav:hover {
  background: rgba(0,0,0,.8);
  border-color: rgba(255,255,255,.4);
  transform: translateY(-50%) scale(1.1);
}

.modal-prev {
  left: 2rem;
}

.modal-next {
  right: 6rem;
}

.modal-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.75);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
}

/* Responsivo */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  /* Header móvil */
  .header { padding: 1rem 0; }
  .header .container { padding: 0 1rem; }
  .menu a { margin-left: .8rem; font-size: .9rem; }
  
  /* Hero móvil */
  .hero { padding: 4rem 0 3rem; }
  .hero__title { font-size: 2.2rem; }
  .hero__subtitle { font-size: 1.1rem; }
  .hero__description { font-size: 1rem; }
  .hero__buttons { flex-direction: column; gap: 1rem; }
  .btn { padding: .8rem 1rem; font-size: .95rem; }
  
  /* Badges móvil */
  .badges { flex-wrap: wrap; gap: .5rem; }
  .badge { font-size: .8rem; padding: .4rem .8rem; }
  
  /* Cards móvil */
  .cards, .gallery { grid-template-columns: 1fr; gap: 1.5rem; }
  .card { padding: 1.5rem; }
  .card__title { font-size: 1.3rem; }
  
  /* Secciones móvil */
  .section { padding: 3rem 0; }
  .section-title { font-size: 2rem; }
  .section-subtitle { font-size: 1rem; }
  
  /* Portfolio móvil */
  .gallery-item { height: 280px; }
  .gallery-item__title { font-size: 1.1rem; }
  .gallery-item__description { font-size: .9rem; }
  
  /* Contacto móvil */
  .contact-form { padding: 1.5rem; margin: 1.5rem auto 0; }
  .form-group input,
  .form-group textarea { padding: .75rem .9rem; font-size: .95rem; }
  .contact-divider { margin: 1.5rem 0 1rem; }
  
  /* Footer móvil */
  .footer__grid { flex-direction: column; text-align: center; gap: 1rem; }
  .footer__links { margin-top: .5rem; }
  .footer__links a { margin: 0 .5rem; font-size: .9rem; }
  
  /* Modal móvil */
  .modal { padding: 1rem; }
  .modal-nav { width: 40px; height: 40px; font-size: 1.5rem; }
  .modal-prev { left: .5rem; }
  .modal-next { right: .5rem; }
  .modal-close { top: .5rem; right: .5rem; width: 35px; height: 35px; font-size: 2rem; }
  .modal-counter { bottom: .5rem; font-size: .8rem; padding: .4rem .8rem; }
  
  /* Botón scroll móvil */
  .scroll-top { bottom: 1rem; right: 1rem; width: 40px; height: 40px; font-size: 1rem; }
  
  /* Nota móvil */
  .note-content {
    flex-direction: column;
    text-align: center;
    gap: 1.2rem;
  }
  .note-icon svg {
    width: 100px;
    height: 100px;
  }
  .note {
    padding: 1.5rem;
  }
}

/* Móvil pequeño */
@media (max-width: 480px) {
  .hero__title { font-size: 1.8rem; }
  .hero__subtitle { font-size: 1rem; }
  .section-title { font-size: 1.8rem; }
  .card { padding: 1.2rem; }
  .gallery-item { height: 240px; }
  .container { padding: 0 1rem; }
}

/* Móvil muy pequeño */
@media (max-width: 375px) {
  .hero__title { font-size: 1.6rem; }
  .hero__subtitle { font-size: .9rem; }
  .section-title { font-size: 1.6rem; }
  .btn { padding: .7rem .9rem; font-size: .9rem; }
  .badge { font-size: .75rem; padding: .3rem .6rem; }
}

/* Optimizaciones para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
  .btn:active { transform: scale(0.95); }
  .card:active { transform: translateY(-2px); }
  .gallery-item:active { transform: scale(0.98); }
  .scroll-top { bottom: 1.5rem; right: 1.5rem; }
}

/* Prevención de zoom en inputs iOS */
.form-group input,
.form-group textarea {
  font-size: 16px; /* Previene zoom automático en iOS */
}

/* Mejoras de rendimiento */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Scroll suave en iOS */
html {
  -webkit-overflow-scrolling: touch;
}




