/* =============================================================
   Euroceramica — hoja de estilos única
   1. Tokens  2. Reset  3. Utilidades  4. Tipografía  5. Componentes
   6. Secciones  7. Efectos  8. Responsive  9. Reduced-motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:          #f7f6f3;
  --paper:       #ffffff;
  --ink:         #15161b;
  --ink-soft:    #4a4d55;
  --ink-mute:    #82858d;
  --line:        rgba(21, 22, 27, 0.1);
  --line-soft:   rgba(21, 22, 27, 0.06);

  --red:         #c4122f;
  --red-dark:    #8f0d22;
  --red-bright:  #e51c3e;
  --red-tint:    #fdeced;
  --graphite:    #16171c;
  --graphite-2:  #1f2027;
  --cream:       #f4ede4;
  --green:       #2f7a52;
  --green-tint:  #eaf4ee;

  --glass:       rgba(255, 255, 255, 0.62);
  --glass-brd:   rgba(255, 255, 255, 0.55);
  --glass-dark:  rgba(22, 23, 28, 0.55);
  --glass-dark-brd: rgba(244, 237, 228, 0.14);

  --display: "Manrope", "Segoe UI", sans-serif;
  --sans:    "Inter", "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", "Consolas", monospace;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --container: 1320px;
  --nav-h: 84px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; font-family: var(--display); }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
input, textarea, select { font: inherit; color: inherit; }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.1rem; background: var(--ink); color: #fff;
  z-index: 9999; border-radius: 8px; font-weight: 600; font-size: .9rem;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilidades
   ============================================================= */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.section { padding-block: clamp(4rem, 9vw, 8rem); position: relative; }
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); font-weight: 500; display: inline-flex; align-items: center; gap: .5em;
  margin-bottom: .9em;
}
.kicker::before { content: ""; width: 1.6em; height: 2px; background: var(--red); display: inline-block; }
.section-title { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 800; }
.section-title em { color: var(--red); font-style: normal; }
.section-sub { color: var(--ink-soft); font-size: 1.05rem; margin-top: 1rem; max-width: 56ch; }
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* =============================================================
   4. Tipografía
   ============================================================= */
h1 { font-weight: 800; }
h2, h3 { font-weight: 700; }

/* =============================================================
   5. Componentes
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .95rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: .96rem;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), background .3s var(--ease-out), color .3s var(--ease-out);
  white-space: nowrap;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 14px 30px -12px rgba(196, 18, 47, 0.55); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(196, 18, 47, 0.6); }
.btn-ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--red); transform: translateY(-2px); }
.btn-sm { padding: .7rem 1.2rem; font-size: .88rem; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.badge {
  display: inline-flex; align-items: center; gap: .5em; font-family: var(--mono); font-size: .74rem;
  letter-spacing: .06em; text-transform: uppercase; padding: .4em .9em; border-radius: 999px;
  background: var(--red-tint); color: var(--red-dark); font-weight: 600;
}
.badge.green { background: var(--green-tint); color: var(--green); }
.badge.demo { background: rgba(21,22,27,.08); color: var(--ink-soft); }

.glass-card {
  background: rgba(255,255,255,0.86);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -34px rgba(21,22,27,.25);
}
@supports (backdrop-filter: blur(18px)) {
  .glass-card { background: var(--glass); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); }
}
.glass-card-dark {
  background: rgba(22,23,28,0.72);
  border: 1px solid var(--glass-dark-brd);
  border-radius: var(--radius-lg);
  color: var(--cream);
}
@supports (backdrop-filter: blur(18px)) {
  .glass-card-dark { background: var(--glass-dark); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); }
}

.avatar-initials {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 1rem; color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-dark)); flex-shrink: 0;
}
.stars { color: var(--red); letter-spacing: .12em; font-size: .95rem; }

/* =============================================================
   6. Secciones
   ============================================================= */

/* --- Nav --- */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 500; height: var(--nav-h);
  display: flex; align-items: center; transition: background .4s var(--ease-out), box-shadow .4s var(--ease-out), height .4s var(--ease-out), border-color .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-nav.is-scrolled {
  height: 68px; background: rgba(247,246,243,0.86); border-color: var(--line);
  box-shadow: 0 12px 30px -20px rgba(21,22,27,.35);
}
@supports (backdrop-filter: blur(14px)) {
  .site-nav.is-scrolled { backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); }
}
.nav-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .6em; font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%; background: var(--red);
  display: grid; place-items: center; overflow: hidden; flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.nav-links { display: flex; align-items: center; gap: 2.1rem; }
.nav-links a {
  position: relative; font-size: .93rem; font-weight: 500; color: var(--ink-soft); padding-block: .3rem;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--red);
  transition: right .4s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }
.nav-cta { display: flex; align-items: center; gap: .8rem; }
.nav-burger { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); place-items: center; }
.nav-burger span, .nav-burger::before, .nav-burger::after { content: ""; display: block; width: 18px; height: 2px; background: var(--ink); margin: 4px auto; transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 600; background: var(--bg);
  display: flex; flex-direction: column; padding: 100px var(--gutter) 2rem;
  transform: translateY(-100%); transition: transform .5s var(--ease-out);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu a { font-family: var(--display); font-size: 1.7rem; font-weight: 700; padding-block: .55rem; border-bottom: 1px solid var(--line); }
.mobile-menu-close { position: absolute; top: 24px; right: var(--gutter); width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; }

/* --- Hero --- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  padding-top: calc(var(--nav-h) + 2rem); overflow: clip;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 32%; }
.hero-bg-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,10,10,.72) 0%, rgba(20,10,12,.5) 38%, rgba(20,10,12,.72) 78%, rgba(10,6,7,.92) 100%),
    linear-gradient(100deg, rgba(140,10,25,.42) 0%, transparent 55%);
}
.hero-mesh {
  position: absolute; inset: -10%; z-index: 1; pointer-events: none; mix-blend-mode: screen; opacity: .55;
  background:
    radial-gradient(38% 32% at 18% 22%, rgba(229,28,62,.55), transparent 60%),
    radial-gradient(30% 26% at 82% 12%, rgba(244,237,228,.28), transparent 62%);
  filter: blur(60px);
  animation: meshDrift 22s ease-in-out infinite;
}
@keyframes meshDrift {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(2%, -3%, 0) scale(1.08); }
}
.hero-grain {
  position: absolute; inset: 0; z-index: 1; opacity: .05; mix-blend-mode: overlay; pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%25" height="100%25" filter="url(%23n)"/></svg>');
}
.hero-inner { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.hero-meta { display: flex; align-items: center; gap: .6em; color: var(--cream); font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; margin-bottom: 1.4rem; opacity: .9; }
.hero-meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red-bright); box-shadow: 0 0 0 4px rgba(229,28,62,.25); }
.hero-title { color: #fff; font-size: clamp(2.3rem, 5.4vw, 4.6rem); max-width: 18ch; text-shadow: 0 6px 30px rgba(0,0,0,.35); }
.hero-sub { color: rgba(244,237,228,.86); font-size: clamp(1rem, 1.4vw, 1.18rem); max-width: 56ch; margin-top: 1.4rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }
.hero-ctas .btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); }
@supports (backdrop-filter: blur(10px)) { .hero-ctas .btn-ghost { backdrop-filter: blur(10px); } }
.hero-ctas .btn-ghost:hover { border-color: #fff; }

.stat-strip {
  position: relative; z-index: 3; margin-top: clamp(2.5rem, 6vw, 4rem);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 40px 70px -34px rgba(21,22,27,.4);
}
.stat-cell { background: rgba(255,255,255,.94); padding: 1.5rem 1.3rem; }
@supports (backdrop-filter: blur(18px)) { .stat-cell { background: var(--glass); backdrop-filter: blur(18px) saturate(160%); } }
.stat-num { font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.2rem); color: var(--ink); }
.stat-num .suffix { color: var(--red); }
.stat-label { font-size: .82rem; color: var(--ink-soft); margin-top: .3rem; }

/* --- Marquee sector strip --- */
.sector-strip { background: var(--ink); color: var(--cream); padding-block: 1rem; overflow: hidden; }
.marquee { display: flex; width: max-content; gap: 3.5rem; animation: marquee 26s linear infinite; }
.marquee span { font-family: var(--mono); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; opacity: .75; white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- Proceso --- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.process-card { border-radius: var(--radius-lg); overflow: hidden; background: var(--paper); border: 1px solid var(--line); transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.process-card:hover { transform: translateY(-8px); box-shadow: 0 30px 50px -28px rgba(21,22,27,.3); }
.process-media { aspect-ratio: 4/3; overflow: hidden; position: relative; }
.process-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.process-card:hover .process-media img { transform: scale(1.08); }
.process-n { position: absolute; top: .9rem; left: .9rem; font-family: var(--mono); font-size: .8rem; color: #fff; background: rgba(20,10,12,.55); padding: .3em .7em; border-radius: 999px; backdrop-filter: blur(6px); }
.process-body { padding: 1.4rem 1.3rem 1.6rem; }
.process-body h3 { font-size: 1.08rem; margin-bottom: .5rem; }
.process-body p { font-size: .92rem; color: var(--ink-soft); }

/* --- Categorías --- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.cat-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 3/4;
  isolation: isolate; transform: perspective(900px) rotateX(0) rotateY(0); transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.cat-card:hover { box-shadow: 0 34px 60px -28px rgba(21,22,27,.4); }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease-out), filter .8s var(--ease-out); }
.cat-card:hover img { transform: scale(1.1); filter: saturate(1.1); }
.cat-tint { position: absolute; inset: 0; z-index: -1; background: linear-gradient(200deg, rgba(15,10,10,.15) 0%, rgba(12,7,8,.86) 88%); }
.cat-content { position: absolute; inset: auto 0 0 0; padding: 1.5rem; color: #fff; }
.cat-count { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cream); opacity: .8; }
.cat-content h3 { font-size: 1.18rem; margin-block: .4rem .5rem; }
.cat-content p { font-size: .86rem; color: rgba(244,237,228,.82); max-width: 30ch; }

/* --- Por qué elegirnos --- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.why-card { padding: 1.8rem 1.5rem; }
.why-num { font-family: var(--mono); color: var(--red); font-size: .82rem; margin-bottom: .8rem; }
.why-card h3 { font-size: 1.05rem; margin-bottom: .6rem; }
.why-card p { font-size: .9rem; color: var(--ink-soft); }

/* --- Visualizador IA --- */
.viz-section { background: var(--graphite); color: var(--cream); position: relative; overflow: clip; }
.viz-section::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 70%;
  background: radial-gradient(45% 60% at 30% 0%, rgba(196,18,47,.35), transparent 70%);
  filter: blur(90px); pointer-events: none;
}
.viz-section .section-sub { color: rgba(244,237,228,.72); }
.viz-section .kicker { color: var(--red-bright); }
.viz-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2.5rem; align-items: start; position: relative; z-index: 1; }
.viz-panel { padding: 1.8rem; }
.viz-drop {
  border: 1.5px dashed rgba(244,237,228,.3); border-radius: var(--radius-md); padding: 2.2rem 1.5rem;
  text-align: center; cursor: pointer; transition: border-color .3s var(--ease-out), background .3s var(--ease-out);
  position: relative;
}
.viz-drop:hover, .viz-drop.is-drag { border-color: var(--red-bright); background: rgba(229,28,62,.06); }
.viz-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.viz-drop-icon { width: 46px; height: 46px; margin-inline: auto .9rem; border-radius: 50%; background: rgba(244,237,228,.08); display: grid; place-items: center; }
.viz-drop p { font-size: .92rem; color: rgba(244,237,228,.75); }
.viz-drop strong { color: var(--cream); }
.viz-preview { margin-top: 1.1rem; border-radius: var(--radius-sm); overflow: hidden; display: none; }
.viz-preview.has-img { display: block; }
.viz-preview img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

.viz-products { margin-top: 1.6rem; }
.viz-products-label { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(244,237,228,.55); margin-bottom: .8rem; display: block; }
.viz-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.viz-swatch { border-radius: 12px; overflow: hidden; border: 2px solid transparent; text-align: left; background: rgba(244,237,228,.05); transition: border-color .3s var(--ease-out), transform .3s var(--ease-out); }
.viz-swatch:hover { transform: translateY(-2px); }
.viz-swatch.is-active { border-color: var(--red-bright); }
.viz-swatch img { aspect-ratio: 1/1; object-fit: cover; }
.viz-swatch span { display: block; font-size: .74rem; padding: .5em .6em; color: rgba(244,237,228,.85); line-height: 1.25; }

.viz-cta { margin-top: 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.viz-note { font-size: .78rem; color: rgba(244,237,228,.5); margin-top: .9rem; }

.viz-result { padding: 1.8rem; min-height: 420px; display: flex; flex-direction: column; }
.viz-result-frame {
  flex: 1; border-radius: var(--radius-md); overflow: hidden; position: relative;
  background: rgba(244,237,228,.04); display: grid; place-items: center; min-height: 340px;
}
.viz-result-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viz-placeholder { text-align: center; color: rgba(244,237,228,.45); padding: 2rem; font-size: .92rem; }
.viz-loading { display: none; text-align: center; color: var(--cream); }
.viz-loading.is-active { display: block; }
.viz-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(244,237,228,.2); border-top-color: var(--red-bright); margin: 0 auto 1rem; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.viz-result-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; gap: 1rem; flex-wrap: wrap; }
.viz-error { display: none; background: rgba(229,28,62,.14); border: 1px solid rgba(229,28,62,.4); color: var(--cream); padding: .9rem 1.1rem; border-radius: 12px; font-size: .88rem; margin-top: 1rem; }
.viz-error.is-active { display: block; }

/* --- Testimonios --- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.testi-card { padding: 1.8rem; display: flex; flex-direction: column; gap: 1.1rem; }
.testi-quote { font-size: .98rem; color: var(--ink-soft); flex: 1; }
.testi-quote::before { content: "\201C"; color: var(--red); font-family: var(--display); font-size: 1.4em; line-height: 0; }
.testi-person { display: flex; align-items: center; gap: .9rem; }
.testi-person strong { display: block; font-size: .95rem; }
.testi-person span { display: block; font-size: .82rem; color: var(--ink-mute); }

/* --- FAQ --- */
.faq-list { max-width: 780px; margin-inline: auto; display: flex; flex-direction: column; gap: .8rem; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--paper); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem 1.4rem; text-align: left; font-weight: 600; font-size: 1rem; }
.faq-icon { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex-shrink: 0; position: relative; transition: transform .4s var(--ease-out), background .3s var(--ease-out); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s; }
.faq-icon::before { width: 10px; height: 1.5px; }
.faq-icon::after { width: 1.5px; height: 10px; }
.faq-item.is-open .faq-icon { background: var(--red); border-color: var(--red); transform: rotate(180deg); }
.faq-item.is-open .faq-icon::before, .faq-item.is-open .faq-icon::after { background: #fff; }
.faq-item.is-open .faq-icon::after { opacity: 0; }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-out); }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a p { padding: 0 1.4rem 1.3rem; color: var(--ink-soft); font-size: .94rem; max-width: 66ch; }

/* --- CTA final --- */
.cta-final { position: relative; overflow: clip; color: #fff; }
.cta-final-bg { position: absolute; inset: 0; z-index: 0; }
.cta-final-bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-final-tint { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(143,13,34,.9), rgba(15,10,10,.94)); }
.cta-final-inner { position: relative; z-index: 1; text-align: center; max-width: 700px; margin-inline: auto; }
.cta-final h2 { font-size: clamp(2rem, 4vw, 3.1rem); color: #fff; }
.cta-final p { color: rgba(244,237,228,.85); margin-top: 1rem; font-size: 1.05rem; }
.cta-final .hero-ctas { justify-content: center; margin-top: 2rem; }

/* --- Contacto --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.5rem; }
.contact-info-list { display: flex; flex-direction: column; gap: 1.4rem; margin-top: 1.6rem; }
.contact-info-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-info-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--red-tint); color: var(--red-dark); display: grid; place-items: center; flex-shrink: 0; }
.contact-info-item strong { display: block; font-size: .92rem; }
.contact-info-item span { display: block; font-size: .88rem; color: var(--ink-soft); }
.contact-form { padding: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--paper);
  transition: border-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint); outline: none; }
.field textarea { resize: vertical; min-height: 110px; }
.field-check { display: flex; align-items: flex-start; gap: .6rem; font-size: .82rem; color: var(--ink-soft); }
.field-check input { width: 16px; height: 16px; margin-top: .2rem; accent-color: var(--red); }
.form-msg { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: 10px; font-size: .88rem; display: none; }
.form-msg.is-active { display: block; }
.form-msg.ok { background: var(--green-tint); color: var(--green); }
.form-msg.err { background: var(--red-tint); color: var(--red-dark); }

/* --- Footer --- */
.site-footer { background: var(--ink); color: rgba(244,237,228,.78); padding-block: 3.5rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-brand p { font-size: .88rem; color: rgba(244,237,228,.55); margin-top: 1rem; max-width: 32ch; }
.footer-col h4 { font-size: .82rem; color: var(--cream); text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); margin-bottom: 1rem; }
.footer-col a, .footer-col span { display: block; font-size: .88rem; padding-block: .35rem; color: rgba(244,237,228,.65); }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(244,237,228,.12); font-size: .78rem; color: rgba(244,237,228,.45); flex-wrap: wrap; gap: .8rem; }
.footer-bottom a { color: rgba(244,237,228,.65); }

/* --- Asistente IA (chat) --- */
.chat-fab {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 700;
  width: 60px; height: 60px; border-radius: 50%; background: var(--red);
  display: grid; place-items: center; color: #fff; box-shadow: 0 18px 34px -14px rgba(196,18,47,.6);
  transition: transform .4s var(--ease-bounce);
}
.chat-fab:hover { transform: scale(1.08); }
.chat-fab .dot-ping { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px var(--ink); }
.chat-panel {
  position: fixed; right: 1.5rem; bottom: 6rem; z-index: 700; width: min(370px, calc(100vw - 2.4rem));
  height: min(540px, calc(100vh - 8rem)); background: var(--paper); border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -30px rgba(21,22,27,.5); border: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(24px) scale(.97); pointer-events: none;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.chat-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.chat-head { background: var(--ink); color: #fff; padding: 1rem 1.2rem; display: flex; align-items: center; gap: .7rem; }
.chat-head strong { display: block; font-size: .92rem; }
.chat-head span { display: block; font-size: .74rem; color: rgba(244,237,228,.6); }
.chat-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.chat-close { margin-left: auto; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.chat-close:hover { background: rgba(255,255,255,.1); }
.chat-body { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .8rem; }
.chat-msg { max-width: 86%; padding: .7rem .95rem; border-radius: 14px; font-size: .88rem; line-height: 1.5; }
.chat-msg.bot { background: var(--bg); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--red); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 1.1rem 1rem; }
.chat-suggestion { font-size: .78rem; padding: .5em .85em; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); }
.chat-suggestion:hover { border-color: var(--red); color: var(--red); }
.chat-form { display: flex; gap: .6rem; padding: .9rem; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; padding: .75rem .9rem; border-radius: 999px; border: 1px solid var(--line); }
.chat-form input:focus { border-color: var(--red); outline: none; }
.chat-send { width: 42px; height: 42px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.chat-send:hover { background: var(--red-dark); }
.chat-typing { display: flex; gap: 4px; padding: .4rem 0; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-mute); animation: typingBounce 1.2s ease-in-out infinite; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* =============================================================
   7. Efectos
   ============================================================= */
[data-tilt] { transform-style: preserve-3d; will-change: transform; }
[data-count-to] { font-variant-numeric: tabular-nums; }
.magnetic { will-change: transform; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (max-width: 1023px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-burger { display: grid; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .process-grid, .cat-grid, .why-grid, .testi-grid { grid-template-columns: repeat(2, 1fr); }
  .viz-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 2.2rem; }
}
@media (max-width: 719px) {
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .process-grid, .cat-grid, .why-grid, .testi-grid { grid-template-columns: 1fr; }
  .viz-swatches { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .chat-panel { right: .7rem; left: .7rem; width: auto; bottom: 5.5rem; }
  .chat-fab { right: 1rem; bottom: 1rem; }
}
@media (min-width: 1280px) { .container { padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2)); } }

/* =============================================================
   9. Reduced-motion — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-meta .dot { animation: none; }
  .hero-mesh { animation: none; }
  .marquee { animation-duration: 60s; }
  .chat-fab .dot-ping { animation: none; }
}
