:root {
  /* Base */
  --bg-dark: #071a33; /* navy profundo */
  --bg-darker: #051226; /* más oscuro para secciones */
  --bg-light: #f7fafc;

  /* Marca (italmatch-like: azul + cyan) */
  --primary: #11b5e5; /* cyan brillante */
  --primary-2: #0b4aa2; /* azul corporativo */

  /* Acento cálido (líneas, badges, detalles) */
  --accent: #f2c94c; /* oro/amarillo suave */

  /* Texto */
  --text-dark: #0b1220;
  --text-muted: rgba(15, 23, 42, 0.72);
  --text-light: #f8fafc;

  /* UI */
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);

  /* Extras */
  --glass: rgba(7, 26, 51, 0.72);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif;
}

html,
body {
  background: var(--bg-light);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =========================
   HEADER / NAV (OSC URO)
   ========================= */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 0;
  transform: translateZ(0); /* evita glitches de composición */
}

/* Tapa la línea */
.header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: rgba(15, 23, 42, 0.88); /* mismo que .header--dark */
}

.header--dark {
  background: rgba(15, 23, 42, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header__content {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
}

.brand__logo {
  width: clamp(140px, 18vw, 220px);
  height: auto;
  display: block;

  /* nitidez y presencia */
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a:hover {
  color: white;
}

/* Botón Cotizar del navbar */
.nav__cta {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(14, 165, 233, 0.75);
  color: #e0f2fe;
  background: transparent;
  font-weight: 700;
}

.nav__cta:hover {
  background: rgba(14, 165, 233, 0.12);
  border-color: #38bdf8;
}

/* =========================
   HERO
   ========================= */
.hero {
  color: white;
  padding: 5rem 0 4rem;
  margin-top: -2px;
  background: radial-gradient(
      900px 520px at 18% 18%,
      rgba(17, 181, 229, 0.22),
      transparent 58%
    ),
    radial-gradient(
      700px 420px at 82% 22%,
      rgba(242, 201, 76, 0.1),
      transparent 60%
    ),
    linear-gradient(135deg, var(--bg-darker), var(--bg-dark));
}

header + .hero {
  margin-top: 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: start;
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

.hero__text h1 {
  margin: 1rem 0 1rem;
  font-size: 2.75rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: white;
}

.hero__text h1 span {
  color: var(--primary);
}

.hero__text p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.05rem;
}

.hero__actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =========================
   BUTTONS
   ========================= */
.btn {
  display: inline-block;
  padding: 0.85rem 1.45rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  transition: transform 120ms ease, opacity 120ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: white;
  border: none;
  box-shadow: 0 10px 24px rgba(17, 181, 229, 0.18);
}

.btn--secondary {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
  background: rgba(255, 255, 255, 0.04);
}

.btn--primary:hover {
  opacity: 0.92;
}

.btn--secondary:hover {
  border-color: white;
  opacity: 0.95;
}

/* =========================
   CARD
   ========================= */
.card {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.hero__card.card {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-dark);
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.hero__card h3 {
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: 0.35rem;
  color: var(--bg-darker);
}

.hero__card p {
  color: rgba(15, 23, 42, 0.7);
  margin-bottom: 1.25rem;
}

/* =========================
   FORMS
   ========================= */
.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 0.8rem 0.9rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: white;
  outline: none;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.form input::placeholder,
.form textarea::placeholder {
  color: rgba(15, 23, 42, 0.45);
}

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

/* =========================
   SECTIONS
   ========================= */
.section {
  padding: 5rem 0;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

.section--dark {
  background: var(--bg-dark);
  color: white;
}

.section--dark h2 {
  color: white;
}

/* =========================
   GRID CARDS (SOLUCIONES)
   ========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.grid .card {
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.grid .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.grid .card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.grid .card p {
  color: var(--text-muted);
}

/* =========================
   TAGS (SECTORES)
   ========================= */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tags span {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  font-size: 0.92rem;
}

/* =========================
   CONTACT
   ========================= */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact p {
  color: var(--text-muted);
}

.section#contacto .card {
  border: 1px solid rgba(15, 23, 42, 0.1);
}

/* =========================
   FOOTER
   ========================= */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.footer__content p {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  font-size: 0.92rem;
}

/* 1) Tablets / pantallas medianas */
@media (max-width: 900px) {
  .container {
    padding: 0 1.25rem;
  }

  .header__content {
    height: 72px;
  }

  .brand__logo {
    width: clamp(140px, 22vw, 200px);
  }

  .nav {
    gap: 0.9rem;
  }

  .nav a {
    font-size: 0.9rem;
  }

  .hero {
    padding: 4.25rem 0 3.25rem;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero__text h1 {
    font-size: 2.25rem;
  }

  .hero__text p {
    font-size: 1rem;
    max-width: 100%;
  }

  .hero__card {
    max-width: 640px;
  }
}

/* 2) Mobile grande: el header ya no da para menú completo */
@media (max-width: 768px) {
  .project__images {
    grid-template-columns: 1fr;
  }

  .header__content {
    height: 66px;
  }

  /* Logo más compacto */
  .brand__logo {
    width: clamp(120px, 38vw, 180px);
  }

  /* Por ahora: ocultar links, dejar solo el CTA */
  .nav a:not(.nav__cta) {
    display: none;
  }

  .nav {
    gap: 0.75rem;
  }

  .nav__cta {
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    border: 1.5px solid rgba(17, 181, 229, 0.7);
    color: #e6f8ff;
  }

  .nav__cta:hover {
    background: rgba(17, 181, 229, 0.12);
    border-color: rgba(17, 181, 229, 1);
  }

  /* Hero */
  .hero {
    padding: 3.75rem 0 3rem;
  }

  .hero__text h1 {
    font-size: 2.05rem;
    line-height: 1.12;
  }

  .hero__actions {
    gap: 0.75rem;
  }

  /* Botones más cómodos */
  .btn {
    padding: 0.85rem 1.15rem;
  }

  /* Card del formulario */
  .card {
    padding: 1.5rem;
  }

  /* Secciones */
  .section {
    padding: 4rem 0;
  }

  .section h2 {
    font-size: 1.65rem;
    margin-bottom: 1.5rem;
  }

  /* Contact: columna */
  .contact {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* 3) Mobile pequeño (iPhone SE / 360-390px) */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .header__content {
    height: 62px;
  }

  .brand__logo {
    width: clamp(110px, 44vw, 165px);
  }

  /* Badge y textos */
  .badge {
    font-size: 0.78rem;
    padding: 0.4rem 0.75rem;
  }

  .hero__text h1 {
    font-size: 1.85rem;
  }

  .hero__text p {
    font-size: 0.98rem;
  }

  /* Botones full width para que no se aprieten */
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  /* Inputs más cómodos en móvil */
  .form input,
  .form textarea,
  .form select {
    padding: 0.8rem 0.85rem;
    border-radius: 12px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .tags {
    gap: 0.5rem;
  }

  .tags span {
    padding: 0.45rem 0.85rem;
    font-size: 0.9rem;
  }
}

/* 4) Ultra pequeño (por si acaso) */
@media (max-width: 360px) {
  .brand__logo {
    width: 120px;
  }

  .nav__cta {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  .hero__text h1 {
    font-size: 1.7rem;
  }
}

.header {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.hero {
  margin-top: -2px;
}
/* =========================
   UI: Toast + Validación
   ========================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(255, 255, 255, 0.92);
  color: #0b1220;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  gap: 10px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 9999;
  max-width: min(520px, calc(100vw - 24px));
}

.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast__title {
  font-weight: 900;
}

.toast__text {
  color: rgba(11, 18, 32, 0.72);
  font-weight: 700;
}

/* Inputs inválidos */
.is-invalid {
  border-color: rgba(239, 68, 68, 0.75) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.contact__actions{
  display:flex;
  gap:0.75rem;
  flex-wrap:wrap;
  margin-top:1rem;
}

.contact__channel{
  display:flex;
  gap:1rem;
  align-items:center;
  margin:0.25rem 0 1rem;
  color:rgba(15,23,42,0.72);
  font-weight:700;
}

.section--dark .contact__channel{
  color:rgba(255,255,255,0.85);
}

.contact__channel input{
  transform: translateY(1px);
}

.section__subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 700px;
}

.project__images figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 600;
}

.project__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}


.project__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.project__images figure {
  margin: 0;
}

.project__images img {
  width: 100%;
  height: 260px;          /* 🔥 MISMO ALTO */
  object-fit: cover;     /* recorta sin deformar */
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f3f4f6;
}


