/* =========================================================
   Equipo Medios — estilos del sitio principal
   Misma identidad que el blog: navy + celeste, Space Grotesk + Inter
   ========================================================= */

/* ---------- Tipografías (alojadas en /fonts, sin depender de Google) ---------- */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url('../fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-display: swap; src: url('../fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('../fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }

:root {
  --ink: #0f1c2e;
  --ink-2: #253447;
  --muted: #5b6b7f;
  --bg: #f4f6fa;
  --card: #ffffff;
  --line: #e3e8ef;
  --brand: #1f9be0;
  --brand-2: #2bb0f0;
  --brand-dark: #0b6fb0;
  --night: #0b1626;
  --night-2: #102a44;
  --wa: #25d366;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15,28,46,.06), 0 8px 24px rgba(15,28,46,.06);
  --shadow-lg: 0 2px 4px rgba(15,28,46,.08), 0 20px 48px rgba(15,28,46,.14);
  --wrap: 1180px;
  --head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); }
h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 0;
  font: 600 1rem/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 20px rgba(31,155,224,.35); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-wa { background: var(--wa); color: #06361a; box-shadow: 0 6px 20px rgba(37,211,102,.3); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.22); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1b2d45; }

/* ---------- Encabezado ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 42px; height: 42px; }
.brand b { font: 700 1.2rem/1 var(--head); color: var(--ink); letter-spacing: -0.02em; }
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 12px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.nav a:hover { background: #eef4fa; color: var(--brand-dark); }
.header .btn { padding: 11px 18px; font-size: .95rem; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.menu-btn svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #cfe0f1;
  background:
    radial-gradient(1000px 420px at 88% -10%, rgba(31,155,224,.45), transparent 60%),
    radial-gradient(700px 360px at -5% 115%, rgba(31,155,224,.22), transparent 60%),
    linear-gradient(135deg, var(--night) 0%, var(--night-2) 100%);
}
.hero::after { /* grilla sutil de fondo */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 96px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; margin-bottom: 22px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  font-size: .85rem; font-weight: 500; color: #bfe3fa;
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 4px rgba(37,211,102,.2); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
.hero h1 em { font-style: normal; color: var(--brand-2); }
.hero .lead { margin-top: 20px; font-size: 1.18rem; max-width: 36em; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero .trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 34px; font-size: .92rem; color: #9fb8cf; }
.hero .trust span::before { content: "✓"; color: var(--brand-2); font-weight: 700; margin-right: 8px; }

/* Calculadora */
.calc {
  background: #fff; color: var(--ink-2);
  border-radius: 20px; padding: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.calc h2 { font-size: 1.35rem; }
.calc > p { margin-top: 6px; font-size: .95rem; color: var(--muted); }
.calc form { margin-top: 18px; display: grid; gap: 14px; }
.field label { display: flex; justify-content: space-between; font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field output { color: var(--brand-dark); font-weight: 600; }
.field input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px; margin: 8px 0;
  background: linear-gradient(90deg, var(--brand) var(--p, 30%), #dfe7f0 var(--p, 30%));
}
.field input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); box-shadow: 0 2px 6px rgba(15,28,46,.2); cursor: pointer; }
.field input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); cursor: pointer; }
.calc-result {
  margin-top: 6px; padding: 18px; border-radius: 14px;
  background: linear-gradient(135deg, #e9f6fd, #f3faff);
  border: 1px solid #cfe9f8;
}
.calc-result small { display: block; font-size: .82rem; color: var(--muted); }
.calc-result strong { display: block; margin-top: 2px; font: 700 2.1rem/1.1 var(--head); color: var(--ink); }
.calc-result span { display: block; margin-top: 4px; font-size: .85rem; color: var(--muted); }
.calc .btn { width: 100%; margin-top: 4px; }
.calc .note { margin-top: 10px; font-size: .78rem; color: var(--muted); text-align: center; }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { display: inline-block; margin-bottom: 12px; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-dark); }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.section-head p { margin-top: 14px; font-size: 1.1rem; color: var(--muted); }

/* Servicios */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service {
  position: relative; display: flex; flex-direction: column;
  padding: 32px 28px 28px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow);
}
.service.featured { border-color: #bfe3f7; box-shadow: 0 0 0 4px rgba(31,155,224,.08), var(--shadow); }
.service .tag { position: absolute; top: 20px; right: 20px; padding: 4px 10px; border-radius: 999px; background: #e6f6fd; color: var(--brand-dark); font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.icon {
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand-dark));
  color: #fff; margin-bottom: 22px;
}
.icon svg { width: 26px; height: 26px; }
.service h3 { font-size: 1.4rem; }
.service > p { margin-top: 10px; color: var(--muted); }
.service ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.service li { position: relative; padding-left: 26px; font-size: .95rem; }
.service li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 14px; border-radius: 50%; background: #e6f6fd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230b6fb0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat; }
.service .more { margin-top: auto; padding-top: 24px; font-weight: 600; text-decoration: none; }
.service .more:hover { text-decoration: underline; }

/* IA */
.ai-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ai-item { padding: 26px 24px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); }
.ai-item .icon { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px; }
.ai-item .icon svg { width: 22px; height: 22px; }
.ai-item h3 { font-size: 1.12rem; }
.ai-item p { margin-top: 8px; font-size: .95rem; color: var(--muted); }

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: paso; }
.step { position: relative; padding: 28px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.step::before { counter-increment: paso; content: "0" counter(paso); display: block; font: 700 1rem/1 var(--head); color: var(--brand); margin-bottom: 14px; }
.step h3 { font-size: 1.15rem; }
.step p { margin-top: 8px; font-size: .95rem; color: var(--muted); }

/* Proyectos */
.projects { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
/* fila 1: las 2 tiendas online grandes · fila 2: 3 sitios · fila 3: 2 sitios */
.projects > .project { grid-column: span 2; }
.projects > .project:nth-child(1), .projects > .project:nth-child(2),
.projects > .project:nth-child(6), .projects > .project:nth-child(7) { grid-column: span 3; }
.projects img { color: transparent; } /* si falta una imagen, no se ve el texto alternativo encima */
.project {
  display: block; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project .shot { aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, #dbe7f3, #eef4fa); }
.project .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s ease; }
.project:hover .shot img { transform: scale(1.04); }
.project .info { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.project h3 { font-size: 1.05rem; }
.project small { display: block; color: var(--muted); font-size: .85rem; }
.project .badge { flex: none; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: #eef2f7; color: #3b4b60; }
.project .badge.shop { background: #e8f8ee; color: #137a3a; }

/* Blog: notas destacadas */
.blog-grid { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: auto auto; gap: 24px; }
.post {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post .thumb { aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #dbe7f3, #eef4fa); }
.post .thumb img { width: 100%; height: 100%; object-fit: cover; color: transparent; }
.post .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post .cat { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: #e6f6fd; color: var(--brand-dark); font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.post h3 { font-size: 1.15rem; line-height: 1.3; }
.post p { font-size: .95rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post time { margin-top: auto; font-size: .82rem; color: var(--muted); }
.post.main { grid-row: 1 / span 2; }
.post.main .thumb { aspect-ratio: 16 / 10; }
.post.main h3 { font-size: 1.6rem; }
.post.side { flex-direction: row; }
.post.side .thumb { flex: 0 0 42%; aspect-ratio: auto; }
.post.side p { -webkit-line-clamp: 2; }
.blog-cta { display: flex; justify-content: center; margin-top: 40px; }

/* Empresa */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about .quote { padding: 36px; border-radius: 22px; color: #d8e8f6; background: linear-gradient(135deg, var(--night), var(--night-2)); }
.about .quote h3 { color: #fff; font-size: 1.1rem; }
.about .quote p { margin-top: 8px; font-size: 1.15rem; }
.about .quote p + h3 { margin-top: 26px; }
.about .text p + p { margin-top: 14px; }

/* Contacto */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.channels { display: grid; gap: 14px; margin-top: 28px; }
.channel {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
}
.channel .icon { width: 44px; height: 44px; margin: 0; border-radius: 12px; }
.channel .icon.wa { background: var(--wa); color: #06361a; }
.channel small { display: block; color: var(--muted); font-size: .82rem; }
.channel b { font-weight: 600; }
.form { padding: 32px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.form h3 { font-size: 1.35rem; margin-bottom: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: block; margin-bottom: 14px; font-size: .88rem; font-weight: 600; color: var(--ink); }
.form input, .form select, .form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #f8fafc;
  font: 400 1rem/1.4 var(--body); color: var(--ink);
}
.form textarea { min-height: 130px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(31,155,224,.18); }
.form .hp { position: absolute; left: -9999px; }
.form .btn { width: 100%; margin-top: 4px; }
.form .legal { margin-top: 12px; font-size: .8rem; color: var(--muted); text-align: center; }
.form-msg { display: none; margin-bottom: 16px; padding: 12px 14px; border-radius: 10px; font-size: .95rem; }
.form-msg.ok { display: block; background: #e8f8ee; color: #137a3a; }
.form-msg.err { display: block; background: #fdecec; color: #b42318; }

/* ---------- Pie ---------- */
.footer { background: var(--night); color: #9fb3c8; padding: 64px 0 28px; font-size: .95rem; }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; }
.footer .brand b { color: #fff; }
.footer p { margin-top: 14px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { color: #cfe0f1; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer .news { display: flex; gap: 8px; margin-top: 12px; }
.footer .news input { flex: 1; min-width: 0; padding: 11px 12px; border-radius: 10px; border: 1px solid #23364f; background: #0f2036; color: #fff; font: inherit; }
.footer .news .btn { padding: 11px 16px; }
.footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 22px; border-top: 1px solid #1c2e45; font-size: .85rem; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: #fff; box-shadow: 0 10px 30px rgba(37,211,102,.45);
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 32px; height: 32px; }

/* Aparición suave al hacer scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; padding-top: 64px; padding-bottom: 72px; }
  .calc { max-width: 560px; }
  .ai-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: 1fr; max-width: 640px; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav, .header .btn { display: none; }
  .menu-btn { display: block; }
  .header.open .nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 72px; left: 0; right: 0;
    padding: 10px 16px 18px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .header.open .nav a { padding: 14px 12px; border-bottom: 1px solid var(--line); }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .projects > .project, .projects > .project:nth-child(n) { grid-column: auto; }
  .blog-grid { grid-template-columns: 1fr; }
  .post.main { grid-row: auto; }
  .about, .contact { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .hero .ctas .btn { width: 100%; }
  .calc { padding: 22px; }
  .ai-grid, .steps, .projects { grid-template-columns: 1fr; }
  .post.side { flex-direction: column; }
  .post.side .thumb { aspect-ratio: 16 / 9; }
  .form { padding: 22px; }
  .form .row { grid-template-columns: 1fr; gap: 0; }
  .footer .cols { grid-template-columns: 1fr; gap: 28px; }
  .footer .news { flex-direction: column; }
  .wa-float { width: 54px; height: 54px; right: 14px; bottom: 14px; }
}
