/* ============================
   VARIABLES DE COLOR Y ESTILO
   ============================ */
:root {
  --blue: #2563eb;            /* Azul eléctrico */
  --blue-dark: #1e40af;       /* Azul profundo */
  --bg: #0b1020;              /* Fondo tecnológico */
  --bg-2: #0d1325;            /* Fondo degradado */
  --gray: #111827;            /* Gris metálico profundo */
  --gray-light: #9ca3af;      /* Gris claro */
  --orange: #f97316;          /* Acento naranja */
  --text: #e5e7eb;            /* Texto principal */
  --muted: #9ca3af;           /* Texto secundario */
  --card: #131a2e;            /* Tarjetas */
  --border: #1f2937;          /* Bordes */
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* ============================
   RESET Y BASE
   ============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* evita desbordamiento horizontal */
}

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 2rem 0;
}

/* ============================
   HEADER / NAV
   ============================ */
.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(11, 16, 32, 0.75);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo-img {
  width: 32px;
  height: 32px;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-menu a {
  color: var(--text);
  text-decoration: none;
  padding: .6rem .9rem;
  border-radius: 8px;
  transition: 0.2s ease;
}

.nav-menu a:hover {
  background: #0f1730;
}

.nav-toggle {
  display: none; /* oculto en escritorio */
}

/* ============================
   HERO
   ============================ */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 2rem;
  padding: 4rem 0 2rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
}

.hero p {
  margin: 1rem 0 2rem;
  color: var(--muted);
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(37,99,235,0.25), transparent 70%);
  filter: blur(40px);
  z-index: -1;
}

/* ============================
   BOTONES
   ============================ */
.btn {
  display: inline-block;
  padding: .8rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .1s ease, background .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--blue);
  color: white;
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: #0f1730;
}

/* ============================
   SECCIONES
   ============================ */
.section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

/* ============================
   GRID
   ============================ */
.grid {
  display: grid;
  gap: 1.5rem;
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.value-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.portfolio-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ============================
   CARDS
   ============================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  position: relative;
}

.card .icon {
  width: 36px;
  height: 36px;
  margin-bottom: .6rem;
}

/* ============================
   LISTAS
   ============================ */
.list {
  margin-top: .8rem;
  padding-left: 1rem;
  color: var(--muted);
}

/* ============================
   CONTACTO
   ============================ */
.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 680px;
}

.form-group {
  display: grid;
  gap: .5rem;
}

input, textarea {
  background: #0e162d;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: .8rem 1rem;
  font-size: 1rem;
}

input:focus, textarea:focus {
  outline: 2px solid var(--blue);
}

.form-actions {
  display: flex;
  gap: .8rem;
}

.form-status {
  color: var(--orange);
  font-weight: 600;
  min-height: 1.2rem;
}

/* ============================
   FOOTER
   ============================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
}

/* ============================
   PORTAFOLIO IMÁGENES
   ============================ */
.portfolio-grid img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.portfolio-grid figure {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}

.portfolio-grid figure img {
  transition: transform 0.3s ease;
}

.portfolio-grid figure:hover img {
  transform: scale(1.05);
}

.portfolio-grid figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(11, 16, 32, 0.85);
  color: var(--text);
  padding: 1rem;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-grid figure:hover figcaption {
  opacity: 1;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    background: var(--card);
    position: absolute;
    top: 60px;
    right: 20px;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
    width: 40px;
    height: 40px;
    background: url('../assets/icons/menu.svg') no-repeat center/24px;
    border: none;
    cursor: pointer;
  }

  /* Portafolio en móviles: una sola columna */
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid img {
    width: 100%;
    height: auto;
  }
}

