/* ==========================================================
   Talkeatin Servicios — Sistema de diseño
   Estructura inspirada en huawei.com/es: limpio, claro, minimalista,
   barra de segmentos, mega menú, carrusel, mosaicos y tarjetas.
   Identidad propia: acento magenta + cian/amarillo (CMYK).
   ========================================================== */

:root {
  --bg: #fff;
  --bg-soft: #f5f5f7;
  --ink: #000;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5ea;

  --accent: #e6007e;
  --cyan: #00a9d6;
  --yellow: #ffc800;
  --grad: linear-gradient(110deg, var(--cyan), var(--accent) 60%, var(--yellow));

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1400px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --section: clamp(3.5rem, 7vw, 6.5rem);
  --radius: 16px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 1rem/1.6 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }

.container { width: min(100% - 2*var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: var(--section); }
.section--soft { background: var(--bg-soft); }
.section-title { font-size: clamp(1.7rem, 2.6vw + .5rem, 2.75rem); text-align: center; margin-bottom: 2.5rem; }
.section-title small { display: block; font-size: 1rem; font-weight: 400; color: var(--muted); margin-top: .6rem; letter-spacing: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

/* ---------- Botones / enlaces ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.8rem; border-radius: 999px; font-weight: 600; background: var(--accent); color: #fff; border: 1.5px solid var(--accent); transition: .2s; }
.btn:hover { background: #c4006b; border-color: #c4006b; }
.btn--outline { background: transparent; color: inherit; border-color: currentColor; }
.btn--outline:hover { background: #fff; color: #000; border-color: #fff; }
.btn--dark { background: #000; border-color: #000; }
.btn--dark:hover { background: #333; border-color: #333; }
.more { color: var(--accent); font-weight: 600; }
.more::after { content: " ›"; transition: margin .2s; }
.more:hover::after { margin-left: 4px; }

/* ---------- Header ---------- */
.topbar { background: var(--bg-soft); border-bottom: 1px solid var(--line); font-size: .8rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 36px; color: var(--muted); }
.topbar a:hover { color: var(--accent); }
.topbar__right { display: flex; gap: 1.4rem; }

.segments { background: #fff; border-bottom: 1px solid var(--line); }
.segments .container { display: flex; gap: 2rem; overflow-x: auto; scrollbar-width: none; }
.segments a { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 0; font-size: .9rem; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.segments a:hover, .segments a.is-active { color: var(--ink); border-color: var(--accent); }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 2.5rem; min-height: var(--header-h); }
.logo img { height: 36px; width: auto; }
.nav__links { display: flex; gap: .4rem; flex: 1; }
.nav__links > li > a { display: block; padding: 1.3rem .9rem; font-weight: 500; font-size: .95rem; }
.nav__links > li:hover > a, .nav__links > li > a[aria-current="page"] { color: var(--accent); }
.nav__actions { display: flex; align-items: center; gap: 1.2rem; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: none; border: 0; font-size: 1.15rem; }
.icon-btn:hover { background: var(--bg-soft); }
.cart-count { font-size: .85rem; font-weight: 600; }
.nav-toggle { display: none; }

/* Mega menú */
.has-mega { position: static; }
.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 40px -30px rgba(0, 0, 0, .2);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .2s;
}
.has-mega:hover .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega .container { display: grid; grid-template-columns: repeat(2, 1fr) 1.2fr; gap: 2rem; padding-block: 2rem; }
.mega h4 { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin-bottom: .8rem; }
.mega li a { display: block; padding: .35rem 0; font-weight: 500; }
.mega li a:hover { color: var(--accent); }
.mega__feat { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16/10; }
.mega__feat img { width: 100%; height: 100%; object-fit: cover; }
.mega__feat span { position: absolute; left: 1rem; bottom: .8rem; color: #fff; font-weight: 600; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }

@media (max-width: 960px) {
  .nav { gap: 1rem; justify-content: space-between; }
  .nav-toggle { display: grid; }
  .nav__links {
    position: absolute; inset: 100% 0 auto 0; flex-direction: column; gap: 0; background: #fff;
    padding: .5rem var(--gutter) 1.5rem; border-bottom: 1px solid var(--line); display: none; max-height: 80vh; overflow: auto;
  }
  .nav__links.open { display: flex; }
  .nav__links > li > a { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .mega { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; }
  .mega .container { grid-template-columns: 1fr; padding: .5rem 0 0 1rem; width: 100%; gap: .5rem; }
  .mega__feat, .mega h4 { display: none; }
  .topbar__right .hide-sm { display: none; }
}

/* ---------- Carrusel hero ---------- */
.carousel { position: relative; background: #000; color: #fff; overflow: hidden; }
.slides { display: flex; transition: transform .7s cubic-bezier(.65, 0, .35, 1); }
.slide { position: relative; flex: 0 0 100%; min-height: clamp(460px, 62vh, 680px); display: grid; align-items: center; isolation: isolate; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.slide::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, .15) 70%); }
.slide__body { padding-block: 3rem; max-width: 620px; display: grid; gap: 1.1rem; justify-items: start; }
.slide__tag { font-size: .85rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.slide h1, .slide h2 { color: #fff; font-size: clamp(2.2rem, 4.5vw + .5rem, 4.5rem); }
.slide p { font-size: 1.15rem; color: rgba(255, 255, 255, .85); max-width: 480px; }
.slide .btns { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: .6rem; }
.carousel__ctrl { position: absolute; bottom: 1.5rem; left: 0; right: 0; z-index: 5; }
.carousel__ctrl .container { display: flex; align-items: center; justify-content: space-between; }
.dots { display: flex; gap: .6rem; }
.dots button { width: 36px; height: 4px; border: 0; border-radius: 2px; background: rgba(255, 255, 255, .35); padding: 0; position: relative; overflow: hidden; }
.dots button.on::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: fill 6s linear forwards; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.arrows { display: flex; gap: .5rem; }
.arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); background: rgba(0, 0, 0, .3); color: #fff; font-size: 1.2rem; }
.arrows button:hover { background: #fff; color: #000; }

/* ---------- Mosaicos de iconos ---------- */
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.tile { display: grid; justify-items: center; gap: .9rem; padding: 2rem 1rem; background: var(--bg-soft); border-radius: var(--radius); text-align: center; font-weight: 600; transition: .25s; }
.tile:hover { background: #fff; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .2); transform: translateY(-4px); }
.tile__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; background: #fff; }
.tile:hover .tile__icon { background: var(--bg-soft); }
.tile small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Tarjetas de producto ---------- */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.product { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; text-align: center; transition: .3s; }
.product:hover { box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .25); transform: translateY(-4px); }
.product__img { aspect-ratio: 1; overflow: hidden; background: #ececf0; }
.product__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.product:hover .product__img img { transform: scale(1.06); }
.product__body { padding: 1.4rem 1.2rem 1.8rem; display: grid; gap: .4rem; justify-items: center; }
.product h3 { font-size: 1.2rem; }
.product p { color: var(--muted); font-size: .92rem; }
.product .more { margin-top: .6rem; font-size: .95rem; }
@media (max-width: 1100px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .products { grid-template-columns: 1fr; } }

/* ---------- Banners divididos (servicios) ---------- */
.banners { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.banner { position: relative; min-height: 480px; border-radius: var(--radius); overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; padding: 2.5rem; }
.banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s; }
.banner:hover > img { transform: scale(1.05); }
.banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 20%, rgba(0, 0, 0, .8)); }
.banner h3 { color: #fff; font-size: 2rem; margin-bottom: .5rem; }
.banner p { color: rgba(255, 255, 255, .85); max-width: 440px; margin-bottom: 1.2rem; }
.banner .btn { align-self: flex-start; }
@media (max-width: 760px) { .banners { grid-template-columns: 1fr; } .banner { min-height: 380px; } }

/* ---------- Cómo funciona ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: s; }
.step { counter-increment: s; border-top: 3px solid var(--ink); padding-top: 1.2rem; }
.step::before { content: "0" counter(s); display: block; font-weight: 800; font-size: 1.1rem; color: var(--accent); margin-bottom: .6rem; }
.step h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Galería / noticias ---------- */
.news-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.news-head h2 { font-size: clamp(1.7rem, 2.6vw + .5rem, 2.5rem); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 260px; gap: 1rem; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); }
.gallery figure:first-child { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption { position: absolute; inset: auto 0 0; padding: 2rem 1.2rem 1rem; color: #fff; font-weight: 600; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
@media (max-width: 800px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; } .gallery figure:first-child { grid-column: span 2; grid-row: span 1; } }

/* ---------- Declaración de marca ---------- */
.statement { text-align: center; max-width: 900px; margin-inline: auto; display: grid; gap: 1.5rem; justify-items: center; }
.statement h2 { font-size: clamp(2.2rem, 4.5vw + .5rem, 4.2rem); }
.statement h2 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.statement p { color: var(--muted); font-size: 1.15rem; max-width: 640px; }
.statement blockquote { margin: 1rem 0 0; padding: 1.8rem; background: var(--bg-soft); border-radius: var(--radius); font-size: 1.05rem; }
.statement cite { display: block; margin-top: .8rem; font-style: normal; font-weight: 600; font-size: .9rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding-block: 3rem 1.5rem; font-size: .9rem; color: var(--muted); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
.footer__grid h4 { font-size: .85rem; color: var(--ink); margin-bottom: .8rem; }
.footer__grid li { margin-bottom: .45rem; }
.footer__grid a:hover { color: var(--accent); }
.footer__grid address { font-style: normal; }
.footer__brand img { height: 34px; width: auto; margin-bottom: 1rem; }
.footer__bottom { border-top: 1px solid var(--line); padding-top: 1.2rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem 2rem; }
.footer__bottom ul { display: flex; gap: 1.5rem; flex-wrap: wrap; }
@media (max-width: 700px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================
   Páginas internas
   ========================================================== */
.page-hero { position: relative; isolation: isolate; color: #fff; background: #000; overflow: hidden; }
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .75; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0,0,0,.8), rgba(0,0,0,.2)); }
.page-hero .container { padding-block: clamp(3.5rem, 9vw, 7rem); display: grid; gap: 1rem; justify-items: start; }
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 4.5vw + .5rem, 4rem); max-width: 760px; }
.page-hero p { color: rgba(255,255,255,.85); font-size: 1.15rem; max-width: 560px; }
.page-hero--plain { background: var(--bg-soft); color: var(--ink); }
.page-hero--plain::before { display: none; }
.page-hero--plain h1 { color: var(--ink); }
.page-hero--plain p { color: var(--muted); }
.crumbs { font-size: .85rem; opacity: .8; }
.crumbs a:hover { text-decoration: underline; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split h2 { font-size: clamp(1.7rem, 2.6vw + .5rem, 2.6rem); margin-bottom: 1rem; }
.split p { color: var(--muted); margin-bottom: 1rem; }
.split img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.split--rev > :first-child { order: 2; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split--rev > :first-child { order: 0; } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.feature { background: #fff; border-radius: var(--radius); padding: 2rem; border: 1px solid var(--line); }
.section--soft .feature { border: 0; }
.feature .ico { font-size: 2rem; margin-bottom: .8rem; }
.feature h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.feature p { color: var(--muted); font-size: .95rem; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }

.cta-band { background: #000; color: #fff; border-radius: var(--radius); padding: clamp(2rem, 5vw, 4rem); display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 2.4vw + .5rem, 2.3rem); max-width: 600px; }

.prose { max-width: 780px; margin-inline: auto; }
.prose h2 { font-size: 1.5rem; margin: 2.2rem 0 .7rem; }
.prose p, .prose li { color: #3a3a3f; margin-bottom: .9rem; }
.prose ul { list-style: disc; padding-left: 1.4rem; }
.notice { background: #fff8e1; border: 1px solid #ffe08a; border-radius: 12px; padding: 1rem 1.2rem; font-size: .92rem; margin-bottom: 2rem; }

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2rem; }
.pill { padding: .55rem 1.2rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 500; font-size: .92rem; }
.pill:hover, .pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.product .btn { margin-top: .8rem; padding: .55rem 1.3rem; font-size: .9rem; }

.empty { text-align: center; max-width: 520px; margin-inline: auto; display: grid; gap: 1rem; justify-items: center; }
.empty .big { font-size: 4rem; }
.empty p { color: var(--muted); }

.form-card { max-width: 460px; margin-inline: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem; box-shadow: 0 20px 50px -30px rgba(0,0,0,.3); }
.form-card h2 { font-size: 1.6rem; margin-bottom: 1.4rem; }
.field { display: grid; gap: .35rem; margin-bottom: 1.1rem; }
.field label { font-weight: 600; font-size: .9rem; }
.field input { padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; }
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(230,0,126,.15); }
.form-card .btn { width: 100%; justify-content: center; }
.form-card small { display: block; text-align: center; margin-top: 1rem; color: var(--muted); }
.form-msg { margin-top: 1rem; font-size: .9rem; color: var(--accent); text-align: center; min-height: 1.2em; }
[hidden] { display: none !important; }
.field textarea { padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; } .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(230,0,126,.15); }

/* Cotizar */
.quote-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.quote-grid .form-card { margin: 0; width: 100%; max-width: none; }
.quote-info { display: grid; gap: 1.4rem; }
.quote-info h2 { font-size: clamp(1.7rem, 2.6vw + .5rem, 2.6rem); }
.quote-info > p { color: var(--muted); font-size: 1.1rem; }
.checks { display: grid; gap: .6rem; }
.checks li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: .6rem; }
.info-box { background: var(--bg-soft); border-radius: var(--radius); padding: 1.5rem; }
.info-box h3 { font-size: 1.05rem; margin-bottom: .6rem; }
.info-box ol { padding-left: 1.2rem; display: grid; gap: .4rem; color: #3a3a3f; }
.info-box p { color: #3a3a3f; }
@media (max-width: 680px) { .quote-grid { grid-template-columns: 1fr; } }
.quote-info { text-align: left; justify-items: start; }

/* Ajustes móvil */
.btn--sm { padding: .5rem 1.1rem; font-size: .9rem; }
@media (max-width: 560px) {
  .tiles .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .nav { gap: .6rem; }
  .logo img { height: 30px; }
  .slide { min-height: 520px; }
  .slide__body { padding-bottom: 5.5rem; }
  .banner { padding: 1.6rem; }
}

/* Catálogo */
.product__img--contain { background: #fff; padding: 1.2rem; border-bottom: 1px solid var(--line); }
.product__img--contain img { object-fit: contain; }
.product__tag { font-size: .78rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.product .price { color: var(--ink); font-size: 1rem; } .product .price strong { font-size: 1.35rem; }
.price-note { margin-top: 1.5rem; text-align: center; color: var(--muted); font-size: .9rem; }
